Package org.carrot2.text.preprocessing
Class PreprocessingContext.AllLabels
- java.lang.Object
-
- org.carrot2.text.preprocessing.PreprocessingContext.AllLabels
-
- Enclosing class:
- PreprocessingContext
public class PreprocessingContext.AllLabels extends Object
Information about words and phrases that might be good cluster label candidates. Each entry in each array corresponds to one label candidate.All arrays in this class have the same length and values across different arrays correspond to each other for the same index.
-
-
Field Summary
Fields Modifier and Type Field Description com.carrotsearch.hppc.BitSet[]
documentIndices
Indices of documents assigned to the label candidate.int[]
featureIndex
Feature index of the label candidate.int
firstPhraseIndex
The first index infeatureIndex
which points toPreprocessingContext.AllPhrases
, or -1 if there are no phrases infeatureIndex
.
-
Constructor Summary
Constructors Constructor Description AllLabels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequence
getLabel(int index)
int
size()
String
toString()
For debugging purposes.
-
-
-
Field Detail
-
featureIndex
public int[] featureIndex
Feature index of the label candidate. Features whose values are less than the size ofPreprocessingContext.AllWords
arrays are single word features and point to entries inPreprocessingContext.AllWords
. Features whose values are larger or equal to the size ofPreprocessingContext.AllWords
, after subtracting the size ofPreprocessingContext.AllWords
, point toPreprocessingContext.AllPhrases
.This array is produced by
LabelFilterProcessor
.
-
documentIndices
public com.carrotsearch.hppc.BitSet[] documentIndices
Indices of documents assigned to the label candidate.This array is produced by
DocumentAssigner
.
-
firstPhraseIndex
public int firstPhraseIndex
The first index infeatureIndex
which points toPreprocessingContext.AllPhrases
, or -1 if there are no phrases infeatureIndex
.This value is set by
LabelFilterProcessor
.- See Also:
featureIndex
-
-
Method Detail
-
getLabel
public CharSequence getLabel(int index)
-
size
public int size()
-
-