pitt.search.semanticvectors
Class VectorSearcher.VectorSearcherPerm
java.lang.Object
pitt.search.semanticvectors.VectorSearcher
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"
Method Summary |
float |
getScore(float[] testVector)
This needs to be filled in for each subclass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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