分享

How to install nltk3 for python3?

 dzh1121 2014-04-25
1: check the link  http://www./install.html, and download the nltk3 file.
2:  besides python3,  we also need to install the following.
sudo apt-get install python3-pip  python3-dev
$ sudo pip3 install pyyaml

$ wget http://www.nltk.org/nltk3-alpha/nltk-3.0a3.tar.gz
$ tar -xzvf nltk-3.0a3.tar.gz
$ cd nltk-3.0a3/
$ sudo python3 setup.py install  ( 上面这3步,就是install 文件里有)
$ python3
>>> import nltk
>>> from nltk.corpus import brown
>>> print(brown.sents()[0])


and the nltk data from the page http://www./data.html

Command line installation

To ensure central installation, run the command

$ sudo python3 -m nltk.downloader -d /usr/share/nltk_data all


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多