I shouldn't be getting this error. This has worked before and any tutorial goes over this in the same way and it works. Please help.
import nltk
from nltk.book import *
text3.generate()
AttributeError Traceback (most recent call last)
<ipython-input-2-e0816ba18b61> in <module>()
----> 1 text3.generate()
AttributeError: 'Text' object has no attribute 'generate'
print sys.version #my python version 2.7.8 |Anaconda 2.0.1 (x86_64)| (default, Aug 21 2014, 15:21:46) [GCC 4.2.1 (Apple Inc. build 5577)]
The fourth note in the first online chapter of the NLTK book says that:
The generate() method is not available in NLTK 3.0 but will be reinstated in a subsequent version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With