【问题标题】:rasa nlu predict the right entity but wrong intentrasa nlu 预测正确的实体但错误的意图
【发布时间】:2019-10-03 14:17:10
【问题描述】:

我有一个使用正则表达式的邮件意图:

## regex:regex_mail
- .\*@.*

## intent:consultation-dossier2
- [email@gmail.com](regex_mail)
- [cncc@gmail.fr](regex_mail)
- [cncc.leather@planet.tn](regex_mail)
- [contact@cetime.com.tn](regex_mail)
- [ebtgeg@egrg.aege](regex_mail)

问题是在输入“documentation@gmail.com”时,nlu 识别实体“regex_mail”但选择了意图“documentation”。

https://drive.google.com/open?id=1pvSsCZsqEt8HuSVaZr8x9sIn8LgqnZuu

【问题讨论】:

  • 这可能是因为documentation 这个词不在您的意图consultation-dossier-2 中。而且我认为意图预测不受实体类型的影响,因此您可能希望通过其他方式(例如使用表单)来提取实体。
  • @wael BTW,您没有提供“文档”意图示例。让他们思考会发生什么可能很有用

标签: rasa


【解决方案1】:

在我看来,你训练机器人的方式,“意图分类”不会正确发生。 如果您只想在用户说出有效的电子邮件地址时“检测”,那么您可以随时检查 regex_mail 实体是否被检测到。如果是,该值是否是新的。无需为此训练意图分类。

但是如果你想训练对有电子邮件地址的句子进行分类,那么你可以训练如下:

## intent:consultation-dossier2
- My email is [email@gmail.com](regex_mail)
- Please mail me at [cncc@gmail.fr](regex_mail)
- Is your address [cncc.leather@planet.tn](regex_mail) correct? or no?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-04
    • 1970-01-01
    • 1970-01-01
    • 2019-08-03
    相关资源
    最近更新 更多