如何下载NLTK的全部免费资源?

时间:2016-07-17 16:43:26

标签: python python-3.x nltk

在我的Mac上,安装裸机NLTK并输入nltk.download()工作正常。它给了一个弹出窗口,从那里顺利航行。

现在我遇到了删除服务器(带有shell的Linux VPS)的问题。我将nltk添加到Python 2和Python 3,并从服务器运行nltk.download()。后者给了我一个无效的ASCII艺术复选框:

Python 3.4.2 (default, Oct  8 2014, 10:45:20)  [GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more 
information.

>>> import nltk

>>> nltk.download() NLTK Downloader

---------------------------------------------------------------------------
    d) Download   l) List    u) Update   c) Config   h) Help   q)           
Quit

--------------------------------------------------------------------------- Downloader> h



Commands:   d) Download a package or collection     u) Update out of
date packages   l) List packages & collections          h) Help   c)

View & Modify Configuration          q) Quit



---------------------------------------------------------------------------

    d) Download   l) List    u) Update   c) Config   h) Help   q) Quit

--------------------------------------------------------------------------- Downloader> s Command 's' unrecognized

---------------------------------------------------------------------------

    d) Download   l) List    u) Update   c) Config   h) Help   q) Quit

--------------------------------------------------------------------------- Downloader> a Command 'a' unrecognized



---------------------------------------------------------------------------

    d) Download   l) List    u) Update   c) Config   h) Help   q) 
Quit

---------------------------------------------------------------------
------ Downloader> d


Download which package (l=list; x=cancel)?   Identifier> l Packages:  
[ ] abc................. Australian Broadcasting Commission 2006   [ ]
alpino.............. Alpino Dutch Treebank   [ ]
averaged_perceptron_tagger Averaged Perceptron Tagger   [ ]
basque_grammars..... Grammars for Basque   [ ] biocreative_ppi.....
BioCreAtIvE (Critical Assessment of Information
                           Extraction Systems in Biology)   [ ] 
bllip_wsj_no_aux.... BLLIP Parser: WSJ Model   [ ]
book_grammars....... Grammars from NLTK Book   [ ]
brown_tei........... Brown Corpus (TEI XML Version)   [ ]
cess_cat............ CESS-CAT Treebank   [ ] cess_esp............
CESS-ESP Treebank   [ ] chat80.............. Chat-80 Data Files   [ ]
city_database....... City Database   [ ] cmudict............ The
Carnegie Mellon Pronouncing Dictionary (0.6)   [ ]
comparative_sentences Comparative Sentence Dataset   [ ]
comtrans............ ComTrans Corpus Sample   [ ] conll2000...........
CONLL 2000 Chunking Corpus   [ ] conll2002........... CONLL 2002 Named
Entity Recognition Corpus   [ ] conll2007........... Dependency
Treebanks from CoNLL 2007 (Catalan
                           and Basque Subset)

我知道我不需要其他语言;我知道其中一些,但是部分熟练。

我希望能够使用https://pythonprogramming.net/wordnet-nltk-tutorial/中讨论的NLTK演示。它使用棕色和其他包装;但我的主要目标之一是能够计算单词之间的距离。

1 个答案:

答案 0 :(得分:1)

你有机会尝试这个吗?

python -m nltk.downloader all

这是直的from the documentation