nltk NgramMod公司

2024-04-19 23:43:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我以前在nltk中使用过NgramModel类,没有出错。但是,我最近将nltk更新为version 3.1,我再也找不到NgramModel类了。当我像往常一样尝试导入时:

from nltk.model import NgramModel

我知道错误了

ImportError: No module named 'nltk.model'。在

NgramModel或{}模块最近是否被更换过?在


Tags: 模块nofromimportmodelversion错误named
1条回答
网友
1楼 · 发布于 2024-04-19 23:43:53

这是一个open issue,因为bugs。在

这一点在本期杂志中提到:

If you're currently using the version from github, you can switch to the "model" branch, which includes the NgramModel code, though it's currently significantly behind the "develop" branch and hasn't picked up all the newest bug fixes.

到模型分支的链接是here。在

相关问题 更多 >