Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port: [#6434] Priority broken for RegexRecognizer (#6435) #4323

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

ceciliaavila
Copy link
Collaborator

Fixes #4308

Description

This PR ports the changes in PR#6435 updating the AdaptiveDialog's onRecognize method to take into consideration the priority set for the intents when there is more than one result with the same score.

Specific Changes

  • Updated the onRecognize method to choose the topIntent considering both score and priority.
  • Removed the break from the recognize method to return all the intents that match the pattern.
  • Added a unit test to cover the priority scenario in adaptiveDialog.test.

Testing

These images show the bot not recognizing the correct intent before and the bot returning the right intent according to its priority after the changes.
image

@ceciliaavila ceciliaavila requested a review from a team as a code owner September 13, 2022 13:11
@coveralls
Copy link

coveralls commented Sep 13, 2022

Pull Request Test Coverage Report for Build 3045338740

  • 18 of 18 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 84.548%

Totals Coverage Status
Change from base Build 3024027438: 0.01%
Covered Lines: 19885
Relevant Lines: 22279

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit fdf7762 into main Sep 13, 2022
@tracyboehrer tracyboehrer deleted the southworks/update/port-intents-priority branch September 13, 2022 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

port: [#6434] Priority broken for RegexRecognizer (#6435)
3 participants