public class ProtectedTermFilter extends ConditionalTokenFilter
AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
ProtectedTermFilter(CharArraySet protectedTerms,
TokenStream input,
Function<TokenStream,TokenStream> inputFactory)
Creates a new ProtectedTermFilter
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
shouldFilter()
Whether or not to execute the wrapped TokenFilter(s) for the current token
|
close, end, incrementToken, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public ProtectedTermFilter(CharArraySet protectedTerms, TokenStream input, Function<TokenStream,TokenStream> inputFactory)
protectedTerms
- the set of terms to skip the wrapped filters forinput
- the input TokenStreaminputFactory
- a factory function to create the wrapped filter(s)protected boolean shouldFilter()
ConditionalTokenFilter
shouldFilter
in class ConditionalTokenFilter
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.