public final class GermanStemFilter extends TokenFilter
TokenFilter
that stems German words.
It supports a table of words that should
not be stemmed at all. The stemmer used can be changed at runtime after the
filter object is created (as long as it is a GermanStemmer
).
To prevent terms from being stemmed use an instance of
SetKeywordMarkerFilter
or a custom TokenFilter
that sets
the KeywordAttribute
before this TokenStream
.
SetKeywordMarkerFilter
AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
GermanStemFilter(TokenStream in)
Creates a
GermanStemFilter instance |
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken() |
void |
setStemmer(GermanStemmer stemmer)
Set a alternative/custom
GermanStemmer for this filter. |
close, end, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public GermanStemFilter(TokenStream in)
GermanStemFilter
instancein
- the source TokenStream
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void setStemmer(GermanStemmer stemmer)
GermanStemmer
for this filter.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.