| java.lang.Object org.apache.commons.codec.language.SoundexUtils
SoundexUtils | final class SoundexUtils (Code) | | Utility methods for
Soundex and
RefinedSoundex classes.
author: Apache Software Foundation version: $Id: SoundexUtils.java,v 1.5 2004/03/17 18:31:35 ggregory Exp $ since: 1.3 |
Method Summary | |
static String | clean(String str) Cleans up the input string before Soundex processing by only returning
upper case letters.
Parameters: str - The String to clean. | static int | difference(StringEncoder encoder, String s1, String s2) Encodes the Strings and returns the number of characters in the two
encoded Strings that are the same.
- For Soundex, this return value ranges from 0 through 4: 0 indicates
little or no similarity, and 4 indicates strong similarity or identical
values.
- For refined Soundex, the return value can be greater than 4.
Parameters: encoder - The encoder to use to encode the Strings. Parameters: s1 - A String that will be encoded and compared. Parameters: s2 - A String that will be encoded and compared. | static int | differenceEncoded(String es1, String es2) Returns the number of characters in the two Soundex encoded Strings that
are the same.
- For Soundex, this return value ranges from 0 through 4: 0 indicates
little or no similarity, and 4 indicates strong similarity or identical
values.
- For refined Soundex, the return value can be greater than 4.
Parameters: es1 - An encoded String. Parameters: es2 - An encoded String. |
clean | static String clean(String str)(Code) | | Cleans up the input string before Soundex processing by only returning
upper case letters.
Parameters: str - The String to clean. A clean String. |
difference | static int difference(StringEncoder encoder, String s1, String s2) throws EncoderException(Code) | | Encodes the Strings and returns the number of characters in the two
encoded Strings that are the same.
- For Soundex, this return value ranges from 0 through 4: 0 indicates
little or no similarity, and 4 indicates strong similarity or identical
values.
- For refined Soundex, the return value can be greater than 4.
Parameters: encoder - The encoder to use to encode the Strings. Parameters: s1 - A String that will be encoded and compared. Parameters: s2 - A String that will be encoded and compared. The number of characters in the two Soundex encoded Strings thatare the same. See Also: SoundexUtils.differenceEncoded(String,String) See Also:
* MS T-SQL DIFFERENCE throws: EncoderException - if an error occurs encoding one of the strings |
differenceEncoded | static int differenceEncoded(String es1, String es2)(Code) | | Returns the number of characters in the two Soundex encoded Strings that
are the same.
- For Soundex, this return value ranges from 0 through 4: 0 indicates
little or no similarity, and 4 indicates strong similarity or identical
values.
- For refined Soundex, the return value can be greater than 4.
Parameters: es1 - An encoded String. Parameters: es2 - An encoded String. The number of characters in the two Soundex encoded Strings thatare the same. See Also:
* MS T-SQL DIFFERENCE |
|
|