dictionary {R.temis}R Documentation

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


file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva")
corpus <- import_corpus(file, "factiva", language="en")
dtm <- build_dtm(corpus)
dictionary(dtm)


[Package R.temis version 0.1.3 Index]