API Reference
//
Semantic similarity
Calculate the semantic similarity between two text fragments, either in the same language or in different languages.
The request body should contain:
content1(string) - The first text fragment.language1(string) - The IETF language code forcontent1.content2(string) - The second text fragment to compare.language2(string) - The IETF language code forcontent2.settings(object) - Additional settings as per specifications. More information: Tisane API Configuration And Customization Guide.
The response is a number between 0 and 1, representing the similarity of the submitted text fragments.
Security
Tisane-API-Key
POST
curl -i -X POST \
https://api.tisane.ai/similarity \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY_HERE' \
-d '{
"language1": "en",
"content1": "Franz Ferdinand was assassinated by a Serbian revolutionary",
"language2": "en",
"content2": "A Yugoslav radical assassinated Franz Ferdinand",
"settings": {}
}'