public final class StempelFilter extends TokenFilter
Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!
AttributeSource.AttributeFactory, AttributeSource.State
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MIN_LENGTH
Minimum length of input words to be processed.
|
input
Constructor and Description |
---|
StempelFilter(TokenStream in,
StempelStemmer stemmer)
Create filter using the supplied stemming table.
|
StempelFilter(TokenStream in,
StempelStemmer stemmer,
int minLength)
Create filter using the supplied stemming table.
|
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken()
Returns the next input Token, after being stemmed
|
close, end, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public static final int DEFAULT_MIN_LENGTH
public StempelFilter(TokenStream in, StempelStemmer stemmer)
in
- input token streamstemmer
- stemmerpublic StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)
in
- input token streamstemmer
- stemmerminLength
- For performance reasons words shorter than minLength
characters are not processed, but simply returned.public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException