pitt.search.semanticvectors
Class VectorSearcher.VectorSearcherPerm

java.lang.Object
  extended by pitt.search.semanticvectors.VectorSearcher
      extended by pitt.search.semanticvectors.VectorSearcher.VectorSearcherPerm
Enclosing class:
VectorSearcher

public static class VectorSearcher.VectorSearcherPerm
extends VectorSearcher

Class for searching a permuted vector store using cosine similarity. Uses implementation of rotation for permutation proposed by Sahlgren et al 2008 Should find the term that appears frequently in the position p relative to the index term (i.e. sat +1 would find a term occurring frequently immediately after "sat"


Nested Class Summary
 
Nested classes/interfaces inherited from class pitt.search.semanticvectors.VectorSearcher
VectorSearcher.BalancedVectorSearcherPerm, VectorSearcher.VectorSearcherConvolutionSim, VectorSearcher.VectorSearcherCosine, VectorSearcher.VectorSearcherCosineSparse, VectorSearcher.VectorSearcherMaxSim, VectorSearcher.VectorSearcherPerm, VectorSearcher.VectorSearcherSubspaceSim, VectorSearcher.VectorSearcherTensorSim
 
Constructor Summary
VectorSearcher.VectorSearcherPerm(VectorStore queryVecStore, VectorStore searchVecStore, LuceneUtils luceneUtils, java.lang.String[] queryTerms)
           
 
Method Summary
 float getScore(float[] testVector)
          This needs to be filled in for each subclass.
 
Methods inherited from class pitt.search.semanticvectors.VectorSearcher
getNearestNeighbors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorSearcher.VectorSearcherPerm

public VectorSearcher.VectorSearcherPerm(VectorStore queryVecStore,
                                         VectorStore searchVecStore,
                                         LuceneUtils luceneUtils,
                                         java.lang.String[] queryTerms)
                                  throws java.lang.IllegalArgumentException,
                                         ZeroVectorException
Parameters:
queryVecStore - Vector store to use for query generation.
searchVecStore - The vector store to search.
luceneUtils - LuceneUtils object to use for query weighting. (May be null.)
queryTerms - Terms that will be parsed into a query expression. If the string "?" appears, terms best fitting into this position will be returned
Throws:
java.lang.IllegalArgumentException
ZeroVectorException
Method Detail

getScore

public float getScore(float[] testVector)
Description copied from class: VectorSearcher
This needs to be filled in for each subclass. It takes an individual vector and assigns it a relevance score for this VectorSearcher.

Specified by:
getScore in class VectorSearcher