# Fuzzy String Matching Algorithm

• 03-28-2008
Osiris990
Fuzzy String Matching Algorithm
I've looked everywhere for a good explanation of an algorithm for fuzzy string matching. Anyone have a link to a good tutorial on it?

Thanks,
Shane
• 03-28-2008
Dino
lol.

If you've looked everywhere, where are we supposed to look?
• 03-28-2008
indigo0086
• 03-28-2008
Salem
• 03-31-2008
Osiris990
Sorry for the brevity of my initial post. I was in a bit of a rush when I wrote it. It makes me sound as if I'm looking for you to do the searching for me, which isn't the case.

Quote:

Originally Posted by Salem

That's kind of along the lines of what I was looking for, but I was more thinking of something where I could find a percent of similarity between two strings...

Say, for instance, that I compare the strings "how are you?" and "how do you do?". I'm looking for an algorithm that could tell me whether the two strings have a roughly matching meaning in the form of a percentage... Do you understand what I'm asking for? Anyone have any ideas?
• 03-31-2008
matsp
It all depends on how you want to match the two strings:
Character matching:
"how are you?" and "how do you do?" - about 50% similarity. While strings are the same, count "similar". If strings differ, use some method to find a similar point again.

Word-wise:
Roughly the same as character matching, but instead of matcing characters, parse the string and split into words, and compare words.

The difference between character and word matching omes when matching something like:
"How do you do?"
with
"Howling on you?" [Sorry, silly example, but had to come up with something starting with "How..."]

Linguistically:
"how are you?" and "how do you do?" - not much in common at all (one is asking a genuine question, the other is a formality in greething someone - and no one is genuinely interested in either case ;) ]. This is of course much more complicated than the method of word or character matching, because it has to do with the meaning of the words.

--
Mats
• 03-31-2008
Salem
Soundex returns a number (of sorts), converting it to a &#37;'age can't be that hard surely.