-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
label keyword argument in Span.merge has no effect #862
Comments
Hi, First --- I don't have utmost confidence that everything works the way it should here. I'll anaswer what should happen, but this part of the code isn't very well tested yet, after undergoing some changes through v1.0. Associating the label to the entity in the matcher will only control what gets passed over to the If you omit the Finally, label vs ent_type. The |
It doesn't seem that the |
Using
|
@dlmiyamoto Thanks for the analysis. Will comment here when I get to this. In the meantime, I think this might be an easy patch if someone else wants to have a look at it. It's just a matter of wiring up the keyword argument so it does what the positional arguments already do. |
Add option to use label=ent_type in doc.merge arguments (Bug fix for issue #862)
Fixed by #935. Thanks Eric! 🎉 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am trying to add custom entities via
add_entity
API. I'd like to be able to specify their entity types. It does not appear that thelabel
keyword inadd_entity
is doing anything.(The following description looks long, but is the same code block repeated with minor changes.)
If I use the snippet provided in issue #523:
It looks promising:
However, I'm not sure the
label='ORG'
is actually doing anything. If I remove it, I get the same output.In fact, anything of the form ABC [Brothers/Limited/Company/Bank] gets labeled as an 'ORG'. And I can't get other patterns to be labeled 'ORG'. E.g.:
The
.label_
property ofdoc.ents
is always''
.How do I set the entity label? And what is the difference between
doc.ents[0].label_
anddoc[0].ent_type_
?The text was updated successfully, but these errors were encountered: