public final class MockTokenFilter extends TokenFilter
.{12,}
to act like a lengthfilter
AttributeSource.State
Modifier and Type | Field and Description |
---|---|
static CharacterRunAutomaton |
EMPTY_STOPSET
Empty set of stopwords
|
static CharacterRunAutomaton |
ENGLISH_STOPSET
Set of common english stopwords
|
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
MockTokenFilter(TokenStream input,
CharacterRunAutomaton filter)
Create a new MockTokenFilter.
|
Modifier and Type | Method and Description |
---|---|
void |
end() |
boolean |
incrementToken() |
void |
reset() |
close
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public static final CharacterRunAutomaton EMPTY_STOPSET
public static final CharacterRunAutomaton ENGLISH_STOPSET
public MockTokenFilter(TokenStream input, CharacterRunAutomaton filter)
input
- TokenStream to filterfilter
- DFA representing the terms that should be removed.public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void end() throws IOException
end
in class TokenFilter
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.