182 lines
4.3 KiB
JSON
182 lines
4.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Structured Media Builder: qa",
|
|
"type": "object",
|
|
"properties": {
|
|
"schema_version": {
|
|
"const": "1.0"
|
|
},
|
|
"media_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
},
|
|
"canonical_url": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"rights": {
|
|
"type": "object",
|
|
"properties": {
|
|
"statement": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"license": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"usage_info": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"redistribution_allowed": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"statement",
|
|
"license",
|
|
"usage_info",
|
|
"redistribution_allowed"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"input_sha256": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{64}$"
|
|
},
|
|
"qa": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"qa_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
|
},
|
|
"question": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"answer": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"answer_type": {
|
|
"enum": [
|
|
"extractive",
|
|
"synthesis"
|
|
]
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chunk_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
|
},
|
|
"cue_id": {
|
|
"type": "string",
|
|
"pattern": "^cue-[0-9]{6}$"
|
|
},
|
|
"quote": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"media_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
},
|
|
"start_seconds": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
},
|
|
"end_seconds": {
|
|
"type": "number",
|
|
"exclusiveMinimum": 0
|
|
},
|
|
"transcript_url": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://"
|
|
},
|
|
"playback_url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"chunk_id",
|
|
"cue_id",
|
|
"quote",
|
|
"media_id",
|
|
"start_seconds",
|
|
"end_seconds",
|
|
"transcript_url",
|
|
"playback_url"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"media_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
}
|
|
},
|
|
"required": [
|
|
"qa_id",
|
|
"question",
|
|
"answer",
|
|
"answer_type",
|
|
"evidence",
|
|
"media_id"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"schema_version",
|
|
"media_id",
|
|
"canonical_url",
|
|
"language",
|
|
"rights",
|
|
"input_sha256",
|
|
"qa"
|
|
],
|
|
"additionalProperties": false
|
|
}
|