本站资源收集于互联网,不提供软件存储服务,每天免费更新优质的软件以及学习资源!

为什么我在PyCharm中无法使用nltk包?

网络教程 app 1℃

为什么我在PyCharm中无法使用nltk包

pycharm 下 nltk 包无法使用

在 pycharm 中即使下载了 nltk 包,却发现无法调用其功能。例如,运行以下代码会导致错误:

import nltkfor_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 文档。

以上就是为什么我在 PyCharm 中无法使用 nltk 包?的详细内容,更多请关注范的资源库其它相关文章!

转载请注明:范的资源库 » 为什么我在PyCharm中无法使用nltk包?

喜欢 (0)