anl.aida.sv
Class SemanticVectorStore

java.lang.Object
  extended by anl.aida.sv.SemanticVectorStore

public class SemanticVectorStore
extends java.lang.Object

Wraps access to the semantic vectors data.


Nested Class Summary
private static class SemanticVectorStore.IdMatcher
           
private static class SemanticVectorStore.PathMatcher
           
 
Field Summary
private  java.util.Map<java.lang.Integer,float[]> docCache
           
private  DocumentVectorStoreReader docReader
           
private static float[] EMPTY_VECTOR
           
private  SemanticVectorStore.IdMatcher idMatcher
           
private  SemanticVectorStore.PathMatcher pathMatcher
           
private  java.util.Map<java.lang.String,float[]> termCache
           
private  pitt.search.semanticvectors.VectorStoreReader termReader
           
 
Constructor Summary
SemanticVectorStore(java.lang.String docStorePath, java.lang.String termStorePath)
          Creates an SVWrapper using the specified term and doc stores.
 
Method Summary
 float[] getDocumentVector(int stcIndex)
          Gets the document vector for the document with the specified stc Index.
 float[] getDocumentVector(java.lang.String docPath)
           
 java.lang.Iterable<pitt.search.semanticvectors.ObjectVector> getDocumentVectors()
           
 float[] getTermVector(java.lang.String term)
           
 java.lang.Iterable<pitt.search.semanticvectors.ObjectVector> getTermVectors()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 store
termStorePath - the path to the terms store
Throws:
java.io.IOException - if there is an error reading the stores.
Method Detail

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()