You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于配置BING拼写检查为独立单字校验的技术咨询

Fixing Bing Spell Check's Contextual Correction of "medical suppliers"

Hey there, let's work through this issue where Bing Spell Check is overcorrecting your specific term "medical suppliers" to "medical supplies"—even though "suppliers" on its own never gets flagged.

First, let's break down why this happens: Bing's default spell check behavior uses contextual analysis to suggest what it thinks is the most natural or commonly used phrase. In this case, it assumes "medical supplies" is the intended term because it's more widely used, but that's not aligned with your system's required terminology.

Here are three actionable solutions to get the behavior you want (validating individual words without contextual influence):

1. Switch to the proof mode in the Bing Spell Check API

Bing's API offers two main modes, and swapping from the default spell mode to proof will shift its focus entirely. The proof mode prioritizes catching actual spelling/grammar errors instead of suggesting contextually alternative phrases. Since neither "medical" nor "suppliers" is misspelled, this mode will leave the phrase intact and won't second-guess the word combination.

When making your API request, just set the mode parameter to proof—this should immediately stop the unwanted correction for "medical suppliers" while still catching real typos in other queries.

2. Add "medical suppliers" to a custom dictionary

If you want to keep some contextual checks for other phrases but need to protect specific terms like this, create a custom dictionary in your Bing Spell Check configuration. Add the exact phrase "medical suppliers" as a valid, approved term. This tells the API to treat this phrase as correct and skip any replacement suggestions for it.

This is a great middle ground if you don't want to disable all contextual analysis, just override it for your system-specific terminology.

3. Manually validate each word individually

As a fallback, you can bypass Bing's contextual analysis entirely by splitting the search query into individual words, running spell check on each one separately, then recombining them. Since "suppliers" on its own never triggers a correction, the combined phrase will stay as "medical suppliers".

Here's a quick pseudocode example of how you could implement this:

def check_spell_per_word(search_query):
    # Split query into individual words
    words = search_query.split()
    # Run spell check on each word via the API
    corrected_words = [bing_spell_check_api(word) for word in words]
    # Recombine into the final query
    return ' '.join(corrected_words)

Just note that this approach will ignore any legitimate contextual fixes you might want for other phrases, so test it with your typical search traffic to make sure it doesn't break other use cases.


内容的提问来源于stack exchange,提问作者Bill Chang

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:23:56