API Reference
//
Named entity comparison
Compares two compound named entities and identifies differences. The request body should include:
language1(string) - IETF tag for the first entity's language.entity1(string) - The first entity.language2(string) - IETF tag for the second entity's language.entity2(string) - The second entity.type(string) - The entity type (currently only person is supported).
More information: Named Entities in the Tisane API Response Guide The response contains:
result(string) - Comparison result:no_single_entity- One or both entities are invalid.same- Entities are identical (name order might differ).different- Entities differ, with details indifferences.
differences(array of strings) - Lists detected differences:given_namesurnametitle(e.g., Mr., Mrs.)social_role(e.g., academic degrees)suffixvariation(e.g., spelling or style differences)
Security
Tisane-API-Key
POST
curl -i -X POST \
https://api.tisane.ai/compare/entities \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY_HERE' \
-d '{
"language1": "en",
"entity1": "Gary Youngman MD",
"language2": "en",
"entity2": "Gary Oldman",
"type": "person"
}'Response
{ "result": "different", "differences": [ "surname", "social_role" ] }