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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lopqtx
Forum Newbie
Posts: 1
Joined: Wed Dec 30, 2009 2:33 am

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

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

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

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply