zoukankan      html  css  js  c++  java
  • 【问题和解决】python中nltk与nltk_contrib的关系

    最近在读导师给的《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 <limaoma...@gmail.com> 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
  • 相关阅读:
    家庭记账本---开发进度1
    HDOJ 1004--Let the Balloon Rise
    DP HDIJ1421 搬宿舍
    动态规划之最长公共子序列
    和最大的子序列之二
    和最大的子序列之一
    动态规划之一最长上升子序列LIS
    动态规划之一数塔
    动态规划之一ones
    动态规划实例
  • 原文地址:https://www.cnblogs.com/createMoMo/p/3092581.html
Copyright © 2011-2022 走看看