java.lang.Object | |
↳ | org.apache.commons.codec.language.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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | US_ENGLISH_MAPPING_STRING |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
US_ENGLISH | This static variable contains an instance of the RefinedSoundex using the US_ENGLISH mapping. | ||||||||||
US_ENGLISH_MAPPING | RefinedSoundex is *refined* for a number of reasons one being that the mappings have been altered. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an instance of the RefinedSoundex object using the default US
English mapping.
| |||||||||||
Creates a refined soundex instance using a custom mapping.
| |||||||||||
Creates a refined Soundex instance using a custom mapping.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the number of characters in the two encoded Strings that are the
same.
| |||||||||||
Encodes an Object using the refined soundex algorithm.
| |||||||||||
Encodes a String using the refined soundex algorithm.
| |||||||||||
Retreives the Refined Soundex code for a given String object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.commons.codec.Encoder
| |||||||||||
From interface
org.apache.commons.codec.StringEncoder
|
This static variable contains an instance of the RefinedSoundex using the US_ENGLISH mapping.
RefinedSoundex is *refined* for a number of reasons one being that the mappings have been altered. This implementation contains default mappings for US English.
Creates an instance of the RefinedSoundex object using the default US English mapping.
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.
mapping | Mapping array to use when finding the corresponding code for a given character |
---|
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.
mapping | Mapping string to use when finding the corresponding code for a given character |
---|
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.
s1 | A String that will be encoded and compared. |
---|---|
s2 | A String that will be encoded and compared. |
EncoderException | if an error occurs encoding one of the strings |
---|
Encodes an Object using the refined soundex algorithm. This method is provided in order to satisfy the requirements of the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
pObject | Object to encode |
---|
EncoderException | if the parameter supplied is not of type java.lang.String |
---|
Encodes a String using the refined soundex algorithm.
pString | A String object to encode |
---|
Retreives the Refined Soundex code for a given String object.
str | String to encode using the Refined Soundex algorithm |
---|