Package org.apache.lucene.demo.knn
KnnVector example code.
The vector dictionary used in the demo is taken from the GloVe project, whose data is in the public domain.
-
Class Summary Class Description DemoEmbeddings This class providesDemoEmbeddings.computeEmbedding(String)
andDemoEmbeddings.computeEmbedding(Reader)
for calculating "semantic" embedding vectors for textual input.KnnVectorDict Manages a map from token to numeric vector for use with KnnVector indexing and search.KnnVectorDictFilter Looks up each tokens in a dictionary, and sums the token vectors.