[Tutor] Fwd: thesaurus
froslie at gmail.com
Thu Jul 9 04:41:56 CEST 2009
I see.. that makes sense. Kind of new with python -- sorry for that.
after printing using this:
I'm getting a format like this returned:
I assume I need to clean this up by reading past 'Adjective|sim|' to
'streaming' and then returning it from lookup()..
this will be happening in the following:
On Wed, Jul 8, 2009 at 10:29 PM, Rich Lovely <roadierich at googlemail.com>wrote:
> 2009/7/9 Pete Froslie <froslie at gmail.com>:
> > No problem, thanks for taking the time.
> > I'm actually trying to resolve this error now:
> > buff.append(" ".join(lookup(Word) for Word in line.split()))
> > NameError: global name 'lookup' is not defined
> > ..also assume I need to change 'Word' to something that checks the next
> > in the text file and then replaces it with the one that is looked up..
> > working on that now.
> > Pete F
> lookup() is the function that looks up the word in the thesaurus. I
> left implementing that as an exercise for you, as I don't know the
> format of the reference you're using.
> Richard "Roadie Rich" Lovely, part of the JNP|UK Famile
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor