博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【问题和解决】python中nltk与nltk_contrib的关系
阅读量:4680 次
发布时间:2019-06-09

本文共 1994 字,大约阅读时间需要 6 分钟。

最近在读导师给的《Natural Language Processing with Python》.

在读到11章11.5这一小节时,遇到这样一段代码。

from nltk_contrib import toolbox

其实,在我安装的Python和nltk包里面,并没有nltk_contirb。我是又单独在官网上下载的nltk_contrib。尽管现在可以使用了,但是我还是在疑问nltk和nltk_contrib之间的关系。

由于国内的网站上相关的资料太少,貌似又没有人提出这个疑问(难道是我太钻牛角了?)。于是,我在谷歌论坛上,发表了一个帖子。

问题如下:

My questions are as follows:
1 What is the relationship between "nltk" and "nltk_contrib"?(nltk和nltk_contrib之间的关系是什么?)
2 Is "Nltk_contrib" already out of date?(nltk_contrib已经过时了吗?) 有一位印第安纳大学伯明顿分校的在校学生Alex为我做了解答: 他的英文原文是:
> 1 What is the relationship between "nltk" and "nltk_contrib"? nltk_contrib is a separate repository where people can contribute miscellaneous NLP tools -- there's a lot of stuff in there, and it may or may not be useful. Or it may or may not work. > 2 Is "Nltk_contrib" already out of date? A bunch of things in it are out of date :-( We should update them! Did you have a specific problem using the toolbox? -- -- alexr

他回答的很详细。英语也很容易懂。所以就不翻译了。

后续补充:

我的回复: On Tue, May 21, 2013 at 6:01 PM, XXX 
wrote: > > Hi Alex: > First of all, thank you for your answer. This post has been published > for a long time, I thought that no one wants to answer my question, I am > glad to see your reply. > The reason why these questions, because I found the toolbox there are a > lot of versions. In addition to this version of the nltk_contrib.toolbox, > there nltk.toolbox, and nltk.corpus.reader.toolbox. > The reason why I use nltk_contrib is there is a more useful function > for me, that is nltk_contrib.data.indent (XXXX). > Thanks again for your help!
Alex的回复: Oh, that's interesting! Thanks for pointing this out, how there's a "toolbox" module in both nltk and nltk_contrib! The modules in nltk vs nltk_contrib look pretty different, but they're by the same author... we should probably write down some documentation for what they do, and maybe when to use which one! ---Alex

 

转载于:https://www.cnblogs.com/createMoMo/archive/2013/05/25/3092581.html

你可能感兴趣的文章
C程序的启动和终止
查看>>
js的继承
查看>>
AIDL
查看>>
Find a way HDU - 2612
查看>>
DSP与STM32区别
查看>>
String类型方法
查看>>
sass
查看>>
web工程名出现红色的叹号
查看>>
未进入Kali Linux系统修改修改密码的方法
查看>>
SQLServer中的变量:局部变量,全局变量
查看>>
WPF自定义命令
查看>>
P3531 [POI2012]LIT-Letters
查看>>
JS中的正则表达式
查看>>
kafka集群管理工具kafka-manager部署安装
查看>>
Swift 实现俄罗斯方块详细思路解析(附完整项目)
查看>>
Lua 函数参数 & 默认实参
查看>>
移动端页面点击a标签会有半透明的阴影或红色边框的bug
查看>>
对Joint Training of Cascaded CNN for Face Detection一文的几点疑惑
查看>>
tensorflow c/c++库使用方法
查看>>
c++学习笔记:类的若干基础问题
查看>>