Class ContextLabelFilter
- java.lang.Object
-
- org.carrot2.attrs.AttrComposite
-
- org.carrot2.text.preprocessing.filter.ContextLabelFilter
-
- All Implemented Interfaces:
AcceptingVisitor
- Direct Known Subclasses:
CompleteLabelFilter
,SingleLabelFilterBase
public abstract class ContextLabelFilter extends AttrComposite
Defines the contract for label filtering components, which mark words and phrases that should not be considered as candidates for cluster labels- See Also:
LabelFilterProcessor
-
-
Field Summary
Fields Modifier and Type Field Description AttrBoolean
enabled
Enables or disables this filter.-
Fields inherited from class org.carrot2.attrs.AttrComposite
attributes
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContextLabelFilter(String enabledLabel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
filter(PreprocessingContext context, boolean[] acceptedStems, boolean[] acceptedPhrases)
Called to perform label filtering.boolean
isEnabled()
-
Methods inherited from class org.carrot2.attrs.AttrComposite
accept
-
-
-
-
Field Detail
-
enabled
public final AttrBoolean enabled
Enables or disables this filter.
-
-
Constructor Detail
-
ContextLabelFilter
protected ContextLabelFilter(String enabledLabel)
-
-
Method Detail
-
filter
public abstract void filter(PreprocessingContext context, boolean[] acceptedStems, boolean[] acceptedPhrases)
Called to perform label filtering.- Parameters:
context
- contains words and phrases to be filteredacceptedStems
- the filter should set tofalse
those elements that correspond to the stems to be filtered outacceptedPhrases
- the filter should set tofalse
those elements that correspond to the phrases to be filtered out
-
isEnabled
public final boolean isEnabled()
- Returns:
true
if the filter is enabled.
-
-