Package de.jungblut.nlp
Class SparseVectorDocumentMapper
- java.lang.Object
-
- de.jungblut.nlp.SparseVectorDocumentMapper
-
- All Implemented Interfaces:
InvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,java.lang.Integer>
public final class SparseVectorDocumentMapper extends java.lang.Object implements InvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,java.lang.Integer>
Mapper that maps sparse vectors into a set of their indices so they can be used in theInvertedIndexfor fast lookup.- Author:
- thomas.jungblut
-
-
Constructor Summary
Constructors Constructor Description SparseVectorDocumentMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.Integer>mapDocument(de.jungblut.math.DoubleVector v)Maps the document into its smaller parts.
-
-
-
Method Detail
-
mapDocument
public java.util.Set<java.lang.Integer> mapDocument(de.jungblut.math.DoubleVector v)
Description copied from interface:InvertedIndex.DocumentMapperMaps the document into its smaller parts.- Specified by:
mapDocumentin interfaceInvertedIndex.DocumentMapper<de.jungblut.math.DoubleVector,java.lang.Integer>- Parameters:
v- the document to map.- Returns:
- a set of keys that this document consists of.
-
-