I'm trying to use both a bigram and a trigram using tidytext. What code could I use for the token to look for 2 and 3 words.
This is the code for using bigrams only:
library(tidytext)
library(janeaustenr)
austen_bigrams <- austen_books() %>%
unnest_tokens(bigram, text, token = "ngrams", n = 2)
austen_bigrams