Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在说法中使用正则表达式词典导致意图识别错误 #50

Open
Functional-Account opened this issue Oct 22, 2021 · 3 comments
Assignees
Labels
bug Something isn't working 缺陷

Comments

@Functional-Account
Copy link

Functional-Account commented Oct 22, 2021

Labels: 缺陷, 创建者: 王海良

描述

来自 Chatopera智能客服-客户群02 (微信群或私聊)对话记录

刘建: 咨询下,词典自定义了正则后意图识别有问题,甚至影响另外一个意图的识别,选择 词汇表则没有问题。            (2021-10-22 15:23:24)
王海良: 这是一个 BUG 吧,是在说法中使用了正则表达式词典吗?            (2021-10-22 15:24:08)
刘建: 对            (2021-10-22 15:25:14)
王海良: 在说法中使用正则表达式词典导致意图识别错误,对吧?            (2021-10-22 15:26:56)
刘建: 对的            (2021-10-22 15:27:11)


提示:以上为未整理的聊天历史,更多介绍查看评论信息。

💬 Opened by OSSChat automatically.
@hailiang-wang hailiang-wang changed the title 如果我的需求是 我想订三(n)张机票 词典自定义了正则后意图识别有问题 我要订三 在说法中使用正则表达式词典导致意图识别错误 Oct 22, 2021
@hailiang-wang hailiang-wang added the bug Something isn't working label Oct 22, 2021
@DreamerLark
Copy link

[一二三四五六七八九十壹贰叁肆伍陆柒捌玖拾百千万亿]+

这正则导致意图识别不了。如果^([一二三四五六七八九十壹贰叁肆伍陆柒捌玖拾百千万亿]+)$ 则可以识别
但导致不能和单位一起识别出来

@hailiang-wang
Copy link
Member

数字在计划内实现为一个系统词典,现在可以通过在多轮对话脚本中,使用函数 extractNumberthis.user.history 来实现。

extractNumber

this.user.history

意图匹配器

@hailiang-wang
Copy link
Member

嗯系统词典就好了,现在在用户说法里需要确认 商品 数量 单位三要素,缺了然后配置追问,这样比较简单。用函数的话,流程上不那么简明

@hailiang-wang hailiang-wang self-assigned this Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 缺陷
Projects
None yet
Development

No branches or pull requests

3 participants