Open salihai opened 10 months ago
Hi! Can you provide more context on what it is you're trying to do? There is no component
to be imported from spaCy. Perhaps share your code so I can better understand what's going on?
Here is my code:
import numpy as np from sense2vec import Sense2Vec s2v = Sense2Vec().from_disk('s2v_old')
Could it be that your s2v_old
model was trained with spaCy v2, and you're now executing this with spaCy v3? spaCy v2 used to have an import for component
in the language
module.
Unfortunately v2 and v3 aren't compatible. For more background, have a look at our blog post: https://explosion.ai/blog/spacy-v3
With respect to sense2vec
:
sense2vec
1.x is compatible with spacy
2.xsense2vec
2.x is compatible with spacy
3.xi will check it, thank you
How can i solve this problem 'ImportError: cannot import name 'component' from 'spacy' (/usr/local/lib/python3.10/dist-packages/spacy/init.py)' ??