public abstract class SingleLabelFilterBase extends Object implements ILabelFilter
ILabelFilter implementations that handle each label independently.| Constructor and Description |
|---|
SingleLabelFilterBase() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
acceptPhrase(PreprocessingContext context,
int phraseIndex)
Should return
true if the phrase located at phraseIndex
is to be accepted, false otherwise. |
abstract boolean |
acceptWord(PreprocessingContext context,
int wordIndex)
Should return
true if the word located at wordIndex is to
be accepted, false otherwise. |
void |
filter(PreprocessingContext context,
boolean[] acceptedStems,
boolean[] acceptedPhrases)
Called to perform label filtering.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEnabledpublic void filter(PreprocessingContext context, boolean[] acceptedStems, boolean[] acceptedPhrases)
ILabelFilterfilter in interface ILabelFiltercontext - contains words and phrases to be filteredacceptedStems - the filter should set to false those elements
that correspond to the stems to be filtered outacceptedPhrases - the filter should set to false those elements
that correspond to the phrases to be filtered outpublic abstract boolean acceptWord(PreprocessingContext context, int wordIndex)
true if the word located at wordIndex is to
be accepted, false otherwise.context - provides access to all information about the wordwordIndex - index of the word for which decision is to be madepublic abstract boolean acceptPhrase(PreprocessingContext context, int phraseIndex)
true if the phrase located at phraseIndex
is to be accepted, false otherwise.context - provides access to all information about the phrasephraseIndex - index of the phrase for which decision is to be made