lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject svn commit: r1332510 - /lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java
Date Tue, 01 May 2012 03:16:49 GMT
Author: dsmiley
Date: Tue May  1 03:16:48 2012
New Revision: 1332510

URL: http://svn.apache.org/viewvc?rev=1332510&view=rev
Log:
Commons-Codec's Caverphone class is deprecated; its replacement is Caverphone2.
  Since the old reportedly forwards calls to the new; this should have no effect.

Modified:
    lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java

Modified: lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java?rev=1332510&r1=1332509&r2=1332510&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java
(original)
+++ lucene/dev/trunk/lucene/analysis/phonetic/src/test/org/apache/lucene/analysis/phonetic/TestPhoneticFilter.java
Tue May  1 03:16:48 2012
@@ -22,11 +22,7 @@ import java.io.Reader;
 import java.io.StringReader;
 
 import org.apache.commons.codec.Encoder;
-import org.apache.commons.codec.language.Caverphone;
-import org.apache.commons.codec.language.DoubleMetaphone;
-import org.apache.commons.codec.language.Metaphone;
-import org.apache.commons.codec.language.RefinedSoundex;
-import org.apache.commons.codec.language.Soundex;
+import org.apache.commons.codec.language.*;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.BaseTokenStreamTestCase;
 import org.apache.lucene.analysis.MockTokenizer;
@@ -60,10 +56,10 @@ public class TestPhoneticFilter extends 
     assertAlgorithm(new RefinedSoundex(), false, "aaa bbb ccc easgasg",
         new String[] { "A0", "B1", "C3", "E034034" });
     
-    assertAlgorithm(new Caverphone(), true, "Darda Karleen Datha Carlene",
+    assertAlgorithm(new Caverphone2(), true, "Darda Karleen Datha Carlene",
         new String[] { "TTA1111111", "Darda", "KLN1111111", "Karleen", 
           "TTA1111111", "Datha", "KLN1111111", "Carlene" });
-    assertAlgorithm(new Caverphone(), false, "Darda Karleen Datha Carlene",
+    assertAlgorithm(new Caverphone2(), false, "Darda Karleen Datha Carlene",
         new String[] { "TTA1111111", "KLN1111111", "TTA1111111", "KLN1111111" });
   }
 
@@ -79,7 +75,7 @@ public class TestPhoneticFilter extends 
   /** blast some random strings through the analyzer */
   public void testRandomStrings() throws IOException {
     Encoder encoders[] = new Encoder[] {
-      new Metaphone(), new DoubleMetaphone(), new Soundex(), new RefinedSoundex(), new Caverphone()
+      new Metaphone(), new DoubleMetaphone(), new Soundex(), new RefinedSoundex(), new Caverphone2()
     };
     
     for (final Encoder e : encoders) {
@@ -107,7 +103,7 @@ public class TestPhoneticFilter extends 
   
   public void testEmptyTerm() throws IOException {
     Encoder encoders[] = new Encoder[] {
-        new Metaphone(), new DoubleMetaphone(), new Soundex(), new RefinedSoundex(), new
Caverphone()
+        new Metaphone(), new DoubleMetaphone(), new Soundex(), new RefinedSoundex(), new
Caverphone2()
     };
     for (final Encoder e : encoders) {
       Analyzer a = new Analyzer() {



Mime
View raw message