Closed Protino closed 7 years ago
I just installed quepy to start working with some examples as shown in the tutorials. But I get the following errors while running main.py.
main.py
Traceback (most recent call last): File "main.py", line 9, in <module> target, query, metadata = testquepy.get_query("what is a blowtorch?") File "/usr/local/lib/python2.7/dist-packages/quepy/quepyapp.py", line 106, in get_query for target, query, userdata in self.get_queries(question): File "/usr/local/lib/python2.7/dist-packages/quepy/quepyapp.py", line 123, in get_queries for expression, userdata in self._iter_compiled_forms(question): File "/usr/local/lib/python2.7/dist-packages/quepy/quepyapp.py", line 137, in _iter_compiled_forms words = list(self.tagger(question)) File "/usr/local/lib/python2.7/dist-packages/quepy/tagger.py", line 68, in wrapper words = tagger_function(string) File "/usr/local/lib/python2.7/dist-packages/quepy/tagger.py", line 64, in <lambda> tagger_function = lambda x: run_nltktagger(x, settings.NLTK_DATA_PATH) File "/usr/local/lib/python2.7/dist-packages/quepy/nltktagger.py", line 49, in run_nltktagger u'NN': wordnet.NOUN, File "/usr/local/lib/python2.7/dist-packages/nltk/corpus/util.py", line 99, in __getattr__ self.__load() File "/usr/local/lib/python2.7/dist-packages/nltk/corpus/util.py", line 64, in __load except LookupError: raise e LookupError: ********************************************************************** Resource u'corpora/wordnet' not found. Please use the NLTK Downloader to obtain the resource: >>> nltk.download() Searched in: - u'/' - u'h' - u'o' - u'm' - u'e' - u'/' - u'g' - u'u' - u'r' - u'u' - u'p' - u'a' - u'd' - u'/' - u'n' - u'l' - u't' - u'k' - u'_' - u'd' - u'a' - u't' - u'a' **********************************************************************
Also this is how i set he nltk_data variable in settings.py:
settings.py
# NLTK config NLTK_DATA_PATH = "/home/gurupad/nltk_data" # List of paths with NLTK data
Can someone help me out?
SOLVED It's a list, not a string so brackets are needed. NLTK_DATA_PATH = ["/home/gurupad/nltk_data"]
NLTK_DATA_PATH = ["/home/gurupad/nltk_data"]
Sorry my bad. Please close the issue.
I just installed quepy to start working with some examples as shown in the tutorials. But I get the following errors while running
main.py
.Also this is how i set he nltk_data variable in
settings.py
:Can someone help me out?