|
Carrot2 v3.3.0
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
org.carrot2.text.preprocessing.filter.GenitiveLabelFilter
public class GenitiveLabelFilter
Accepts labels that do not end in words in the Saxon Genitive form (e.g. "Threatening the Country's").
| Field Summary | |
|---|---|
boolean |
enabled
Remove labels ending in genitive form. |
| Constructor Summary | |
|---|---|
GenitiveLabelFilter()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.carrot2.text.preprocessing.filter.SingleLabelFilterBase |
|---|
filter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean enabled
| Constructor Detail |
|---|
public GenitiveLabelFilter()
| Method Detail |
|---|
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 made
public 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.
|
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 | ||||||||