python自然语言处理:NLTK+Ubuntu+Eclipse环境配置
来源:互联网 发布:网络硬盘录像机多少钱 编辑:程序博客网 时间:2024/06/07 02:23
配置环境
- 安装eclipse
- 添加pydev插件
- 安装完提示重启eclipse
- 首先通过下面的命令安装pip,pip是Python的一个安装和管理扩展库的工具
sudo apt-get install python-pip 安装Python开发环境,方便今后编译其他扩展库
sudo apt-get install python-dev
安装missing的包
apt-get update –fix-missing安装nltk
sudo apt-get install python-nltk- 安装numpy
sudo apt-get install python-numpy - 安装python-matplotlib
sudo apt-get install python-matplotlib - 安装prover9
sudo apt-get install prover9 - 安装python-scipy
sudo apt-get install python-scipy - 配置dev 解释器,选择auto-config
安装nltk data
官网的安装教程是很简单的,但是在大陆的网速是让人崩溃的
http://www.nltk.org/data.html
所幸的是,github上有人指出它实际下载的位置是:
http://www.nltk.org/nltk_data/
然后我按照错误提示
Resource ‘corpora/brown’ not found. Please use the NLTK
Downloader to obtain the resource: >>> nltk.download().
Searched in:
- ‘/home/hadoop/nltk_data’
- ‘/usr/share/nltk_data’
- ‘/usr/local/share/nltk_data’
- ‘/usr/lib/nltk_data’
- ‘/usr/local/lib/nltk_data’
创建了一个文件夹 /usr/share/nltk_data
随后将网站上下载的zip解压到nltk_data中的corpora文件夹下:
hadoop@lucy-desktop:/usr/share/nltk_data/corpora$ ls
brown
再运行:
>>> from nltk.corpus import brown>>> brown.words()['The', 'Fulton', 'County', 'Grand', 'Jury', 'said', ...]
就是可以的了。
有没有一键安装的方法呢?
根据这个讨论,应该也是有的:
https://github.com/nltk/nltk/issues/565
在github上
https://github.com/nltk/nltk_data/tree/gh-pages
Apart from individual data packages, you can download the entire collection (using “all”), or just the data required for the examples and exercises in the book (using “book”), or just the corpora and no grammars or trained models (using “all-corpora”).
下载后目录内容为:
找到tools文件夹:
执行
sudo ./download.sh all
就安装了整个collection 在 /usr/share
目录下
参考文献:
ubuntu12.04 Eclipse Python下的nltk环境搭建
http://blog.csdn.net/caicai1617/article/details/21322645
MOOC上公开课:
https://class.coursera.org/nlangp-001/lecture
更具体的:
哪些公开课上关于NLP的?
https://www.quora.com/What-is-the-best-natural-language-processing-MOOC
- python自然语言处理:NLTK+Ubuntu+Eclipse环境配置
- python+NLTK自然语言处理 环境搭建
- Python nltk自然语言处理基本资料
- Python+NLTK自然语言处理学习(一):环境搭建
- Python+NLTK自然语言处理学习(一):环境搭建
- Python+NLTK自然语言处理学习(一):环境搭建
- Python自然语言处理-自然语言工具包(NLTK)
- [python+nltk] 自然语言处理简单介绍和NLTK坏境配置及入门知识(一)
- Python+NLTK自然语言处理学习(一…
- Python+NLTK自然语言处理学习(二…
- Python+NLTK自然语言处理学习(三…
- python自然语言处理nltk库常用接口
- python nltk自然语言处理学习笔记1
- python nltk自然语言处理学习笔记2
- Python自然语言处理NLTK(1.1-1.3)
- 《Python自然语言处理》笔记1------初识nltk
- python自然语言处理-使用NLTK做统计分析
- python自然语言处理nltk包离线下载
- Android连续点击两次Back键退出程序
- mysql服务器修改为utf8编码
- XMPP框架 微信项目开发之XMPP框架的导入——XMPP框架导入的详细步骤
- 第4章 Fragment
- 学习Android Studio里的Gradle
- python自然语言处理:NLTK+Ubuntu+Eclipse环境配置
- TextView显示文本控件
- UIBarButtonItemSystemItemFixedItem设定指定宽度的barButtonItem
- 冒泡排序的原理及方法
- Ant创建JAR可执行jar文件
- 如何用Maven创建web项目(具体步骤)
- debian安装sublime text 3
- Linux 下三种方式设置环境变量
- intelliJ IEDA + opencv 开发上手