[Tutor] word challenge

Isaac Hall hall@ouhep1.nhn.ou.edu
Fri Jul 18 17:46:35 2003


Ok, so I can think of a couple of ways of going about this.  They would 
probably vary in speed depending on the length of the dictionary file, and 
the phrase.

1)loop over every letter in the phrase.
  Inside this loop, loop over all dictionary words beginning with this 
letter.
  first check that the letters after the current letter are enough to make 
the current word,
  if that passes, check that all the letters in the current word are after 
the current letter.
  if that passes, check that they are in the correct order, if so, we have 
a word that works.

2)check every possible combination that COULD be a word against the 
dictionary.  This method would grow VERY fast with length of phrase I 
think however.  

Ike


On Fri, 18 Jul 2003, gyro funch wrote:

> 
> Hi Zak,
> 
> >>Oops. I meant to ask:
> >>* Of all possible discovered words from the 
> >> phrase's own words, which do we pick? All of them?
> 
> Yes, we want a list of all of them. 
> This list can then be paired down based on some criterion (shortest, longest, etc.)
> 
> -g
> 
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 

--