anl.aida.sv
Class SemanticVectorStore
java.lang.Object
anl.aida.sv.SemanticVectorStore
public class SemanticVectorStore
- extends java.lang.Object
Wraps access to the semantic vectors data.
Constructor Summary |
SemanticVectorStore(java.lang.String docStorePath,
java.lang.String termStorePath)
Creates an SVWrapper using the specified term and doc stores. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_VECTOR
private static final float[] EMPTY_VECTOR
docReader
private DocumentVectorStoreReader docReader
termReader
private pitt.search.semanticvectors.VectorStoreReader termReader
pathMatcher
private SemanticVectorStore.PathMatcher pathMatcher
idMatcher
private SemanticVectorStore.IdMatcher idMatcher
docCache
private java.util.Map<java.lang.Integer,float[]> docCache
termCache
private java.util.Map<java.lang.String,float[]> termCache
SemanticVectorStore
public SemanticVectorStore(java.lang.String docStorePath,
java.lang.String termStorePath)
throws java.io.IOException
- Creates an SVWrapper using the specified term and doc stores.
- Parameters:
docStorePath
- the path to the document terms storetermStorePath
- the path to the terms store
- Throws:
java.io.IOException
- if there is an error reading the stores.
getDocumentVector
public float[] getDocumentVector(java.lang.String docPath)
throws java.io.IOException
- Throws:
java.io.IOException
getDocumentVector
public float[] getDocumentVector(int stcIndex)
throws java.io.IOException
- Gets the document vector for the document with the specified stc Index.
- Parameters:
stcIndex
- the index
- Returns:
- the document vector
- Throws:
java.io.IOException
- if there is an error finding the document vector
getTermVector
public float[] getTermVector(java.lang.String term)
getTermVectors
public java.lang.Iterable<pitt.search.semanticvectors.ObjectVector> getTermVectors()
getDocumentVectors
public java.lang.Iterable<pitt.search.semanticvectors.ObjectVector> getDocumentVectors()