Bing 拼写检查 API 不适用于多行和分隔符

问题描述

遵循ms tutorial

我只有在发布一行文字时才能得到正确的回复。

  • “Helo wrd and smth elze” - 工作正常。
  • “Helo wrd
    and smth elze”- {"_type":"SpellCheck","flaggedTokens":[]} - 我在 C# 中使用了 \n\r 新行。
  • “Helo wrd;还有 smth elze”- {"_type":"SpellCheck","flaggedTokens":[]}
  • 与任何其他分隔符相同。

此外,从教程中它建议使用 Uri.EscapeDataString 但是我得到的所有建议在文本之前都有 %20(或 A20),这是奇怪的行为。

对此有什么建议吗?就我而言,我需要验证一堆单独的行(上下文)。

#1 编辑
开始使用“;”分隔符将数据测试行组合成一个文本。 另一个问题是,除了 En-us 之外,没有其他语言可以工作(得到 [])。

我的设置: 引用 msdocs

var response = await PostAsync<SpellCheckRootToken>(string.Empty,new Dictionary<string,string>
            {
                {"mkt","ru-RU"},{"setLang","ru"},// tried header instead
                {"cc","RU"},// tried w/o
                {"mode","proof"},// tried both spell and proof
                {"text",input},// tried encoding,escaping...
            });

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)