Skip to content

Creating document-feature matrix from already stemmed token fails #117

Description

@AdroMine

Using quanteda 0.9.5.8 with both R 3.2.3 on Windows 7 x64. If I try to create a dfm from already stemmed tokens (stemmed using wordstem() ), I get an error. Using stem within the dfm command does work however.

Reproducible Code -->

corp <- corpus(inaugTexts)
tokens <- tokenize(corp)
stemTokens <- wordstem(tokens)
dfm1 <- dfm(stemTokens)

Creating a dfm from a tokenizedTexts object ...
   ... indexing documents: 57 documents
   ... indexing features: 6,257 feature types
Error in (function (cl, name, valueClass)  : 
  assignment of an object of classNULLis not valid for @ngramsin an object of classdfmSparse”; is(value, "integer") is not TRUE

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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