Reputation: 81
Hi I am trying to import Example class from Spacy.training module. I am trying exact code as in documentation.
from spacy.training import Example
But I am getting "ModuleNotFoundError: No module named 'spacy.training
'"
How can I import Example class now?
Upvotes: 1
Views: 1635
Reputation: 27375
Example
was introduced in spacy version 3
.
Link to Example
https://spacy.io/api/example#_title
You can check the current version of your spacy with this command on your Jupyter cell:
!pip show spacy
OR
spacy.__version__
Once you check the version, you can update to a latest version by:
!pip install -U spacy
Once, you get spacy 3
your problem will be resolved.
Upvotes: 4