nltk / nltk_data

NLTK Data
1.4k stars 1.02k forks source link

NLTK ERROR when download punkt #154

Open mengxun1437 opened 3 years ago

mengxun1437 commented 3 years ago

here is the error information: (SQLMODEL) mengxun@mengxun:~/SQLMODEL$ python -m nltk.downloader punkt /home/mengxun/anaconda3/envs/SQLMODEL/lib/python3.8/runpy.py:127: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) [nltk_data] Error loading punkt: <urlopen error [Errno 111] Connection [nltk_data] refused> Error installing package. Retry? [n/y/e] e

system : Ubuntu 20.04

can anyone give me a tip to solve it?

RiseInRose commented 1 year ago

https://www.nltk.org/data.html#installing-via-a-proxy-web-server

jiaohuix commented 1 month ago

@RiseInRose it works for me!!! thanks!


import nltk
nltk.set_proxy('http://192.168.1.10:4780')
nltk.download('cmudict')