VCorpus: Volatile Corpora

Description Usage Arguments Details Value See Also Examples

Description

Create volatile corpora.

Usage

1
2
VCorpus(x, readerControl = list(reader = reader(x), language = "en"))
as.VCorpus(x)

Arguments

x

For VCorpus a Source object, and for as.VCorpus an R object.

readerControl

a named list of control parameters for reading in content from x.

reader

a function capable of reading in and processing the format delivered by x.

language

a character giving the language (preferably as IETF language tags, see language in package NLP). The default language is assumed to be English ("en").

Details

A volatile corpus is fully kept in memory and thus all changes only affect the corresponding R object.

Value

An object inheriting from VCorpus and Corpus.

See Also

Corpus for basic information on the corpus infrastructure employed by package tm.

PCorpus provides an implementation with permanent storage semantics.

Examples

1
2
3
reut21578 <- system.file("texts", "crude", package = "tm")
VCorpus(DirSource(reut21578, mode = "binary"),
        list(reader = readReut21578XMLasPlain))

Example output

Loading required package: NLP
<<VCorpus>>
Metadata:  corpus specific: 0, document level (indexed): 0
Content:  documents: 20

tm documentation built on May 2, 2019, 2:43 a.m.