文件
edu-content/schemas/vocab-1.1.schema.json

42 行
1.8 KiB
JSON

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "vocab-1.1 word entry",
"description": "词库条目。在原有 vocab 记录上新增 source.source_id(必填)血缘字段;保留 licence(英式)记录级标注。",
"type": "object",
"required": ["id", "level", "headword", "pos", "origin", "source", "gloss"],
"properties": {
"id": { "type": "string" },
"level": { "type": "string", "enum": ["A2", "B1"] },
"headword": { "type": "string" },
"pos": { "type": "array", "items": { "type": "string" } },
"pos_notes": { "type": ["string", "null"] },
"examples": { "type": ["array", "null"], "items": { "type": "object" } },
"phrases": { "type": ["array", "null"] },
"topics": { "type": ["array", "null"] },
"origin": { "type": "string" },
"source": {
"type": "object",
"required": ["source_id"],
"properties": {
"source_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
"source_item_id": { "type": ["string", "null"] },
"file": { "type": ["string", "null"] },
"url": { "type": ["string", "null"] },
"publisher": { "type": ["string", "null"] },
"licence": { "type": "string", "enum": ["official-free", "cc-by", "cc-by-sa", "cc-nc-education", "restricted", "internal-only", "llm-generated", "unknown"] }
}
},
"gloss": {
"type": "object",
"required": ["zh", "source", "licence"],
"properties": {
"zh": { "type": "string" },
"phonetic": { "type": ["string", "null"] },
"phonetic_source": { "type": ["string", "null"] },
"source": { "type": "string" },
"licence": { "type": "string", "enum": ["official-free", "cc-by", "cc-by-sa", "cc-nc-education", "restricted", "internal-only", "llm-generated", "unknown"] }
}
}
}
}