Class GenitiveLabelFilter
java.lang.Object
org.carrot2.attrs.AttrComposite
org.carrot2.text.preprocessing.filter.SingleLabelFilterBase
org.carrot2.text.preprocessing.filter.GenitiveLabelFilter
- All Implemented Interfaces:
AcceptingVisitor
,LabelFilter
public class GenitiveLabelFilter extends SingleLabelFilterBase
Accepts labels that do not end in words in the Saxon Genitive form (e.g. "Threatening the
Country's").
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GenitiveLabelFilter()
-
Method Summary
Modifier and Type Method Description boolean
acceptPhrase(PreprocessingContext context, int phraseIndex)
Should returntrue
if the phrase located atphraseIndex
is to be accepted,false
otherwise.boolean
acceptWord(PreprocessingContext context, int wordIndex)
Should returntrue
if the word located atwordIndex
is to be accepted,false
otherwise.
-
Constructor Details
-
GenitiveLabelFilter
public GenitiveLabelFilter()
-
-
Method Details
-
acceptPhrase
Description copied from class:SingleLabelFilterBase
Should returntrue
if the phrase located atphraseIndex
is to be accepted,false
otherwise.- Specified by:
acceptPhrase
in classSingleLabelFilterBase
- Parameters:
context
- provides access to all information about the phrasephraseIndex
- index of the phrase for which decision is to be made
-
acceptWord
Description copied from class:SingleLabelFilterBase
Should returntrue
if the word located atwordIndex
is to be accepted,false
otherwise.- Specified by:
acceptWord
in classSingleLabelFilterBase
- Parameters:
context
- provides access to all information about the wordwordIndex
- index of the word for which decision is to be made
-