-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
fix for 6340 bug #6423
fix for 6340 bug #6423
Conversation
Thanks for submitting a pull request 🚀 @melindaloubser1 will take a look at it as soon as possible ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for addressing my comments 💯
@praneethgb You need to sign the Contributor License Agreement. Otherwise I am not able to merge this PR. Thanks. |
@tabergma, Signed. Thanks. |
* fix for 6340 bug * DeepSource Styling issues * BILOU code module change * adding bilou tagging entites test case * UNi-gram as new token * Other tag check for test cases * review comments * doc line split Co-authored-by: Tanja <tabergma@gmail.com>
When use roles, there's still a problem to have the entity tokens B-entity ... L-entity to be collected as a whole because of the condition: ( rasa/rasa/nlu/extractors/extractor.py Line 152 in cfe49f4
group_or_role_changed = (last_group_tag != current_group_tag or last_role_tag != current_role_tag) Considering the role and the entity type are both associated with the same token, for me, this works instead
And the rest of the logic to reconstruct the compound entity based on bilou labels of the entity tag ensures the integrity of the approach. Also the "current_role_tag" under construction of the entity ->
|
@tabergma have you seen the message from above? |
Proposed changes:
If two entities are separated by a single space with U- tags, they are currently detected as one entity.
Example:
my ingredients are eggs lemon juice and milk results in
{'entity': 'eggs lemon juice', 'entity':: 'milk', 'extractor': 'DIETClassifier'}
This PR fixes this. Entities separated by a single space and BILOU tags will be listed as individual entities.
Related post: #6340
Status (please check what you already did):
black
(please check Readme for instructions)