Text Project

When you export a Text Project, the download folder contains JSON files of your annotations. Each document has its own JSON file.

The JSON for annotations in Text Projects contains 4 main fields:

{
    "metadata": {},
    "instances": [],
    "tags": [],
    "freeText": ""
}

Metadata

{
    "name": "example1.txt",
    "url": "string",
    "status": "Completed",
    "projectId": 3457,
    "annotatorEmail": null,
    "qaEmail": "[email protected]",
    "lastAction": {
      "email": "[email protected]",
      "timestamp": 1631194162947
    }
 }

Description:

  • "name": “string” - Document name as stated in the CSV file or generated by SDK.
  • “url”: “string” - The URL from the attached CSV.
  • "status": “string” - The document status. It can be: NotStarted, InProgress, QualityCheck, Returned, Skipped, or Completed.
  • “projectId”: "integer" - The project ID.
  • "annotatorEmail": “string” - The assigned annotator’s email address.
  • "qaEmail": “string” - The assigned QA’s email address.
  • "lastAction": objects - The user who last made changes to an instance.
    • "email": “string” - The email address of the last user who made the changes.
    • "timestamp": "integer" - The date and time when the last change was made. Format example: "timestamp": “1626152220563”

Instances

[
    {
      "id": "1f3e90aa-6f5f-4578-9e29-9ea89ddae38f", 
      "type": "entity", 
      "classId": 5005974,
      "className": "Spam",
      "start": 562,
      "end": 634,
      "attributes": [
        {
          "id": 655171,
          "groupId": 163392,
          "name": "first",
          "groupName": "Type"
        }
      ],
      "creationType": "Manual",
      "createdAt": "2021-07-29T12:15:08.216Z",
      "createdBy": {
        "email": "[email protected]",
        "role": "Annotator"
      },
      "updatedAt": "2021-07-29T12:15:09.414Z",
      "updatedBy": {
        "email": "[email protected]",
        "role": "Admin"
      }
    }
]

Description:

  • “id”: string - Unique instance ID.
  • “type”: string - Instance type. If it’s entity, then the instance is an annotation. If it’s tag, then the instance is a tag.
  • “classId”: integer - Class ID (A class ID from the “classes.json” belonging to the instance’s corresponding class, or -1 if the instance is not classified).
  • "className": string - Class name (one of the class names in “classes.json”, or an empty value if the instance is not classified).
  • “start”: number - The index of the instance’s first character. The index of the first character is 0.
  • “end”: number - The index of the instance’s last character.
  • “attributes”: array of objects - List of attributes for the instance.
    • “id”: "integer" - Attribute ID (must be in “classes.json”)
    • “groupId”: integer - Attribute group ID (must be in “classes.json”)
    • "name": string - Attribute name
    • "groupName": string - Attribute group name
  • “creationType”: string - The way in which the instance was created. Currently, only Manual is an available option.
  • "createdBy": objects
    • "email": string - The email address of the user who created the instance.
    • "role": string - The role of the user who created the instance.
  • "createdAt": string - The date and time when the instance was created.
  • "updatedBy": objects
    • "email": string - The email address of the user who updated the instance.
    • "role": string - The role of the user who updated the instance.
  • "updatedAt": string - The date and time when the instance was updated.

Tags

[
        "Spam",
        "Non-Spam"
]

Description:

  • "Tag": string - The names of the tags that are added to the document.

Free text

"freeText": "the document describes residency"

Description:

  • "freeText": string - The text entered in the Free Text section in the editor.

Relationships

        {
            "type": "entity",
            "id": "b72c2acb-70f9-46a8-b4c4-5600068e26f3",
            "start": 118,
            "end": 161,
            "className": "City",
            ...
        },
        {
            "type": "entity",
            "id": "9571f701-daa1-48d9-9102-c5db89e2815e",
            "start": 176,
            "end": 231,
            "className": "Country",
            ...
        },
        {
            "type": "relationship",
            "id": "31d3c85a-9041-4ae3-a798-8dd790277144",
            "from": "b72c2acb-70f9-46a8-b4c4-5600068e26f3", //Subject entity
            "to": "9571f701-daa1-48d9-9102-c5db89e2815e", //Object entity
            "classId": 5005974,
            "className": "Capital",
            "attributes": [
                {
                    "id": 9251325,
                    "groupId": 4403072,
                    "name": "Central",
       	   	        "groupName": "Location"
                },
            ],
            "creationType": "Manual",
            "createdAt": "2023-07-24T13:11:28.831Z",
            "createdBy": {
                "email": "[email protected]",
                "role": "Annotator"
            },
            "updatedAt": "2023-07-24T13:11:28.831Z",
            "updatedBy": {
                "email": "[email protected]",
                "role": "Annotator"
            }
        }

Description:

  • “type”: string - Instance type. If it’s entity, then the instance is an annotation. If it’s relationship, then the instance is a relationship.
  • “classId”: integer - Class ID (A class ID from the “classes.json” belonging to the instance’s corresponding class, or -1 if the instance is not classified).
  • "from": string - The ID of the subject entity, where the relationship starts.
  • "to": string - The ID of the object entity, where the relationship ends.
  • "className": string - Class name (one of the class names in “classes.json”, or an empty value if the instance is not classified).
  • “attributes”: array of objects - List of attributes for the instance.
    • “id”: "integer" - Attribute ID (must be in “classes.json”)
    • “groupId”: integer - Attribute group ID (must be in “classes.json”)
    • "name": string - Attribute name
    • "groupName": string - Attribute group name
  • “creationType”: string - The way in which the instance was created. Currently, only Manual is the available option.
  • "createdBy": objects
    • "email": string - The email address of the user who created the instance.
    • "role": string - The role of the user who created the instance.
  • "createdAt": string - The date and time when the instance was created.
  • "updatedBy": objects
    • "email": string - The email address of the user who updated the instance.
    • "role": string - The role of the user who updated the instance.
  • "updatedAt": string - The date and time when the instance was updated.