@Bindable(prefix="NumericLabelFilter") public class NumericLabelFilter extends SingleLabelFilterBase
Modifier and Type | Field and Description |
---|---|
boolean |
enabled
Remove numeric labels.
|
Constructor and Description |
---|
NumericLabelFilter() |
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 numeric labels") @Level(value=BASIC) @Group(value="Labels") public boolean enabled
public boolean acceptPhrase(PreprocessingContext context, int phraseIndex)
SingleLabelFilterBase
true
if the phrase located at phraseIndex
is to be accepted, false
otherwise.acceptPhrase
in class SingleLabelFilterBase
context
- 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)
SingleLabelFilterBase
true
if the word located at wordIndex
is to
be accepted, false
otherwise.acceptWord
in class SingleLabelFilterBase
context
- 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
.