stylest2_terms {stylest2} | R Documentation |
Select terms above frequency cutoff
Description
A function to select terms for inclusion in a stylest2 model, based on a document-feature matrix of texts to predict and a specified cutoff.
Usage
stylest2_terms(dfm, cutoff)
Arguments
dfm |
a quanteda |
cutoff |
a single numeric value - the quantile of term frequency under which to drop terms. |
Value
A character vector of terms falling above the term frequency cutoff.
Examples
data(novels_dfm)
best_cut <- stylest2_select_vocab(dfm=novels_dfm)
stylest2_terms(dfm = novels_dfm, cutoff=best_cut$cutoff_pct_best)
[Package stylest2 version 0.1 Index]