public class VectorSpaceModelContext extends Object
Modifier and Type | Field and Description |
---|---|
PreprocessingContext |
preprocessingContext
Preprocessing context for the underlying documents.
|
com.carrotsearch.hppc.IntIntHashMap |
stemToRowIndex
Stem index to row index mapping for the
tdMatrix . |
DoubleMatrix2D |
termDocumentMatrix
Term-document matrix.
|
DoubleMatrix2D |
termPhraseMatrix
Term-document-like matrix for phrases from
PreprocessingContext.AllLabels . |
Constructor and Description |
---|
VectorSpaceModelContext(PreprocessingContext preprocessingContext)
Creates a vector space model context with the provided preprocessing context.
|
public final PreprocessingContext preprocessingContext
public DoubleMatrix2D termDocumentMatrix
PreprocessingContext.AllStems
, see stemToRowIndex
.
This matrix is produced by
TermDocumentMatrixBuilder.buildTermDocumentMatrix(VectorSpaceModelContext)
.
public DoubleMatrix2D termPhraseMatrix
PreprocessingContext.AllLabels
. If there are no
phrases in PreprocessingContext.AllLabels
, phrase matrix is null
. For mapping
between rows of this matrix and PreprocessingContext.AllStems
, see stemToRowIndex
.
This matrix is produced by
TermDocumentMatrixBuilder.buildTermPhraseMatrix(VectorSpaceModelContext)
.
public com.carrotsearch.hppc.IntIntHashMap stemToRowIndex
tdMatrix
. Keys in this map are
indices of entries in PreprocessingContext.AllStems
arrays, values are the indices of
tdMatrix
rows corresponding to the stems. Please note that depending
on the limit on the size of the matrix, some stems may not have their corresponding
matrix rows.
This object is produced by
TermDocumentMatrixBuilder.buildTermDocumentMatrix(VectorSpaceModelContext)
.
public VectorSpaceModelContext(PreprocessingContext preprocessingContext)