public final class CommonGramsQueryFilter extends TokenFilter
AttributeSource.AttributeFactory, AttributeSource.State| Constructor and Description |
|---|
CommonGramsQueryFilter(CommonGramsFilter input)
Constructs a new CommonGramsQueryFilter based on the provided CommomGramsFilter
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken()
Output bigrams whenever possible to optimize queries.
|
boolean |
isGramType()
Convenience method to check if the current type is a gram type
|
void |
reset()
This method is called by a consumer before it begins consumption using
TokenStream.incrementToken(). |
close, endaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringpublic CommonGramsQueryFilter(CommonGramsFilter input)
input - CommonGramsFilter the QueryFilter will usepublic void reset()
throws IOException
TokenStream.incrementToken().
Resets this stream to a clean state. Stateful implementations must implement this method so that they can be reused, just as if they had been created fresh.
If you override this method, always call super.reset(), otherwise
some internal state will not be correctly reset (e.g., Tokenizer will
throw IllegalStateException on further usage).
NOTE:
The default implementation chains the call to the input TokenStream, so
be sure to call super.reset() when overriding this method.
reset in class TokenFilterIOExceptionpublic boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic boolean isGramType()
true if the current type is a gram type, false otherwiseCopyright © 2010 - 2020 Adobe. All Rights Reserved