Description Usage Arguments Value See Also Examples
Interface to apply transformation functions to distributed
corpora. See tm_map
in tm for more information.
1 2 | ## S3 method for class 'DCorpus'
tm_map(x, FUN, ...)
|
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 |
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()
.
getTransformations
for available transformations in package
tm.
1 2 | data("crude")
tm_map(as.DCorpus(crude), content_transformer(tolower))
|
Loading required package: DSL
Loading required package: tm
Loading required package: NLP
<<DCorpus>>
Metadata: corpus specific: 0, document level (indexed): 0
Content: documents: 20
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.