similarity-remote-api
Documentation / similarity/similarity-remote-api
Similarity​
weighRelevanceConceptVectorAPI()​
function weighRelevanceConceptVectorAPI(
source_sentence: string,
sentences: string[],
options?: object): Promise<any>;
Defined in: similarity/similarity-remote-api.js:18
Calculate the semantic similarity between one text and a list of other sentences by comparing their embeddings. https://huggingface.co/docs/api-inference/detailed_parameters#sentence-similarity-task

Parameters​
Parameter | Type | Description |
---|---|---|
|
| The string that you wish to compare the other strings with. This can be a phrase, sentence, or longer passage, depending on the model being used. |
|
| A list of strings which will be compared against the source_sentence. |
| { | |
|
| |
|
| default="sentence-transformers/all-MiniLM-L6-v2" |
Returns​
Promise
<any
>
array of 0-1 similarity scores for each sentence *