get_ngrams.Rd
Access n-grams tokens of documents as a vector.
get_ngrams(document, ...) # S3 method for document get_ngrams(document, ...) # S3 method for documents get_ngrams(document, ...) # S3 method for corpus get_ngrams(document, ...)
document | A document as returned by the |
---|---|
... | Any other positional arguments. |
A tibble of ngrams and their occurences.
# NOT RUN { init_textanalysis() # build document doc <- string_document("This is a document.") # extract n-grams get_ngrams(doc) get_ngrams(doc, 2L) # }