pitt.search.semanticvectors
Class DocVectors
java.lang.Object
pitt.search.semanticvectors.DocVectors
- All Implemented Interfaces:
- VectorStore
public class DocVectors
- extends java.lang.Object
- implements VectorStore
Implementation of vector store that collects doc vectors by
iterating through all the terms in a term vector store and
incrementing document vectors for each of the documents containing
that term.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocVectors
public DocVectors(TermVectorsFromLucene termVectorData)
throws java.io.IOException
- Constructor that gets everything it needs from a
TermVectorsFromLucene object.
- Throws:
java.io.IOException
makeWriteableVectorStore
public VectorStore makeWriteableVectorStore()
- Create a version of the vector store indexes by path / filename rather than Lucene ID.
getVector
public float[] getVector(java.lang.Object id)
- Specified by:
getVector
in interface VectorStore
- Parameters:
id
- the object whose vector you want to look up
- Returns:
- a vector (of floats)
getAllVectors
public java.util.Enumeration getAllVectors()
- Specified by:
getAllVectors
in interface VectorStore
- Returns:
- an enumeration of all the object vectors in the store.
getNumVectors
public int getNumVectors()
- Specified by:
getNumVectors
in interface VectorStore
- Returns:
- a count of the number of vectors in the store.