Closed peterinnesmsft closed 3 years ago
Contents of recognizer\CoinversationalCore.lu.dialog for reference:
{
"$kind": "Microsoft.MultiLanguageRecognizer",
"id": "LUIS_ConversationalCore",
"recognizers": {
"en-us": "ConversationalCore.en-us.lu",
"": "ConversationalCore.en-us.lu"
}
}
Version
4.13.0-rc4
Describe the bug
Multi-language recognizer is unable to select the corresponding recognizer for a given locale if there is a case mismatch between the recognizer locale key and either the locale in the incoming activity or the default locale from the LanguagePolicy.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Additional context
Related to https://github.com/microsoft/BotFramework-Composer/issues/6893.
When creating a new bot on the adaptive runtime, the bot is created using a default locale of 'en-US', which is fed in to the ConfigurationLanguagePolicy. This language policy is ultimately referenced in MultiLanguageRecognizer.
If no locale is explicitly set, we are able to correctly find the language policy corresponding to en-US. However, per ConversationalCore.lu.dialog scaffolded in recognizers dir for new bot, the locale is configured as 'en-us'. When attempting to select the recognizer based on the language policy locale value, it is not discovered because the recognizers dictionary is deserialized into a dictionary that uses a case-sensitive key comparer.