in reply to Re: minimal response program code problem
in thread minimal response program code problem

There is a slight problem with this approach: it doesn't pick up 'multiword' items from %goodwords ("i see", "i mean", "i know", "i think so").

Replies are listed 'Best First'.
Re^3: minimal response program code problem
by Melly (Chaplain) on Dec 05, 2006 at 17:26 UTC

    Oops - very true... hmm, I guess I should loop through the goodwords keys and test each one against the chunk... although, given, in this example, very few of the goodwords are multi-word, it might be quicker to treat those as the exceptions and check for them seperately.

    map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
    Tom Melly, pm@tomandlu.co.uk