metaphone

Metaphone is a phonetic algorithm, an algorithm published in 1990 for indexing words by their English pronunciation. The algorithm produces variable length keys as its output, as opposed to Soundex's fixed-length keys. Similar sounding words share the same keys.

metaphone(str) → returns string

This function requires Lucee. Not supported on Adobe ColdFusion.

metaphone Argument Reference

str string
Required

Links more information about metaphone

Examples sample code invoking the metaphone function

This compound word is the longest word published with 79 letters according to the 1996 Guinness Book of World Records

Metaphone("Donaudampfschiffahrtsgesellschaftskapitän")

Expected Result: TNTM

Metaphone("Truck")&"/"&Metaphone("Trek")

Expected Result: TRK/TRK

Adding a word changes the whole metaphone

Metaphone("Trek")&"/"&Metaphone("Star Trek")

Expected Result: TRK/STRT


Fork me on GitHub