Dictionary {tm}R Documentation

Dictionary

Description

Constructs a dictionary from a character vector or a term-document matrix.

Usage

## S3 method for class 'character':
Dictionary(x)
## S3 method for class 'TermDocumentMatrix':
Dictionary(x)

Arguments

x A character vector or a term-document matrix holding the terms for the dictionary.

Value

An S4 object of class Dictionary which extends the class character representing a dictionary.

Author(s)

Ingo Feinerer

Examples

Dictionary(c("some", "tokens"))
data(crude)
Dictionary(TermDocumentMatrix(crude))

[Package tm version 0.3-4.1 Index]