public final class TypeTokenFilter extends FilteringTokenFilter
AttributeSource.StateinputDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
TypeTokenFilter(TokenStream input,
Set<String> stopTypes)
Create a new
TypeTokenFilter that filters tokens out
(useWhiteList=false). |
TypeTokenFilter(TokenStream input,
Set<String> stopTypes,
boolean useWhiteList)
Create a new
TypeTokenFilter. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept()
By default accept the token if its type is not a stop type.
|
end, incrementToken, resetcloseaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic TypeTokenFilter(TokenStream input, Set<String> stopTypes, boolean useWhiteList)
TypeTokenFilter.input - the TokenStream to consumestopTypes - the types to filteruseWhiteList - if true, then tokens whose type is in stopTypes will
be kept, otherwise they will be filtered outpublic TypeTokenFilter(TokenStream input, Set<String> stopTypes)
TypeTokenFilter that filters tokens out
(useWhiteList=false).protected boolean accept()
accept in class FilteringTokenFilterCopyright © 2000-2024 Apache Software Foundation. All Rights Reserved.