CS 330: Algorithms: Design & Practice

Homework4: The Soundex Phonetic Encoding Algorithm
Due: In class on Monday, February 20, 2012

;

Implement the Soundex Algorithm in Python. The details of the algorithm are given here: http://en.wikipedia.org/wiki/Soundex

Implement the algorithm as a function that, given a name (string) encodes and returns the desired length soundex encoding. That is:

def Soundex(name, len=4):

   """Returns the Soundex encoding of name. The retruned code will be len chars long."""

Write a short program that inputs names, and outputs the Soundex encoding. Show the output of your program on at least 3-5 different sets of homophones. You may use variations on your own name as examples.

Do some background research on the use of Soundex, its applications, and its evolution.

What to hand in

1. Write a short history of the Soundex algorithm (at most 5 pages). Please write the document as a research paper. Use proper citations and attributions. Format the document using 1-inch margins all around, single-spaced, in 12pt Times Roman (or equivalent) font. Include a description of the algorithm, sample encodings, and sample inputs/outputs and encodings from your program in the report.

2. Your implementation in Python and a printout of all sample output. Include this as an appendix to your report.

Notes:

Please, do not consult any implementations available on the web or from a text for this one. That is, you are to design your own program to implement the algorithm. Later, we will learn different ways of implementing this algorithm, it variations, and also some newer phonetic encodings. So, please, just design and use your own implementation.

Presentation:

We will announce in class the presenters.


Back to CS330 Materials