On Fri, Oct 17, 2008 at 4:59 AM, carme colominas <[EMAIL PROTECTED]> wrote: > 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
It means that Python doesn't know what fdist means. You have to tell it, either by defining an fdist() function yourself (using def) or by importing a module that includes it. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
