@Bindable(prefix="QueryLabelFilter") public class QueryLabelFilter extends SingleLabelFilterBase
| Modifier and Type | Field and Description |
|---|---|
boolean |
enabled
Remove query words.
|
| Constructor and Description |
|---|
QueryLabelFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptPhrase(PreprocessingContext context,
int phraseIndex)
Should return
true if the phrase located at phraseIndex
is to be accepted, false otherwise. |
boolean |
acceptWord(PreprocessingContext context,
int wordIndex)
Should return
true if the word located at wordIndex is to
be accepted, false otherwise. |
boolean |
isEnabled() |
filter@Input @Processing @Attribute @Label(value="Remove query words") @Level(value=BASIC) @Group(value="Labels") public boolean enabled
public boolean acceptPhrase(PreprocessingContext context, int phraseIndex)
SingleLabelFilterBasetrue if the phrase located at phraseIndex
is to be accepted, false otherwise.acceptPhrase in class SingleLabelFilterBasecontext - provides access to all information about the phrasephraseIndex - index of the phrase for which decision is to be madepublic boolean acceptWord(PreprocessingContext context, int wordIndex)
SingleLabelFilterBasetrue if the word located at wordIndex is to
be accepted, false otherwise.acceptWord in class SingleLabelFilterBasecontext - provides access to all information about the wordwordIndex - index of the word for which decision is to be madepublic boolean isEnabled()
true if the filter is to be applied, false if the
filter should be omitted by the LabelFilterProcessor.