Class RefinedSoundex
Encodes a string into a Refined Soundex value. A refined soundex code is
optimized for spell checking words. Soundex method originally developed by
Margaret Odell
and Robert Russell
.
This class is immutable and thread-safe.
Inheritance
Assembly: Lucene.Net.Analysis.Phonetic.dll
Syntax
public class RefinedSoundex : object, IStringEncoder
Constructors
Name | Description |
---|---|
RefinedSoundex() | Creates an instance of the RefinedSoundex object using the default US English mapping. |
RefinedSoundex(Char[]) | Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping, and/or possibly provide an internationalized mapping for a non-Western character set. |
RefinedSoundex(String) | Creates a refined Soundex instance using a custom mapping. This constructor can be used to customize the mapping, and/or possibly provide an internationalized mapping for a non-Western character set. |
Fields
Name | Description |
---|---|
US_ENGLISH | This static variable contains an instance of the RefinedSoundex using the US_ENGLISH mapping. |
US_ENGLISH_MAPPING_STRING | since 1.4 |
Methods
Name | Description |
---|---|
Difference(String, String) | Returns the number of characters in the two encoded strings that are the same. This return value ranges from 0 to the length of the shortest encoded string: 0 indicates little or no similarity, and 4 out of 4 (for example) indicates strong similarity or identical values. For refined Soundex, the return value can be greater than 4. See: MS T-SQL DIFFERENCE since 1.3 |
Encode(String) | Encodes a string using the refined soundex algorithm. |
GetSoundex(String) | Retrieves the Refined Soundex code for a given string. |