IVR式对话系统/工作流程/菜单
我需要构建一个类似于呼叫中心中使用的 IVR 的对话系统。我的系统不是基于电话的,但对话框是相似的。就像
System: "Main menu: Enter [1] for menu1, [2] for menu2"
User: [1]
System: "menu1: enter [1] for apples, [2] for oranges, [3] for main menu"
User: [7]
System: "What??"
System: "menu1: enter [1] for apples, [2] for oranges, [3] for main menu"
User: [2]
... and so on
我想要对所有可能的选项有一个很好的声明性描述,以及在用户输入的指导下运行该树的好方法。
已经考虑过:ANTLR生成的词法分析器/解析器(似乎有点矫枉过正),基于SCXML的状态机(似乎只能声明转换,其余的需要编码)
I need to build a dialog system similar to IVR used in call centers. My system is not phone-based, but the dialog is similar. Something like
System: "Main menu: Enter [1] for menu1, [2] for menu2"
User: [1]
System: "menu1: enter [1] for apples, [2] for oranges, [3] for main menu"
User: [7]
System: "What??"
System: "menu1: enter [1] for apples, [2] for oranges, [3] for main menu"
User: [2]
... and so on
I want to have a nice declarative description of all the possible options and a nice way to run through that tree, guided by user input.
Already considered: ANTLR-generated lexer/parser (seems to be an overkill), SCXML-based state machine (seems like only transitions can be declared, the rest needs to be coded)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以前从未见过 SCXML,但在浏览了项目页面和示例后,我觉得它拥有您需要的一切。您的 IVR 可以建模为状态图。进入状态要么呈现下一个选择,要么启动一个活动(呈现下一个菜单级别也是一个活动)。
实现“错误的用户输入”状态可能很棘手(或者 SCXML 已经有针对此常见任务的解决方案)。
您可以发明一个小型 DSL 来简化此状态机的编辑。用该 DSL 编写的文档将被转换为驱动 IVR 系统的 SCXML 文件。
(感谢 SCXML 指针!)
I've never seen SCXML before, but after a short glimpse on the project pages and the examples, it looks to me like it has everything you need. Your IVR can be modeled as a state diagram. Entering a state either presents the next choices or starts an activity (while presenting the next menu level is an activity too).
It might be tricky to implement a 'wrong user input' state (or SCXML already has a solution for this common task).
You could invent a small DSL to simplify editing this statemachine. Documents written in this DSL would be translated to SCXML files that would drive the IVR system.
(thanks for the SCXML pointer!)