powered by
Create a dictionary with information on all words in a corpus.
dictionary(dtm, remove_stopwords = FALSE)
A DocumentTermMatrix object.
DocumentTermMatrix
Whether stopwords should be removed from the dictionary.
A data.frame with row names indicating the terms, and columns giving the stem, the number of occurrences, and whether the term is a stopword.
data.frame
# NOT RUN { file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva") corpus <- import_corpus(file, "factiva", language="en") dtm <- build_dtm(corpus) dictionary(dtm) # }
Run the code above in your browser using DataLab