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])
评论列表
文章目录