dictionary: dictionary

Description Usage Arguments Value Examples

View source: R/dictionary.R

Description

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

Usage

1
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

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

R.temis documentation built on May 13, 2021, 1:08 a.m.

Related to dictionary in R.temis...