as.tokens.dfm {sentopics} | R Documentation |
Convert back a dfm to a tokens object
Description
Convert back a dfm to a tokens object
Usage
## S3 method for class 'dfm'
as.tokens(
x,
concatenator = NULL,
tokens = NULL,
ignore_list = NULL,
case_insensitive = FALSE,
padding = TRUE,
...
)
Arguments
x |
quanteda::dfm to be coerced |
concatenator |
only used for consistency with the generic |
tokens |
optionally, the tokens from which the dfm was created. Providing the initial tokens will ensure that the word order will be respected in the coerced object. |
ignore_list |
a character vector of words that should not be removed
from the initial tokens object. Useful to avoid removing some lexicon word
following the usage of |
case_insensitive |
only used when the |
padding |
if |
... |
unused |
Value
a quanteda quanteda::tokens object.
See Also
quanteda::as.tokens()
quanteda::dfm()
Examples
library("quanteda")
dfm <- dfm(ECB_press_conferences_tokens, tolower = FALSE)
dfm <- dfm_trim(dfm, min_termfreq = 200)
as.tokens(dfm)
as.tokens(dfm, tokens = ECB_press_conferences_tokens)
as.tokens(dfm, tokens = ECB_press_conferences_tokens, padding = FALSE)