For the complete documentation index, see llms.txt. This page is also available as Markdown.

Entity linking

Use the Tonic Textual REST API to link entity values.

Group entities

post

Group entities together based on the original text

Body

Request to group detected entities using entity linking.

original_textstringOptional
include_entity_linking_scoresbooleanOptional

Include entity-linking confidence scores. The default value is False.

entity_linking_score_limitinteger · int32 · min: 1 · max: 2147483647Optional

Maximum number of entity-linking scores to return. Set to null for no limit.

Responses
200

Returns grouped entities

Response containing entity groups produced by entity linking.

post/api/Synthesis/group
POST /api/Synthesis/group HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 546

{
  "entities": [
    {
      "start": 1,
      "end": 1,
      "pythonStart": 1,
      "pythonEnd": 1,
      "label": "text",
      "text": "text",
      "score": 1,
      "language": "text",
      "exampleRedaction": "text",
      "head": "text",
      "tail": "text",
      "subNerEntities": [
        {
          "start": 1,
          "end": 1,
          "pythonStart": 1,
          "pythonEnd": 1,
          "label": "text",
          "text": "text",
          "score": 1,
          "language": "text",
          "exampleRedaction": "text",
          "head": "text",
          "tail": "text",
          "subNerEntities": "[Circular Reference]",
          "modelBasedEntityName": "text"
        }
      ],
      "modelBasedEntityName": "text"
    }
  ],
  "original_text": "text",
  "include_entity_linking_scores": true,
  "entity_linking_score_limit": 1
}
200

Returns grouped entities

{
  "entities": [
    {
      "start": 1,
      "end": 1,
      "pythonStart": 1,
      "pythonEnd": 1,
      "label": "text",
      "text": "text",
      "score": 1,
      "language": "text",
      "exampleRedaction": "text",
      "head": "text",
      "tail": "text",
      "subNerEntities": [
        {
          "start": 1,
          "end": 1,
          "pythonStart": 1,
          "pythonEnd": 1,
          "label": "text",
          "text": "text",
          "score": 1,
          "language": "text",
          "exampleRedaction": "text",
          "head": "text",
          "tail": "text",
          "subNerEntities": [
            "[Circular Reference]"
          ],
          "modelBasedEntityName": "text"
        }
      ],
      "modelBasedEntityName": "text"
    }
  ],
  "groups": [
    {
      "pii_type": "NUMERIC_VALUE",
      "entity_indices": [
        1
      ],
      "representative": "text",
      "linking_edges": [
        {
          "entityIndexA": 1,
          "entityIndexB": 1,
          "linkingConfidence": 1,
          "linkingConfidenceType": "text"
        }
      ]
    }
  ],
  "entity_linking_score_matrix": [
    [
      {
        "linkingConfidence": 1,
        "linkingConfidenceType": "text"
      }
    ]
  ]
}

Last updated

Was this helpful?