Reference

Class

RiTa

Name

RiTa.stem

Description Extracts base roots from a word according to the specified stemming algorithm
 
Note: see http://text-processing.com/demo/stem/ for comparison of Lancaster and Porter algorithms or http://mpii.de/yago-naga/javatools for info on PlingStemmer
Syntax
RiTa.stem(word, type);
Parameters
Stringthe word to analyze
StringChoose RiTa.PORTER (the default), RiTa.LANCASTER, or RiTa.PLING, to specify the stemming algorithm to use
Returns
Stringthe stemmed form of 'word'
Example

s = RiTa.stem("cakes"); // returns -> cake

y = RiTa.stem("cakes", RiTa.LANCASTER);

Platform Java / Javascript