【问题标题】:Handling Cortana interpretation mistakes处理 Cortana 解释错误
【发布时间】:2017-12-23 00:36:24
【问题描述】:

我想知道如何最好地处理 Cortana 有时会犯的解释错误。

例如;我正在构建一个机器人,它使用预先构建的家庭自动化实体为我处理一些家庭自动化意图。现在我添加了一个名为 HomeAutomation.ActivateScene 的意图。这是为了激活我的家庭自动化软件中设置的某个场景。

现在这可能是我的非母语口音,但 Cortana 有时无法解释我所说的确切单词。这主要发生在“场景”这个词上,她有时将其翻译为“看到”、“高级”或“说”,听起来有点像。

所以现在我的问题是:

  1. 我应该考虑到这一点还是依靠 Cortana 来改善她的听力?
  2. 如果没有,我可以确保 LUIS 得到正确的解释;但最好的方法是什么?作为意图训练的一部分来学习这些其他词?或者以某种方式学习它以理解某个单词的发音?

任何指导将不胜感激!

【问题讨论】:

  • 不久前我在 Alexa 上遇到了同样的问题,我将 Alexa 认为我在说的话添加到话语中,以便将它们映射到解决问题的正确意图。可能不是最优雅的解决方案,但它确实有效。

标签: botframework azure-language-understanding cortana cortana-skills-kit


【解决方案1】:

您可以尝试语音识别启动,这是创建一个 LUIS 应用程序的过程,该应用程序可以识别您希望 Cortana 技能识别的单词,并将其链接到 Cortana 技能。在 LUIS 应用中,您将添加一些您想要识别为实体的有代表性的话语和标签词。

这里有一篇文章描述它:https://blog.botframework.com/2017/06/26/Speech-To-Text/#intent-based-speech-priming-for-natural-language

【讨论】:

【解决方案2】:

如果您使用 C# 和 Dialogs,您可以尝试使用 PromptOptionsWithSynonyms 的参数:https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.builder.dialogs.promptoptionswithsynonyms-1.-ctor?view=botbuilder-3.8。如果只是少数几个单词被误解,那有点小技巧,但您可以尝试将错误添加为“场景”的同义词。另一个尝试的选择是降低 PromptDialog.Choice 函数调用中的 minScore 参数(我在文档中找不到这个),但函数定义如下:

    // Summary:
    //     Prompt for one of a set of choices.
    //
    // Parameters:
    //   context:
    //     The dialog context.
    //
    //   resume:
    //     Resume handler.
    //
    //   promptOptions:
    //     The prompt options.
    //
    //   recognizeChoices:
    //     (Optional) if true, the prompt will attempt to recognize numbers in the users
    //     utterance as the index of the choice to return. The default value is "true".
    //
    //   recognizeNumbers:
    //     (Optional) if true, the prompt will attempt to recognize ordinals like "the first
    //     one" or "the second one" as the index of the choice to return. The default value
    //     is "true".
    //
    //   recognizeOrdinals:
    //     (Optional) if true, the prompt will attempt to recognize the selected value using
    //     the choices themselves. The default value is "true".
    //
    //   minScore:
    //     (Optional) minimum score from 0.0 - 1.0 needed for a recognized choice to be
    //     considered a match. The default value is "0.4".
    //
    // Type parameters:
    //   T:
    //     The type of the options.
    //
    // Remarks:
    //     T should implement System.Object.ToString
    public static void Choice<T>(IDialogContext context, ResumeAfter<T> resume, IPromptOptions<T> promptOptions, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-29
    • 2013-02-16
    • 2013-06-22
    • 1970-01-01
    • 2020-10-08
    • 2016-02-07
    相关资源
    最近更新 更多