alvations / pywsd

Python Implementations of Word Sense Disambiguation (WSD) Technologies.
MIT License
744 stars 132 forks source link

pls help install on windows 'averaged_perceptron_tagger' #30

Closed Sandy4321 closed 6 years ago

Sandy4321 commented 7 years ago

as you recommend I try to install 'averaged_perceptron_tagger' but windows 10 computer gives error

Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved.

e:\nltk_data>python -m nltk.downloader showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml

e:\nltk_data>python -m nltk.downloader 'averaged_perceptron_tagger' [nltk_data] Error loading 'averaged_perceptron_tagger': Package [nltk_data] "'averaged_perceptron_tagger'" not found in index Error installing package. Retry? [n/y/e] y Traceback (most recent call last): File "C:\Users\cde3\Anaconda3\lib\runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "C:\Users\cde3\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\cde3\Anaconda3\lib\site-packages\nltk\downloader.py", line 2268, in halt_on_error=options.halt_on_error) File "C:\Users\cde3\Anaconda3\lib\site-packages\nltk\downloader.py", line 677, in download if not self.download(msg.package.id, download_dir, AttributeError: 'NoneType' object has no attribute 'id'

e:\nltk_data>

alvations commented 7 years ago

What is your nltk version?

$ python3
>>> import nltk
>>> print (nltk.__version__)

Try upgrading the NLTK version using:

pip install -U nltk

Perhaps this might help too: https://gist.github.com/alvations/0ed8641d7d2e1941b9f9

After upgrading the NLTK version, you should see:

$ python -m nltk.downloader averaged_perceptron_tagger
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /Users/liling.tan/nltk_data...
[nltk_data]   Package averaged_perceptron_tagger is already up-to-
[nltk_data]       date!

Do get back if any of the above has helped you to fix the error! =)

alvations commented 6 years ago

If you're still having problems with the NLTK data, please take a look at https://stackoverflow.com/questions/22211525/how-do-i-download-nltk-data

sheqiZ commented 3 years ago

upgrading nlkt and downloading resources work!

Priyavrat13 commented 1 year ago

upgrading nlkt Didn't work for me. getting this error: [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error [nltk_data] [WinError 10054] An existing connection was forcibly [nltk_data] closed by the remote host> Please help

mahaanand7 commented 1 year ago

python -m nltk.downloader averaged_perceptron_tagger

Thank you alvations ! it works

( $ python -m nltk.downloader averaged_perceptron_tagger [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] /Users/liling.tan/nltk_data... [nltk_data] Package averaged_perceptron_tagger is already up-to- [nltk_data] date! )