https://www.w3.org/TR/speech-grammar/
{
"grammar": {
"head":
{
"gramName": "Test1",
"version": "1.0",
"lang": "zh-CN",
"mode": "voice",
"scope": "public"
},
"ruleid":
[
{"id": "1","name": "select airplane"},
{"id": "2","name": "select traffic"},
{"id": "3","name": "select illegal items"},
{"id": "4","name": "airplane"},
{"id": "5","name": "company"},
{"id": "6","name": "vehicle"},
{"id": "7","name": "items"},
{"id": "8","name": "extend"}
],
"idref": ["1", "2", "3", "4", "5", "6", "7","8"],
"select airplane": {
"example": ["查询航班", "航班查询", "查询飞机"],
"verb": ["查询", "查", "要", "航班", "飞机"],
"words":
[
{
"item": "航班查询",
"one-of": ["吧", "啊", "呀"]
}
],
"idref": ["4", "5"]
},
"select traffic": {
"example": ["查询机场交通", "机场交通查询"],
"verb": ["查询", "查", "要", "交通"],
"words":
[
{
"item": "机场交通查询",
"one-of": ["吧", "啊", "呀", "嗯"]
}
],
"idref": ["6"]
},
"select illegal items": {
"example": ["违规物品查询", "查询违规物品"],
"verb": ["查询", "查", "要"],
"words":
[
{
"item": "违规物品查询",
"one-of": ["我", "要", "帮", "啊", "呀"]
}
],
"idref": ["7"]
},
"airplane": {
"example": [],
"verb": [],
"words":
[
{
"item": "6770",
"one-of": []
},
{
"item": "6887"
},
{
"item": "5006"
}
]
},
"company": {
"words":
[
{
"item": "南方航空公司",
"one-of": ["吧", "啊", "呀", "的"]
},
{
"item": "厦门国际机场",
"one-of": ["吧", "啊", "呀", "的"]
}
],
"idref": []
},
"vehicle": {
"words":
[
{
"item": "地铁",
"one-of": ["的", "是", "啊"]
},
{
"item": "公交",
"one-of": ["的", "是", "啊"]
},
{
"item": "大巴",
"one-of": ["的", "是", "啊"]
}
]
},
"items": {
"example": ["酒能不能带上飞机", "毒品能不能带上飞机", "爆炸物能不能带上飞机"],
"words":
[
{
"item": "酒",
"hom": {
"item": "酒",
"texts": ["就", "救", "久", "旧","九","9"],
"count": 1,
"index": [1]
},
"one-of": ["的", "是", "啊"]
},
{
"item": "毒品",
"one-of": ["的", "是", "啊"]
},
{
"item": "爆炸物",
"one-of": ["的", "是", "啊"]
}
]
},
"extend": {
"gram":
{
"name": "Test2",
"path": "../conf/Test2.fgram",
"url": "",
"idref": ["1"]
}
}
}
}
GramCode