John Machin wrote: > On 25/04/2006 6:26 PM, Iain King wrote: >> iain = re.compile("(Ia(i)?n|Eoin)") >> steven = re.compile("Ste(v|ph|f)(e|a)n") > > IMHO, the amount of hand-crafting that goes into a *general-purpose* > phonetic matching algorithm is already bordering on overkill. Your > method using REs would not appear to scale well at all.
Also compare the readability of regular expressions in this case to a simple list: ["Steven", "Stephen", "Stefan", "Stephan", ...] -- http://mail.python.org/mailman/listinfo/python-list