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.State
input
DEFAULT_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, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public KStemFilter(TokenStream in)
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
- If there is a low-level I/O error.Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.