# Simple example
wordStem(c("win", "winning", "winner"))
# Test some of the vocabulary supplied at https://github.com/snowballstem/snowball-data
for(lang in getStemLanguages()) {
load(system.file("words", paste0(lang, ".RData"), package="SnowballC"))
stopifnot(all(wordStem(dat$words, lang) == dat$stem))
}
stopifnot(is.na(wordStem(NA)))
Run the code above in your browser using DataLab