首页 > 解决方案 > 在 LUIS 中设置标志以进行 BING 拼写检查

问题描述

我已将必应拼写检查连接到我的 LUIS 应用程序,但我需要将模式标志从“证明”更改为“拼写”。在保持流程自动化的同时,有没有可能的方法来做到这一点。

标签: azure-language-understanding

解决方案


如果您已直接从应用程序/机器人集成 API,则 bing 拼写检查 API 使用默认模式“证明”,将模式值更改为“拼写”应将搜索设置为拼写。

如果您使用 LUIS API 直接添加拼写检查终结点 URL,则每次调用都必须包含拼写更正所需的信息才能正常工作。

端点 URL 需要将 spellCheck 参数设置为“true”以及 bing-spell-check-subscription-key 的值。

https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appID}?subscription-key={luisKey}&spellCheck= true &bing-spell-check-subscription-key= {bingKey } &verbose=true&timezoneOffset=0&q={话语}

此端点对拼写错误的单词的响应应该为通过的话语建议“alteredQuery”。例如:

    {
  "query": "How far is the mountainn?",
  "alteredQuery": "How far is the mountain?",
  "topScoringIntent": {
    "intent": "Concierge",
    "score": 0.183866
  },
  "entities": []
}

推荐阅读