Python nltk download and download_shell both freeze (hang) on punkt attempt

后端 未结 3 762
心在旅途
心在旅途 2020-12-19 22:11

Using NLTK 2.0.4. installed for EPD\'s Python-2.7.3 (not Canopy). on Ubuntu 12.10. In the terminal I type:

In [96]: nltk.download_shell()
NL         


        
相关标签:
3条回答
  • 2020-12-19 22:36

    I had the same problem with nltk 3.0.01b. I downloaded the "book" package and monitored the download from the task manager's network display while at the same time checking the size of the target folder (AppData\Roaming\nltk_data on my Windows 7 system). The network traffic ceased and the folder stopped growing at a size of 379 MB. But the Python shell was locked. The following was the last message displayed:

    showing info http://nltk.github.com/nltk_data/

    However, if you cancel out the Tk window that shows what download items are available, the nltk.download() command will terminate and the shell prompt will come back.

    0 讨论(0)
  • 2020-12-19 22:39

    I had the same problem and downloaded the necessary items manually from the following link:

    http://nltk.org/nltk_data/

    Not the desired solution, but will work until this is fixed.

    UPDATE:

    I was actually able to run nltk.download() to install cmudict. Maybe this issue only affects certain packages?

    0 讨论(0)
  • 2020-12-19 22:56

    Most probably it is not stuck. It may be downloading. It downloads at much slower rate even if you have good internet connectivity. I kept checking the folder size using a while loop and it slowly kept on increasing and it was successful finally. It would have worked if you waited. Unzipping might have failed because you tried to unzip before entire file downloaded.

    0 讨论(0)
提交回复
热议问题