Skip to content
RDocumentation: term_stats
Note that this notebook was automatically generated from an RDocumentation page. It depends on the package and the example code whether this code will run without errors. You may need to edit the code to make things work.
if(!require('corpus')) {
install.packages('corpus')
library('corpus')
}term_stats("A rose is a rose is a rose.")
# remove punctuation and English stop words
term_stats("A rose is a rose is a rose.",
text_filter(drop_symbol = TRUE, drop = stopwords_en))
# unigrams, bigrams, and trigrams
term_stats("A rose is a rose is a rose.", ngrams = 1:3)
# also include the type information
term_stats("A rose is a rose is a rose.", ngrams = 1:3, types = TRUE)