|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.egothor.core.Filter
org.egothor.parser.filter.Stemmer
public final class Stemmer
The Stemmer object is a filter which transforms all words to their respective stems.
| Field Summary |
|---|
| Fields inherited from class org.egothor.core.Filter |
|---|
prev |
| Constructor Summary | |
|---|---|
Stemmer(Sequence<Token> prev,
Trie stemmer)
Construct a Stem object using the given stemmer table. |
|
| Method Summary | |
|---|---|
Token |
action(Token t)
A simple stemming algorithm which works as follows: |
void |
setStemmer(Trie stemmer)
Sets the stemmer attribute of the Stem object |
| Methods inherited from class org.egothor.core.Filter |
|---|
getPrevTokenizer, next, setPrevTokenizer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Stemmer(Sequence<Token> prev,
Trie stemmer)
prev - this filter's Tokenizerstemmer - the stemmer table| Method Detail |
|---|
public void setStemmer(Trie stemmer)
stemmer - The new stemmer valuepublic Token action(Token t)
If the token is <WORD>, and the text of the
token is longer than 4 characters, then the token's text is
transformed to its stem. The transformation will not be done when
the stem is shorter than three characters.
action in class Filtert - the Token
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||