各领域语义表示协议

天气

天气(weather)能支持对天气、温度、风速等属性的查询的解析。天气意图及词槽表示如下:
注:"/"表示多个示例值分割,以下各领域皆同。

示例:

query:北京明天天气

{
    "appid": 597,    
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "weather",
            "intent": "USER_WEATHER ",
            "score": 100,
            "slots": {
                "user_loc": [
                    {
                        "word": "北京",
                        "norm": ""
                    }
                ],
                "user_time ": [
                    {
                        "word": "明天",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "北京 明天 天气",
    "raw_text": "北京明天天气",
    "err_no": 0
}

query:明天几度

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "weather",
            "intent": "USER_TEMP",
            "score": 100,
            "slots": {
                "user_time ": [
                    {
                        "word": "明天",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "明天 几 度",
    "raw_text": "明天几度",
    "err_no": 0
}

列车

列车(train)能够支持通用列车信息的查询解析,也可以解析对坐席、列车类别、票价等特殊查询请求的解析。列车意图及词槽表示如下:

示例:

query:北京西站到上海的高铁

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "train",
            "intent": "BOOK_TICKET",
            "score": 100,
            "slots": {
                "user_start_station": [
                    {
                        "word": "北京西站",
                        "norm": ""
                    }
                ],
                  "user_arrival_city": [
                    {
                        "word": "上海",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "北京 西站 到 上海 的 高铁",
    "raw_text": "北京西站到上海的高铁",
    "err_no": 0
}

query:北京西到无锡的动车几点发车

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "train",
            "intent": "START_TIME",
            "score": 100,
            "slots": {
                "user_start_station": [
                    {
                        "word": "北京西站",
                        "norm": ""
                    }
                ],
                  "user_arrival_city": [
                    {
                        "word": "上海",
                        "norm": ""
                    }
                ],
                  "user_train_type": [
                    {
                        "word": "动车",
                        "norm": ""
                    }
                ]   
            }
        }
    ],
    "parsed_text": "北京西到无锡的动车几点发车",
    "raw_text": "北京 西 到 无锡 的 动车 几 点 发车",
    "err_no": 0
}

航班

航班(flight)支持基于航班类型、出发日期、航空公司、城市等的航班信息、机票信息的语义解析。航班意图及词槽表示如下:

示例:

query:明天从北京到上海的东航机票

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "flight",
            "intent": "BOOK_TICKET",
            "score": 100,
            "slots": {
                "user_start_time": [
                    {
                        "word": "明天",
                        "norm": ""
                    }
                ],
                 "user_start_city": [
                    {
                        "word": "北京",
                        "norm": ""
                    }
                ],
                  "user_arrival_city": [
                    {
                        "word": "上海",
                        "norm": ""
                    }
                ],
                  "user_company": [
                    {
                        "word": "东航",
                        "norm": ""
                    }
                ]   
            }
        }
    ],
    "parsed_text": "明天从北京到上海的东航机票",
    "raw_text": "明天 从 北京 到 上海 的 东航 机票",
    "err_no": 0
}

电话

电话(telephone)提供常用的拨打电话、通话记录查看等操作的语义解析。电话意图及词槽表示如下:

示例:

query:打电话给妈妈北京移动的号码

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " telephone ",
            "intent": "PHONE_CALL",
            "score": 100,
            "slots": {
                "user_call_target": [
                    {
                        "word": "妈妈",
                        "norm": ""
                    }
                ],
                 "user_phone_loc": [
                    {
                        "word": "北京",
                        "norm": ""
                    }
                ],
                  "user_card_type": [
                    {
                        "word": "移动",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "打电话给妈妈北京移动的号码",
    "raw_text": "打电话 给 妈妈 北京 移动 的 号码",
    "err_no": 0
}

query:打开未接来电

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " telephone",
            "intent": "VIEW_MISS_CALL",
            "score": 100,
            "slots": {
            }
        }
    ],
    "parsed_text": "打开未接来电",
    "raw_text": "打开 未 接 来电",
    "err_no": 0
}

订咖啡

订咖啡(coffee)提供咖啡预定等操作的语义解析。订咖啡意图及词槽表示如下:

示例:

query:给我来杯拿铁

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " coffee",
            "intent": "ORDERCOFFEE",
            "score": 100,
            "slots": {
                "user_coffee_type": [
                    {
                        "word": "拿铁",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "给我来杯拿铁",
    "raw_text": "给 我 来 杯 拿铁",
    "err_no": 0
}

query:要两杯不加糖的摩卡

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " coffee",
            "intent": "ORDERCOFFEE",
            "score": 100,
            "slots": {
                "user_coffee_type": [
                    {
                        "word": "摩卡",
                        "norm": ""
                    }
                ],
                 "user_coffee_type": [
                    {
                        "word": "两杯",
                        "norm": ""
                    }
                ],
                 " user_coffee_descript": [
                    {
                        "word": "不加糖",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "要两杯不加糖的摩卡",
    "raw_text": "要 两杯 不 加糖 的 摩卡",
    "err_no": 0
}

电影播放

电影播放(movie)提供电影播放控制、电影信息查询、电影播放、搜索记录等的语义解析。电影播放意图及词槽表示如下:

示例:

query:我想看阿甘正传

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " movie",
            "intent": "MOVIE_INFO",
            "score": 100,
            "slots": {
                "user_movie_name": [
                    {
                        "word": "阿甘正传",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "我想看阿甘正传",
    "raw_text": "我 想 看 阿甘 正 传",
    "err_no": 0
}

query:播放刘德华的电影

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " movie",
            "intent": "MOVIE_INFO",
            "score": 100,
            "slots": {
                "user_actor": [
                    {
                        "word": "刘德华",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "播放刘德华的电影",
    "raw_text": "播放 刘德华 的 电影",
    "err_no": 0
}

页面屏幕控制

页面屏幕控制(screen_control)提供屏幕滚动、页面跳转、列表排序、列表选择操作的等语义解析。页面屏幕控制意图及词槽表示如下:

示例:

query:往上翻两页

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " screen_control",
            "intent": " SCROLL_CTRL",
            "score": 100,
            "slots": {
                "user_scroll_direction": [
                    {
                        "word": "上",
                        "norm": ""
                    }
                ],
                 "user_scroll_index": [
                    {
                        "word": "两",
                        "norm": ""
                    }
                ],
                 "user_scroll_unit": [
                    {
                        "word": "页",
                        "norm": ""
                    }
                ],

            }
        }
    ],
    "parsed_text": "往上翻两页",
    "raw_text": "往上 翻 两 页",
    "err_no": 0
}

query:按时间排序

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " screen_control",
            "intent": "LIST_SORT_CON",
            "score": 100,
            "slots": {
                "user_sort_condition": [
                    {
                        "word": "时间",
                        "norm": ""
                    }
                ]
            }
        }
    ]
    "parsed_text": "按时间排序",
    "raw_text": "按 时间 排序",
    "err_no": 0
}

电视剧

电视剧(tv)提供基于电视剧属性的查询和泛查询的语义解析。电视剧意图及词槽表示如下:

示例:

query:我要看娘道第三集

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "tv",
            "intent": "TVINFO",
            "score": 100,
            "slots": {
                "user_tv_name": [
                    {
                        "word": "娘道",
                        "norm": ""
                    }
                ],
                  "user_tv_episode": [
                    {
                        "word": "第三集",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "我要看娘道第三集",
    "raw_text": "我 要 看 娘道 第 三 集",
    "err_no": 0
}

query:最近有什么好看的电视剧

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "tv",
            "intent": "TVRANK",
            "score": 100,
            "slots": {
                "user_sortby": [
                    {
                        "word": "好看",
                        "norm": ""
                    }
                ],
                  "user_tv_time": [
                    {
                        "word": "最近",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "最近有什么好看的电视剧",
    "raw_text": "最近 有 什么 好看 的 电视剧",
    "err_no": 0
}

外卖

外卖(takeaway)提供外卖购买、退订和基于店名、菜名、数量的点外卖等操作的语义解析。外卖意图及词槽表示如下:

示例:

query:来一份麦当劳的香辣鸡腿堡

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " takeaway ",
            "intent": " BOOK_TAKEOUT",
            "score": 100,
            "slots": {
                "user_food": [
                    {
                        "word": "香辣鸡腿堡",
                        "norm": ""
                    }
                ],
                  "user_num": [
                    {
                        "word": "一",
                        "norm": ""
                    }
                ],
                  "user_unit": [
                    {
                        "word": "份",
                        "norm": ""
                    }
                ],
                  "user_shop": [
                    {
                        "word": "麦当劳",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "来一份麦当劳的香辣鸡腿堡",
    "raw_text": "来 一 份 麦当劳 的 香辣 鸡腿 堡",
    "err_no": 0
}

query:下单吧

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "takeaway",
            "intent": "BUY",
            "score": 100,
            "slots": {
            }
        }
    ],
    "parsed_text": "下单吧",
    "raw_text": "下单 吧",
    "err_no": 0
}

机器人控制

机器人控制(robot)提供机器人的行走、转动、动作、表情、拍照、音量控制、APP打开等操作的语义解析。百度机器人意图及词槽表示如下:

示例:

query:给我拍张照吧

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "robot",
            "intent": "ROBOT_TAKE_PHOTO",
            "score": 100,
            "slots": {
                "user_take_photo": [
                    {
                        "word": "拍张照",
                        "norm": ""
                    }
                ]
}
        }
}

星座

星座(constell)提供星座时间、星座信息等的语义解析。星座意图及词槽表示如下:

示例:

query:金牛座的人是什么样的呢

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "constell",
            "intent": "CONSTELL_INFO",
            "score": 100,
            "slots": {
                "user_constell_name": [
                    {
                        "word": "金牛座",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text": "金牛座的人是什么样的呢",
    "raw_text": "金牛座 的 人 是 什么样 的 呢",
    "err_no": 0
}

query:金牛座的人生日是在几月

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "constell",
            "intent": "CONSTELL_TIME",
            "score": 100,
            "slots": {
                "user_constell_name": [
                    {
                        "word": "金牛座",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"金牛座的人生日是在几月",
    "raw_text":"金牛座 的 人 生日 是 在 几月",
    "err_no": 0
}

属相

属相(zodiac)提供查询属相出生时间、运势、年龄等相关问题的语义解析。属相意图及词槽表示如下:

示例:

query:牛年出生是哪年

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " zodiac",
            "intent": " BORN_TIME",
            "score": 100,
            "slots": {
                "user_zodiac_name": [
                    {
                        "word": "牛年",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"牛年出生是哪年",
    "raw_text":"牛 年 出生 是 哪 年",
    "err_no": 0
}

query:属虎的人本命佛是什么

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": " zodiac",
            "intent": " FATE",
            "score": 100,
            "slots": {
                "user_zodiac_name": [
                    {
                        "word": "属虎",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"属虎的人本命佛是什么",
    "raw_text":"属 虎 的 人 本命佛 是 什么",
    "err_no": 0
}

摇号

摇号(yaohao)提供摇号申请、查询等操作的语音解析。摇号意图及词槽表示如下:

示例:

query:北京汽车摇号申请

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "yaohao",
            "intent": "PLATE_APPLY",
            "score": 100,
            "slots": {
                "user_city": [
                    {
                        "word": "北京",
                        "norm": ""
                    }
                ],
                  "user_car_type": [
                    {
                        "word": "汽车",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"北京汽车摇号申请",
    "raw_text":"北京 汽车 摇号 申请",
    "err_no": 0
}

进制转换

进制转换(hexcalc)提供某一数字的二进制、八进制、十进制、十六进制之间的转换的语义解析。进制转换意图及词槽表示如下:

示例:

query:怎样将十进制110转换成十六进制的

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "hexcalc",
            "intent": "HEX_CONVERT",
            "score": 100,
            "slots": {
                "user_number": [
                    {
                        "word": "110",
                        "norm": ""
                    }
                ],
                  "user_original_hex": [
                    {
                        "word": "十进制",
                        "norm": ""
                    }
                ],
                 "user_target_hex": [
                    {
                        "word": "十六进制",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"怎样将十进制110转换成十六进制的",
    "raw_text":"怎样 将 十 进制 110 转换 成 十六 进制 的",
    "err_no": 0
}

时区查询

时区查询(time_zone)提供时区查询、时区差查询的语义解析。时区查询意图及词槽表示如下:

示例:

query:美国与北京的时区差多少

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "time_zone",
            "intent": "TIMEZONE_DIFF",
            "score": 100,
            "slots": {
                "user_loc": [
                    {
                        "word": "北京",
                        "norm": ""
                    }
                ],
                  "user_loc": [
                    {
                        "word": "美国",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"美国与北京的时区差多少",
    "raw_text":"美国 与 北京 的 时区 差 多少",
    "err_no": 0
}

query:美国的夏威夷在哪个时区

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "time_zone",
            "intent": "TIMEZONE_SEARCH",
            "score": 100,
            "slots": {
                  "user_loc": [
                    {
                        "word": "美国夏威夷",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"美国的夏威夷在哪个时区",
    "raw_text":"美国 的 夏威夷 在 哪个 时区",
    "err_no": 0
}

限行查询

限行查询(vehichle)提供各城市的限行号码及限行时间查询的语义解析。限行查询意图及词槽表示如下:

示例:

query:请问成都今天限号是多少

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "vehichle",
            "intent": "LIMIT_NUM",
            "score": 100,
            "slots": {
                  "user_city": [
                    {
                        "word": "成都",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"请问成都今天限号是多少",
    "raw_text":"请问 成都 今天 限号 是 多少",
    "err_no": 0
}

query:查一下天津周三限行到几点

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "vehichle",
            "intent": "LIMIT_TIME",
            "score": 100,
            "slots": {
                  "user_city": [
                    {
                        "word": "天津",
                        "norm": ""
                    }
                ],
                  "user_time": [
                    {
                        "word": "周三",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"查一下天津周三限行到几点",
    "raw_text":"查一下 天津 周三 限行 到 几点",
    "err_no": 0
}

卡通

卡通(animation)提供基于角色、导演、地区、动画片名称等属性的精确需求搜索和泛需求搜索。卡通意图及词槽表示如下:

示例:

query:我要看西游记的动画片

"appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "animation",
            "intent": "ANIMATION_INFO",
            "score": 100,
            "slots": {
                  "user_ani_name": [
                    {
                        "word": "西游记",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"我要看西游记的动画片",
    "raw_text":"我 要 看 西游记 的动画片",
    "err_no": 0
}

query:现在有什么好看的动画片

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "animation",
            "intent": "ANIMATION_RANK",
            "score": 100,
            "slots": {
                  "user_time": [
                    {
                        "word": "现在",
                        "norm": ""
                    }
                ],
                  "user_ani_tag": [
                    {
                        "word": "好看",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"现在有什么好看的动画片",
    "raw_text":"现在 有 什么 好看 的 动画片",
    "err_no": 0
}

数值计算

数值计算(qv)提供数字计算和数字比较大小的语义解析。数值计算意图及词槽表示如下:

示例:

query:零和负二谁大

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "qv",
            "intent": "NUM_COMPARE",
            "score": 100,
            "slots": {
                  "user_num": [
                    {
                        "word": "零",
                        "norm": ""
                    }
                ],
                  "user_num": [
                    {
                        "word": "负二",
                        "norm": ""
                    }
                ],
                  "user_compare_type": [
                    {
                        "word": "大",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"零和负二谁大",
    "raw_text":"零 和 负二 谁 大",
    "err_no": 0
}

团购

团购(groupbuy)提供具体到某个城市、区域、区县的指定货品类型、时间、价格、距离的团购需求语义解析。团购意图及词槽表示如下:

示例:

query:附近有哪些人均100左右的酒店团购

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "groupbuy",
            "intent": "GROUPBUY",
            "score": 100,
            "slots": {
                  "user_distance": [
                    {
                        "word": "附近",
                        "norm": ""
                    }
                ],
                  "user_price": [
                    {
                        "word": "100",
                        "norm": ""
                    }
                ],
                  "user_goods": [
                    {
                        "word": "酒店",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"附近有哪些人均100左右的酒店团购",
    "raw_text":"附近 有 哪些 人均 100 左右 的 团购",
    "err_no": 0
}

美食

美食(cate)提供具体到某个城市、区域、区县的指定美食种类或菜名的美食查询的语义解析。美食意图及词槽表示如下:

示例:

query:帮我找一家能停车有包间的火锅店

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "cate",
            "intent": "CATE",
            "score": 100,
            "slots": {
                  "user_parking": [
                    {
                        "word": "能停车",
                        "norm": ""
                    }
                ],
                  "user_sep_room": [
                    {
                        "word": "有包间",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"帮我找一家能停车有包间的火锅店",
    "raw_text":"帮 我 找 一家 能 停车 有 包间 的 火锅 店",
    "err_no": 0
}

NBA

NBA(nba)提供NBA相关的球队、球员、教练等的图片、视频、新闻及比赛信息查找的语音解析。NBA意图及词槽表示如下:

示例:

query:有科比的图片吗

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "nba",
            "intent": "PICTURE_SEARCH",
            "score": 100,
            "slots": {
                  "user_basketball_player": [
                    {
                        "word": "科比",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"有科比的图片吗",
    "raw_text":"有 科比 的图片 吗",
    "err_no": 0
}

query:看下马刺的比赛

{
    "appid": 597,
    "encoding": "UTF-8",
    "results": [
        {
            "domain": "nba",
            "intent": "GAME_SEARCH",
            "score": 100,
            "slots": {
                  "user_basketball_team": [
                    {
                        "word": "马刺",
                        "norm": ""
                    }
                ]
            }
        }
    ],
    "parsed_text":"看下马刺的比赛",
    "raw_text":"看 下 马刺 的 比赛",
    "err_no": 0
}