mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robina...@apache.org
Subject svn commit: r907675 - in /lucene/mahout/trunk: examples/pom.xml utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java
Date Mon, 08 Feb 2010 15:06:09 GMT
Author: robinanil
Date: Mon Feb  8 15:06:09 2010
New Revision: 907675

URL: http://svn.apache.org/viewvc?rev=907675&view=rev
Log:
reverting changes to jets3

Modified:
    lucene/mahout/trunk/examples/pom.xml
    lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java

Modified: lucene/mahout/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/pom.xml?rev=907675&r1=907674&r2=907675&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/pom.xml (original)
+++ lucene/mahout/trunk/examples/pom.xml Mon Feb  8 15:06:09 2010
@@ -215,6 +215,12 @@
       <version>1.5.8</version>
     </dependency>
 
+    <dependency>
+      <groupId>net.java.dev.jets3t</groupId>
+      <artifactId>jets3t</artifactId>
+      <version>0.7.1</version>
+    </dependency>
+
   </dependencies>
 
 

Modified: lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java?rev=907675&r1=907674&r2=907675&view=diff
==============================================================================
--- lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java
(original)
+++ lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFPartialVectorReducer.java
Mon Feb  8 15:06:09 2010
@@ -60,14 +60,14 @@
                      Iterator<VectorWritable> values,
                      OutputCollector<WritableComparable<?>,VectorWritable> output,
                      Reporter reporter) throws IOException {
-    if (values.hasNext() == false) return;
+    if (!values.hasNext()) return;
     Vector value = values.next().get();
     Iterator<Element> it = value.iterateNonZero();
     Vector vector = new RandomAccessSparseVector(key
         .toString(), Integer.MAX_VALUE, value.getNumNondefaultElements());
     while (it.hasNext()) {
       Element e = it.next();
-      if (dictionary.containsKey(e.index()) == false) continue;
+      if (!dictionary.containsKey(e.index())) continue;
       long df = dictionary.get(e.index());
       if (df / vectorCount > maxDfPercent) continue;
       if (df < minDf) df = minDf;



Mime
View raw message