Re: [PHP] Phonetic speller function

2005-01-17 Thread Jochem Maas
Dotan, Greg Donald wrote: On Mon, 17 Jan 2005 23:43:48 +0200, Dotan Cohen <[EMAIL PROTECTED]> wrote: I looked at the 'sound like' modules in php (leveshtien, soundex) but they are for comparing 2 strings, not creating a string based on what we already have. You're looking at it from the wrong end.

Re: [PHP] Phonetic speller function

2005-01-17 Thread Greg Donald
On Mon, 17 Jan 2005 23:43:48 +0200, Dotan Cohen <[EMAIL PROTECTED]> wrote: > I looked at the 'sound like' modules in php (leveshtien, soundex) but they are > for comparing 2 strings, not creating a string based on what we already have. You're looking at it from the wrong end. With soundex you cre

Re: [PHP] Phonetic speller function

2005-01-17 Thread Dotan Cohen
I looked at the 'sound like' modules in php (leveshtien, soundex) but they are for comparing 2 strings, not creating a string based on what we already have. I see that str_replace supports regular expessions. Without devoting hours learning to write a regex, would it be inappropriate for me to

Re: [PHP] Phonetic speller function

2005-01-16 Thread Richard Lynch
Dotan Cohen wrote: > kayak. Focusing only on the 'k's I get this array: kayak, cayac. But I > need > kayak, kayac, cayak, cayac. You may (or may not) be able to get something going with that extra optional last argument to str_replace which tells how many characters to replace. str_replace('k',

Re: [PHP] Phonetic speller function

2005-01-16 Thread Greg Donald
On Mon, 17 Jan 2005 01:07:12 +0200, Dotan Cohen <[EMAIL PROTECTED]> wrote: > I am creating an app that will take any word and return an array with all the > possible ways of spelling it. PHP has soundex, which may greatly assist in what you are doing: php.net/soundex Lots of good examples in the