C# Class Metaphone.DoubleMetaphone

Implements the Double Metaphone phonetic matching algorithm published by Lawrence Phillips in June 2000 C/C++ Users Journal. Optimized and ported to C# by Adam Nelson ([email protected])
显示文件 Open project: fmendes/SalesForceCSharpAPI Class Usage Examples

Public Methods

Method Description
DoubleMetaphone ( ) : System

Default ctor, initializes by computing the keys of an empty string, which are both empty strings

DoubleMetaphone ( String word ) : System

Constructs a new DoubleMetaphone object, and initializes it with the metaphone keys for a given word

computeKeys ( String word ) : void

Sets a new current word for the instance, computing the new word's metaphone keys

doubleMetaphone ( String word, String &primaryKey, String &alternateKey ) : void

Static wrapper around the class, enables computation of metaphone keys without instantiating a class.

Private Methods

Method Description
addMetaphoneCharacter ( String primaryCharacter ) : void
addMetaphoneCharacter ( String primaryCharacter, String alternateCharacter ) : void
areStringsAt ( int start, int length ) : bool
buildMetaphoneKeys ( ) : void
isVowel ( int pos ) : bool
isWordSlavoGermanic ( ) : bool

Method Details

DoubleMetaphone() public method

Default ctor, initializes by computing the keys of an empty string, which are both empty strings
public DoubleMetaphone ( ) : System
return System

DoubleMetaphone() public method

Constructs a new DoubleMetaphone object, and initializes it with the metaphone keys for a given word
public DoubleMetaphone ( String word ) : System
word String Word with which to initialize the object. Computes the metaphone keys /// of this word.
return System

computeKeys() public method

Sets a new current word for the instance, computing the new word's metaphone keys
public computeKeys ( String word ) : void
word String New word to set to current word. Discards previous metaphone keys, /// and computes new keys for this word
return void

doubleMetaphone() public static method

Static wrapper around the class, enables computation of metaphone keys without instantiating a class.
public static doubleMetaphone ( String word, String &primaryKey, String &alternateKey ) : void
word String Word whose metaphone keys are to be computed
primaryKey String Ref to var to receive primary metaphone key
alternateKey String Ref to var to receive alternate metaphone key, or be set to null if /// word has no alternate key by double metaphone
return void