Callback Format

The response object is part of the callback POST request and is permanently stored as part of the task object.

{
  "annotations": [
    {
      "id": "b86c22a3-1f7c-4be2-bb8f-899ee9324c0b",
      "start": 10,
      "end": 17,
      "text": "Alex Wang",
      "label": "person",
    },
    {
      "id": "a76da53e-4ebd-4466-aed7-80db6fb98329",
      "start": 22,
      "end": 31,
      "text": "Transform",
      "label": "conference",
    }
  ],
  "relationships": [
    {
      "id": "ade8e9e9-ef9c-4fc7-9517-62d79a15c1cb",
      "source_ref": "b86c22a3-1f7c-4be2-bb8f-899ee9324c0b",
      "target_ref": "a76da53e-4ebd-4466-aed7-80db6fb98329",
      "name": "speaker_at",
    }
  ]
}

NamedEntityRecognitionResponse

Field

Type

Description

annotations

object array

List of NamedEntityRecogntionAnnotation objects.

relationships

object array

List of NamedEntityRecognitionRelationship objects.

NamedEntityRecognitionAnnotation

Field

Type

Description

id

string

Unique identifier.

start

number

Start index of the text span.

end

number

End index of the text span.

text

string

Text of the text span.

label

string

References the name field of a label in the task params.

attributes (optional)

object

The keys of the object reference keys of the attributes object for the corresponding label in the task params.

NamedEntityRecognitionRelationship

In tasks with undirected relationships, the source_ref and target_ref fields are interchangeable. In tasks with links that do not have relationship names, the name field will be left blank.

Field

Type

Description

id

string

Unique identifier.

source_ref

string

References the id of the annotation that is the source of the directed relationship.

target_ref

string

References the id of the annotation that is the target of the directed relationship.

name (optional)

string

References the name of relationship definitions in the task params.