◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
pycharm 下 nltk 包无法使用
在 pycharm 中即使下载了 nltk 包,却发现无法调用其功能。例如,运行以下代码会导致错误:
import nltk for_test = 'Xi is the chairman of China in the year 2013.' print(nltk.word_tokenize(for_test))
attributeerror: module 'nltk' has no attribute 'word_tokenize'
解决方法:参考 nltk 文档。
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。