Gossamer Forum
Home : General : Perl Programming :

Comparing Words

Quote Reply
Comparing Words
Hi everyone,

I'm trying to make a spell checker,

And the code I'm using now, takes 60 percent of a word and compares it with field1 in a data base.

I don't like it becase if you type in masereti it should come back and say maserati But it only looks for the part masere so the word maserati won't be picked up.

There is only one letter that is different it should be picked up, Is there a way to do this,

compare the two words and if there is only a one, two, three or whatever letter difference then it will count it as a match.

I can't even think of what the code would like and this is very important for me to finish.

Thank you for all you help,

perlkid

Quote Reply
Re: Comparing Words In reply to
Have a look at SOUNDEX:

http://www.perl.com/...-Soundex-2.20.tar.gz

or:

http://www.mysql.com/...ion=String_functions

Note: this is only useful for the english language.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Comparing Words In reply to
 
Thanks Alex, I'm having my admin install it now,

But aside from that I have it working pretty well.

Thanks Alex,

perlkid