org.apache.commons.codec.language
Class RefinedSoundex
java.lang.Object
|
+--org.apache.commons.codec.language.RefinedSoundex
- All Implemented Interfaces:
- Encoder, StringEncoder
- public class RefinedSoundex
- extends java.lang.Object
- implements StringEncoder
Encodes a string into a soundex value. Sounde is an encoding used to
relate similar names, but can also be used as a general purpose
scheme to find word with similar phonemes.
More information may be found at: http://www.bluepoof.com/Soundex/info2.html
- Version:
- $Revision: 1.1 $ $Date: 2003/04/25 17:50:56 $
- Author:
- tobrien@transolutions.net, ggregory@seagullsw.com
Method Summary |
java.lang.Object |
encode(java.lang.Object pObject)
All encoders allow a library-user to pass an
Object and get an Object in return. |
java.lang.String |
encode(java.lang.String pString)
Encode a String and produce a String. |
java.lang.String |
soundex(java.lang.String str)
Get the SoundEx value of a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
US_ENGLISH_MAPPING
public static final char[] US_ENGLISH_MAPPING
US_ENGLISH
public static final RefinedSoundex US_ENGLISH
RefinedSoundex
public RefinedSoundex()
RefinedSoundex
public RefinedSoundex(char[] mapping)
soundex
public java.lang.String soundex(java.lang.String str)
- Get the SoundEx value of a string.
This implementation is taken from the code-snippers on
http://www.sourceforge.net/
encode
public java.lang.String encode(java.lang.String pString)
throws EncoderException
- Description copied from interface:
StringEncoder
- Encode a String and produce a String.
- Specified by:
encode
in interface StringEncoder
- Parameters:
pString
- a String to encode
- Returns:
- the encoded String
- Throws:
EncoderException
- thrown if there is
an error conidition during the Encoding process.
encode
public java.lang.Object encode(java.lang.Object pObject)
throws EncoderException
- Description copied from interface:
Encoder
- All encoders allow a library-user to pass an
Object and get an Object in return. This function
encodes an "Object" - returning the encoded content
as an Object. The Objects here may just be byte[]
or Strings depending on the implementation used.
- Specified by:
encode
in interface Encoder
- Parameters:
pObject
- An object ot encode
- Returns:
- An "encoded" Object
- Throws:
EncoderException
- an encoder exception is
thrown if the encoder experiences a failure
condition during the encoding process.
Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.