[Tutor] name 'x" is not defined

carme colominas carme.colominas at gmail.com
Fri Oct 17 10:59:11 CEST 2008


hi,

I'm a  linguist and absolut new on Python; I'm trying to follow the first
chapter of *Natural Language Processing in Python.
I'm aware this is a very basic question, but I'm stuck; can someone explain
me, what does it mean that a function is not defined and how to proceed?
*
For example, for fdist:

>> for word in nltk.corpus.brown.words():
    if fdist(word)>= 3:
        print(word)

I get the following:

Traceback (most recent call last):
  File "<pyshell#47>", line 2, in <module>
    if fdist(word)>= 3:
NameError: name 'fdist' is not defined

Thanks in advance!

carme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081017/78b51186/attachment-0001.htm>


More information about the Tutor mailing list