Skip to content

Error caused when dfm called with only non-characters the last element, and  #181

Description

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)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions