Content Transformers
Create content transformers, i.e., functions which modify the content of an R object.
content_transformer(FUN)
FUN |
a function. |
A function with two arguments:
tm_map for an interface to apply transformations to corpora.
data("crude")
crude[[1]]
(f <- content_transformer(function(x, pattern) gsub(pattern, "", x)))
tm_map(crude, f, "[[:digit:]]+")[[1]]Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.