-
-
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 Merge with keyword arguments #1240
Comments
This is fixed in 2.0 (on develop branch). If you want you could port the fix over? It doesn't rely on other changes. |
Thanks for the quick response! It's not a big issue so I won't bother porting the fix. Using the three parameters interface (which I guess will be deprecated soon) is a workaround for now. I can switch to keyword args when I update to 2.0. |
Okay cool. Thanks, and please keep reporting! :) |
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. |
Merging spans with keyword arguments does not work.
Looking at
spaCy/spacy/tokens/doc.pyx
Line 622 in 6c15cf4
if you want to use a keyword argument to set the lemma, you have to use the key attrs.LEMMA. However, the value of that is 73. Python does not allow numeric keys and putting the key into a dict and using the ** operator (eg myspan.merge(**{spacy.attrs.LEMMA:"new_lemma"}) throws a type error.
Your Environment
The text was updated successfully, but these errors were encountered: