| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "https://huggingface.co/datasets/egobowwow/egobowwow-1k/resolve/v1.1.0/schemas/label-language-profile.schema.json", |
| "title": "EgoBowWow label-language profile bundle", |
| "description": "Versioned syntax, vocabulary, rubric, loss hazards, grounded-world binding, and lexical mappings for translating annotation labels through Universal Label Semantics.", |
| "type": "object", |
| "additionalProperties": false, |
| "required": [ |
| "$schema", |
| "schema_version", |
| "bundle_id", |
| "interlingua_id", |
| "design_contract", |
| "teacher_rubric", |
| "label_only_predicate_concepts", |
| "label_languages", |
| "lexical_mappings", |
| "entity_concepts", |
| "entity_lexical_mappings", |
| "controlled_frames" |
| ], |
| "properties": { |
| "$schema": {"const": "../schemas/label-language-profile.schema.json"}, |
| "schema_version": {"const": "1.1.0"}, |
| "bundle_id": {"$ref": "#/$defs/id"}, |
| "interlingua_id": {"$ref": "#/$defs/id"}, |
| "design_contract": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": [ |
| "translation_shape", |
| "native_preservation", |
| "grounding_invariant", |
| "abstention", |
| "teacher_authority", |
| "mapping_relations" |
| ], |
| "properties": { |
| "translation_shape": {"type": "string", "minLength": 1}, |
| "native_preservation": {"type": "string", "minLength": 1}, |
| "grounding_invariant": {"type": "string", "minLength": 1}, |
| "abstention": {"type": "string", "minLength": 1}, |
| "teacher_authority": {"type": "string", "minLength": 1}, |
| "mapping_relations": { |
| "type": "array", |
| "minItems": 8, |
| "uniqueItems": true, |
| "items": {"$ref": "#/$defs/mappingRelation"} |
| } |
| } |
| }, |
| "teacher_rubric": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["decision_order", "required_checks", "forbidden_shortcuts"], |
| "properties": { |
| "decision_order": {"$ref": "#/$defs/nonEmptyStrings"}, |
| "required_checks": {"$ref": "#/$defs/nonEmptyStrings"}, |
| "forbidden_shortcuts": {"$ref": "#/$defs/nonEmptyStrings"} |
| } |
| }, |
| "label_only_predicate_concepts": { |
| "type": "object", |
| "minProperties": 1, |
| "propertyNames": {"$ref": "#/$defs/id"}, |
| "additionalProperties": {"type": "string", "minLength": 1} |
| }, |
| "label_languages": { |
| "type": "array", |
| "minItems": 2, |
| "items": {"$ref": "#/$defs/profile"} |
| }, |
| "lexical_mappings": { |
| "type": "array", |
| "items": {"$ref": "#/$defs/lexicalMapping"} |
| }, |
| "entity_concepts": { |
| "type": "object", |
| "propertyNames": {"$ref": "#/$defs/id"}, |
| "additionalProperties": {"type": "string", "minLength": 1} |
| }, |
| "entity_lexical_mappings": { |
| "type": "array", |
| "items": {"$ref": "#/$defs/lexicalMapping"} |
| }, |
| "controlled_frames": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["predicate_concept_id", "patient_concept_id"], |
| "properties": { |
| "predicate_concept_id": {"$ref": "#/$defs/id"}, |
| "patient_concept_id": {"$ref": "#/$defs/id"} |
| } |
| } |
| } |
| }, |
| "$defs": { |
| "id": {"type": "string", "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}, |
| "nonEmptyStrings": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": {"type": "string", "minLength": 1} |
| }, |
| "mappingRelation": { |
| "enum": [ |
| "exact_match", |
| "close_match", |
| "broad_match", |
| "narrow_match", |
| "related_match", |
| "composite", |
| "contextual", |
| "unmapped" |
| ] |
| }, |
| "inputBinding": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["paths", "mode"], |
| "properties": { |
| "paths": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"} |
| }, |
| "mode": {"enum": ["first", "collect"]} |
| } |
| }, |
| "outputBinding": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["slot", "mode"], |
| "properties": { |
| "slot": {"$ref": "#/$defs/id"}, |
| "mode": {"enum": ["scalar", "list", "text", "concept", "generated_text"]} |
| } |
| }, |
| "profile": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": [ |
| "language_id", |
| "title", |
| "family", |
| "source_ids", |
| "native_units", |
| "annotation_rubric", |
| "known_loss_hazards", |
| "input_bindings", |
| "output_bindings", |
| "lexicalizations" |
| ], |
| "properties": { |
| "language_id": {"$ref": "#/$defs/id"}, |
| "title": {"type": "string", "minLength": 1}, |
| "family": {"$ref": "#/$defs/id"}, |
| "source_ids": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": {"$ref": "#/$defs/id"} |
| }, |
| "evidence_urls": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": {"type": "string", "format": "uri", "pattern": "^https://"} |
| }, |
| "native_units": {"$ref": "#/$defs/nonEmptyStrings"}, |
| "annotation_rubric": {"type": "string", "minLength": 1}, |
| "known_loss_hazards": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": {"type": "string", "minLength": 1} |
| }, |
| "default_language_tag": { |
| "type": "string", |
| "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$" |
| }, |
| "shallow_text_parse": {"type": "boolean"}, |
| "closed_predicate_vocabulary": {"type": "boolean"}, |
| "canonical_semantics": {"type": "boolean"}, |
| "default_speech_act": {"$ref": "#/$defs/id"}, |
| "controlled_surface": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["template", "realized_slots"], |
| "properties": { |
| "template": { |
| "type": "string", |
| "minLength": 1, |
| "allOf": [ |
| {"pattern": "\\{predicate\\}"}, |
| {"pattern": "\\{patient\\}"} |
| ] |
| }, |
| "terminal_punctuation": {"type": "string", "maxLength": 1}, |
| "realized_slots": { |
| "type": "array", |
| "minItems": 2, |
| "uniqueItems": true, |
| "items": {"$ref": "#/$defs/id"} |
| } |
| } |
| }, |
| "input_bindings": { |
| "type": "object", |
| "propertyNames": {"$ref": "#/$defs/id"}, |
| "additionalProperties": {"$ref": "#/$defs/inputBinding"} |
| }, |
| "preserved_only_fields": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"} |
| }, |
| "output_bindings": { |
| "type": "object", |
| "propertyNames": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"}, |
| "additionalProperties": {"$ref": "#/$defs/outputBinding"} |
| }, |
| "lexicalizations": { |
| "type": "object", |
| "propertyNames": {"$ref": "#/$defs/id"}, |
| "additionalProperties": {"type": "string", "minLength": 1} |
| }, |
| "entity_lexicalizations": { |
| "type": "object", |
| "propertyNames": {"$ref": "#/$defs/id"}, |
| "additionalProperties": {"type": "string", "minLength": 1} |
| } |
| } |
| }, |
| "lexicalMapping": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": [ |
| "rule_id", |
| "source_language_id", |
| "source_lexeme", |
| "concept_id", |
| "mapping_relation" |
| ], |
| "properties": { |
| "rule_id": {"$ref": "#/$defs/id"}, |
| "source_language_id": { |
| "oneOf": [ |
| {"const": "*"}, |
| {"$ref": "#/$defs/id"} |
| ] |
| }, |
| "source_lexeme": {"type": "string", "minLength": 1}, |
| "concept_id": {"$ref": "#/$defs/id"}, |
| "mapping_relation": {"$ref": "#/$defs/mappingRelation"} |
| } |
| } |
| } |
| } |
|
|