|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpitt.search.semanticvectors.VectorSearcher
public abstract class VectorSearcher
Class for searching vector stores using different scoring functions. Each VectorSearcher implements a particular scoring function which is normally query dependent, so each query needs its own VectorSearcher.
Nested Class Summary | |
---|---|
static class |
VectorSearcher.BalancedVectorSearcherPerm
Class for searching a permuted vector store using cosine similarity. |
static class |
VectorSearcher.VectorSearcherConvolutionSim
Class for searching a vector store using convolution similarity. |
static class |
VectorSearcher.VectorSearcherCosine
Class for searching a vector store using cosine similarity. |
static class |
VectorSearcher.VectorSearcherCosineSparse
Class for searching a vector store using sparse cosine similarity. |
static class |
VectorSearcher.VectorSearcherMaxSim
Class for searching a vector store using minimum distance similarity. |
static class |
VectorSearcher.VectorSearcherPerm
Class for searching a permuted vector store using cosine similarity. |
static class |
VectorSearcher.VectorSearcherSubspaceSim
Class for searching a vector store using quantum disjunction similarity. |
static class |
VectorSearcher.VectorSearcherTensorSim
Class for searching a vector store using tensor product similarity. |
Constructor Summary | |
---|---|
VectorSearcher(VectorStore queryVecStore,
VectorStore searchVecStore,
LuceneUtils luceneUtils)
Performs basic initialization; subclasses should normally call super() to use this. |
Method Summary | |
---|---|
java.util.LinkedList<SearchResult> |
getNearestNeighbors(int numResults)
This nearest neighbor search is implemented in the abstract VectorSearcher class itself: this enables all subclasses to reuse the search whatever scoring method they implement. |
abstract 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 |
Constructor Detail |
---|
public VectorSearcher(VectorStore queryVecStore, VectorStore searchVecStore, LuceneUtils luceneUtils)
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.)Method Detail |
---|
public abstract float getScore(float[] testVector)
public java.util.LinkedList<SearchResult> getNearestNeighbors(int numResults)
numResults
- the number of results / length of the result list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |