mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smar...@apache.org
Subject svn commit: r1466110 - in /mahout/trunk: ./ core/src/main/java/org/apache/mahout/common/lucene/ core/src/test/java/org/apache/mahout/vectorizer/encoders/ examples/src/main/java/org/apache/mahout/classifier/ integration/src/main/java/org/apache/mahout/t...
Date Tue, 09 Apr 2013 16:37:45 GMT
Author: smarthi
Date: Tue Apr  9 16:37:44 2013
New Revision: 1466110

URL: http://svn.apache.org/r1466110
Log:
Mahout-1188: Inconsistency in Lucene versions between codebase and POM

Modified:
    mahout/trunk/CHANGELOG
    mahout/trunk/core/src/main/java/org/apache/mahout/common/lucene/AnalyzerUtils.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/encoders/TextValueEncoderTest.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/MailArchivesClusteringAnalyzer.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaAnalyzer.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/dirichlet/TestL1ModelClustering.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/nlp/collocations/llr/BloomTokenFilterTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java
    mahout/trunk/pom.xml

Modified: mahout/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/mahout/trunk/CHANGELOG?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/CHANGELOG (original)
+++ mahout/trunk/CHANGELOG Tue Apr  9 16:37:44 2013
@@ -2,6 +2,8 @@ Mahout Change Log
 
 Release 0.8 - unreleased
 
+  MAHOUT-1188: Inconsistent reference to Lucene versions in code and POM (smarthi)
+
   MAHOUT-1161: Unable to run CJKAnalyzer for conversion of a sequence file to sparse vector
due to instantiation
                exception (ssc)
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/lucene/AnalyzerUtils.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/lucene/AnalyzerUtils.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/lucene/AnalyzerUtils.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/lucene/AnalyzerUtils.java Tue
Apr  9 16:37:44 2013
@@ -32,7 +32,7 @@ public final class AnalyzerUtils {
    * @throws ClassNotFoundException - {@link ClassNotFoundException}
    */
   public static Analyzer createAnalyzer(String analyzerClassName) throws ClassNotFoundException
{
-    return createAnalyzer(analyzerClassName, Version.LUCENE_41);
+    return createAnalyzer(analyzerClassName, Version.LUCENE_42);
   }
 
   public static Analyzer createAnalyzer(String analyzerClassName, Version version) throws
ClassNotFoundException {
@@ -47,7 +47,7 @@ public final class AnalyzerUtils {
    * @return {@link Analyzer}
    */
   public static Analyzer createAnalyzer(Class<? extends Analyzer> analyzerClass) {
-    return createAnalyzer(analyzerClass, Version.LUCENE_41);
+    return createAnalyzer(analyzerClass, Version.LUCENE_42);
   }
 
   public static Analyzer createAnalyzer(Class<? extends Analyzer> analyzerClass, Version
version) {

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/encoders/TextValueEncoderTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/encoders/TextValueEncoderTest.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/encoders/TextValueEncoderTest.java
(original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/encoders/TextValueEncoderTest.java
Tue Apr  9 16:37:44 2013
@@ -70,7 +70,7 @@ public final class TextValueEncoderTest 
   @Test
   public void testLuceneEncoding() throws Exception {
     LuceneTextValueEncoder enc = new LuceneTextValueEncoder("text");
-    enc.setAnalyzer(new WhitespaceAnalyzer(Version.LUCENE_41));
+    enc.setAnalyzer(new WhitespaceAnalyzer(Version.LUCENE_42));
     Vector v1 = new DenseVector(200);
     enc.addToVector("test1 and more", v1);
     enc.flush(1, v1);

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java
Tue Apr  9 16:37:44 2013
@@ -60,7 +60,7 @@ public final class NewsgroupHelper {
   private static final long WEEK = 7 * 24 * 3600;
   
   private final Random rand = RandomUtils.getRandom();  
-  private final Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_41);
+  private final Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_42);
   private final FeatureVectorEncoder encoder = new StaticWordValueEncoder("body");
   private final FeatureVectorEncoder bias = new ConstantValueEncoder("Intercept");
   

Modified: mahout/trunk/integration/src/main/java/org/apache/mahout/text/MailArchivesClusteringAnalyzer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/main/java/org/apache/mahout/text/MailArchivesClusteringAnalyzer.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/main/java/org/apache/mahout/text/MailArchivesClusteringAnalyzer.java
(original)
+++ mahout/trunk/integration/src/main/java/org/apache/mahout/text/MailArchivesClusteringAnalyzer.java
Tue Apr  9 16:37:44 2013
@@ -41,7 +41,7 @@ import org.apache.lucene.util.Version;
  * stop words, excluding non-alpha-numeric tokens, and porter stemming.
  */
 public final class MailArchivesClusteringAnalyzer extends StopwordAnalyzerBase {
-  private static final Version LUCENE_VERSION = Version.LUCENE_41;
+  private static final Version LUCENE_VERSION = Version.LUCENE_42;
   
   // extended set of stop words composed of common mail terms like "hi",
   // HTML tags, and Java keywords asmany of the messages in the archives

Modified: mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaAnalyzer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaAnalyzer.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaAnalyzer.java
(original)
+++ mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaAnalyzer.java
Tue Apr  9 16:37:44 2013
@@ -33,19 +33,19 @@ import org.apache.lucene.util.Version;
 public class WikipediaAnalyzer extends StopwordAnalyzerBase {
   
   public WikipediaAnalyzer() {
-    super(Version.LUCENE_41, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+    super(Version.LUCENE_42, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
   }
   
   public WikipediaAnalyzer(CharArraySet stopSet) {
-    super(Version.LUCENE_41, stopSet);
+    super(Version.LUCENE_42, stopSet);
   }
 
   @Override
   protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
     Tokenizer tokenizer = new WikipediaTokenizer(reader);
-    TokenStream result = new StandardFilter(Version.LUCENE_41, tokenizer);
-    result = new LowerCaseFilter(Version.LUCENE_41, result);
-    result = new StopFilter(Version.LUCENE_41, result, getStopwordSet());
+    TokenStream result = new StandardFilter(Version.LUCENE_42, tokenizer);
+    result = new LowerCaseFilter(Version.LUCENE_42, result);
+    result = new StopFilter(Version.LUCENE_42, result, getStopwordSet());
     return new TokenStreamComponents(tokenizer, result);
   }
 }

Modified: mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java
(original)
+++ mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java
Tue Apr  9 16:37:44 2013
@@ -34,7 +34,7 @@ public class AnalyzerTransformer impleme
   private String fieldName = "text";
 
   public AnalyzerTransformer() {
-    this(new StandardAnalyzer(Version.LUCENE_41), "text");
+    this(new StandardAnalyzer(Version.LUCENE_42), "text");
   }
 
   public AnalyzerTransformer(Analyzer analyzer) {

Modified: mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
(original)
+++ mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
Tue Apr  9 16:37:44 2013
@@ -105,8 +105,8 @@ public final class TestClusterDumper ext
     RAMDirectory directory = new RAMDirectory();
     
     IndexWriter writer = new IndexWriter(directory, 
-           new IndexWriterConfig(Version.LUCENE_41,new StandardAnalyzer(
-        Version.LUCENE_41)));
+           new IndexWriterConfig(Version.LUCENE_42,new StandardAnalyzer(
+        Version.LUCENE_42)));
             
     try {
       for (int i = 0; i < docs2.length; i++) {

Modified: mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/dirichlet/TestL1ModelClustering.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/dirichlet/TestL1ModelClustering.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/dirichlet/TestL1ModelClustering.java
(original)
+++ mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/dirichlet/TestL1ModelClustering.java
Tue Apr  9 16:37:44 2013
@@ -135,7 +135,7 @@ public final class TestL1ModelClustering
     System.out.println();
     sampleData = Lists.newArrayList();
     RAMDirectory directory = new RAMDirectory();
-    IndexWriter writer = new IndexWriter( directory, new IndexWriterConfig(Version.LUCENE_41,new
StandardAnalyzer(Version.LUCENE_41)));
+    IndexWriter writer = new IndexWriter( directory, new IndexWriterConfig(Version.LUCENE_42,new
StandardAnalyzer(Version.LUCENE_42)));
 
     FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setStoreTermVectors(true);

Modified: mahout/trunk/integration/src/test/java/org/apache/mahout/utils/nlp/collocations/llr/BloomTokenFilterTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/test/java/org/apache/mahout/utils/nlp/collocations/llr/BloomTokenFilterTest.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/test/java/org/apache/mahout/utils/nlp/collocations/llr/BloomTokenFilterTest.java
(original)
+++ mahout/trunk/integration/src/test/java/org/apache/mahout/utils/nlp/collocations/llr/BloomTokenFilterTest.java
Tue Apr  9 16:37:44 2013
@@ -79,7 +79,7 @@ public final class BloomTokenFilterTest 
   @Test
   public void testAnalyzer() throws IOException {
     Reader reader = new StringReader(input);
-    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_41);
+    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_42);
     TokenStream ts = analyzer.tokenStream(null, reader);
     ts.reset();
     validateTokens(allTokens, ts);
@@ -91,7 +91,7 @@ public final class BloomTokenFilterTest 
   @Test
   public void testNonKeepdAnalyzer() throws IOException {
     Reader reader = new StringReader(input);
-    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_41);
+    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_42);
     TokenStream ts = analyzer.tokenStream(null, reader);
     ts.reset();
     TokenStream f = new BloomTokenFilter(getFilter(filterTokens), false /* toss matching
tokens */, ts);
@@ -104,7 +104,7 @@ public final class BloomTokenFilterTest 
   @Test
   public void testKeepAnalyzer() throws IOException {
     Reader reader = new StringReader(input);
-    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_41);
+    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_42);
     TokenStream ts = analyzer.tokenStream(null, reader);
     ts.reset();
     TokenStream f = new BloomTokenFilter(getFilter(filterTokens), true /* keep matching tokens
*/, ts);
@@ -117,7 +117,7 @@ public final class BloomTokenFilterTest 
   @Test
   public void testShingleFilteredAnalyzer() throws IOException {
     Reader reader = new StringReader(input);
-    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_41);
+    Analyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_42);
     TokenStream ts = analyzer.tokenStream(null, reader);
     ts.reset();
     ShingleFilter sf = new ShingleFilter(ts, 3);

Modified: mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java
(original)
+++ mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java
Tue Apr  9 16:37:44 2013
@@ -76,7 +76,7 @@ public class CachedTermInfoTest extends 
                                       RAMDirectory directory,
                                       boolean createNew,
                                       int startingId) throws IOException {
-    IndexWriter writer = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_41,
new WhitespaceAnalyzer(Version.LUCENE_41)));
+    IndexWriter writer = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_42,
new WhitespaceAnalyzer(Version.LUCENE_42)));
 
     try {
       for (int i = 0; i < DOCS.length; i++) {

Modified: mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java
(original)
+++ mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java
Tue Apr  9 16:37:44 2013
@@ -163,7 +163,7 @@ public final class LuceneIterableTest ex
                                               RAMDirectory directory,
                                               boolean createNew,
                                               int startingId) throws IOException {
-    IndexWriter writer = new IndexWriter( directory, new IndexWriterConfig(Version.LUCENE_41,new
StandardAnalyzer(Version.LUCENE_41)));
+    IndexWriter writer = new IndexWriter( directory, new IndexWriterConfig(Version.LUCENE_42,new
StandardAnalyzer(Version.LUCENE_42)));
         
     try {
       for (int i = 0; i < DOCS.length; i++) {

Modified: mahout/trunk/pom.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/pom.xml?rev=1466110&r1=1466109&r2=1466110&view=diff
==============================================================================
--- mahout/trunk/pom.xml (original)
+++ mahout/trunk/pom.xml Tue Apr  9 16:37:44 2013
@@ -98,7 +98,7 @@
     <maven.clover.multiproject>true</maven.clover.multiproject>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <hadoop.version>1.1.2</hadoop.version>
-    <lucene.version>4.2.0</lucene.version>
+    <lucene.version>4.2.1</lucene.version>
   </properties>
   <issueManagement>
     <system>Jira</system>



Mime
View raw message