soundex

An algorithm for encoding a word so that similar sounding words encode the same. The first letter is copied unchanged then subsequent letters are encoded as follows:

	bfpv	 -> "1"
	cgjkqsxz -> "2"
	dt	  	 -> "3"
	l	  	 -> "4"
	mn	  	 -> "5"
	r	  	 -> "6"

Other characters are ignored and repeated characters are encoded as though they were a single character. Encoding stops when the resulting string is four characters long, adding trailing "0"s if it is shorter. For example, "SMITH" or "SMYTHE" would both be encoded as "S530".