Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov. Updates regarding government operating status and resumption of normal operations can be found at OPM.gov.
LVG Metaphone Algorithm
Introduction:
The Lexical tool uses the "Metaphone" phonetic code algorithm by Lawrence Philips, "Hanging on the Metaphone", Computer Language v7n12, December 1990, pp. 39-43. An input term is reduced to a 1 to 6 character code (configurable) using relatively simple phonetic rules for typical spoken English.
Basically, Metaphone reduces the alphabet to 16 consonant sounds:
B F H J K L M N P R S T W X Y 0 (zero)
where the 0 (zero) represents the 'th' sound.
Input
Output: an output code in uppercased string.
Algorithm:
I. Pre-Process
Steps Descriptions | Conditions (if) | Actions (then) |
Initial check |
|
|
Drop non-alphabetic characters |
|
|
Quick checki |
|
|
Quick check |
|
|
Uppercased |
|
II. Initial Letter Exceptions
Steps Descriptions |
Actions (then)
| Initial Exception-I
| String begin with: | Initial Exception-II
| Initial Exception-III
| |
III. Transformation by looping through the string
Steps Descriptions | Conditions (if) | Actions (then) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Doubled letters rules |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Vowel Letters Rules |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
B Rules |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C Rules-I |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C Rules-II |
|
References