Package org.carrot2.clustering.lingo
Interface LabelAssigner
- All Superinterfaces:
AcceptingVisitor
- All Known Implementing Classes:
SimpleLabelAssigner
,UniqueLabelAssigner
public interface LabelAssigner extends AcceptingVisitor
Assigns labels to base vectors obtained from the factorization.
-
Method Summary
Modifier and Type Method Description void
assignLabels(LingoProcessingContext context, org.carrot2.math.mahout.matrix.DoubleMatrix2D stemCos, com.carrotsearch.hppc.IntIntHashMap filteredRowToStemIndex, org.carrot2.math.mahout.matrix.DoubleMatrix2D phraseCos)
Assigns labels to base vectors found by the matrix factorization.
-
Method Details
-
assignLabels
void assignLabels(LingoProcessingContext context, org.carrot2.math.mahout.matrix.DoubleMatrix2D stemCos, com.carrotsearch.hppc.IntIntHashMap filteredRowToStemIndex, org.carrot2.math.mahout.matrix.DoubleMatrix2D phraseCos)Assigns labels to base vectors found by the matrix factorization. The results must be stored in theLingoProcessingContext.clusterLabelFeatureIndex
andLingoProcessingContext.clusterLabelScore
arrays.- Parameters:
context
- contains all information about the current clustering requeststemCos
- base vector -- single stems cosine matrixfilteredRowToStemIndex
- mapping between row indices of stemCos and indices of stems inPreprocessingContext.allStems
phraseCos
- base vector -- phrase cosine matrix
-