-
-
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
💫 Span should accept string label #3027
Labels
Comments
ines
added
enhancement
Feature requests and improvements
feat / doc
Feature: Doc, Span and Token objects
labels
Dec 8, 2018
honnibal
added a commit
that referenced
this issue
Dec 8, 2018
ines
pushed a commit
that referenced
this issue
Dec 8, 2018
Fixes #3027. * Allow Span.__init__ to take unicode values for the `label` argument. * Allow `Span.label_` to be writeable. - [x] I have submitted the spaCy Contributor Agreement. - [x] I ran the tests, and all new and existing tests passed. - [ ] My changes don't require a change to the documentation, or if they do, I've added all required information.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
The
Span
class allows alabel=
keyword argument, but only accepts integer IDs (hash values), not string labels. So in order to add a string label, you first need to look it up in thenlp.vocab.strings
ordoc.vocab.strings
. This is inconvenient – ideally,Span
should accept both:The text was updated successfully, but these errors were encountered: