# NOT RUN {
# Simple example
wordStem(c("win", "winning", "winner"))
# Test the supplied vocabulary
for(lang in getStemLanguages()) {
load(system.file("words", paste0(lang, ".RData"), package="SnowballC"))
stopifnot(all(wordStem(voc[[1]], lang) == voc[[2]]))
}
stopifnot(is.na(wordStem(NA)))
# }
Run the code above in your browser using DataLab