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

More strict entity matching and better handle duplicate enum entity cases #1221

Merged
merged 4 commits into from
May 24, 2023

Conversation

Apollon77
Copy link
Contributor

Pull Request Template

PR Checklist

  • I have run npm test locally and all tests are passing.
  • I have added/updated tests for any new behavior.
  • If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description

This PR mainly adds a new feature to allow to limit the matched entities to the ones defined by the protvided utterances. This is mainly helpful when builtins are used that match content "by themself" and so add entities that were not expected and also might overlap with defined entities. Because of the fact that builtin extractors were executed before otehr entities they had precendence potentially.

With the new NER setting considerOnlyIntentEntities=true/false the matched entities can be hard limited to the ones defined by utterances of the matched intent. All other entities that might have matched are filtered out.

Additionally the code also handles the case that there are overlapping enum entities and if more then one are defined for the intent then the matching checks if one was already matched and then matches the other ones. In the past the entity matching was allways detected on "the first" enum entity with the relevant value. Now they are filled in the order they were added.

The PR also adds a lot more testing for entitiy matching

@Apollon77
Copy link
Contributor Author

@eric-lara Ready for review

@Apollon77
Copy link
Contributor Author

@ericzon ... merge error fixed, ready for review

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@agrawal-rohit
Copy link

@Apollon77 @ericzon The overlapping enum entities are a huge issue for my production application. Could we get this PR reviewed and merged at the earliest? Thanks 😇

@ericzon ericzon merged commit 5a9fe3b into axa-group:master May 24, 2023
@Apollon77 Apollon77 deleted the entityfeat2 branch May 24, 2023 15:04
@Apollon77
Copy link
Contributor Author

Thank yopu very much!

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.

4 participants