tm_map.DCorpus {tm.plugin.dc} | R Documentation |
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 'DCorpus'
tm_map(x, FUN, ...)
Arguments
x |
A distributed corpus of class |
FUN |
a transformation function taking a text document as input and
returning a text document. The function |
... |
arguments to |
Value
A DCorpus
with FUN
applied to each document in
x
. If revisions are enabled, the original documents contained
in x
can be retrieved via getting back to the corresponding
revision using the function setRevision()
.
See Also
getTransformations
for available transformations in package
tm.
Examples
data("crude")
tm_map(as.DCorpus(crude), content_transformer(tolower))
[Package tm.plugin.dc version 0.2-10 Index]