public final class PatternKeywordMarkerFilter extends KeywordMarkerFilter
KeywordAttribute. Each token
that matches the provided pattern is marked as a keyword by setting
KeywordAttribute.setKeyword(boolean) to true.AttributeSource.StateinputDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
PatternKeywordMarkerFilter(TokenStream in,
Pattern pattern)
Create a new
PatternKeywordMarkerFilter, that marks the current
token as a keyword if the tokens term buffer matches the provided
Pattern via the KeywordAttribute. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isKeyword() |
incrementTokenclose, end, resetaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic PatternKeywordMarkerFilter(TokenStream in, Pattern pattern)
PatternKeywordMarkerFilter, that marks the current
token as a keyword if the tokens term buffer matches the provided
Pattern via the KeywordAttribute.in - TokenStream to filterpattern - the pattern to apply to the incoming term bufferprotected boolean isKeyword()
isKeyword in class KeywordMarkerFilterCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.