nlpaug icon indicating copy to clipboard operation
nlpaug copied to clipboard

FileNotFoundError

Open liuweizz opened this issue 10 months ago • 0 comments

(nlpaug_env) lwz@ubuntu:/ssd1/lwz/CCKS-AI-detection$ python -c "import nltk; print(nltk.pos_tag(nltk.word_tokenize('This is a test sentence.')))" Traceback (most recent call last): File "", line 1, in File "/home/lwz/anaconda3/envs/nlpaug_env/lib/python3.8/site-packages/nltk/tag/init.py", line 168, in pos_tag tagger = _get_tagger(lang) File "/home/lwz/anaconda3/envs/nlpaug_env/lib/python3.8/site-packages/nltk/tag/init.py", line 110, in _get_tagger tagger = PerceptronTagger() File "/home/lwz/anaconda3/envs/nlpaug_env/lib/python3.8/site-packages/nltk/tag/perceptron.py", line 183, in init self.load_from_json(lang) File "/home/lwz/anaconda3/envs/nlpaug_env/lib/python3.8/site-packages/nltk/tag/perceptron.py", line 274, in load_from_json with open(loc + TAGGER_JSONS[lang]["weights"]) as fin: FileNotFoundError: [Errno 2] No such file or directory: '/home/lwz/nltk_data/taggers/averaged_perceptron_tagger_eng/averaged_perceptron_tagger_eng.weights.json'

liuweizz avatar Jun 04 '25 03:06 liuweizz