问题描述
必应拼写检查API 的最大字符数为10,000请求希望进行拼写检查[mode = spell]或校对[mode = proof(default)]的文本块.
The Bing spell check API has a 10,000 char limit for the chunk of text that the request would like to do a spell check [mode=spell] or proof read [mode=proof(default)].
但是,我遇到了一个问题,即一大堆拼写错误的文本明显在10k的限制内,在拼写检查请求中未返回带有标记标记的标记,但是在校对请求中返回了
However I am running into an issue where a chunk of misspelt text clearly under the limit of 10k, does not return back with flagged tokens in a spell check request, but does return back in the proof read request.
有什么作用?拼写检查是否有下限?
What gives? Is there a lower limit for Spell check?
下面两个请求的输出.我在两种情况下都使用POST,并且两个响应都返回200 OK
Output for both requests below. I am using POST in both cases and both responses return a 200 OK
模式:拼写
请求:
Text =这是一个长期的看法,这里有一些错误.它应该 是一个问题,但我想不出很长的问题.也许那个 意味着我没什么好问的?
Text=This is a long sentance with some mistakes in here. its supposed to be a question but i can’t think of a long question. maybe that means i don’t have something selious to ask?
响应:
{"_type":拼写检查","flaggedTokens":[]}
{ "_type": "SpellCheck", "flaggedTokens": [] }
模式:证明
请求:
Text =这是一个长期的看法,这里有一些错误.它应该 是一个问题,但我想不出很长的问题.也许那个 意味着我没什么好问的?
Text=This is a long sentance with some mistakes in here. its supposed to be a question but i can’t think of a long question. maybe that means i don’t have something selious to ask?
响应:
{
"_ type":拼写检查",
"_type": "SpellCheck",
"flaggedTokens":[
"flaggedTokens": [
{
"offset": 15,
"token": "sentance",
"type": "UnknownToken",
"suggestions": [
{
"suggestion": "sentence",
"score": 0.687877624668787
}
]
},
{
"offset": 86,
"token": "i",
"type": "UnknownToken",
"suggestions": [
{
"suggestion": "I",
"score": 0
}
]
},
{
"offset": 137,
"token": "i",
"type": "UnknownToken",
"suggestions": [
{
"suggestion": "I",
"score": 0
}
]
},
{
"offset": 52,
"token": "its",
"type": "UnknownToken",
"suggestions": [
{
"suggestion": "it's",
"score": 0.830337199488689
}
]
},
{
"offset": 160,
"token": "selious",
"type": "UnknownToken",
"suggestions": [
{
"suggestion": "serious",
"score": 0.897224156828521
},
{
"suggestion": "delicious",
"score": 0.687622047694618
}
]
}
]
}
推荐答案
这是Bing API的不同来源,但可能是事实的来源: https://dev.cognitive.microsoft.com/docs/services/56e73033cf5ff80c2008c679/operations/56e73036cf5ff81048ee6727
This is a different source of Bing's API, but is probably the source of truth:https://dev.cognitive.microsoft.com/docs/services/56e73033cf5ff80c2008c679/operations/56e73036cf5ff81048ee6727
这篇关于Bing拼写检查API是否对mode = spell有附加的长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!