I want to run the code that stanford postagger.jar needs. but I have this error:
File "/usr/lib/python2.7/site-packages/nltk/internals.py", line 562, in find_jar
(name, path_to_jar))
ValueError: Could not find stanford-postagger.jar jar file at resources/stanford-postagger.jar
How can I fix this error?
EDIT:
I am using the hazm module:
from hazm import POSTagger
tagger = POSTagger()
tagger.tag(word_tokenize('ما بسیار کتاب میخوانیم'))
and the full result:
Traceback (most recent call last):
File "pyt.py", line 8, in <module>
tagger = POSTagger()
File "/home/vahid/dev/hazm/hazm/POSTagger.py", line 14, in __init__
super(stanford.POSTagger, self).__init__(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/nltk/tag/stanford.py", line 42, in __init__
verbose=verbose)
File "/usr/lib/python2.7/site-packages/nltk/internals.py", line 562, in find_jar
(name, path_to_jar))
ValueError: Could not find stanford-postagger.jar jar file at resources/stanford-postagger.jar
source
share