Soundex Overview

Soundex® is an algorithm that assigns letters to a numerical equivalent for the purpose of organizing together names that sound alike but are not spelled alike. The U.S. Census Bureau has been using Soundex for more than one hundred years.  STORIS uses Soundex in some name search options, such as in the Search for a Customer routine.

For example, if you enter SMITH as the last name and nothing for the first name, the system returns all customer records with last name Smith, as well as any last names that sound like Smith (for example, Schmidt or Smitty).  Conversely, an alphanumeric search of SMITH returns only those records spelled exactly like Smith (that is, not Smyth or Smithe).

To specify Soundex as the default search method for the Search for a Customer screen, use the Default Search Type field on the Customer tab in the Point of Sale Control Settings.

Soundex Codes

The Soundex code for a name consists of a letter followed by three numbers. The letter is drawn from the first letter of the name, and the numbers encode the remaining consonants in the name. Similar sounding consonants share the same Soundex number. For example, the letters B, F, P, and V are phonetically similar, and are encoded as the number one (1).

Vowels can affect coding, but are never coded directly unless they appear at the start of the name.

Soundex assigns numbers to letters as follows:

0 = a, e, h, i, o, u, w, y

1 = b, f, p, v

2 = c, g, j, k, q, s, x, z

3 = d, t

4 = l

5 = m, n

6 = r

Soundex applies the algorithm to names as follows:

  1. Do not convert the first letter of the name to a number.

  2. Change selected two-and-three digit consonant blends into one or two digits. For example, Soundex changes SCH as in Schmidt to SH, PH as in Phillip to F, or GH as in McDonough to H.

  3. Change the following letters (except if it is first in the name) to zero (0): a, e, h, i, o, u, w, y

  4. Assign numbers to the letters as per the list above.

  5. Remove the second digit of all numeric pairs. For example, LITTLE initially translates to L03340. Removing the second 3 (or T) leaves L0340.

  6. Remove all zeros (0) from the string.

  7. Retain only the four left-most characters. If the Soundex string has less than four characters, pad the right side of the number with zeroes (0) to reach four characters.

Soundex applies the algorithm to SMITH as follows:

  1. Do not convert the first letter of the name to a number. (S)

  2. Change selected two-and-three digit consonant blends into one or two digits. (NONE)

  3. Change the following letters (except if it is first in the name) to zero (0): a, e, h, i, o, u, w, y (SM0T0)

  4. Assign numbers to the letters as per the list above. (S5030)

  5. Remove the second digit of all numeric pairs. (S5030)

  6. Remove all zeros (0) from the string. (S53)

  7. Retain only the four leftmost characters. If the Soundex string has less than four characters, pad the right side of the number with zeroes (0) to reach four characters. (S530)

Soundex applies the algorithm to SCHMIDT as follows:

  1. Do not convert the first letter of the name to a number. (S)

  2. Change selected two-and-three digit consonant blends into one or two digits. (SHMIDT)

  3. Change the following letters (except if it is first in the name) to zero (0): a, e, h, i, o, u, w, y (S0M0DT)

  4. Assign numbers to the letters as per the list above. (S05033)

  5. Remove the second digit of all numeric pairs. (S0503)

  6. Remove all zeros (0) from the string. (S53)

  7. Retain only the four leftmost characters. If the Soundex string has less than four characters, pad the right side of the number with zeroes (0) to reach four characters. (S530)

The H and W Rule

Soundex applies an additional rule called the "H and W" rule. If an H or W separates two consonants with the same Soundex number (not including the first letter of the word), Soundex combines those two consonants into one digit. However, this rule does not apply if Soundex numbers are separated by a vowel.  See the example below.

Soundex applies the "H and W" rule to ASHCROFT as follows:

  1. Do not convert the first letter of the name to a number. (A)

  2. Change selected two-and-three digit consonant blends into one or two digits. (NONE)

  3. Change the following letters (except if it is first in the name) to zero (0): a, e, h, i, o, u, w, y (ASHCR0FT)

  4. Assign numbers to the letters as per the list above. (A2026013)

  5. Remove the second digit of all numeric pairs. (A2026013)

  6. If an H or W separates two consonants with the same Soundex number (not including the first letter of the word), combine those two consonants into one digit. (A2H26013 -> A26013)

  7. Remove all zeros (0) from the string. (A2613)

  8. Retain only the four leftmost characters. If the Soundex string has less than four characters, pad the right side of the number with zeroes (0) to reach four characters. (A261)

   Soundex does not apply the "H and W" rule to ASHCROFT as follows:

  1. Do not convert the first letter of the name to a number. (A)

  2. Change selected two-and-three digit consonant blends into one or two digits. (NONE)

  3. Change the following letters (except if it is first in the name) to zero (0): a, e, h, i, o, u, w, y (AS0CR0FT)

  4. Assign numbers to the letters as per the list above. (A2026013)

  5. Remove the second digit of all numeric pairs. (A2026013)

  6. If an H or W separates two consonants with the same Soundex number (not including the first letter of the word), combine those two consonants into one digit. (NONE)

  7. Remove all zeros (0) from the string. (A22613)

  8. Remove the second digit of all numeric pairs. (A2613)

  9. Retain only the four leftmost characters. If the Soundex string has less than four characters, pad the right side of the number with zeroes (0) to reach four characters. (A261)