urduhack
urduhack copied to clipboard
I am facing this issue of "word2idx.json" not found.
How to reproduce the problem
I ran the following code after installing urduhack as
pip install Urduhack[tf]
from here: UrduHack Docs After that I ran the following code:
import urduhack
# Downloading models
urduhack.download()
nlp = urduhack.Pipeline()
text = """
گزشتہ ایک روز کے دوران کورونا کے سبب 118 اموات ہوئیں جس کے بعد اموات کا مجموعہ 3 ہزار 93 ہوگیا ہے۔
سب سے زیادہ اموات بھی پنجاب میں ہوئی ہیں جہاں ایک ہزار 202 افراد جان کی بازی ہار چکے ہیں۔
سندھ میں 916، خیبر پختونخوا میں 755، اسلام آباد میں 94، گلگت بلتستان میں 18، بلوچستان میں 93 اور ا?زاد کشمیر میں 15 افراد کورونا وائرس سے جاں بحق ہو چکے ہیں۔
"""
doc = nlp(text)
for sentence in doc.sentences:
print(sentence.text)
for word in sentence.words:
print(f"{word.text}\t{word.pos}")
for token in sentence.tokens:
print(f"{token.text}\t{token.ner}")
This was the error that I got.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator.DESKTOP-2V0A5JF/.urduhack/models/tagger/pos/word2idx.json'
Your Environment
- Operating System: Windows 10
- Python Version Used: 3.8
- Urduhack Version Used: 1.1.1
- Environment Information: anaconda base environment