O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Perform a SoundEx String Comparison

Problem

You want to compare two strings based on their sound.

Solution

Implement a text-matching algorithm such as SoundEx.

Discussion

The SoundEx algorithm is one of the best-known algorithms for "fuzzy" text matching. It’s designed to convert a word into a code based on one possible phonetic representation. Similar sounding words map to the same codes, enabling you to identify which words sound the same.

There are several SoundEx variants, all of which provide slightly different implementations of the same core rules:

  • Simplified. The original SoundEx from late 1800s.

  • Miracode. The modified SoundEx from 1910.

  • KnuthEd2. The SoundEx algorithm from The Art of Computer Programming, Volume 3: Sorting and Searching, Second ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required