Usage of Bing SpellChecker into LUIS.ai

Viewed 53

I try to improve LUIS intents prediction accuracy. Because there is an issue when missing one letter leads LUIS to a wrong intent. I use the tutorial, but still there is no promised key like alteredQuery in the JSON returned form LUIS.

EXPECTATION:

  "query": "bouk me a fliht to kayro",
  "prediction": {
    "alteredQuery": "book me a flight to cairo",
    "topIntent": "book a flight",
    "intents": {
      "book a flight": {
        "score": 0.9480589
      }
      "None": {
        "score": 0.0332136229
      }
    },
    "entities": {}
  }
}

REALITY:

  "query": "bouk me a fliht to kayro",
  "prediction": {
    "topIntent": "book a flight",
    "intents": {
      "book a flight": {
        "score": 0.9480589
      }
      "None": {
        "score": 0.0332136229
      }
    },
    "entities": {}
  }
}

This is how I use it:

const luisConfig: LuisApplication = {
    applicationId: [APP_ID_GOES_HERE],
    endpointKey: [KEY_GOES_HERE],
    endpoint: [ENDPOINT_GOES_HERE],
};

const recognizerOptions: LuisRecognizerOptionsV2 = {
    apiVersion: 'v2',
    bingSpellCheckSubscriptionKey: [KEY_GOES_HERE];
    includeAllIntents: true,
    log: true,
    spellCheck: true,
    log: true,
    includeInstanceData: true
};

const luisRecognizer = new LuisRecognizer(luisConfig, recognizerOptions, true);

1 Answers

I have the same issue... if I call the API directly:

/luis/prediction/v3.0/apps/<xxxxx>/slots/production/predict?verbose=true&show-all-intents=false&log=true&subscription-key=<xxxxx>&mkt-bing-spell-check-key=<xxxxx>&query=gretings

The response have not the object "alteredQuery".

Im also try with more parameters with the same result:

https://<xxxxx>.cognitiveservices.azure.com/luis/prediction/v3.0/apps/<xxxxx>/slots/production/predict?verbose=true&show-all-intents=false&log=true&subscription-key=<xxxxx>&spellCheck=true&mkt-bing-spell-check-key=<xxxxx>&bing-spell-check-subscription-key=<xxxxx>&query=gretings

If I call directly the BING API with the Ocp-Apim-Subscription-Key header, they response correctly:

https://api.bing.microsoft.com/v7.0/spellcheck?text=gretings
Related