赞
踩
- >>>import nltk
- >>>nltk.download()
- ---------------------------------------------------------------------------
- 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/aistudio/nltk_data...
- Unzipping tokenizers/punkt.zip.
按照第一种方式如果出错会得到提示:
- Searched in:
- - '/root/nltk_data'
- - '/usr/nltk_data'
- - '/usr/share/nltk_data'
- - '/usr/lib/nltk_data'
- - '/usr/share/nltk_data'
- - '/usr/local/share/nltk_data'
- - '/usr/lib/nltk_data'
- - '/usr/local/lib/nltk_data'
下载punkt.zip包,解压缩后放置到/nltk_data/tokenizers文件目录下,然后将整个文件目录放置到其searched in的任意一个目录下就ok。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。