botbuilder-python
botbuilder-python copied to clipboard
[PORT] Fix LuisRecognizer to not return intents if there is no utterance
Port this change from botbuilder-dotnet/master branch: https://github.com/microsoft/botbuilder-dotnet/pull/4129
Fixes #4117
Description
Luis Recognizer returns an intent of string.empty with a perfect score of 1.0. This messes up logic downstream in RecognizerSet because it thinks it has a perfect intent.
Specific Changes
- Changed LuisRecognizer to return empy RecognizerResult (no intents or entities) when there is no utterance.
Testing
Changed RegexRecognizer to behave just like LuisRecognizer so that ValueRecognizer tests are valid check.
Changed projects
- Microsoft.Bot.Builder.AI.LUIS
- Microsoft.Bot.Builder.Dialogs.Adaptive
- Microsoft.Bot.Builder.AI.LUIS.Tests
Added PR for the same #1387