From bb900e63e8848d93d2613a350d56126aa0678d86 Mon Sep 17 00:00:00 2001 From: Boyko Karadzhov Date: Thu, 29 Mar 2018 14:52:44 +0000 Subject: [PATCH] simple chinese sample --- Blank/zh/cognitive-flow.json | 92 ++++++++++++++++++++++++++++++++++++ Blank/zh/tests.json | 43 +++++++++++++++++ Blank/zh/training.json | 59 +++++++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 Blank/zh/cognitive-flow.json create mode 100644 Blank/zh/tests.json create mode 100644 Blank/zh/training.json diff --git a/Blank/zh/cognitive-flow.json b/Blank/zh/cognitive-flow.json new file mode 100644 index 0000000..fe3225e --- /dev/null +++ b/Blank/zh/cognitive-flow.json @@ -0,0 +1,92 @@ +{ + "commands": { + "NEXT-PAGE": [ + "下一个5" + ] + }, + "settings": { + "invalid-replies": [ + "我不确定我是否理解你所说的。" + ], + "general-failure": [ + "目前我们遇到技术困难。" + ], + "previous-conversation-messages": [ + "我现在要回到{{ conversationDisplayName }}。" + ] + }, + "conversations": { + "welcome": { + "type": "support", + "steps": [{ + "type": "message", + "messages": [ + "这是您的聊天机器人欢迎的对话。" + ] + }, + { + "type": "conversation", + "conversation": "help", + "conditions": ["{{$not ($has conversation) }}"] + } + ] + }, + "help": { + "type": "support", + "steps": [{ + "type": "message", + "messages": [ + [ + "如果您遇到问题,可以通过键入'restart'重新启动对话,", + "这是我能为你做的事情:" + ] + ], + "display": { + "type": "quick-reply", + "data": [ + "对话1", + "会话2" + ] + } + }] + }, + "restart": { + "type": "support", + "steps": [{ + "type": "message", + "messages": [ + "你的谈话重新开始。" + ] + }, + { + "type": "conversation", + "conversation": "welcome" + } + ] + }, + "conversationOne": { + "type": "goal", + "display-name": "对话1", + "steps": [{ + "type": "message", + "messages": [ + [ + "这是对话1" + ] + ] + }] + }, + "conversationTwo": { + "type": "goal", + "display-name": "会话2", + "steps": [{ + "type": "message", + "messages": [ + [ + "这是对话2" + ] + ] + }] + } + } + } \ No newline at end of file diff --git a/Blank/zh/tests.json b/Blank/zh/tests.json new file mode 100644 index 0000000..e1162b6 --- /dev/null +++ b/Blank/zh/tests.json @@ -0,0 +1,43 @@ +{ + "scenarios": [ + { + "it": "introduces itself and enters into a conversation", + "steps": [ + { + "user": { + "text": "嗨" + }, + "bot": [ + [ + { + "text": "这是您的聊天机器人欢迎的对话。" + }, + { + "text": "如果您遇到问题,可以通过键入'restart'重新启动对话," + }, + { + "text": "这是我能为你做的事情:", + "quickReplies": [ + "对话1", + "会话2" + ] + } + ] + ] + }, + { + "user": { + "text": "对话1" + }, + "bot": [ + [ + { + "text": "这是对话1" + } + ] + ] + } + ] + } + ] +} diff --git a/Blank/zh/training.json b/Blank/zh/training.json new file mode 100644 index 0000000..bd70a7f --- /dev/null +++ b/Blank/zh/training.json @@ -0,0 +1,59 @@ +{ + "entity-definitions": [{ + "name": "Conversation", + "lookup-strategy": "trait", + "data": [{ + "value": "conversationOne", + "expressions": [ + "对话1" + ], + "metadata": "" + }, + { + "value": "conversationTwo", + "expressions": [ + "会话2" + ], + "metadata": "" + }, + { + "value": "restart", + "expressions": [ + "restart", + "重新开始" + ] + }, + { + "value": "help", + "expressions": [ + "Help", + "帮帮我" + ] + } + ] + }, + { + "name": "SmallTalk", + "lookup-strategy": "QnA", + "data": [{ + "value": "goodbye", + "expressions": [ + "再见" + ], + "answers": [ + "再见" + ] + }, + { + "value": "thanks", + "expressions": [ + "谢谢" + ], + "answers": [ + "别客气" + ] + } + ] + } + ] + } \ No newline at end of file