View source: R/tokens_recompile.R
| tokens_recompile | R Documentation |
This function reassign tokens IDs after changes in removal or transformation of tokens. It update token IDs to ensure that they are unique and dense. Usually, this function is only applied to tokens_xptr objects at the end of text pre-processing.
tokens_recompile(x, force = FALSE)
x |
the tokens_xptr object. |
force |
if |
toks <- tokens(c(one = "a b c d A B C D",
two = "A B C d"), xptr = TRUE)
toks <- tokens_tolower(toks)
types(toks)
types(tokens_recompile(toks))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.