本文介绍了如何检查wordnet是否已经安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道我们可以像这样检查资源:
I know that we can check for resources like this:
try: nltk.data.find('tokenizers/punkt') except LookupError: nltk.download('punkt')但我找不到为 wordnet 执行此操作的方法:
But I can't find the way to do this for wordnet:
try: nltk.data.find('wordnet') # ????/wordnet except LookupError: nltk.download('wordnet')我如何进行此检查?
推荐答案您可以:
nltk.find('corpora/wordnet')更多推荐
如何检查wordnet是否已经安装?
发布评论