数字的特定格式是匹配的

时间:2018-07-17 04:55:03

标签: python rasa-nlu

Rasa NLU版本: 0.12.3

操作系统(Windows,OSX等): Ubuntu 18.04

模型配置文件的内容:

 function setInfo() {
    if (document.getElementById("emailForm").value == null || 
    document.getElementById("nameForm").value == null) {

        alert("Please Fill in all sections");

    } else {

    email = document.getElementById("emailForm").value;
    name = document.getElementById("nameForm").value;
    loaded();

    }
}

问题:

我的意向训练数据已包含以下数据

{{firstName | limitTo:7}} {{firstName.length> 7? '...':''}}

在测试此意图时对数据进行训练后,该输入是否与输入 20/7/2018

相匹配

1 个答案:

答案 0 :(得分:0)

有一个典型的问题,对于了解类似的答案将很有用:

  • 您有多少培训数据?
  • 您有多少个意图?
  • 意图有多相似?

但是我认为在您的情况下,至少有两件事对您不利:

  • 您正在使用的featurizer将数字集在一起。在代码中看到此注释:

    Creates bag-of-words representation of intent features using sklearn's `CountVectorizer`. All tokens which consist only of digits (e.g. 123 and 99 but not ab12d) will be represented by a single feature."""

  • 令牌生成器或多或少地基于空格:

    "token_pattern": r'(?u)\b\w\w+\b'

还请记住,Rasa NLU将始终选择一种意图。因此,您也应该监视信心。该输入的置信度可能足够低,您可以为某种罐装响应添加阈值以回退。

您能提供两个示例的预期意图和实体吗?