commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1636703 - in /commons/proper/codec/trunk/src: main/java/org/apache/commons/codec/language/bm/ main/resources/org/apache/commons/codec/language/bm/ test/java/org/apache/commons/codec/language/bm/
Date Tue, 04 Nov 2014 19:49:40 GMT
Author: tn
Date: Tue Nov  4 19:49:40 2014
New Revision: 1636703

URL: http://svn.apache.org/r1636703
Log:
[CODEC-187] Update Beider-Morse rules to v3.4.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java
    commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/ash_approx_common.txt
    commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/gen_approx_common.txt
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEngineTest.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java?rev=1636703&r1=1636702&r2=1636703&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java
Tue Nov  4 19:49:40 2014
@@ -65,7 +65,7 @@ import org.apache.commons.codec.StringEn
  * Down-stream applications may wish to further process the encoding for indexing or lookup
purposes, for example, by
  * splitting on pipe (<code>|</code>) and indexing under each of these alternatives.
  * <p>
- * <b>Note</b>: this version of the Beider-Morse encoding is equivalent with
v3.3 of the reference implementation.
+ * <b>Note</b>: this version of the Beider-Morse encoding is equivalent with
v3.4 of the reference implementation.
  *
  * @see <a href="http://stevemorse.org/phonetics/bmpm.htm">Beider-Morse Phonetic Matching</a>
  * @see <a href="http://stevemorse.org/phoneticinfo.htm">Reference implementation</a>

Modified: commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/ash_approx_common.txt
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/ash_approx_common.txt?rev=1636703&r1=1636702&r2=1636703&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/ash_approx_common.txt
(original)
+++ commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/ash_approx_common.txt
Tue Nov  4 19:49:40 2014
@@ -201,7 +201,13 @@
 "lEndEr"	""	"$"	"lYnder" 
 "lendEr"	""	"$"	"lYnder" 
 "lEnder"	""	"$"	"lYnder" 
-             
+
+// burg = berg
+"bUrk" "" "$" "(burk|berk)"
+"burk" "" "$" "(burk|berk)"
+"bUrg" "" "$" "(burk|berk)"
+"burg" "" "$" "(burk|berk)"
+
 // CONSONANTS {z & Z; s & S} are approximately interchangeable
 "s" "" "[rmnl]" "z"
 "S" "" "[rmnl]" "z"

Modified: commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/gen_approx_common.txt
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/gen_approx_common.txt?rev=1636703&r1=1636702&r2=1636703&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/gen_approx_common.txt
(original)
+++ commons/proper/codec/trunk/src/main/resources/org/apache/commons/codec/language/bm/gen_approx_common.txt
Tue Nov  4 19:49:40 2014
@@ -205,7 +205,17 @@
 "lEndEr" "" "$" "lYnder" 
 "lendEr" "" "$" "lYnder" 
 "lEnder" "" "$" "lYnder" 
-             
+
+// burg = berg
+"burk" "" "$" "(burk|berk)" 
+"bUrk" "" "$" "(burk|berk)"
+"burg" "" "$" "(burk|berk)"
+"bUrg" "" "$" "(burk|berk)"
+"Burk" "" "$" "(burk|berk)"
+"BUrk" "" "$" "(burk|berk)"
+"Burg" "" "$" "(burk|berk)"
+"BUrg" "" "$" "(burk|berk)"
+
 // CONSONANTS {z & Z; s & S} are approximately interchangeable
 "s" "" "[rmnl]" "z"
 "S" "" "[rmnl]" "z"

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEngineTest.java?rev=1636703&r1=1636702&r2=1636703&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
(original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/language/bm/PhoneticEngineTest.java
Tue Nov  4 19:49:40 2014
@@ -17,7 +17,8 @@
 
 package org.apache.commons.codec.language.bm;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.List;
@@ -50,7 +51,13 @@ public class PhoneticEngineTest {
                                 "(elSink|elsink|helSink|helsink|helzink|xelsink)-(banhelsink|fanhelsink|fanhelzink|vanhelsink|vanhelzink|vanjelsink)",
                                 NameType.GENERIC,
                                 RuleType.EXACT,
-                                Boolean.FALSE, TEN });
+                                Boolean.FALSE, TEN },
+                        new Object[] {
+                                "Judenburg",
+                                "iudnbYrk|iudnbirk|iudnburk|xudnbirk|xudnburk|zudnbirk|zudnburk",
+                                NameType.GENERIC,
+                                RuleType.APPROX,
+                                Boolean.TRUE, TEN });
     }
 
     private final boolean concat;



Mime
View raw message