Constructor and Description |
---|
Stemmer(Sequence<Token> prev,
Trie stemmer)
Construct a Stem object using the given stemmer table.
|
Modifier and Type | Method and Description |
---|---|
Token |
action(Token t)
A simple stemming algorithm which works as follows:
|
void |
setStemmer(Trie stemmer)
Sets the stemmer attribute of the Stem object
|
getPrevTokenizer, next, setPrevTokenizer
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.
Copyright © 2016 Egothor. All Rights Reserved.