Skip to content

Commit ed9becf

Browse files
committed
Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/codec/trunk@130375 13f79535-47bb-0310-9956-ffa450edef68
1 parent 57d1317 commit ed9becf

4 files changed

Lines changed: 33 additions & 18 deletions

File tree

src/java/org/apache/commons/codec/language/DoubleMetaphone.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* Encodes a string into a double metaphone value.
24-
* This Implementation is based on the algorithm by Lawrence Philips.
24+
* This Implementation is based on the algorithm by <CITE>Lawrence Philips</CITE>.
2525
* <ul>
2626
* <li>Original Article: <a
2727
* href="http://www.cuj.com/documents/s=8038/cuj0006philips/">
@@ -31,7 +31,7 @@
3131
* </ul>
3232
*
3333
* @author Apache Software Foundation
34-
* @version $Id: DoubleMetaphone.java,v 1.23 2004/05/24 04:55:33 ggregory Exp $
34+
* @version $Id: DoubleMetaphone.java,v 1.24 2004/06/05 18:32:04 ggregory Exp $
3535
*/
3636
public class DoubleMetaphone implements StringEncoder {
3737

src/java/org/apache/commons/codec/language/Metaphone.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@
2020
import org.apache.commons.codec.StringEncoder;
2121

2222
/**
23-
* Encodes a string into a metaphone value.
24-
* The initial Java implementation, William B. Brogden. December, 1997
25-
* Permission given by wbrogden for code to be used anywhere.
26-
*
27-
* "Hanging on the Metaphone" by Lawrence Philips
28-
* <i>Computer Language</i> of Dec. 1990, p 39
23+
* Encodes a string into a metaphone value.
24+
* <p>
25+
* Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>.
26+
* Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.
27+
* </p>
28+
* <p>
29+
* <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in <CITE>Computer Language of Dec. 1990, p
30+
* 39.</CITE>
31+
* </p>
2932
*
3033
* @author Apache Software Foundation
31-
* @version $Id: Metaphone.java,v 1.19 2004/05/24 04:56:29 ggregory Exp $
34+
* @version $Id: Metaphone.java,v 1.20 2004/06/05 18:32:04 ggregory Exp $
3235
*/
3336
public class Metaphone implements StringEncoder {
3437

src/java/org/apache/commons/codec/language/RefinedSoundex.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
import org.apache.commons.codec.StringEncoder;
2121

2222
/**
23-
* Encodes a string into a refined soundex value. A refined soundex code is
24-
* optimized for spell checking word. "Soundex" method originally developed by
25-
* Margaret Odell and Robert Russell
23+
* Encodes a string into a Refined Soundex value. A refined soundex code is
24+
* optimized for spell checking words. Soundex method originally developed by
25+
* <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>.
2626
*
2727
* @author Apache Software Foundation
28-
* @version $Id: RefinedSoundex.java,v 1.20 2004/05/24 04:57:24 ggregory Exp $
28+
* @version $Id: RefinedSoundex.java,v 1.21 2004/06/05 18:32:04 ggregory Exp $
2929
*/
3030
public class RefinedSoundex implements StringEncoder {
3131

src/java/org/apache/commons/codec/language/Soundex.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
import org.apache.commons.codec.StringEncoder;
2121

2222
/**
23-
* Encodes a string into a soundex value. Soundex is an encoding used to relate similar names, but can also be used as a
23+
* Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names, but can also be used as a
2424
* general purpose scheme to find word with similar phonemes.
2525
*
2626
* @author Apache Software Foundation
27-
* @version $Id: Soundex.java,v 1.23 2004/06/05 00:43:32 ggregory Exp $
27+
* @version $Id: Soundex.java,v 1.24 2004/06/05 18:32:04 ggregory Exp $
2828
*/
2929
public class Soundex implements StringEncoder {
3030

@@ -35,13 +35,25 @@ public class Soundex implements StringEncoder {
3535
*/
3636
public static final Soundex US_ENGLISH = new Soundex();
3737

38+
/**
39+
* This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position
40+
* means do not encode.
41+
* <p>
42+
* (This constant is provided as both an implementation convenience and to allow Javadoc to pick
43+
* up the value for the constant values page.)
44+
* </p>
45+
*
46+
* @see #US_ENGLISH_MAPPING
47+
*/
48+
public static final String US_ENGLISH_MAPPING_STRING = "01230120022455012623010202";
49+
3850
/**
3951
* This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position
4052
* means do not encode.
4153
*
4254
* @see Soundex#Soundex(char[])
4355
*/
44-
public static final char[] US_ENGLISH_MAPPING = "01230120022455012623010202".toCharArray();
56+
public static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
4557

4658
/**
4759
* Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This
@@ -90,8 +102,8 @@ public Soundex() {
90102
}
91103

92104
/**
93-
* Creates a soundex instance using the given mapping. This constructor can be used to customize the mapping, and/or
94-
* possibly provide an internationalized mapping for a non-Western character set.
105+
* Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized
106+
* mapping for a non-Western character set.
95107
*
96108
* Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each
97109
* letter is mapped. This implementation contains a default map for US_ENGLISH

0 commit comments

Comments
 (0)