Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Last Name Soundex Code. Use C++ to write, please! CS 140 Last Name Soundex Code Concepts: Strings, and Character Manipulation (65 points) American Soundex ledig

Last Name Soundex Code. Use C++ to write, please!image text in transcribedimage text in transcribed

CS 140 Last Name Soundex Code Concepts: Strings, and Character Manipulation (65 points) American Soundex ledig The Soundex oode for a name consists of a letter flowed by three teletter isthe etter the abial and the digits encode the remaining consonants. Similar sounding consonants share the same digitso, for example, consonants B, F, P, and V are each encoded as the number 1. The correct value can be found as follows: 1. Retain the first letter of the name and drop all other occurrences ofa, e,i, o, u,y,h,w. 2. Replace consonants with digits as follows (after the first letter: b, f, p, v-1 g,i k, q, s, x, z +2 d,t- 3 3 if two or more letters with the same number are adjacent in the original name (before step 1), only retain the first letter; also two letters with the same number separated by h or Ware coded as a single number, whereas such letters terate the previous step until you have one letter and three numbers. lf you have too few letters in your word that you 4. cant assign three numbers, append with zeros until there are three numbers. lf you have more than 3 letters, just retain the first 3 numbers. using tis algorithm, both Robert and Rupert return the same string R163 while *Rubin yields "R150". "Ashcrafr and 'Ashcroft bothyield A261" and not A226 (he chars s'and c in the name would receive a single number of 2 and not 22 since an hiesin between them). Tymczak yields T522 not T520 (the chars z' and in the name are coded as 2 twice since a vowel besin between them). Pfister yields "P236 not P123 (the first two letters have the same number and are coded once as P)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

What would you do?

Answered: 1 week ago