Generate an annotator which computes word stem annotations using
wordStem()
from package SnowballC.
Snowball_Stem_Annotator(language = "porter")
A Annotator
object giving the generated word stem
annotator.
a character string giving the document language.
See the documentation for wordStem()
for
more information.
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)
stem_annotator <- Snowball_Stem_Annotator()
stem_annotator(s, a)
Run the code above in your browser using DataLab