public final class KStemFilter extends TokenFilter
See "Viewing Morphology as an Inference Process" (Krovetz, R., Proceedings of the Sixteenth Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 191-203, 1993).
All terms must already be lowercased for this filter to work correctly.
Note: This filter is aware of the KeywordAttribute. To prevent
certain terms from being passed to the stemmer
KeywordAttribute.isKeyword() should be set to true
in a previous TokenStream.
Note: For including the original term as well as the stemmed version, see
KeywordRepeatFilterFactory
AttributeSource.StateinputDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
KStemFilter(TokenStream in) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken()
Returns the next, stemmed, input Token.
|
close, end, resetaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic KStemFilter(TokenStream in)
public boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOException - If there is a low-level I/O error.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.