Skip to content
OATSCHEMA

Docs / Schemas / entity-extraction / 0.5.0

Entity Extraction 0.5.0

Represent named entities, structural slots, or visual concepts extracted from unstructured data. Links raw evidence (text spans or geometric regions) to normalized values and business concepts.

This is an older version of entity-extraction.

The latest version is 0.8.0. Releases before 0.7.0 use the $id https://dorsalhub.com/schemas/open/entity-extraction and are served by DorsalHub.

$id
https://dorsalhub.com/schemas/open/entity-extraction
Latest
https://oatschema.org/entity-extraction
Versions
Source
v0.5.0 on GitHub

Schema

entity-extraction.json Raw
{    "x-license": {        "id": "Apache-2.0",        "notice": "Copyright 2025-2026 Dorsal Hub LTD",        "url": "https://github.com/dorsalhub/open-validation-schemas/blob/main/LICENSE"    },    "$schema": "https://json-schema.org/draft/2020-12/schema",    "$id": "https://dorsalhub.com/schemas/open/entity-extraction",    "title": "Entity Extraction",    "version": "0.5.0",    "description": "Represent named entities, structural slots, or visual concepts extracted from unstructured data. Links raw evidence (text spans or geometric regions) to normalized values and business concepts.",    "type": "object",    "properties": {        "unit": {            "type": "string",            "description": "The unit for all coordinate values if geometric data is present.",            "enum": [                "px",                "pt",                "normalized",                "per_mille"            ]        },        "producer": {            "type": "string",            "description": "The creator (model, tool or author) of this extraction.",            "maxLength": 1024        },        "vocabulary_url": {            "type": "string",            "format": "uri",            "description": "URL to the definition of the entity labels.",            "maxLength": 2048        },        "vocabulary": {            "type": "array",            "description": "Allowed values for the 'label' field.",            "maxItems": 100,            "items": {                "type": "string",                "maxLength": 128            }        },        "score_explanation": {            "type": "string",            "description": "Defines the meaning of the 'score' field.",            "maxLength": 256        },        "entities": {            "type": "array",            "description": "An array of extracted entities.",            "maxItems": 100000,            "items": {                "type": "object",                "properties": {                    "id": {                        "type": "string",                        "description": "A unique identifier for this entity instance (e.g. UUID).",                        "maxLength": 128                    },                    "concept": {                        "type": "string",                        "description": "The business role or slot this entity fills (e.g. 'InvoiceDate', 'Plaintiff'). Optional.",                        "maxLength": 128                    },                    "label": {                        "type": "string",                        "description": "The entity category (e.g. 'PER', 'DATE', 'MONEY').",                        "maxLength": 128                    },                    "text": {                        "type": "string",                        "description": "The raw text span as it appears in the source. Optional for visual entities (e.g. logos, signatures).",                        "maxLength": 4096                    },                    "value": {                        "description": "The machine-readable value (e.g. '2025-11-21', 3500.00, true).",                        "anyOf": [                            {                                "type": "string",                                "maxLength": 4096                            },                            {                                "type": "number"                            },                            {                                "type": "boolean"                            },                            {                                "type": "null"                            }                        ]                    },                    "definition": {                        "type": "string",                        "description": "Definition of the concept.",                        "maxLength": 1024                    },                    "score": {                        "type": "number",                        "description": "The confidence score for this extraction, ranging from 0.0 (uncertain) to 1.0 (certain).",                        "minimum": 0,                        "maximum": 1                    },                    "location": {                        "type": "array",                        "description": "The physical location(s) of the entity.",                        "maxItems": 10,                        "items": {                            "oneOf": [                                {                                    "title": "Block Reference",                                    "type": "object",                                    "properties": {                                        "type": {                                            "const": "block_ref"                                        },                                        "block_id": {                                            "type": "string",                                            "maxLength": 128                                        }                                    },                                    "required": [                                        "type",                                        "block_id"                                    ],                                    "additionalProperties": false                                },                                {                                    "title": "Geometric Location",                                    "type": "object",                                    "properties": {                                        "type": {                                            "const": "block"                                        },                                        "block_type": {                                            "enum": [                                                "box",                                                "polygon"                                            ]                                        },                                        "page_number": {                                            "type": "integer",                                            "minimum": 1                                        },                                        "box": {                                            "type": "object",                                            "properties": {                                                "x": {                                                    "type": "number"                                                },                                                "y": {                                                    "type": "number"                                                },                                                "width": {                                                    "type": "number"                                                },                                                "height": {                                                    "type": "number"                                                }                                            },                                            "required": [                                                "x",                                                "y",                                                "width",                                                "height"                                            ],                                            "additionalProperties": false                                        },                                        "polygon": {                                            "type": "array",                                            "minItems": 3,                                            "maxItems": 100,                                            "items": {                                                "type": "object",                                                "properties": {                                                    "x": {                                                        "type": "number"                                                    },                                                    "y": {                                                        "type": "number"                                                    }                                                },                                                "required": [                                                    "x",                                                    "y"                                                ],                                                "additionalProperties": false                                            }                                        }                                    },                                    "required": [                                        "type",                                        "block_type",                                        "page_number"                                    ],                                    "additionalProperties": false,                                    "allOf": [                                        {                                            "if": {                                                "properties": {                                                    "block_type": {                                                        "const": "box"                                                    }                                                }                                            },                                            "then": {                                                "required": [                                                    "box"                                                ]                                            }                                        },                                        {                                            "if": {                                                "properties": {                                                    "block_type": {                                                        "const": "polygon"                                                    }                                                }                                            },                                            "then": {                                                "required": [                                                    "polygon"                                                ]                                            }                                        }                                    ]                                }                            ]                        }                    },                    "attributes": {                        "type": "object",                        "description": "Arbitrary metadata (e.g. currency, gender). Flat key-value pairs.",                        "maxProperties": 16,                        "additionalProperties": {                            "anyOf": [                                {                                    "type": "string",                                    "maxLength": 1024                                },                                {                                    "type": "number"                                },                                {                                    "type": "boolean"                                },                                {                                    "type": "null"                                }                            ]                        }                    }                },                "required": [                    "label"                ],                "additionalProperties": false            }        },        "attributes": {            "type": "object",            "description": "Arbitrary metadata relevant to this extraction.",            "maxProperties": 16,            "additionalProperties": {                "anyOf": [                    {                        "type": "string",                        "maxLength": 1024                    },                    {                        "type": "number"                    },                    {                        "type": "boolean"                    },                    {                        "type": "null"                    }                ]            }        }    },    "required": [        "entities"    ],    "additionalProperties": false,    "allOf": [        {            "if": {                "properties": {                    "entities": {                        "maxItems": 0                    }                }            },            "then": {                "anyOf": [                    {                        "required": [                            "vocabulary"                        ]                    },                    {                        "required": [                            "vocabulary_url"                        ]                    }                ]            }        },        {            "if": {                "properties": {                    "unit": {                        "const": "normalized"                    }                }            },            "then": {                "properties": {                    "entities": {                        "items": {                            "properties": {                                "location": {                                    "items": {                                        "properties": {                                            "box": {                                                "properties": {                                                    "x": {                                                        "maximum": 1                                                    },                                                    "y": {                                                        "maximum": 1                                                    },                                                    "width": {                                                        "maximum": 1                                                    },                                                    "height": {                                                        "maximum": 1                                                    }                                                }                                            },                                            "polygon": {                                                "items": {                                                    "properties": {                                                        "x": {                                                            "maximum": 1                                                        },                                                        "y": {                                                            "maximum": 1                                                        }                                                    }                                                }                                            }                                        }                                    }                                }                            }                        }                    }                }            }        },        {            "if": {                "properties": {                    "unit": {                        "const": "per_mille"                    }                }            },            "then": {                "properties": {                    "entities": {                        "items": {                            "properties": {                                "location": {                                    "items": {                                        "properties": {                                            "box": {                                                "properties": {                                                    "x": {                                                        "maximum": 1000                                                    },                                                    "y": {                                                        "maximum": 1000                                                    },                                                    "width": {                                                        "maximum": 1000                                                    },                                                    "height": {                                                        "maximum": 1000                                                    }                                                }                                            },                                            "polygon": {                                                "items": {                                                    "properties": {                                                        "x": {                                                            "maximum": 1000                                                        },                                                        "y": {                                                            "maximum": 1000                                                        }                                                    }                                                }                                            }                                        }                                    }                                }                            }                        }                    }                }            }        }    ]}

Fields

  • unit string

    The unit for all coordinate values if geometric data is present.

    Allowed values: "px", "pt", "normalized", "per_mille"

  • producer string

    The creator (model, tool or author) of this extraction.

    • at most 1024 characters
  • vocabulary_url string

    URL to the definition of the entity labels.

    • at most 2048 characters
    • format uri
  • vocabulary array of string

    Allowed values for the 'label' field.

    • at most 100 items
    • each at most 128 characters
  • score_explanation string

    Defines the meaning of the 'score' field.

    • at most 256 characters
  • entities array of object required

    An array of extracted entities.

    • at most 100000 items
    • id string

      A unique identifier for this entity instance (e.g. UUID).

      • at most 128 characters
    • concept string

      The business role or slot this entity fills (e.g. 'InvoiceDate', 'Plaintiff'). Optional.

      • at most 128 characters
    • label string required

      The entity category (e.g. 'PER', 'DATE', 'MONEY').

      • at most 128 characters
    • text string

      The raw text span as it appears in the source. Optional for visual entities (e.g. logos, signatures).

      • at most 4096 characters
    • value string | number | boolean | null

      The machine-readable value (e.g. '2025-11-21', 3500.00, true).

      • string: at most 4096 characters
    • definition string

      Definition of the concept.

      • at most 1024 characters
    • score number

      The confidence score for this extraction, ranging from 0.0 (uncertain) to 1.0 (certain).

      • 0 to 1
    • location array of object

      The physical location(s) of the entity.

      • at most 10 items

      Exactly one of these forms:

      1. Block Reference object
        • type constant "block_ref" required
        • block_id string required
          • at most 128 characters
      2. Geometric Location object
        • type constant "block" required
        • block_type enum required

          Allowed values: "box", "polygon"

        • page_number integer required
          • ≥ 1
        • box object
          • x number required
          • y number required
          • width number required
          • height number required
        • polygon array of object
          • 3 to 100 items
          • x number required
          • y number required

        Rules:

        • When block_type is "box", box is required.
          Show the JSON Schema
          {  "if": {    "properties": {      "block_type": {        "const": "box"      }    }  },  "then": {    "required": [      "box"    ]  }}
        • When block_type is "polygon", polygon is required.
          Show the JSON Schema
          {  "if": {    "properties": {      "block_type": {        "const": "polygon"      }    }  },  "then": {    "required": [      "polygon"    ]  }}
    • attributes object

      Arbitrary metadata (e.g. currency, gender). Flat key-value pairs.

      • at most 16 properties
      • * string | number | boolean | null

        Any other key.

        • string: at most 1024 characters
  • attributes object

    Arbitrary metadata relevant to this extraction.

    • at most 16 properties
    • * string | number | boolean | null

      Any other key.

      • string: at most 1024 characters

Rules:

  • When entities is empty: at least one of vocabulary, vocabulary_url must be present.
    Show the JSON Schema
    {  "if": {    "properties": {      "entities": {        "maxItems": 0      }    }  },  "then": {    "anyOf": [      {        "required": [          "vocabulary"        ]      },      {        "required": [          "vocabulary_url"        ]      }    ]  }}
  • When unit is "normalized", further limits apply.
    Show the JSON Schema
    {  "if": {    "properties": {      "unit": {        "const": "normalized"      }    }  },  "then": {    "properties": {      "entities": {        "items": {          "properties": {            "location": {              "items": {                "properties": {                  "box": {                    "properties": {                      "x": {                        "maximum": 1                      },                      "y": {                        "maximum": 1                      },                      "width": {                        "maximum": 1                      },                      "height": {                        "maximum": 1                      }                    }                  },                  "polygon": {                    "items": {                      "properties": {                        "x": {                          "maximum": 1                        },                        "y": {                          "maximum": 1                        }                      }                    }                  }                }              }            }          }        }      }    }  }}
  • When unit is "per_mille", further limits apply.
    Show the JSON Schema
    {  "if": {    "properties": {      "unit": {        "const": "per_mille"      }    }  },  "then": {    "properties": {      "entities": {        "items": {          "properties": {            "location": {              "items": {                "properties": {                  "box": {                    "properties": {                      "x": {                        "maximum": 1000                      },                      "y": {                        "maximum": 1000                      },                      "width": {                        "maximum": 1000                      },                      "height": {                        "maximum": 1000                      }                    }                  },                  "polygon": {                    "items": {                      "properties": {                        "x": {                          "maximum": 1000                        },                        "y": {                          "maximum": 1000                        }                      }                    }                  }                }              }            }          }        }      }    }  }}

Copyright 2025-2026 Dorsal Hub LTD. Licensed under Apache-2.0.