|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.codec.language.RefinedSoundex
public 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.
| Field Summary | |
|---|---|
static RefinedSoundex |
US_ENGLISH
This static variable contains an instance of the RefinedSoundex using the US_ENGLISH mapping. |
static String |
US_ENGLISH_MAPPING_STRING
|
| Constructor Summary | |
|---|---|
RefinedSoundex()
Creates an instance of the RefinedSoundex object using the default US English mapping. |
|
RefinedSoundex(char[] mapping)
Creates a refined soundex instance using a custom mapping. |
|
RefinedSoundex(String mapping)
Creates a refined Soundex instance using a custom mapping. |
|
| Method Summary | |
|---|---|
int |
difference(String s1,
String s2)
Returns the number of characters in the two encoded Strings that are the same. |
Object |
encode(Object pObject)
Encodes an Object using the refined soundex algorithm. |
String |
encode(String pString)
Encodes a String using the refined soundex algorithm. |
String |
soundex(String str)
Retrieves the Refined Soundex code for a given String object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String US_ENGLISH_MAPPING_STRING
public static final RefinedSoundex US_ENGLISH
| Constructor Detail |
|---|
public RefinedSoundex()
public RefinedSoundex(char[] mapping)
mapping - Mapping array to use when finding the corresponding code for
a given characterpublic RefinedSoundex(String mapping)
mapping - Mapping string to use when finding the corresponding code for a given character| Method Detail |
|---|
public int difference(String s1,
String s2)
throws EncoderException
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 stringsSoundexUtils.difference(StringEncoder,String,String),
MS T-SQL DIFFERENCE
public Object encode(Object pObject)
throws EncoderException
encode in interface EncoderpObject - Object to encode
EncoderException - if the parameter supplied is not of type java.lang.Stringpublic String encode(String pString)
encode in interface StringEncoderpString - A String object to encode
public String soundex(String str)
str - String to encode using the Refined Soundex algorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||