Package org.carrot2.text.preprocessing
Class LabelFilterProcessor
java.lang.Object
org.carrot2.attrs.AttrComposite
org.carrot2.text.preprocessing.LabelFilterProcessor
- All Implemented Interfaces:
AcceptingVisitor
public class LabelFilterProcessor extends AttrComposite
Applies basic filtering to words and phrases to produce candidates for cluster labels. Filtering
is applied to
PreprocessingContext.AllWords
and PreprocessingContext.AllPhrases
, the results are saved to PreprocessingContext.AllLabels
. Currently, the following filters are applied:
This class saves the following results to the PreprocessingContext
:
This class requires that InputTokenizer
, CaseNormalizer
, StopListMarker
and PhraseExtractor
be invoked first.
-
Field Summary
Fields Modifier and Type Field Description CompleteLabelFilter
completeLabelFilter
Truncated phrase filter for this processor.GenitiveLabelFilter
genitiveLabelFilter
Genitive length label filter.MinLengthLabelFilter
minLengthLabelFilter
Min length label filter.NumericLabelFilter
numericLabelFilter
Numeric label filter for this processor.QueryLabelFilter
queryLabelFilter
Query word label filter for this processor.StopLabelFilter
stopLabelFilter
Stop label filter.StopWordLabelFilter
stopWordLabelFilter
Stop word label filter for this processor. -
Constructor Summary
Constructors Constructor Description LabelFilterProcessor()
-
Method Summary
Modifier and Type Method Description void
process(PreprocessingContext context)
Processes all filters declared as fields of this class.
-
Field Details
-
queryLabelFilter
Query word label filter for this processor. -
stopWordLabelFilter
Stop word label filter for this processor. -
stopLabelFilter
Stop label filter. -
numericLabelFilter
Numeric label filter for this processor. -
completeLabelFilter
Truncated phrase filter for this processor. -
minLengthLabelFilter
Min length label filter. -
genitiveLabelFilter
Genitive length label filter.
-
-
Constructor Details
-
LabelFilterProcessor
public LabelFilterProcessor()
-
-
Method Details
-
process
Processes all filters declared as fields of this class.
-