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()
NLTK Downloader
---------------------------------------------------------------------------
d) Download l) List u) Update c) Config h) Help q) Quit
---------------------------------------------------------------------------
Downloader> d
Download which package (l=list; x=cancel)?
Identifier> punkt
Downloading package 'punkt' to /home/espears/nltk_data...
And then it freezes. The relevant punkt.zip file is written to the stated directory, but the download
interface never relinquishes.
This example is with IPython, but I tried the same with the regular Python 2.7.3 interpreter and got the same result.
When I try to use unzip
to unzip the file directly, I see errors saying that the proper central zip-file code is not found within the file and that it cannot be unzipped. See below:
espears@computer ~/nltk_data/tokenizers $ unzip punkt.zip
Archive: punkt.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of punkt.zip or
punkt.zip.zip, and cannot find punkt.zip.ZIP, period.
This happens with both nltk.download()
and nltk.download_shell()
in the same way.
I can inspect the .zip file using du
to see that initially its size grows from 0 MB to about 2.7 MB, so it is actually downloading something and the file is not empty. But it stops at 2.7 MB (which may or may not correspond to the expected full size of the file) and then the Python shell downloader freezes.
download_shell
which bypasses the graphics concerns. – Thermoscope