Class StempelFilter
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.lucene.analysis.TokenFilter
-
- org.apache.lucene.analysis.stempel.StempelFilter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class StempelFilter extends org.apache.lucene.analysis.TokenFilterTransforms the token stream as per the stemming algorithm.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!
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MIN_LENGTHMinimum length of input words to be processed.
-
Constructor Summary
Constructors Constructor Description StempelFilter(org.apache.lucene.analysis.TokenStream in, StempelStemmer stemmer)Create filter using the supplied stemming table.StempelFilter(org.apache.lucene.analysis.TokenStream in, StempelStemmer stemmer, int minLength)Create filter using the supplied stemming table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanincrementToken()Returns the next input Token, after being stemmed-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
-
-
-
-
Field Detail
-
DEFAULT_MIN_LENGTH
public static final int DEFAULT_MIN_LENGTH
Minimum length of input words to be processed. Shorter words are returned unchanged.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StempelFilter
public StempelFilter(org.apache.lucene.analysis.TokenStream in, StempelStemmer stemmer)Create filter using the supplied stemming table.- Parameters:
in- input token streamstemmer- stemmer
-
StempelFilter
public StempelFilter(org.apache.lucene.analysis.TokenStream in, StempelStemmer stemmer, int minLength)Create filter using the supplied stemming table.- Parameters:
in- input token streamstemmer- stemmerminLength- For performance reasons words shorter than minLength characters are not processed, but simply returned.
-
-
Method Detail
-
incrementToken
public boolean incrementToken() throws IOExceptionReturns the next input Token, after being stemmed- Specified by:
incrementTokenin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
-