I work with my App in Java and i use Lucene 4.1.0 to use Porter Stemmer method. I have read and implementing this
this is my code
import org.apache.lucene.analysis.snowball.*;
import org.tartarus.snowball.ext.PorterStemmer;
private String stemmer(String word){
PorterStemmer obj = new PorterStemmer();
obj.setCurrent(word);
obj.stem();
return obj.getCurrent();
}
this method works, but Porter Stemmer did not work properly for some words e.g :
Maybe theres a bug in the algorithm? How to solve this problem?
Porter Stemmer Algorithm is expected to convert source >> sourc. Please read more about porter stemmer algorithm from here