Re: Phonetic speller function
| From: | Greg Donald | Date: | Mon, 17 Jan 2005 23:18:48 +0000 |
| Subject: | Re: Phonetic speller function | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206595@lists.php.net to get a copy of this message | ||
On Mon, 17 Jan 2005 23:43:48 +0200, Dotan Cohen
<dotan_0105@dotancohen.com> 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 create soundex values for _all_ your known words, and
you stick them in a db.. then you find the soundex value for the word
in question and you do a lookup in your db to find other words with
the closest values. You're right that you don't create any new
strings based on the word. Instead you would provide a listing of
similar words from the db lookup. It's all up to you what words go
into the db to pick from.
I read somewhere most English speaking folks only use about 80K words or so.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/