------------- You Prefer to use CPU --------------
Traceback (most recent call last):
File "/usr/src/app/main.py", line 8, in <module>
print(spacy_posTagger.tag(tokens = Ä'من', 'به', 'مدرسه', 'ایران', 'رفته_بودم', '.'Ü))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hazm/pos_tagger.py", line 380, in tag
self._setup_model(ÄtokensÜ)
File "/usr/local/lib/python3.11/site-packages/hazm/pos_tagger.py", line 260, in _setup_model
self.tagger = spacy.load(self.model_path) # Load the spaCy model
^^^^^
NameError: name 'spacy' is not defined
Description
Encountering
name 'spacy' is not defined
when trying to callspacy_posTagger.tag
from the Hazm library.Steps to Reproduce
spacy_posTagger.tag
as per the documentation/examples provided:Environment
Hazm version: 0.10.0 Python version: 3.11 Operating System: Docker image python:3.11-slim scipy: 1.11.4 numpy: 1.24.3