@Test public void testStemming() { Assert.assertEquals(stemmer.stem("deny"), "deni" ); Assert.assertEquals(stemmer.stem("declining"), "declin" ); Assert.assertEquals(stemmer.stem("diversity"), "divers" ); Assert.assertEquals(stemmer.stem("divers"), "diver" ); Assert.assertEquals(stemmer.stem("dental"), "dental" ); }
public String stem(String s) { if (stem(s.toCharArray(), s.length())) return toString(); else return s; }
PorterStemmer implements Stemmer { public String stem(String s) { if (stem(s.toCharArray(), s.length())) return toString(); else return s; } }
PorterStemmer implements Stemmer { public String stem(String s) { if (stem(s.toCharArray(), s.length())) return toString(); else return s; } PorterStemmer(); }
PorterStemmer implements Stemmer { public String stem(String s) { if (stem(s.toCharArray(), s.length())) return toString(); else return s; } PorterStemmer(); void reset(); void add(char ch); @Override String toString(); int getResultLength(); char[] getResultBuffer(); String stem(String s); CharSequence stem(CharSequence word); boolean stem(char[] word); boolean stem(char[] wordBuffer, int offset, int wordLen); boolean stem(char[] word, int wordLen); boolean stem(); boolean stem(int i0); }
PorterStemmer implements Stemmer { public String stem(String s) { if (stem(s.toCharArray(), s.length())) return toString(); else return s; } PorterStemmer(); void reset(); void add(char ch); @Override String toString(); int getResultLength(); char[] getResultBuffer(); String stem(String s); CharSequence stem(CharSequence word); boolean stem(char[] word); boolean stem(char[] wordBuffer, int offset, int wordLen); boolean stem(char[] word, int wordLen); boolean stem(); boolean stem(int i0);  }