Skip to content

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

@jreades

Description

@jreades

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions