View source: R/feature_information.r
feature_stats | R Documentation |
Compute a number of useful statistics for features: term frequency, idf, etc.
feature_stats(tc, feature, context_level = c("document", "sentence"))
tc |
a tCorpus |
feature |
The name of the feature column |
context_level |
Should results be returned at document or sentence level |
a data.frame
tc = create_tcorpus(c('Text one first sentence. Text one second sentence', 'Text two'),
split_sentences = TRUE)
fs = feature_stats(tc, 'token')
head(fs)
fs = feature_stats(tc, 'token', context_level = 'sentence')
head(fs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.