azure-language-understanding - 在 LUIS 中设置标志以进行 BING 拼写检查
问题描述
我已将必应拼写检查连接到我的 LUIS 应用程序,但我需要将模式标志从“证明”更改为“拼写”。在保持流程自动化的同时,有没有可能的方法来做到这一点。
解决方案
如果您已直接从应用程序/机器人集成 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": []
}
推荐阅读
- javascript - javascript - http 头调用 - 捕获 302 重定向并检索响应标头
- python-3.x - 使用 discord.py 忽略 python3 中的机器人生成的错误
- bash - 如何阻止 perl 消息“不推荐使用 XXX,而是使用 YYY”转到 stderr?
- ios - 将 String 转换为 Double 不适用于 Swift 中的更大值
- ios - 在 Swift 中使用 JSON 解码器难以解析 JSON 中的整数值
- spring - 在 Spring Boot 中使用 JPA 身份验证的 OAuth2 和 JWT
- python - 在遍历数据框时抓取更新的熊猫列行
- sql - 如何禁止自定义列表具有来自不同基本列表的元素
- swift - Swift UILabel 折线的行距
- git - @{upstream} 和 @{push} 之间的 Git 区别