Breeze
Breeze

Reputation: 29

The bing spell check service does not correct the typos in my web app bot

I am using .Net V3 SDK Azure Bot framework. Integrated a Bing Spell Check API service with my Web App bot and enabled the service in my LUIS model as well. I thought the spell check service will correct the typos once the user ask the question from the bot. I am sure the spell check service works as the number of calls increase each time I test the bot, but how can I get the suggested text from the spell check service? Do I have to code this functionality in the bot code? thanks in advance for any help.

Upvotes: 1

Views: 188

Answers (1)

Kyle Delaney
Kyle Delaney

Reputation: 12264

A query that's been corrected by Bing Spell Check gets sent in the LUIS result's alteredQuery property.

In your LUIS dialog, you can access the AlteredQuery property like this:

[LuisIntent("None")]
public async Task NoneIntent(IDialogContext context, LuisResult result)
{
    await context.PostAsync($"I think you meant \"{result.AlteredQuery}\"");
}

Upvotes: 2

Related Questions