本文介绍了nltk NgramModel错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在nltk中使用NgramModel类没有错误.但是,我最近将nltk更新为版本3.1 ,我再也找不到了NgramModel类.当我尝试照常导入时:

I've previously used the NgramModel class in nltk without error. However, I recently updated nltk to version 3.1 and I can no longer find the NgramModel class. When I try to import as usual:

from nltk.model import NgramModel

我得到了错误

ImportError: No module named 'nltk.model'.

NgramModelmodel模块最近被更换了吗?

Has NgramModel or the model module been recently replaced?

推荐答案

这是未解决的问题因为错误.

在问题中对此进行了说明:

This is noted in the issue:

到模型分支的链接是此处.

这篇关于nltk NgramModel错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 19:17