I am a beginner in Python and NLTK. I am trying to run the following code from a tutorial:
from nltk.corpus import gutenberg
from nltk import FreqDist
fd = FreqDist()
for word in gutenberg.words('austen-sense.txt'):
fd.inc(word)
If I run this I get the following error:
AttributeError: 'FreqDist' object has no attribute 'inc'
Any idea what I am doing wrong?
