plasticityai / magnitude

A fast, efficient universal vector embedding utility package.
MIT License
1.62k stars 119 forks source link

Spacy3.x not supported (tag_map no longer exists) #87

Open jreades opened 3 years ago

jreades commented 3 years ago

Hi -- I'm trying to make use of PyMagnitude in a Docker image that has Spacy 3.0.6 installed. When trying to load the downloaded vectors I receive the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-37-54185549ba8b> in <module>
      1 import spacy
----> 2 from spacy.lang.en import tag_map

ImportError: cannot import name 'tag_map' from 'spacy.lang.en' (/opt/conda/envs/nlp/lib/python3.8/site-packages/spacy/lang/en/__init__.py)

A bit of Googling turned up:

The TAG_MAP and MORPH_RULES in the language data have been replaced by the more flexible AttributeRuler

See further info on Backwards Incompatibilities.

filipegomes commented 1 year ago

Same issue here.