a problem with applyDictionary(), example:
mydict <- dictionary(list(nonExistent = c("XXX", "YYY")))
mydfm <- dfm(inaugCorpus, dictionary = mydict)
Creating a dfm from a corpus ...
... lowercasing
... tokenizing
... indexing documents: 57 documents
... indexing features: 9,215 feature types
... applying a dictionary consisting of 1 key
... created a 57 x 1 sparse dfm
... complete.
Elapsed time: 0.115 seconds.
topfeatures(mydfm)
nonExistent
0
mydfm <- dfm(inaugCorpus, thesaurus = mydict)
Creating a dfm from a corpus ...
... lowercasing
... tokenizing
... indexing documents: 57 documents
... indexing features: 9,215 feature types
... applying a dictionary consisting of 1 key
Show Traceback
Rerun with Debug
Error in -keyIndex : invalid argument to unary operator
Thanks Luc Frachon luc.frachon@gmail.com for discovering this.
a problem with applyDictionary(), example:
Thanks Luc Frachon luc.frachon@gmail.com for discovering this.