| BOW_train | R Documentation |
Train a Bag-of-Words Model
BOW_train(doc, weighting_scheme = "bow", ngram_size = 1)
doc |
A character vector of documents to be processed. |
weighting_scheme |
A string specifying the weighting to apply.
Defaults to
|
ngram_size |
An integer specifying the maximum n-gram size. For example, 'ngram_size = 1' will create unigrams only; 'ngram_size = 2' will create unigrams and bigrams. Defaults to 1. |
An object of class "qs_bow_fit" containing:
dfm_template: a quanteda dfm template
weighting_scheme: the weighting used
ngram_size: the n-gram size used
#'
txt <- c("text one", "text two text")
fit <- BOW_train(txt, weighting_scheme = "bow")
fit$dfm_template
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.