R.temis (version 0.1.3)

dictionary: dictionary

Description

Create a dictionary with information on all words in a corpus.

Usage

dictionary(dtm, remove_stopwords = FALSE)

Arguments

dtm

A DocumentTermMatrix object.

remove_stopwords

Whether stopwords should be removed from the dictionary.

Value

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.

Examples

Run this code
# 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