|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.process.Stemmer
Stemmer, implementing the Porter Stemming Algorithm The Stemmer class transforms a word into its root form. The input word can be provided a character at time (by calling add()), or at once by calling one of the various stem(something) methods.
Constructor Summary | |
Stemmer()
|
Method Summary | |
Object |
apply(Object word)
Stems word (which must be a Word ,
or else
a ClassCastException will be thrown, and returns stemmed
Word . |
static void |
main(String[] args)
Test program for demonstrating the Stemmer. |
String |
stem(String s)
Stems s and returns stemmed String . |
Word |
stem(Word w)
Stems w and returns stemmed Word . |
String |
toString()
After a word has been stemmed, it can be retrieved by toString(), or a reference to the internal buffer can be retrieved by getResultBuffer and getResultLength (which is generally more efficient.) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Stemmer()
Method Detail |
public String toString()
toString
in class Object
public static void main(String[] args)
public String stem(String s)
s
and returns stemmed String
.
public Word stem(Word w)
w
and returns stemmed Word
.
public Object apply(Object word)
word
(which must be a Word
,
or else
a ClassCastException will be thrown, and returns stemmed
Word
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |