File size: 7,917 Bytes
d4558b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://huggingface.co/datasets/egobowwow/universal-annotations/resolve/v1.0.0/schemas/universal-annotation-packet.schema.json",
"title": "Universal Annotation Packet",
"description": "Dataset-independent atomic claims with evidence, scope, epistemic status, provenance, language surfaces, and explicit availability.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "packet_id", "ontology", "source", "evidence", "nodes", "claims", "expressions", "availability"],
"properties": {
"schema_version": {"const": "1.0.0"},
"packet_id": {"type": "string", "pattern": "^uap:sha256:[0-9a-f]{64}$"},
"ontology": {
"type": "object",
"additionalProperties": false,
"required": ["ontology_id", "revision_digest"],
"properties": {
"ontology_id": {"type": "string", "minLength": 1},
"revision_digest": {"$ref": "#/$defs/digest"}
}
},
"source": {"$ref": "#/$defs/source"},
"evidence": {"type": "array", "items": {"$ref": "#/$defs/evidence"}},
"nodes": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/node"}},
"claims": {"type": "array", "items": {"$ref": "#/$defs/claim"}},
"expressions": {"type": "array", "items": {"$ref": "#/$defs/expression"}},
"availability": {"type": "array", "items": {"$ref": "#/$defs/availability"}}
},
"$defs": {
"id": {"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_.:-]*$", "maxLength": 192},
"digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
"nullableDigest": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/digest"}]},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["dataset_id", "schema_id", "record_id", "revision_digest", "native_record_digest", "license_expression"],
"properties": {
"dataset_id": {"$ref": "#/$defs/id"},
"schema_id": {"$ref": "#/$defs/id"},
"record_id": {"type": "string", "minLength": 1},
"revision_digest": {"$ref": "#/$defs/digest"},
"native_record_digest": {"$ref": "#/$defs/digest"},
"license_expression": {"type": ["string", "null"]}
}
},
"selector": {
"type": "object",
"additionalProperties": false,
"required": ["clock_id", "start_ns", "end_ns"],
"properties": {
"clock_id": {"$ref": "#/$defs/id"},
"start_ns": {"type": "integer", "minimum": 0},
"end_ns": {"type": "integer", "minimum": 1}
}
},
"evidence": {
"type": "object",
"additionalProperties": false,
"required": ["evidence_id", "evidence_kind", "artifact_digest", "selector", "source_field_path"],
"properties": {
"evidence_id": {"$ref": "#/$defs/id"},
"evidence_kind": {"enum": ["video", "image", "audio", "text", "sensor", "geometry", "human_judgment", "model_output", "derived_record"]},
"artifact_digest": {"$ref": "#/$defs/nullableDigest"},
"selector": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/selector"}]},
"source_field_path": {"type": ["string", "null"]}
}
},
"node": {
"type": "object",
"additionalProperties": false,
"required": ["node_id", "node_kind", "concept_id", "attributes"],
"properties": {
"node_id": {"$ref": "#/$defs/id"},
"node_kind": {"enum": ["event", "agent", "effector", "object", "location", "state", "task", "sensor", "frame"]},
"concept_id": {"$ref": "#/$defs/id"},
"attributes": {"type": "object"}
}
},
"claimObject": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "node_id"],
"properties": {"kind": {"const": "node_ref"}, "node_id": {"$ref": "#/$defs/id"}}
},
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "concept_id"],
"properties": {"kind": {"const": "concept"}, "concept_id": {"$ref": "#/$defs/id"}}
},
{
"type": "object",
"additionalProperties": false,
"required": ["kind", "value", "unit_id"],
"properties": {
"kind": {"const": "value"},
"value": {},
"unit_id": {"type": ["string", "null"]}
}
}
]
},
"scope": {
"type": ["object", "null"],
"additionalProperties": false,
"properties": {
"clock_id": {"type": ["string", "null"]},
"start_ns": {"type": ["integer", "null"], "minimum": 0},
"end_ns": {"type": ["integer", "null"], "minimum": 1},
"coordinate_frame_id": {"type": ["string", "null"]}
}
},
"epistemic": {
"type": "object",
"additionalProperties": false,
"required": ["status", "confidence", "uncertainty", "visibility"],
"properties": {
"status": {"enum": ["observed", "measured", "human_annotated", "model_predicted", "derived", "reported"]},
"confidence": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
"uncertainty": {"type": ["object", "null"]},
"visibility": {"enum": ["visible", "partially_occluded", "fully_occluded", "out_of_view", "not_visual", "unknown"]}
}
},
"provenance": {
"type": "object",
"additionalProperties": false,
"required": ["producer_kind", "producer_digest", "method_id", "review_status", "review_receipt_digest"],
"properties": {
"producer_kind": {"enum": ["sensor", "human", "model", "algorithm", "mixed"]},
"producer_digest": {"$ref": "#/$defs/digest"},
"method_id": {"$ref": "#/$defs/id"},
"review_status": {"enum": ["unreviewed", "single_review", "double_review", "adjudicated", "sensor_qa_pass"]},
"review_receipt_digest": {"$ref": "#/$defs/nullableDigest"}
}
},
"claim": {
"type": "object",
"additionalProperties": false,
"required": ["claim_id", "subject_id", "predicate_id", "object", "scope", "evidence_ids", "epistemic", "provenance"],
"properties": {
"claim_id": {"$ref": "#/$defs/id"},
"subject_id": {"$ref": "#/$defs/id"},
"predicate_id": {"$ref": "#/$defs/id"},
"object": {"$ref": "#/$defs/claimObject"},
"scope": {"$ref": "#/$defs/scope"},
"evidence_ids": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/id"}},
"epistemic": {"$ref": "#/$defs/epistemic"},
"provenance": {"$ref": "#/$defs/provenance"}
}
},
"expression": {
"type": "object",
"additionalProperties": false,
"required": ["expression_id", "locale", "text", "speech_act", "claim_ids", "method", "review_status", "review_receipt_digest"],
"properties": {
"expression_id": {"$ref": "#/$defs/id"},
"locale": {"type": "string", "minLength": 2},
"text": {"type": "string", "minLength": 1},
"speech_act": {"enum": ["observation", "directive", "question", "answer", "warning", "feedback", "unknown"]},
"claim_ids": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/id"}},
"method": {"enum": ["source", "human_translation", "algorithmic_projection", "model_candidate"]},
"review_status": {"enum": ["source_verified", "pending", "single_review", "bilingual_adjudicated"]},
"review_receipt_digest": {"$ref": "#/$defs/nullableDigest"}
}
},
"availability": {
"type": "object",
"additionalProperties": false,
"required": ["dimension_id", "status", "reason"],
"properties": {
"dimension_id": {"$ref": "#/$defs/id"},
"status": {"enum": ["present", "not_collected", "not_applicable", "unknown"]},
"reason": {"type": "string", "minLength": 1}
}
}
}
}
|