{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/dekka-cloud/dekka-veil/research/annotation/schema.json", "title": "Veil annotated record", "description": "One JSON Lines record of annotated text. Spans are half-open and carry both UTF-8 byte offsets (Veil's canonical unit) and Unicode code point offsets.", "type": "object", "required": ["id", "text", "spans", "languages", "domain", "template_family", "synthetic", "provenance", "licence"], "additionalProperties": false, "properties": { "id": { "type": "string", "description": "Stable identifier, unique within the dataset" }, "text": { "type": "string" }, "spans": { "type": "array", "items": { "type": "object", "required": ["label", "start", "end", "char_start", "char_end"], "additionalProperties": false, "properties": { "label": { "type": "string", "description": "A label from research/annotation/guidelines.md" }, "start": { "type": "integer", "minimum": 0, "description": "UTF-8 byte offset, inclusive" }, "end": { "type": "integer", "minimum": 0, "description": "UTF-8 byte offset, exclusive" }, "char_start": { "type": "integer", "minimum": 0, "description": "Unicode code point offset, inclusive" }, "char_end": { "type": "integer", "minimum": 0, "description": "Unicode code point offset, exclusive" }, "context_labels": { "type": "array", "items": { "type": "string" }, "description": "Extra context such as MOBILE_MONEY" } } } }, "hard_negative": { "type": "boolean", "description": "True when the record holds look-alikes that must not be labelled" }, "decoys": { "type": "array", "description": "Positions of look-alikes in a hard negative, for error analysis. Never labels.", "items": { "type": "object", "required": ["kind", "start", "end"], "properties": { "kind": { "type": "string" }, "start": { "type": "integer" }, "end": { "type": "integer" } } } }, "languages": { "type": "array", "items": { "type": "string" }, "minItems": 1, "description": "BCP 47 tags of every language in the text" }, "domain": { "type": "string" }, "template_family": { "type": "string", "description": "The template the record came from; splits never share a family" }, "synthetic": { "type": "boolean" }, "provenance": { "type": "string" }, "licence": { "type": "string" } } }