Skip to content

Named entity comparison

Request

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 in differences.
  • differences (array of strings) - Lists detected differences:

    • given_name
    • surname
    • title (e.g., Mr., Mrs.)
    • social_role (e.g., academic degrees)
    • suffix
    • variation (e.g., spelling or style differences)
Security
Tisane-API-Key
Headers
Content-Typestring
Example:application/json
Bodyapplication/jsonrequired
object
POST
/compare/entities
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"
  }'

Responses

Successful response

Bodyapplication/json
object
Response
{ "result": "different", "differences": [ "surname", "social_role" ] }