【问题标题】:Recognition of prebuilt datetimeV2 entity in LUIS识别 LUIS 中预构建的 datetimeV2 实体
【发布时间】:2018-07-20 02:38:18
【问题描述】:

我们正在使用 DateTimeV2 法语模块。识别未按预期工作。
我们在以下场景中遇到麻烦: 对于query = 13/02/2018,识别的值为13th Feb 2018,但如果指定的日期小于12,例如09/02/2018,识别的值为2018年9月2日。这些结果存在矛盾,我们无法处理由于同样的原因。

如果我在这里遗漏了什么或者有什么可以解决的,请告诉我。

【问题讨论】:

    标签: bots botframework microsoft-cognitive azure-language-understanding direct-line-botframework


    【解决方案1】:

    您并没有遗漏什么,法语识别器中存在错误,我们已经经历过同样的事情。

    问题的根源:

    事实上,问题似乎与识别器使用的检测模板的顺序有关:在法语中,日期以“日-月-年”格式而不是“月-日-年”格式编写。 但是,如果您查看DateTimeDefinitions 的法语here

    public static readonly string DateExtractor4 = $@"\b{MonthNumRegex}\s*[/\\\-]\s*{DayRegex}\s*[/\\\-]\s*{DateYearRegex}";
    public static readonly string DateExtractor5 = $@"\b{DayRegex}\s*[/\\\-]\s*{MonthNumRegex}\s*[/\\\-]\s*{DateYearRegex}";
    

    以及它们的使用方式here,问题将是您的日期将首先适合 DateExtractor4 并且将使用结果,而它是格式为 DateExtractor5 的值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多