nltk 3.0中的生成方法nltk.text.text似乎已被删除。
例如:
>>> bible = nltk.corpus.gutenberg.words(u'bible-kjv.txt')
>>> bibleText = nltk.Text(bible)
>>> bibleText.generate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Text' object has no attribute 'generate'
可能只是我记错了怎么做,但我在网上找到的一切似乎都支持上述方法。你知道我做错了什么吗?
在first online chapter of the NLTK book中有一个注释说:
相关问题 更多 >
编程相关推荐