|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.text.preprocessing.filter.SingleLabelFilterBase
public abstract class SingleLabelFilterBase
A base for ILabelFilter implementations that handle each label independently.
| Constructor Summary | |
|---|---|
SingleLabelFilterBase()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.carrot2.text.preprocessing.filter.ILabelFilter |
|---|
isEnabled |
| Constructor Detail |
|---|
public SingleLabelFilterBase()
| Method Detail |
|---|
public void filter(PreprocessingContext context,
boolean[] acceptedStems,
boolean[] acceptedPhrases)
ILabelFilter
filter 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 out
public 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 made
public 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
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||