%dict=(driver =>"condutor", the =>"o", of =>"de", car =>"carro"); $word='\w+\b'; if( b(a("the Driver of the car is sleeping")) eq "o Condutor do carro (is) (sleeping)" ) {print "ok\n"} else {print "ko(". b(a("the Driver of the car is sleeping")) .")\n"} RULESM a ($word)==>$dict{$1}!! defined($dict{$1}) ($word)=e=> ucfirst($dict{lc($1)}) !! defined($dict{lc($1)}) ($word)==>($1)!! !defined($dict{$1}) (.)==>$1 RULES a1 =b=> s/^/_/; _$==> _($word)==>$dict{$1}_!! defined($dict{$1}) _($word)=e=> ucfirst($dict{lc($1)})."_" !! defined($dict{lc($1)}) _($word)==>($1)_!! !defined($dict{$1}) _(.)==>${1}_ RULES b \bde o\b==>do