Weksa/schemas/cultnet/weksa.scene.schema.json
Weksa 6ef1b7e034 Speaker and Scene documents, SpeakerStateStore, with_scene on a Scene document
Slot Speaker, weksa.speaker and weksa.scene append-only revisions in one
store, V16, feature_refusals as the one feature check, speaker_scene_revision
(Speaker features 22-24), schemas, docs and map lines. Part 1 of map cut 4b.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 02:34:10 +00:00

224 lines
5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Scene",
"description": "A scene: its participants and the relations between them. Key\n`scene:<group>@<n>`; a revision appends and never edits.",
"type": "object",
"properties": {
"annotator": {
"$ref": "#/$defs/Annotator"
},
"group": {
"description": "The corpus split group of the scene, a slug.",
"type": "string"
},
"inventory_rev": {
"type": "integer",
"format": "uint32",
"minimum": 0
},
"n": {
"description": "The revision, from 1.",
"type": "integer",
"format": "uint32",
"minimum": 0
},
"participants": {
"type": "array",
"items": {
"$ref": "#/$defs/EntityId"
}
},
"relations": {
"type": "array",
"items": {
"$ref": "#/$defs/PairRelation"
}
}
},
"required": [
"group",
"n",
"inventory_rev",
"participants",
"relations",
"annotator"
],
"$defs": {
"Annotator": {
"description": "Who annotated a document. A model's generator is an attestation string, held\nto the same form as every provenance string.",
"oneOf": [
{
"type": "string",
"enum": [
"Operator"
]
},
{
"type": "object",
"properties": {
"Model": {
"type": "object",
"properties": {
"family": {
"$ref": "#/$defs/ModelFamily"
},
"generator": {
"type": "string"
}
},
"required": [
"family",
"generator"
]
}
},
"additionalProperties": false,
"required": [
"Model"
]
}
]
},
"EntityId": {
"type": "string",
"pattern": "^entity:[a-z0-9]([a-z0-9-]{0,46}[a-z0-9])?$"
},
"FeatValue": {
"oneOf": [
{
"type": "object",
"properties": {
"Grade": {
"$ref": "#/$defs/Grade"
}
},
"additionalProperties": false,
"required": [
"Grade"
]
},
{
"description": "A label the feature's inventory entry declares.",
"type": "object",
"properties": {
"Option": {
"$ref": "#/$defs/OptionLabel"
}
},
"additionalProperties": false,
"required": [
"Option"
]
},
{
"type": "object",
"properties": {
"Flag": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"Flag"
]
}
]
},
"FeatureValue": {
"type": "object",
"properties": {
"feature": {
"description": "Feature id.",
"$ref": "#/$defs/InvId"
},
"value": {
"$ref": "#/$defs/FeatValue"
}
},
"required": [
"feature",
"value"
]
},
"Grade": {
"type": "integer",
"maximum": 1000,
"minimum": 0
},
"InvId": {
"type": "string",
"pattern": "^(concept|frame|role|relation|speech_act|feature|referent_kind|extension):[1-9][0-9]*$"
},
"ModelFamily": {
"description": "The family of the model that wrote a line.",
"oneOf": [
{
"type": "string",
"enum": [
"Anthropic",
"OpenAi",
"Google",
"Alibaba",
"Meta",
"Mistral"
]
},
{
"description": "Nothing records which family wrote the line.",
"type": "string",
"const": "Unrecorded"
}
]
},
"OptionLabel": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,23}$"
},
"PairRelation": {
"description": "The speaker's relation to one party: feature values of slot `Scene`.",
"type": "object",
"properties": {
"features": {
"type": "array",
"items": {
"$ref": "#/$defs/FeatureValue"
}
},
"from": {
"$ref": "#/$defs/EntityId"
},
"to": {
"$ref": "#/$defs/Party"
}
},
"required": [
"from",
"to",
"features"
]
},
"Party": {
"description": "The other party of a relation. `Unnamed` is an addressee the scene does not\nname, such as the player or a crowd.",
"oneOf": [
{
"type": "string",
"enum": [
"Unnamed"
]
},
{
"type": "object",
"properties": {
"Named": {
"$ref": "#/$defs/EntityId"
}
},
"additionalProperties": false,
"required": [
"Named"
]
}
]
}
}
}