Interface to apply filter and index functions to corpora.
Usage
## S3 method for class 'PCorpus':
tm_filter(x, FUN, \dots)
## S3 method for class 'VCorpus':
tm_filter(x, FUN, \dots)
## S3 method for class 'PCorpus':
tm_index(x, FUN, \dots)
## S3 method for class 'VCorpus':
tm_index(x, FUN, \dots)
Arguments
x
A corpus.
FUN
a filter function taking a text document as input and returning a
logical value.
...
arguments to FUN.
Value
tm_filter returns a corpus containing documents where
FUN matches, whereas tm_index only returns the
corresponding indices.