You want to compare two strings based on their sound.
Implement a text-matching algorithm such as SoundEx.
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 ...