You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Python version: 2.7.10
Platform: Darwin-16.6.0-x86_64-i386-64bit
spaCy version: 1.8.2
Installed models: en, en_core_web_md
The text was updated successfully, but these errors were encountered:
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.
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: