【发布时间】:2021-10-13 13:13:23
【问题描述】:
我想知道nltk.download() 做了什么。另外,如果我添加“wordnet”作为参数,那么会发生什么。 wordnet 是否像某些数据集或其他东西,我想对此进行更多说明。
【问题讨论】:
-
您的问题的简单答案可能在文档底部,nltk.org/install.html:
After installing the NLTK package, please do install the necessary datasets/models for specific functions to work. If you’re unsure of which datasets/models you’ll need, you can install the “popular” subset of NLTK data, on the command line type python -m nltk.downloader popular, or in the Python interpreter import nltk; nltk.download(‘popular’): For details, see http://www.nltk.org/data.html -
为了在你的例子中下载特定的“wordnet”字典,这个问题可能已经在这里回答了stackoverflow.com/questions/6661108/import-wordnet-in-nltk,这表明方法
nltk.download(<dictionary_name>),正如方法名称download()所暗示的那样,指示nltk 库下载请求的字典
标签: deep-learning nlp nltk