botbuilder-python icon indicating copy to clipboard operation
botbuilder-python copied to clipboard

[PORT] Fix LuisRecognizer to not return intents if there is no utterance

Open tomlm opened this issue 5 years ago • 1 comments

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

tomlm avatar Jun 18 '20 19:06 tomlm

Added PR for the same #1387

Adityagrao avatar Sep 20 '20 19:09 Adityagrao