交互的最终结果怎么查看
BB晨光 发布于2018-08 浏览:1958 回复:3
1
收藏

 

这是我自己训练模型,UNIT交互的结果,为什么查询的结果没有返回回来?是隐藏在json中了吗?但是我打开json里面也没什么结果?

{ "action_list": [ { "action_id": "weather_guide_0", "confidence": 100, "custom_reply": "", "refine_detail": { "clarify_reason": "", "interact": "select", "option_list": [ { "info": { "next_expect_intent": "" }, "option": "什么时间?" }, { "info": { "next_expect_intent": "" }, "option": "什么地点?" } ] }, "say": "什么时间?", "type": "guide" }, { "action_id": "weather_satisfy", "confidence": 100, "custom_reply": "", "refine_detail": { "clarify_reason": "", "interact": "", "option_list": [] }, "say": "正在为您查询天气......", "type": "satisfy" } ], "qu_res": { "candidates": [ { "confidence": 100, "domain_confidence": 0, "extra_info": { "group_id": "2", "real_threshold": "0", "threshold": "0.9" }, "from_who": "pow-slu-lev1", "intent": "CMD_UPDATE_USER_LOC", "intent_confidence": 100, "intent_need_clarify": false, "match_info": "{\"group_id\":\"2\",\"match_keywords\":\" \",\"match_pattern\":\"[D:user_loc]\",\"ori_pattern\":\"[D:user_loc]\",\"ori_slots\":{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"CMD_UPDATE_USER_LOC\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:user_loc] \",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_loc\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"北京\",\"word_type\":\"\"}]},\"real_threshold\":0.0,\"threshold\":0.8999999761581421}", "slots": [ { "begin": 0, "confidence": 100, "father_idx": -1, "length": 2, "name": "user_loc", "need_clarify": false, "normalized_word": "(NERL_PLUS_LOC_ROOT)>北京市", "original_word": "北京", "word_type": "" } ] }, { "confidence": 100, "domain_confidence": 0, "extra_info": { "group_id": "9531", "real_threshold": "0", "threshold": "0.8" }, "from_who": "pow-slu-lev1", "intent": "CMD_UPDATE_USER_LOC", "intent_confidence": 100, "intent_need_clarify": false, "match_info": "{\"group_id\":\"9531\",\"match_keywords\":\" \",\"match_pattern\":\"[D:user_loc]\",\"ori_pattern\":\"[D:user_loc]\",\"ori_slots\":{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"CMD_UPDATE_USER_LOC\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:user_loc] \",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_loc\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"北京\",\"word_type\":\"\"}]},\"real_threshold\":0.0,\"threshold\":0.8000000119209290}", "slots": [ { "begin": 0, "confidence": 100, "father_idx": -1, "length": 2, "name": "user_loc", "need_clarify": false, "normalized_word": "(NERL_PLUS_LOC_ROOT)>北京市", "original_word": "北京", "word_type": "" } ] }, { "confidence": 100, "domain_confidence": 0, "extra_info": { "group_id": "9654", "real_threshold": "0", "threshold": "0.8" }, "from_who": "pow-slu-lev1", "intent": "CMD_UPDATE_USER_LOC", "intent_confidence": 100, "intent_need_clarify": false, "match_info": "{\"group_id\":\"9654\",\"match_keywords\":\" \",\"match_pattern\":\"[D:user_loc]\",\"ori_pattern\":\"[D:user_loc]\",\"ori_slots\":{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"CMD_UPDATE_USER_LOC\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:user_loc] \",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_loc\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"北京\",\"word_type\":\"\"}]},\"real_threshold\":0.0,\"threshold\":0.8000000119209290}", "slots": [ { "begin": 0, "confidence": 100, "father_idx": -1, "length": 2, "name": "user_loc", "need_clarify": false, "normalized_word": "(NERL_PLUS_LOC_ROOT)>北京市", "original_word": "北京", "word_type": "" } ] } ], "lexical_analysis": [ { "basic_word": [ "北京" ], "term": "北京", "type": "23", "weight": 1 } ], "nerl_result": [ { "etype": "sys_loc", "etypes": [ "sys_loc", "sys_loc_city", "user_loc" ], "name": "北京" } ], "qu_res_chosen": "{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{\"group_id\":\"1\",\"real_threshold\":\"1\",\"threshold\":\"0.7\"},\"from_who\":\"pow-slu-lev1\",\"intent\":\"WEATHER\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"1\\\",\\\"match_keywords\\\":\\\" \\\",\\\"match_pattern\\\":\\\"天气\\\",\\\"ori_pattern\\\":\\\"天气\\\",\\\"ori_slots\\\":{\\\"confidence\\\":100.0,\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"WEATHER\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"天气 \\\",\\\"slots\\\":[]},\\\"real_threshold\\\":1.0,\\\"threshold\\\":0.6999999880790710}\",\"slots\":[]}\n", "raw_query": "北京", "sentiment_analysis": { "label": "1", "pval": 0 }, "status": 0, "timestamp": 0 }, "schema": { "domain_confidence": 0, "intent": "WEATHER", "intent_confidence": 100, "slots": [ { "begin": 0, "confidence": 100, "length": 2, "merge_method": "updated", "name": "user_loc", "normalized_word": "(NERL_PLUS_LOC_ROOT)>北京市", "original_word": "北京", "session_offset": 0, "sub_slots": [], "word_type": "" }, { "begin": 0, "confidence": 100, "length": 2, "merge_method": "updated", "name": "user_time", "normalized_word": "2018-08-16", "original_word": "明天", "session_offset": 1, "sub_slots": [], "word_type": "" } ] } }

 

发现其实并没有查询出关于天气的内容,所以怎么返回结果呢?

还有就是如果使用Python调用这样的交互内容或者是正确的JSON中的内容呢?

    

 

收藏
点赞
1
个赞
共3条回复 最后由伊茨米可回复于2018-08
#5伊茨米可回复于2018-08
#4 BB晨光回复
就是具体天气信息,那这部分内容怎么获取呢? 如果是用户想要得到反馈的结果,用Python语言怎么实现呢? 请大神指点。。。。
展开

具体资源您需要提供接口来满足。

比如通过UNIT拿到解析结果后,去请求响应的资源API。

 

例如:北京今天天气怎么样?

UNIT会根据配置解析出意图名称,地点北京,时间今天。

 

然后您拿着这些信息,去资源API获取最终结果,再直接返回给用户

0
#4BB晨光回复于2018-08
#3 伊茨米可回复
您指的结果是什么?是图中的回复内容,还是具体天气信息(例如多少度) 如果是后者,那UNIT本身是不提供这部分资源的,需要您自行来完成
展开

就是具体天气信息,那这部分内容怎么获取呢?

如果是用户想要得到反馈的结果,用Python语言怎么实现呢?

请大神指点。。。。

0
#3伊茨米可回复于2018-08

您指的结果是什么?是图中的回复内容,还是具体天气信息(例如多少度)

如果是后者,那UNIT本身是不提供这部分资源的,需要您自行来完成

0
TOP
切换版块