Weksa/schemas/cultnet/weksa.corpus_item.schema.json

184 lines
3.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "CorpusItem",
"description": "Key: `item:<source-slug>:<n>`.",
"type": "object",
"properties": {
"admitted_on": {
"type": "string"
},
"group": {
"description": "The unit the split hashes: a scene, a fixture, a work.",
"type": "string"
},
"id": {
"type": "string"
},
"language": {
"type": "string"
},
"prior_turns": {
"type": "array",
"items": {
"$ref": "#/$defs/Turn"
}
},
"source": {
"$ref": "#/$defs/Source"
},
"speaker": {
"type": "string"
},
"supersedes": {
"description": "Key of the item this one corrects.",
"type": [
"string",
"null"
]
},
"text": {
"type": "string"
},
"withdrawn": {
"type": "boolean"
}
},
"required": [
"id",
"text",
"language",
"speaker",
"group",
"prior_turns",
"source",
"admitted_on",
"withdrawn"
],
"$defs": {
"Source": {
"oneOf": [
{
"type": "string",
"enum": [
"OperatorWritten"
]
},
{
"description": "A line from a cast member's hand-authored fixture.",
"type": "object",
"properties": {
"CastAuthored": {
"type": "object",
"properties": {
"fixture": {
"type": "string"
},
"persona": {
"type": "string"
}
},
"required": [
"persona",
"fixture"
]
}
},
"additionalProperties": false,
"required": [
"CastAuthored"
]
},
{
"type": "object",
"properties": {
"OperatorApproved": {
"type": "object",
"properties": {
"note": {
"type": "string"
}
},
"required": [
"note"
]
}
},
"additionalProperties": false,
"required": [
"OperatorApproved"
]
},
{
"type": "object",
"properties": {
"PublicDomain": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"edition_url": {
"type": "string"
},
"work": {
"type": "string"
}
},
"required": [
"work",
"author",
"edition_url"
]
}
},
"additionalProperties": false,
"required": [
"PublicDomain"
]
},
{
"description": "Labelled model output; never in the test split, never judged by its own family.",
"type": "object",
"properties": {
"ModelWritten": {
"type": "object",
"properties": {
"model_family": {
"type": "string"
},
"prompt_digest": {
"type": [
"string",
"null"
]
}
},
"required": [
"model_family"
]
}
},
"additionalProperties": false,
"required": [
"ModelWritten"
]
}
]
},
"Turn": {
"type": "object",
"properties": {
"speaker": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"speaker",
"text"
]
}
}
}