ggregory    2004/06/05 11:32:04

  Modified:    codec/src/java/org/apache/commons/codec/language
                        RefinedSoundex.java Metaphone.java
                        DoubleMetaphone.java Soundex.java
  Log:
  Javadoc.
  
  Revision  Changes    Path
  1.21      +4 -4      
jakarta-commons/codec/src/java/org/apache/commons/codec/language/RefinedSoundex.java
  
  Index: RefinedSoundex.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/language/RefinedSoundex.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- RefinedSoundex.java       24 May 2004 04:57:24 -0000      1.20
  +++ RefinedSoundex.java       5 Jun 2004 18:32:04 -0000       1.21
  @@ -20,9 +20,9 @@
   import org.apache.commons.codec.StringEncoder;
   
   /**
  - * Encodes a string into a refined soundex value. A refined soundex code is
  - * optimized for spell checking word. "Soundex" method originally developed by
  - * Margaret Odell and Robert Russell
  + * Encodes a string into a Refined Soundex value. A refined soundex code is
  + * optimized for spell checking words. Soundex method originally developed by
  + * <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>.
    * 
    * @author Apache Software Foundation
    * @version $Id$
  
  
  
  1.20      +10 -7     
jakarta-commons/codec/src/java/org/apache/commons/codec/language/Metaphone.java
  
  Index: Metaphone.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/language/Metaphone.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Metaphone.java    24 May 2004 04:56:29 -0000      1.19
  +++ Metaphone.java    5 Jun 2004 18:32:04 -0000       1.20
  @@ -20,12 +20,15 @@
   import org.apache.commons.codec.StringEncoder;
   
   /**
  - * Encodes a string into a metaphone value.
  - * The initial Java implementation, William B. Brogden.  December, 1997
  - * Permission given by wbrogden for code to be used anywhere.
  - * 
  - *  "Hanging on the Metaphone" by Lawrence Philips
  - *      <i>Computer Language</i> of Dec. 1990, p 39   
  + * Encodes a string into a metaphone value. 
  + * <p>
  + * Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>. 
  + * Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.
  + * </p>
  + * <p>
  + * <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in 
<CITE>Computer Language of Dec. 1990, p
  + * 39.</CITE>
  + * </p>
    * 
    * @author Apache Software Foundation
    * @version $Id$
  
  
  
  1.24      +2 -2      
jakarta-commons/codec/src/java/org/apache/commons/codec/language/DoubleMetaphone.java
  
  Index: DoubleMetaphone.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/language/DoubleMetaphone.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DoubleMetaphone.java      24 May 2004 04:55:33 -0000      1.23
  +++ DoubleMetaphone.java      5 Jun 2004 18:32:04 -0000       1.24
  @@ -21,7 +21,7 @@
   
   /**
    * Encodes a string into a double metaphone value.
  - * This Implementation is based on the algorithm by Lawrence Philips.
  + * This Implementation is based on the algorithm by <CITE>Lawrence Philips</CITE>.
    * <ul>
    * <li>Original Article: <a 
    * href="http://www.cuj.com/documents/s=8038/cuj0006philips/";>
  
  
  
  1.24      +17 -5     
jakarta-commons/codec/src/java/org/apache/commons/codec/language/Soundex.java
  
  Index: Soundex.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/language/Soundex.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Soundex.java      5 Jun 2004 00:43:32 -0000       1.23
  +++ Soundex.java      5 Jun 2004 18:32:04 -0000       1.24
  @@ -20,7 +20,7 @@
   import org.apache.commons.codec.StringEncoder;
   
   /**
  - * Encodes a string into a soundex value. Soundex is an encoding used to relate 
similar names, but can also be used as a
  + * Encodes a string into a Soundex value. Soundex is an encoding used to relate 
similar names, but can also be used as a
    * general purpose scheme to find word with similar phonemes.
    * 
    * @author Apache Software Foundation
  @@ -38,10 +38,22 @@
       /**
        * This is a default mapping of the 26 letters used in US English. A value of 
<code>0</code> for a letter position
        * means do not encode.
  +     * <p>
  +     * (This constant is provided as both an implementation convenience and to 
allow Javadoc to pick
  +     * up the value for the constant values page.)
  +     * </p>
  +     * 
  +     * @see #US_ENGLISH_MAPPING
  +     */
  +    public static final String US_ENGLISH_MAPPING_STRING = 
"01230120022455012623010202";
  +
  +    /**
  +     * This is a default mapping of the 26 letters used in US English. A value of 
<code>0</code> for a letter position
  +     * means do not encode.
        * 
        * @see Soundex#Soundex(char[])
        */
  -    public static final char[] US_ENGLISH_MAPPING = 
"01230120022455012623010202".toCharArray();
  +    public static final char[] US_ENGLISH_MAPPING = 
US_ENGLISH_MAPPING_STRING.toCharArray();
   
       /**
        * Encodes the Strings and returns the number of characters in the two encoded 
Strings that are the same. This
  @@ -90,8 +102,8 @@
       }
   
       /**
  -     * Creates a soundex instance using the given mapping. This constructor can be 
used to customize the mapping, and/or
  -     * possibly provide an internationalized mapping for a non-Western character 
set.
  +     * Creates a soundex instance using the given mapping. This constructor can be 
used to provide an internationalized
  +     * mapping for a non-Western character set.
        * 
        * Every letter of the alphabet is "mapped" to a numerical value. This char 
array holds the values to which each
        * letter is mapped. This implementation contains a default map for US_ENGLISH
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to