SimilarityStore#
dbally.similarity.SimilarityStore
#
Base class for all stores. Has to be able to store the data and retrieve it.
This component is used while mapping a user input to the closest matching value in the data source.
In particular, it is used inside SimilarityIndex, allowing the system to
find the closest match to the user's input.
store
abstractmethod
async
#
Stores the data. Should replace the previously stored data.
| PARAMETER | DESCRIPTION |
|---|---|
data |
The data to store.
TYPE:
|
find_similar
abstractmethod
async
#
Finds the most similar text in the store or returns None if no similar text is found.
| PARAMETER | DESCRIPTION |
|---|---|
text |
The text to find similar to.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Optional[str]
|
The most similar text or None if no similar text is found. |