Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am facing this issue of "word2idx.json" not found. #147

Open
MZaidAI opened this issue Sep 30, 2021 · 0 comments
Open

I am facing this issue of "word2idx.json" not found. #147

MZaidAI opened this issue Sep 30, 2021 · 0 comments

Comments

@MZaidAI
Copy link

MZaidAI commented Sep 30, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant