Iain King wrote:
> steven = re.compile("Ste(v|ph|f|ff)(e|a)n")
Also you can expand the RE a bit to improve readability:
re.compile("Stev|Steph|Stef|Steff)(en|an)")
--
http://mail.python.org/mailman/listinfo/python-list
Iain King wrote:
> steven = re.compile("Ste(v|ph|f|ff)(e|a)n")
> steven = ["Steven", "Stephen", "Stefen", "Steffen", "Stevan",
> "Stephan", "Stefan", "Steffan"]
>
> I know which I'd rather type. 'Course, if you can use a ready-built
> list of names...
Oh I agree, I'd rather *type* the former, bu
Edward Elliott wrote:
> 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 bord
John Machin wrote:
> On 25/04/2006 3:15 PM, Edward Elliott wrote:
>> Phoneme matching seems overly complex and might
>> grab things like Tsu-zi.
>
> It might *only* if somebody had a rush of blood to the head and devised
> yet another phonetic key "algorithm". Tsuzi does *not* give the same
> res
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 usi
On 25/04/2006 8:51 PM, Iain King wrote:
> John Machin wrote:
>> On 25/04/2006 6:26 PM, Iain King wrote:
>>> hawkesed wrote:
If I have a list, say of names. And I want to count all the people
named, say, Susie, but I don't care exactly how they spell it (ie,
Susy, Susi, Susie all work
John Machin wrote:
> On 25/04/2006 6:26 PM, Iain King wrote:
> > hawkesed wrote:
> >> If I have a list, say of names. And I want to count all the people
> >> named, say, Susie, but I don't care exactly how they spell it (ie,
> >> Susy, Susi, Susie all work.) how would I do this? Set up a regular
>
On 25/04/2006 6:26 PM, Iain King wrote:
> hawkesed wrote:
>> If I have a list, say of names. And I want to count all the people
>> named, say, Susie, but I don't care exactly how they spell it (ie,
>> Susy, Susi, Susie all work.) how would I do this? Set up a regular
>> expression inside the count?
On 25/04/2006 3:15 PM, Edward Elliott wrote:
> Phoneme matching seems overly complex and might
> grab things like Tsu-zi.
It might *only* if somebody had a rush of blood to the head and devised
yet another phonetic key "algorithm". Tsuzi does *not* give the same
result as any of Suzi, Suzie, Su
hawkesed wrote:
> If I have a list, say of names. And I want to count all the people
> named, say, Susie, but I don't care exactly how they spell it (ie,
> Susy, Susi, Susie all work.) how would I do this? Set up a regular
> expression inside the count? Is there a wildcard variable I can use?
> He
Dave Hughes wrote:
> Another algorithm that might interest isn't based on "sounds-like" but
> instead computes the number of transforms necessary to get from one
> word to another: the Levenshtein distance. A C based implementation
> (with Python interface) is available:
I don't know what algorith
hawkesed wrote:
> If I have a list, say of names. And I want to count all the people
> named, say, Susie, but I don't care exactly how they spell it (ie,
> Susy, Susi, Susie all work.) how would I do this? Set up a regular
> expression inside the count? Is there a wildcard variable I can use?
> He
"Ryan Ginstrom" <[EMAIL PROTECTED]> writes:
> If there are specific spellings you want to allow, you could just
> create a list of them and see if your Suzy is in there:
>
> >>> possible_suzys = [ 'Susy', 'Susi', 'Susie' ]
> >>> my_strings = ['Bob', 'Sally', 'Susi', 'Dick', 'Jane' ]
> >>> for lin
> Behalf Of hawkesed
> If I have a list, say of names. And I want to count all the people
> named, say, Susie, but I don't care exactly how they spell it (ie,
> Susy, Susi, Susie all work.) how would I do this? Set up a regular
> expression inside the count? Is there a wildcard variable I can use
If I have a list, say of names. And I want to count all the people
named, say, Susie, but I don't care exactly how they spell it (ie,
Susy, Susi, Susie all work.) how would I do this? Set up a regular
expression inside the count? Is there a wildcard variable I can use?
Here is the code for the non-
15 matches
Mail list logo