Alternate sound matching algorithm

While looking at extensions and plugins for a programming platform, I came across information about a different “sounds like” matching algorithm. It’s called Jaro-Winkler.

The weakness of SoundEx is that at least the first letter of the string has to match the target. So even though Kris and Chris sound alike, SoundEx will not select them both.

The Jaro-Winkler solves that problem because it is more character matching than sound matching. So one method doesn’t completely replace the other. Each has its “best case” environment.

Here is some text describing the difference. Maybe a JaroWinkler matching choice will appear in PanX someday?

**********************************************

SoundEx encodes a word into a 4-character phonetic code, but it always anchors on the literal first letter, so “Kris” → K620 and “Chris” → C620 — different codes, no match, even though they sound identical.

Jaro-Winkler doesn’t care about phonetics or a fixed anchor letter at all — it’s purely about character overlap within a sliding window plus order. “Kris” and “Chris” share four letters in nearly the same relative order (just an inserted “h”), so they still yield a high similarity score, typically well above 0.85, without either string needing to start with the same character.

The tradeoff: it’s a string similarity measure, not a phonetic one — it won’t catch things that sound alike but are spelled very differently (e.g., “Xtina” vs “Christina” would score lower than you might expect). For name-matching, it should work well since the letters are close in character sequence, not just in sound.

I’ve had the idea of adding a string similarity feature for several years, but I think I would probably use the Damerau-Levenshtein algorithm rather than Jaro-Winkler.

That’s cool. I always thought SoundEx was misnamed because it would miss something as common as Kris and Chris.

I suppose those character matching methods could be made into Functions when more appropriate for the matching chore.