| tokens_match | R Documentation |
Match the token types and IDs of multiple tokens objects using a character vector.
tokens_match(x, types, verbose = quanteda_options("verbose"))
x |
the tokens object. |
types |
character vector for the token types to be matched in the resulting
tokens. Tokens not included in |
verbose |
if |
dfm_match
txt <- c("This is text one", "The text two", "This is text three")
(toks1 <- tokens(txt[1:2]))
(toks2 <- tokens(txt[2:3]))
(toks3 <- tokens_match(toks1, types(toks2)))
identical(types(toks2), types(toks3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.