Botframework 处理Cortana口译错误
我想知道如何最好地处理Cortana有时会犯的口译错误 比如,;我正在构建一个机器人,它使用预先构建的家庭自动化实体为我处理一些家庭自动化意图。现在我添加了一个名为HomeAutomation.ActivateScene的意图。这是为了激活我的家庭自动化软件中的特定场景集 现在这可能是我的非母语口音,但科尔塔纳有时无法解释我所说的确切单词。这主要发生在“场景”这个词上,她有时会把它翻译成“看”、“老”或“说”,听起来很像 现在我的问题是:Botframework 处理Cortana口译错误,botframework,azure-language-understanding,cortana,cortana-skills-kit,Botframework,Azure Language Understanding,Cortana,Cortana Skills Kit,我想知道如何最好地处理Cortana有时会犯的口译错误 比如,;我正在构建一个机器人,它使用预先构建的家庭自动化实体为我处理一些家庭自动化意图。现在我添加了一个名为HomeAutomation.ActivateScene的意图。这是为了激活我的家庭自动化软件中的特定场景集 现在这可能是我的非母语口音,但科尔塔纳有时无法解释我所说的确切单词。这主要发生在“场景”这个词上,她有时会把它翻译成“看”、“老”或“说”,听起来很像 现在我的问题是: 我应该考虑到这一点还是依靠Cortana提高她的听力 如
任何指导都将不胜感激 您可以尝试语音识别启动,这是一个创建LUIS应用程序的过程,该程序识别您希望Cortana技能识别的单词,并将其链接到Cortana技能。在LUIS应用程序中,您可以添加一些有代表性的话语和标签词,以便识别为实体 这里有一篇文章对此进行了描述:如果您使用的是C#和对话框,您可以尝试使用PrompOptions的参数和synoyms:。如果只是少数几个词被曲解了,这有点像黑客,但你可以尝试将这些错误添加为“场景”的同义词。尝试的另一个选项是降低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);
//摘要:
//提示输入一组选项中的一个。
//
//参数:
//背景:
//对话框上下文。
//
//简历:
//恢复处理程序。
//
//提示:
//提示选项。
//
//认可的选择:
//(可选)如果为true,则提示将尝试识别用户中的数字
//话语作为选择返回的指标。默认值为“true”。
//
//识别号码:
//(可选)如果为true,则提示将尝试识别序号,如“第一个”
//“一”或“第二个”作为选择返回的索引。默认值
//这是“真实的”。
//
//识别序号:
//(可选)如果为true,则提示将尝试使用
//选择本身。默认值为“true”。
//
//minScore:
//(可选)获得认可选择所需的0.0-1.0的最低分数
//被认为是一场比赛。默认值为“0.4”。
//
//类型参数:
//T:
//选项的类型。
//
//备注:
//T应实现System.Object.ToString
公共静态无效选项(IDialogContext上下文、恢复后恢复、IPromptOptions PrompptOptions、bool recognizeChoices=true、bool recognizeNumber=true、bool recognizeOrdinals=true、double minScore=0.4);
不久前,我和Alexa遇到了同样的问题,我在话语中添加了Alexa认为我在说的话,因此它们被映射到解决问题的正确意图。可能不是最优雅的解决方案,但它确实有效。如果要提供链接作为答案,请提供一些上下文: