Page 1 of 1

Comparing similar text (e.g. ltd & limited)

Posted: Wed Dec 30, 2009 2:41 am
by lopqtx
I am writing a program whereby, the user will input the name of a company. The company insert may be repeating.

However, some user might enter input like this: "ABC pte ltd". In the database, it might be already has the "ABC Private Limited".

Therefore I want to write a small program that is able to detect there is a similar data inside the DB. I have tried many functions, but failed.

My idea is that the coding will find similar data and output it to let the user validate whether it is the same.

Anybody has any idea on this? Thanks in advance.

Re: Comparing similar text (e.g. ltd & limited)

Posted: Wed Dec 30, 2009 4:58 am
by VladSun
Well, similar entires like the one you gave as an example are very hard to detect.
I've used a small class to detect misspelled entries:

viewtopic.php?f=50&t=89094

Also, take a look at the last post in the thread.