There seems to be an error caused whenever dfm is called with an input that contains only non-characters as the last element, with stem and removeNumbers/removePunct set to true.
Reproducible error examples:
dfm(c("one", "0"), stem = TRUE, removeNumbers = TRUE)
dfm(c("one", "!!"), stem = TRUE, removePunct = TRUE)
On the other hand, the following code runs without any error.
dfm(wordstem(tokenize(c("one", "0"), removeNumbers = TRUE)))
There seems to be an error caused whenever dfm is called with an input that contains only non-characters as the last element, with stem and removeNumbers/removePunct set to true.
Reproducible error examples:
On the other hand, the following code runs without any error.
dfm(wordstem(tokenize(c("one", "0"), removeNumbers = TRUE)))