9 #ifndef _STRUS_VECTOR_STORGE_CLIENT_INTERFACE_HPP_INCLUDED
10 #define _STRUS_VECTOR_STORGE_CLIENT_INTERFACE_HPP_INCLUDED
19 class VectorStorageTransactionInterface;
21 class ValueIteratorInterface;
41 virtual std::vector<VectorQueryResult>
findSimilar(
const std::string& type,
const WordVector& vec,
int maxNofResults,
double minSimilarity,
bool realVecWeights)
const=0;
50 virtual std::vector<std::string>
types()
const=0;
59 virtual std::vector<std::string>
featureTypes(
const std::string& featureValue)
const=0;
64 virtual int nofVectors(
const std::string& type)
const=0;
83 virtual std::string
config()
const=0;
89 virtual void close()=0;
Vector type used for word embedding vector calculations.
Interface to a repository for vectors representing word embeddings.
Definition: vectorStorageClientInterface.hpp:24
virtual std::vector< std::string > featureTypes(const std::string &featureValue) const =0
Get the list of types assigned to a specific featureValue.
virtual WordVector featureVector(const std::string &type, const std::string &featureValue) const =0
Get the vector assigned to a feature value.
Result of a vector similarity search.
Interface for building a repository of vectors with classifiers to map them to discrete features...
Definition: vectorStorageTransactionInterface.hpp:19
virtual void prepareSearch(const std::string &type)=0
Prepare datastructures for calling findSimilar( const WordVector&, int,double,bool)const'.
virtual WordVector normalize(const WordVector &vec) const =0
Calculate the normalized vector representation of the argument vector.
virtual std::string config() const =0
Get the configuration of this storage.
Structure that represents a set of strings as iterator.
Definition: valueIteratorInterface.hpp:21
virtual ValueIteratorInterface * createFeatureValueIterator() const =0
Create an iterator on the feature values inserted.
virtual VectorStorageTransactionInterface * createTransaction()=0
Create an insert/update transaction object.
virtual std::vector< std::string > types() const =0
Get the list of types defined.
virtual void close()=0
Close client connection and eventually do some cleanup.
virtual ~VectorStorageClientInterface()
Destructor.
Definition: vectorStorageClientInterface.hpp:28
std::vector< float > WordVector
Definition: wordVector.hpp:16
virtual double vectorSimilarity(const WordVector &v1, const WordVector &v2) const =0
Calculate a value between 0.0 and 1.0 representing the similarity of two vectors. ...
virtual std::vector< VectorQueryResult > findSimilar(const std::string &type, const WordVector &vec, int maxNofResults, double minSimilarity, bool realVecWeights) const =0
Find all features that are within maximum simiarity distance.
virtual int nofVectors(const std::string &type) const =0
Get the number of vectors defined for the features of a type.