This is an algorithm expressed in Object Pascal to do the Metaphone
phonetic hash. It's kind of like soundex, but a little more specific.

The original metaphone algorithm was implemented Lawrence Philips in Pick
Basic. He can be reached by sending an email to lfp at dolby.com. There
is a newer version of this algorithm, called "double metaphone". You can
find out more about the metaphone algorithm by checking out the aspell metaphone page
and at metaphone.net

The input to the algorithm is a word, and the output is a hash. If two
hashes match, that means that the two original words sounded
phonetically similar. An excellent technique for LESS sensitivity is
to only compare the first few digits of the code as per Soundex.

All source code included in this ZIP file is coyrighted (c) 1996-1999
by White Computer Services. This package has been placed under the GNU LGPL
license which is very much an open source license.

If anyone is interested in doing ANOTHER SPOKEN LANGUAGE version of this
package please email me. I am very interested in adding multi-
language support to this algorithm. Some languages would be more
difficult than others, I suspect, and I will really need the help
of somebody who speaks it fluently.

I also plan on porting this to other languages (most specifically Python) in the near future.

The component code was originally written by Rickard Dahlstrand, and
has only been rearranged so that the actual algorithm is in another
unit.

Thanks to Jason Wharton for providing the impetus to finally rewrite
this code into something more usable / stable. This algorithm will
be included with his IBObjects component suite. You should check it
out at:
http://www.ibobjects.com

You can reach me at:

email:

wcstom@yahoo.com

or

whitet@iname.com (redirect)

If you'd like help implementing this algorithm into your project, I'm
available at reasonable rates. Please contact me via email.
---------------================----------------

Version Information:

v1.1 Checks the length of the string before removing trailing S (must be >1)
'PH' used to translate to 'H' (incorrectly). It now translates to 'F'.

v1.2 The pairs at the beginning of the word were not being translated.

v1.3 The component had a bug - simple but deadly

v1.4 Fixed the code that checks the first two letters, added PS->S
The input length is checked correctly.

v2.0B Complete rewrite of algorithm. Rules are put into constants so they
can be easily changed. Please send comments/bug reports!