Learn R Programming

tm.plugin.dc (version 0.1-7)

tm_map.DistributedCorpus: Transformations on Distributed Corpora

Description

Interface to apply transformation functions to distributed corpora. See tm_map in tm for more information.

Usage

## S3 method for class 'DistributedCorpus':
tm_map(x, FUN, \dots, useMeta = FALSE, lazy = FALSE)

Arguments

x
A distributed corpus.
FUN
A transformation function returning a text document.
...
Arguments to FUN.
useMeta
Logical. Should DMetaData be passed over to FUN as argument?
lazy
FALSE. Only available to be compatible with standard tm mapping routines. Lazy evaluation is not supported in the Hadoop framework.

Value

  • A corpus with FUN applied to each document in x.

See Also

getTransformations for available transformations.

Examples

Run this code
data("crude")
tm_map(as.DistributedCorpus(crude), tolower)

Run the code above in your browser using DataLab