Description Usage Arguments Value
After tokenization, use this function to replace all occurrences of a given term with a new term, whether the new term is in the existing vocabulary or not.
1 2 | remap.terms(term.map = data.frame(), term.id = integer(),
vocab = character())
|
term.map |
data.frame with two columns, the first of which contains the terms to be replaced, and the second of which contains their replacements. If a replacement is not in the current vocabulary, it will be added to the vocabulary. |
term.id |
an integer vector containing the term ID number of every token in the corpus. Should take values between 1 and W, where W is the number of terms in the vocabulary. |
vocab |
a character vector of length W, containing
the terms in the vocabulary. This vector must align with
|
Returns a list of length two. The first element,
new.vocab
, is a character vector containing the new
vocabulary. The second element, new.term.id
is the
new vector of term ID numbers for all tokens in the data,
taking integer values from 1 to the length of the new
vocabulary.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.