{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://get.aiware.com/schemas/v1.0/entity/entity.json",
  "title": "vtn-standard.entity",
  "description": "Standard engine output for Entity Extraction at Veritone",
  "type": "object",
  "definitions": {
    "namedEntityObject": {
      "allOf": [
        {
          "$ref": "https://get.aiware.com/schemas/v1.0/master.json#/definitions/objectResult"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "namedEntity"
            }
          },
          "anyOf": [
            {
              "required": [
                "label"
              ]
            },
            {
              "required": [
                "entityId"
              ]
            }
          ]
        }
      ]
    }
  },
  "allOf": [
    {
      "$ref": "https://get.aiware.com/schemas/v1.0/master.json#/definitions/PREAMBLE"
    },
    {
      "$ref": "https://get.aiware.com/schemas/v1.0/master.json#/definitions/validated"
    },
    {
      "properties": {
        "validationContracts": {
          "type": "array",
          "contains": {
            "const": "entity"
          }
        },
        "object": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/namedEntityObject"
          }
        }
      },
      "required": [
        "object"
      ]
    }
  ]
}
