download.py 文件源码

python
阅读 65 收藏 0 点赞 0 评论 0

项目:textkit 作者: learntextvis 项目源码 文件源码
def download():
    '''
    Install required libraries.
    Note this library will install nltk dependencies into your
    user directory.
    '''

    click.echo("Installing nltk packages into your user directories in " +
               "the following order of existence (first found):\n" +
               '\n'.join(nltk.data.path))

    extensions = [("taggers", "averaged_perceptron_tagger"),
                  ("corpora", "wordnet"),
                  ("tokenizers", "punkt")]

    missing = check_packages_exist(extensions)

    for ext_tuple in missing:
        nltk.download(ext_tuple[1])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号