"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CMetaPhone
Class that implements the metaphone string searching algorithm. The metaphone algorithm is similar to the soundex algorithm but tends to group names together that are more closely related than soundex does. However, metaphone also tends to produce more matches than soundex. Similar to soundex, the metaphone algorithm generates a key value for a word based on the consonants in that word. Metaphone uses more intelligent transformation rules, though, by examining groups of letters, or diphthongs.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CMetaPhone class
|
|
AffectH
|
Private
|
Determines if the character affects "H".
The following characters affect "H": C,G,P,S,T
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
|
IntToByte
|
Private
|
Performs an unsigned conversion from an integer value to a byte value. This procedure correctly handles any integer value.
|
|
IsLetter
|
Private
|
Determines if a character is a letter
|
|
IsVowel
|
Private
|
Determines if the character is a vowel
|
|
MakeSoft
|
Private
|
Determines if the character should be made soft.
The following letters are made soft: E, I, Y.
|
|
Metaphone
|
Method
|
Calculates the metaphone value of a word
|
|
NoChange
|
Private
|
Determines if the character should be changed.
The following characters are not transformed by the MetaPhone algorithm: F, J, L, M, N, R.
|
|
NoGHToF
|
Private
|
Determines if "GH" should be changed to "F".
G is transformed to F if it is proceeded by H, and the word does not start with B, D, or H.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|