mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r688364 [2/3] - in /lucene/mahout/trunk: core/src/main/java/org/apache/mahout/classifier/ core/src/main/java/org/apache/mahout/classifier/bayes/ core/src/main/java/org/apache/mahout/classifier/bayes/common/ core/src/main/java/org/apache/mah...
Date Sat, 23 Aug 2008 16:48:31 GMT
Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyMapper.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyMapper.java Sat Aug 23 09:48:28 2008
@@ -16,10 +16,6 @@
  */
 package org.apache.mahout.clustering.meanshift;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.mapred.JobConf;
@@ -29,6 +25,10 @@
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.mahout.matrix.CardinalityException;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 public class MeanShiftCanopyMapper extends MapReduceBase implements
     Mapper<WritableComparable, Text, Text, WritableComparable> {
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyReducer.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyReducer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyReducer.java Sat Aug 23 09:48:28 2008
@@ -16,11 +16,6 @@
  */
 package org.apache.mahout.clustering.meanshift;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.mapred.JobConf;
@@ -30,6 +25,11 @@
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.mahout.matrix.CardinalityException;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 public class MeanShiftCanopyReducer extends MapReduceBase implements
     Reducer<Text, WritableComparable, Text, WritableComparable> {
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Classifier.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Classifier.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Classifier.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Classifier.java Sat Aug 23 09:48:28 2008
@@ -18,7 +18,6 @@
 
 
 import org.apache.mahout.classifier.ClassifierResult;
-import org.apache.mahout.common.Model;
 
 import java.util.Collection;
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Model.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Model.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Model.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/Model.java Sat Aug 23 09:48:28 2008
@@ -19,12 +19,11 @@
 
 import org.apache.mahout.cf.taste.impl.common.FastMap;
 
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
@@ -33,23 +32,23 @@
  */
 public abstract class Model {
 
-  protected List<Map<Integer, Float>> featureLabelWeights = new ArrayList<Map<Integer, Float>>();
+  protected final List<Map<Integer, Float>> featureLabelWeights = new ArrayList<Map<Integer, Float>>();
 
-  protected Map<String, Integer> featureList = new FastMap<String, Integer>();
+  protected final Map<String, Integer> featureList = new FastMap<String, Integer>();
 
-  protected Map<String, Integer> labelList = new HashMap<String, Integer>();
+  protected final Map<String, Integer> labelList = new HashMap<String, Integer>();
 
-  protected List<Float> sumFeatureWeight = new ArrayList<Float>();
+  protected final List<Float> sumFeatureWeight = new ArrayList<Float>();
 
-  protected Map<Integer, Float> sumLabelWeight = new HashMap<Integer, Float>();
+  protected final Map<Integer, Float> sumLabelWeight = new HashMap<Integer, Float>();
 
-  protected Map<Integer, Float> thetaNormalizer = new HashMap<Integer, Float>();
+  protected final Map<Integer, Float> thetaNormalizer = new HashMap<Integer, Float>();
 
   protected Float sigma_jSigma_k = new Float(0);
 
-  protected Float alpha_i = 1.0f; // alpha_i can be improved upon for increased smoothing
+  protected final Float alpha_i = 1.0f; // alpha_i can be improved upon for increased smoothing
   
-  public static float  DEFAULT_PROBABILITY = 0.5f;
+  public static final float DEFAULT_PROBABILITY = 0.5f;
   
   
   protected abstract float FeatureWeight(Integer label, Integer feature);
@@ -63,10 +62,10 @@
   public abstract void GenerateModel();
   
   protected float getSumLabelWeight(Integer label) {
-    float result = 0;
+    float result = 0.0f;
     Float numSeen = sumLabelWeight.get(label);
     if (numSeen != null) {
-      result = ((float) numSeen);
+      result = numSeen;
     }
     return result;
   }
@@ -75,16 +74,16 @@
     float result = 0.0f;
     Float numSeen = thetaNormalizer.get(label);
     if (numSeen != null) {
-      result = ((float) numSeen);
+      result = numSeen;
     }
     return result;
   }
 
   protected float getSumFeatureWeight(Integer feature) {
-    float result = 0;
+    float result = 0.0f;
     Float numSeen = sumFeatureWeight.get(feature);
     if (numSeen != null) {
-      result = ((float) numSeen);
+      result = numSeen;
     }
     return result;
   }
@@ -95,8 +94,7 @@
       Integer labelId = Integer.valueOf(labelList.size());
       labelList.put(label, labelId);
     }
-    Integer labelId = labelList.get(label);
-    return labelId;
+    return labelList.get(label);
   }
 
   protected Integer getFeature(String feature) {
@@ -105,8 +103,7 @@
       Integer featureId = Integer.valueOf(featureList.size());
       featureList.put(feature, featureId);
     }
-    Integer featureId = featureList.get(feature);
-    return featureId;
+    return featureList.get(feature);
   }
 
   protected void setWeight(String labelString, String featureString, Float weight)

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/EvalMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/EvalMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/EvalMapper.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/EvalMapper.java Sat Aug 23 09:48:28 2008
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-
 import org.apache.hadoop.io.FloatWritable;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
@@ -29,6 +27,8 @@
 import org.apache.mahout.utils.StringUtils;
 import org.uncommons.watchmaker.framework.FitnessEvaluator;
 
+import java.io.IOException;
+
 /**
  * <p>
  * Generic Mapper class for fitness evaluation. Works with the following :

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutEvaluator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutEvaluator.java Sat Aug 23 09:48:28 2008
@@ -17,11 +17,6 @@
  * limitations under the License.
  */
 
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.List;
-
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
@@ -35,6 +30,11 @@
 import org.apache.mahout.utils.StringUtils;
 import org.uncommons.watchmaker.framework.FitnessEvaluator;
 
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.List;
+
 /**
  * Generic Mahout distributed evaluator. takes an evaluator and a population and
  * launches a Hadoop job. The job evaluates the fitness of each individual of the

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutFitnessEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutFitnessEvaluator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutFitnessEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutFitnessEvaluator.java Sat Aug 23 09:48:28 2008
@@ -17,11 +17,11 @@
 
 package org.apache.mahout.ga.watchmaker;
 
+import org.uncommons.watchmaker.framework.FitnessEvaluator;
+
 import java.io.IOException;
 import java.util.List;
 
-import org.uncommons.watchmaker.framework.FitnessEvaluator;
-
 /**
  * Watchmaker compatible Fitness Evaluator that delegates the evaluation of the
  * whole population to Mahout.

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/OutputUtils.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/OutputUtils.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/OutputUtils.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/OutputUtils.java Sat Aug 23 09:48:28 2008
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
@@ -30,11 +26,19 @@
 import org.apache.hadoop.io.SequenceFile.Sorter;
 import org.apache.hadoop.mapred.JobConf;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Utility Class that deals with the output.
  */
 public class OutputUtils {
 
+  private OutputUtils() {
+    // do nothing
+  }
+
   /**
    * Removes the output directory if it already exists.
    * 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STEvolutionEngine.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STEvolutionEngine.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STEvolutionEngine.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STEvolutionEngine.java Sat Aug 23 09:48:28 2008
@@ -17,17 +17,17 @@
 
 package org.apache.mahout.ga.watchmaker;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Random;
-
 import org.uncommons.watchmaker.framework.AbstractEvolutionEngine;
 import org.uncommons.watchmaker.framework.CandidateFactory;
 import org.uncommons.watchmaker.framework.EvaluatedCandidate;
 import org.uncommons.watchmaker.framework.EvolutionaryOperator;
 import org.uncommons.watchmaker.framework.SelectionStrategy;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+
 /**
  * Single Threaded Evolution Engine.
  */

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluator.java Sat Aug 23 09:48:28 2008
@@ -17,11 +17,11 @@
 
 package org.apache.mahout.ga.watchmaker;
 
+import org.uncommons.watchmaker.framework.FitnessEvaluator;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.uncommons.watchmaker.framework.FitnessEvaluator;
-
 /**
  * Special Fitness Evaluator that evaluates all the population ones.
  */

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/AbstractVector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/AbstractVector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/AbstractVector.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/AbstractVector.java Sat Aug 23 09:48:28 2008
@@ -16,8 +16,8 @@
  */
 package org.apache.mahout.matrix;
 
-import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * Implementations of generic capabilities like sum of elements and dot products

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/DenseVector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/DenseVector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/DenseVector.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/DenseVector.java Sat Aug 23 09:48:28 2008
@@ -19,9 +19,9 @@
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.WritableComparable;
 
+import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
-import java.io.DataInput;
 
 /**
  * Implements vector as an array of doubles

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseMatrix.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseMatrix.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseMatrix.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseMatrix.java Sat Aug 23 09:48:28 2008
@@ -16,13 +16,13 @@
  */
 package org.apache.mahout.matrix;
 
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.WritableComparable;
+
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Arrays;
 
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.WritableComparable;
-
 /**
  * Doubly sparse matrix. Implemented as a Map of SparseVector rows
  *

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseVector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseVector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseVector.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/SparseVector.java Sat Aug 23 09:48:28 2008
@@ -16,16 +16,16 @@
  */
 package org.apache.mahout.matrix;
 
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.WritableComparable;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Arrays;
 import java.util.Comparator;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.DataInput;
-
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.WritableComparable;
 
 /**
  * Implements vector that only stores non-zero doubles
@@ -43,7 +43,7 @@
 
   /**
    * Decode a new instance from the argument
-   * 
+   *
    * @param writableComparable
    *            a writableComparable produced by the asWritableComparable method
    * @return a DenseVector

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/Vector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/Vector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/Vector.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/Vector.java Sat Aug 23 09:48:28 2008
@@ -16,8 +16,8 @@
  */
 package org.apache.mahout.matrix;
 
-import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * The basic interface including numerous convenience functions

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedEuclideanDistanceMeasure.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedEuclideanDistanceMeasure.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedEuclideanDistanceMeasure.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedEuclideanDistanceMeasure.java Sat Aug 23 09:48:28 2008
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-import org.apache.hadoop.mapred.JobConf;
 import org.apache.mahout.matrix.Vector;
 
 /**

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedManhattanDistanceMeasure.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedManhattanDistanceMeasure.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedManhattanDistanceMeasure.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedManhattanDistanceMeasure.java Sat Aug 23 09:48:28 2008
@@ -17,7 +17,6 @@
  * limitations under the License.
  */
 
-import org.apache.hadoop.mapred.JobConf;
 import org.apache.mahout.matrix.Vector;
 
 /**

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesClassifierTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesClassifierTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesClassifierTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesClassifierTest.java Sat Aug 23 09:48:28 2008
@@ -17,9 +17,6 @@
  */
 
 import junit.framework.TestCase;
-
-import java.util.Collection;
-
 import org.apache.mahout.classifier.ClassifierResult;
 import org.apache.mahout.common.Model;
 
@@ -33,10 +30,10 @@
 
   protected void setUp() {
     model = new BayesModel();
-    String[] labels = new String[]{"a", "b", "c", "d", "e"};
-    long[] labelCounts = new long[]{6, 20, 60, 100, 200};
-    String[] features = new String[]{"aa", "bb", "cc", "dd", "ee"};
-    model.setSigma_jSigma_k(100f);
+    //String[] labels = new String[]{"a", "b", "c", "d", "e"};
+    //long[] labelCounts = new long[]{6, 20, 60, 100, 200};
+    //String[] features = new String[]{"aa", "bb", "cc", "dd", "ee"};
+    model.setSigma_jSigma_k(100.0f);
     
     model.setSumFeatureWeight("aa", 100);
     model.setSumFeatureWeight("bb", 100);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesFileFormatterTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesFileFormatterTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesFileFormatterTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/BayesFileFormatterTest.java Sat Aug 23 09:48:28 2008
@@ -89,7 +89,7 @@
     files = out.listFiles();
     assertTrue("files Size: " + files.length + " is not: " + 1, files.length == 1);
     BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(files[0]), charset));
-    String line = null;
+    String line;
     int count = 0;
     while ((line = reader.readLine()) != null){
       assertTrue("line does not start with label", line.startsWith("animal"));

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/CBayesClassifierTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/CBayesClassifierTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/CBayesClassifierTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/bayes/CBayesClassifierTest.java Sat Aug 23 09:48:28 2008
@@ -17,12 +17,8 @@
  */
 
 import junit.framework.TestCase;
-
-import java.util.Collection;
-
 import org.apache.mahout.classifier.ClassifierResult;
 import org.apache.mahout.classifier.cbayes.CBayesModel;
-import org.apache.mahout.common.Model;
 
 public class CBayesClassifierTest extends TestCase {
   protected CBayesModel model;
@@ -34,10 +30,10 @@
 
   protected void setUp() {
     model = new CBayesModel();
-    String[] labels = new String[]{"a", "b", "c", "d", "e"};
-    long[] labelCounts = new long[]{6, 20, 60, 100, 200};
-    String[] features = new String[]{"aa", "bb", "cc", "dd", "ee"};
-    model.setSigma_jSigma_k(500f);
+    //String[] labels = new String[]{"a", "b", "c", "d", "e"};
+    //long[] labelCounts = new long[]{6, 20, 60, 100, 200};
+    //String[] features = new String[]{"aa", "bb", "cc", "dd", "ee"};
+    model.setSigma_jSigma_k(500.0f);
     
     model.setSumFeatureWeight("aa", 80);
     model.setSumFeatureWeight("bb", 21);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java Sat Aug 23 09:48:28 2008
@@ -16,20 +16,7 @@
  */
 package org.apache.mahout.clustering.canopy;
 
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import junit.framework.TestCase;
-
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.SequenceFile;
@@ -47,6 +34,18 @@
 import org.apache.mahout.utils.ManhattanDistanceMeasure;
 import org.apache.mahout.utils.UserDefinedDistanceMeasure;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 public class TestCanopyCreation extends TestCase {
   static final double[][] raw = { { 1, 1 }, { 2, 1 }, { 1, 2 }, { 2, 2 },
       { 3, 3 }, { 4, 4 }, { 5, 4 }, { 4, 5 }, { 5, 5 } };
@@ -240,9 +239,6 @@
     return canopies;
   }
 
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
 
   /**
    * Story: User can cluster points using a ManhattanDistanceMeasure and a

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java Sat Aug 23 09:48:28 2008
@@ -16,11 +16,11 @@
  * limitations under the License.
  */
 
+import org.apache.mahout.matrix.Vector;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.mahout.matrix.Vector;
-
 /**
  * This Canopy subclass maintains a list of points in the canopy so it can
  * include them in its toString method. Useful for debugging but not practical

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java Sat Aug 23 09:48:28 2008
@@ -17,17 +17,7 @@
 
 package org.apache.mahout.clustering.kmeans;
 
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import junit.framework.TestCase;
-
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.SequenceFile;
@@ -44,6 +34,15 @@
 import org.apache.mahout.utils.EuclideanDistanceMeasure;
 import org.apache.mahout.utils.ManhattanDistanceMeasure;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 public class TestKmeansClustering extends TestCase {
 
   public static final double[][] reference = { { 1, 1 }, { 2, 1 }, { 1, 2 }, { 2, 2 },
@@ -72,11 +71,6 @@
     rmr("testdata");
   }
 
-  @Override
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
   /**
    * This is the reference k-means implementation. Given its inputs it iterates
    * over the points and clusters until their centers converge or until the

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/VisibleCluster.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/VisibleCluster.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/VisibleCluster.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/VisibleCluster.java Sat Aug 23 09:48:28 2008
@@ -16,11 +16,11 @@
  */
 package org.apache.mahout.clustering.kmeans;
 
+import org.apache.mahout.matrix.Vector;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.mahout.matrix.Vector;
-
 /**
  * This Cluster subclass maintains a list of points in the cluster so it can
  * include them in its toString method. Useful for debugging but not practical

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/meanshift/TestMeanShift.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/meanshift/TestMeanShift.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/meanshift/TestMeanShift.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/meanshift/TestMeanShift.java Sat Aug 23 09:48:28 2008
@@ -16,17 +16,7 @@
  */
 package org.apache.mahout.clustering.meanshift;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import junit.framework.TestCase;
-
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.SequenceFile;
@@ -41,6 +31,15 @@
 import org.apache.mahout.utils.EuclideanDistanceMeasure;
 import org.apache.mahout.utils.ManhattanDistanceMeasure;
 
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class TestMeanShift extends TestCase {
 
   Vector[] raw = null;
@@ -153,10 +152,6 @@
       }
   }
 
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
   /**
    * Story: User can exercise the reference implementation to verify that the
    * test datapoints are clustered in a reasonable manner.

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/EvalMapperTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/EvalMapperTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/EvalMapperTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/EvalMapperTest.java Sat Aug 23 09:48:28 2008
@@ -16,11 +16,7 @@
  * limitations under the License.
  */
 
-import java.util.List;
-import java.util.Set;
-
 import junit.framework.TestCase;
-
 import org.apache.hadoop.io.FloatWritable;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
@@ -31,6 +27,9 @@
 import org.apache.mahout.utils.StringUtils;
 import org.uncommons.watchmaker.framework.FitnessEvaluator;
 
+import java.util.List;
+import java.util.Set;
+
 public class EvalMapperTest extends TestCase {
 
   public void testMap() throws Exception {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/MahoutEvaluatorTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/MahoutEvaluatorTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/MahoutEvaluatorTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/MahoutEvaluatorTest.java Sat Aug 23 09:48:28 2008
@@ -16,14 +16,7 @@
  * limitations under the License.
  */
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
 import junit.framework.TestCase;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -32,6 +25,12 @@
 import org.apache.mahout.ga.watchmaker.utils.DummyEvaluator;
 import org.apache.mahout.utils.StringUtils;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
 public class MahoutEvaluatorTest extends TestCase {
 
   public <T> void testEvaluate() throws Exception {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluatorTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluatorTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluatorTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/STFitnessEvaluatorTest.java Sat Aug 23 09:48:28 2008
@@ -17,15 +17,13 @@
 
 package org.apache.mahout.ga.watchmaker;
 
+import junit.framework.TestCase;
+import org.uncommons.maths.random.MersenneTwisterRNG;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 
-import org.apache.mahout.ga.watchmaker.STFitnessEvaluator;
-import org.uncommons.maths.random.MersenneTwisterRNG;
-
-import junit.framework.TestCase;
-
 public class STFitnessEvaluatorTest extends TestCase {
 
   private class STFitnessEvaluatorMock<T> extends STFitnessEvaluator<T> {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/utils/DummyEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/utils/DummyEvaluator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/utils/DummyEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/ga/watchmaker/utils/DummyEvaluator.java Sat Aug 23 09:48:28 2008
@@ -17,13 +17,13 @@
 
 package org.apache.mahout.ga.watchmaker.utils;
 
+import org.uncommons.watchmaker.framework.FitnessEvaluator;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
 
-import org.uncommons.watchmaker.framework.FitnessEvaluator;
-
 /**
  * Dummy FitnessEvaluator that stores the evaluations it calculates. Uses a
  * static storage to handle the evaluator duplication when passed as a Job

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseMatrix.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseMatrix.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseMatrix.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseMatrix.java Sat Aug 23 09:48:28 2008
@@ -22,10 +22,6 @@
     super(name);
   }
 
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
-
   public Matrix matrixFactory(double[][] values) {
     return new DenseMatrix(values);
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseVector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseVector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseVector.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestDenseVector.java Sat Aug 23 09:48:28 2008
@@ -1,25 +1,6 @@
 package org.apache.mahout.matrix;
 
 import junit.framework.TestCase;
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import junit.framework.TestCase;
 
 public class TestDenseVector extends TestCase {
 

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseColumnMatrix.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseColumnMatrix.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseColumnMatrix.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseColumnMatrix.java Sat Aug 23 09:48:28 2008
@@ -16,19 +16,12 @@
  * limitations under the License.
  */
 
-import junit.framework.TestCase;
-
 public class TestSparseColumnMatrix extends MatrixTest {
 
   public TestSparseColumnMatrix(String name) {
     super(name);
   }
 
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
-
-
   public Matrix matrixFactory(double[][] values) {
     int[] cardinality = {values.length, values[0].length};
     Matrix matrix = new SparseColumnMatrix(cardinality);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseMatrix.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseMatrix.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseMatrix.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseMatrix.java Sat Aug 23 09:48:28 2008
@@ -22,10 +22,6 @@
     super(name);
   }
 
-  protected void setUp() throws Exception {
-    super.setUp();
-  }
-
   public Matrix matrixFactory(double[][] values) {
     int[] cardinality = {values.length, values[0].length};
     Matrix matrix = new SparseMatrix(cardinality);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseRowMatrix.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseRowMatrix.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseRowMatrix.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/matrix/TestSparseRowMatrix.java Sat Aug 23 09:48:28 2008
@@ -23,12 +23,6 @@
     super(name);
   }
 
-  protected void setUp() throws Exception {
-    super.setUp();
-
-  }
-
-
   public Matrix matrixFactory(double[][] values) {
     int[] cardinality = {values.length, values[0].length};
     Matrix matrix = new SparseRowMatrix(cardinality);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/DummyOutputCollector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/DummyOutputCollector.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/DummyOutputCollector.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/DummyOutputCollector.java Sat Aug 23 09:48:28 2008
@@ -16,6 +16,10 @@
  * limitations under the License.
  */
 
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableComparable;
+import org.apache.hadoop.mapred.OutputCollector;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -23,10 +27,6 @@
 import java.util.Set;
 import java.util.TreeMap;
 
-import org.apache.hadoop.io.Writable;
-import org.apache.hadoop.io.WritableComparable;
-import org.apache.hadoop.mapred.OutputCollector;
-
 public class DummyOutputCollector<K extends WritableComparable, V extends Writable> implements OutputCollector<K, V> {
 
   final Map<String, List<V>> data = new TreeMap<String, List<V>>();

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/StringUtilsTest.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/StringUtilsTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/utils/StringUtilsTest.java Sat Aug 23 09:48:28 2008
@@ -16,13 +16,11 @@
  * limitations under the License.
  */
 
+import junit.framework.TestCase;
+
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.mahout.utils.StringUtils;
-
-import junit.framework.TestCase;
-
 public class StringUtilsTest extends TestCase {
 
   private class DummyTest {

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJB.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJB.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJB.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJB.java Sat Aug 23 09:48:28 2008
@@ -17,15 +17,15 @@
 
 package org.apache.mahout.cf.taste.ejb;
 
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.common.Refreshable;
+import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.model.Item;
 import org.apache.mahout.cf.taste.recommender.Rescorer;
 
 import javax.ejb.EJBObject;
 import java.rmi.RemoteException;
-import java.util.List;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * <p>Recommender EJB component interface.</p>

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBBean.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBBean.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBBean.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBBean.java Sat Aug 23 09:48:28 2008
@@ -17,8 +17,8 @@
 
 package org.apache.mahout.cf.taste.ejb;
 
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.common.Refreshable;
+import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.model.Item;
 import org.apache.mahout.cf.taste.recommender.RecommendedItem;
 import org.apache.mahout.cf.taste.recommender.Recommender;
@@ -30,8 +30,8 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import java.util.List;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * <p>Recommender EJB bean implementation.</p>

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBLocal.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBLocal.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBLocal.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/ejb/RecommenderEJBLocal.java Sat Aug 23 09:48:28 2008
@@ -17,14 +17,14 @@
 
 package org.apache.mahout.cf.taste.ejb;
 
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.common.Refreshable;
+import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.model.Item;
 import org.apache.mahout.cf.taste.recommender.Rescorer;
 
 import javax.ejb.EJBLocalObject;
-import java.util.List;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * <p>Recommender EJB local component interface.</p>

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensDataModel.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensDataModel.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensDataModel.java Sat Aug 23 09:48:28 2008
@@ -18,8 +18,8 @@
 package org.apache.mahout.cf.taste.example.grouplens;
 
 import org.apache.mahout.cf.taste.impl.common.FastMap;
-import org.apache.mahout.cf.taste.impl.common.IOUtils;
 import org.apache.mahout.cf.taste.impl.common.FileLineIterable;
+import org.apache.mahout.cf.taste.impl.common.IOUtils;
 import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
 import org.apache.mahout.cf.taste.model.Item;
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensRecommender.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensRecommender.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensRecommender.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensRecommender.java Sat Aug 23 09:48:28 2008
@@ -17,8 +17,8 @@
 
 package org.apache.mahout.cf.taste.example.grouplens;
 
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.common.Refreshable;
+import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.impl.recommender.CachingRecommender;
 import org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender;
 import org.apache.mahout.cf.taste.model.DataModel;
@@ -28,8 +28,8 @@
 import org.apache.mahout.cf.taste.recommender.Rescorer;
 
 import java.io.IOException;
-import java.util.List;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * A simple {@link Recommender} implemented for the GroupLens demo.

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/PrepareTwentyNewsgroups.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/PrepareTwentyNewsgroups.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/PrepareTwentyNewsgroups.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/PrepareTwentyNewsgroups.java Sat Aug 23 09:48:28 2008
@@ -16,19 +16,15 @@
  * limitations under the License.
  */
 
-import org.apache.mahout.classifier.BayesFileFormatter;
-import org.apache.lucene.analysis.Analyzer;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.Options;
 import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.mahout.classifier.BayesFileFormatter;
 
 import java.io.File;
-import java.io.IOException;
 import java.nio.charset.Charset;
 
 
@@ -38,12 +34,11 @@
  * This class takes the directory containing the extracted newsgroups and collapses them into a single file per category, with
  * one document per line (first token on each line is the label) 
  *
- **/
+ */
 public class PrepareTwentyNewsgroups {
-  private transient static Log log = LogFactory.getLog(PrepareTwentyNewsgroups.class);
+
   @SuppressWarnings("static-access")
-  public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, IOException {
-    CommandLine cmdLine = null;
+  public static void main(String[] args) throws Exception {
     Options options = new Options();
     Option parentOpt = OptionBuilder.withLongOpt("parent").isRequired().hasArg().withDescription("Parent dir containing the newsgroups").create("p");
     options.addOption(parentOpt);
@@ -54,14 +49,9 @@
     Option charsetOpt = OptionBuilder.withLongOpt("charset").hasArg().isRequired().withDescription("The name of the character encoding of the input files").create("c");
     options.addOption(charsetOpt);
 
-    try {
+    PosixParser parser = new PosixParser();
+    CommandLine cmdLine = parser.parse(options, args);
 
-      PosixParser parser = new PosixParser();
-      cmdLine = parser.parse(options, args);
-    }
-    catch (ParseException exp) {
-      log.error("Cmd line Syntax Error: " + exp.getMessage(), exp);
-    }
     File parentDir = new File(cmdLine.getOptionValue(parentOpt.getOpt()));
     File outputDir = new File(cmdLine.getOptionValue(outputDirOpt.getOpt()));
     String analyzerName = cmdLine.getOptionValue(analyzerNameOpt.getOpt());

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java Sat Aug 23 09:48:28 2008
@@ -17,34 +17,33 @@
  * limitations under the License.
  */
 
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
 import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.cli.Option;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.mahout.classifier.ClassifierResult;
 import org.apache.mahout.classifier.ResultAnalyzer;
-import org.apache.mahout.classifier.bayes.BayesClassifier;
-import org.apache.mahout.classifier.bayes.BayesModel;
-import org.apache.mahout.common.Classifier;
-import org.apache.mahout.common.Model;
 import org.apache.mahout.classifier.bayes.io.SequenceFileModelReader;
 import org.apache.mahout.classifier.cbayes.CBayesClassifier;
 import org.apache.mahout.classifier.cbayes.CBayesModel;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.mapred.JobConf;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.analysis.Analyzer;
-
-import java.io.*;
+import org.apache.mahout.common.Classifier;
+import org.apache.mahout.common.Model;
 
-import java.util.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
-/**
- * 
- * 
- */
 public class TestClassifier {
 
   @SuppressWarnings({ "static-access", "unchecked" })
@@ -73,7 +72,7 @@
         .hasArg().withDescription("Type of classifier").create("type");
     options.addOption(typeOpt);
 
-    CommandLine cmdLine = null;
+    CommandLine cmdLine;
     try {
       PosixParser parser = new PosixParser();
       cmdLine = parser.parse(options, args);
@@ -154,13 +153,14 @@
           System.out.print(correctLabel);
           BufferedReader fileReader = new BufferedReader(new InputStreamReader(
               new FileInputStream(subdirs[loop].getPath()), encoding));
-          String line = null;
+          String line;
           while ((line = fileReader.readLine()) != null) {
             
             Map<String, List<String>> document = Model.generateNGrams(line, gramSize);
             for (String labelName : document.keySet()) {
+              List<String> strings = document.get(labelName);
               ClassifierResult classifiedLabel = classifier.classify(model,
-                  (String[]) document.get(labelName).toArray(new String[0]),
+                  strings.toArray(new String[strings.size()]),
                   defaultCat);
               resultAnalyzer.addInstance(correctLabel, classifiedLabel);
             }

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java Sat Aug 23 09:48:28 2008
@@ -16,16 +16,12 @@
  * limitations under the License.
  */
 
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
 import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-//import org.apache.mahout.classifier.cbayes.CModelTrainerDriver;
-import org.apache.mahout.classifier.bayes.BayesDriver;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
+import org.apache.commons.cli.ParseException;
 import org.apache.mahout.classifier.cbayes.CBayesDriver;
 
 /**
@@ -47,12 +43,9 @@
  * </ol>
  *  </li>
  * </ol>
- *
- **/
+ */
 public class TrainClassifier {
 
-  private transient static Log log = LogFactory.getLog(TrainClassifier.class);
-
   public void trainNaiveBayes(String dir, String outputDir, int gramSize){
     BayesDriver.runJob(dir, outputDir, gramSize);
   }
@@ -62,7 +55,7 @@
   }
   
   @SuppressWarnings("static-access")
-  public static void main(String[] args) {
+  public static void main(String[] args) throws ParseException {
     Options options = new Options();
     Option trainOpt = OptionBuilder.withLongOpt("train").withDescription("Train the classifier").create("t");
     options.addOption(trainOpt);
@@ -75,30 +68,23 @@
     Option typeOpt = OptionBuilder.withLongOpt("classifierType").isRequired().hasArg().withDescription("Type of classifier").create("type");
     options.addOption(typeOpt);
     
-    CommandLine cmdLine = null;
-    try {
-      PosixParser parser = new PosixParser();
-      cmdLine = parser.parse(options, args);
-
-      boolean train = cmdLine.hasOption(trainOpt.getOpt());
-      TrainClassifier tn = new TrainClassifier();
-      if (train == true){;
-        String classifierType = cmdLine.getOptionValue(typeOpt.getOpt());
-        if(classifierType.equalsIgnoreCase("bayes")){
-          System.out.println("Training Bayes Classifier");
-          tn.trainNaiveBayes(cmdLine.getOptionValue(inputDirOpt.getOpt()), cmdLine.getOptionValue(outputOpt.getOpt()), Integer.parseInt(cmdLine.getOptionValue(gramSizeOpt.getOpt())));
-          
-        }
-        else if(classifierType.equalsIgnoreCase("cbayes"))
-        {
-          System.out.println("Training Complementary Bayes Classifier");
+    PosixParser parser = new PosixParser();
+    CommandLine cmdLine = parser.parse(options, args);
+
+    boolean train = cmdLine.hasOption(trainOpt.getOpt());
+    TrainClassifier tn = new TrainClassifier();
+    if (train == true){
+      String classifierType = cmdLine.getOptionValue(typeOpt.getOpt());
+      if(classifierType.equalsIgnoreCase("bayes")){
+        System.out.println("Training Bayes Classifier");
+        tn.trainNaiveBayes(cmdLine.getOptionValue(inputDirOpt.getOpt()), cmdLine.getOptionValue(outputOpt.getOpt()), Integer.parseInt(cmdLine.getOptionValue(gramSizeOpt.getOpt())));
+
+      } else if(classifierType.equalsIgnoreCase("cbayes")) {
+        System.out.println("Training Complementary Bayes Classifier");
         //setup the HDFS and copy the files there, then run the trainer
         tn.trainCNaiveBayes(cmdLine.getOptionValue(inputDirOpt.getOpt()), cmdLine.getOptionValue(outputOpt.getOpt()), Integer.parseInt(cmdLine.getOptionValue(gramSizeOpt.getOpt())));
-        }
-      }      
-    }
-    catch (ParseException exp) {
-      log.error("Cmd line Syntax Error: " + exp.getMessage(), exp);
+      }
     }
+
   }
 }

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreator.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreator.java Sat Aug 23 09:48:28 2008
@@ -17,11 +17,11 @@
  * limitations under the License.
  */
 
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
 import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.cli.Option;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
 
 import java.io.IOException;
 
@@ -45,7 +45,7 @@
         .withDescription("Location of the Countries File").create("c");
     options.addOption(countriesFileOpt);
     
-    CommandLine cmdLine = null;
+    CommandLine cmdLine;
     try {
       PosixParser parser = new PosixParser();
       cmdLine = parser.parse(options, args);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java Sat Aug 23 09:48:28 2008
@@ -16,23 +16,24 @@
  * limitations under the License.
  */
 
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.util.*;
-import org.apache.hadoop.mapred.*;
 import org.apache.hadoop.util.GenericsUtil;
-import org.apache.hadoop.io.DefaultStringifier;
 import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.DefaultStringifier;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.mapred.JobClient;
+import org.apache.hadoop.mapred.JobConf;
 
-
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.Set;
+import java.util.HashSet;
 
 /**
  * Create and run the Bayes Trainer.
  *
- **/
+ */
 public class WikipediaDatasetCreatorDriver {
   /**
    * Takes in two arguments:
@@ -46,7 +47,7 @@
     String input = args[0];
     String output = args[1];
     String countriesFile = args[2];
-    
+
     runJob(input, output,countriesFile);
   }
 
@@ -61,45 +62,43 @@
   public static void runJob(String input, String output, String countriesFile) {
     JobClient client = new JobClient();
     JobConf conf = new JobConf(WikipediaDatasetCreatorDriver.class);
-    
+
     conf.set("key.value.separator.in.input.line", " ");
     conf.set("xmlinput.start", "<text xml:space=\"preserve\">");
     conf.set("xmlinput.end", "</text>");
     conf.setOutputKeyClass(Text.class);
     conf.setOutputValueClass(Text.class);
-    
-//    conf.setInputPath(new Path(input));
-    FileInputFormat.setInputPaths(conf, new Path(input));
+
+    conf.setInputPath(new Path(input));
     Path outPath = new Path(output);
-//    conf.setOutputPath(outPath);
-    FileOutputFormat.setOutputPath(conf, outPath);
+    conf.setOutputPath(outPath);
 
     conf.setMapperClass(WikipediaDatasetCreatorMapper.class);
     conf.setNumMapTasks(100);
     conf.setInputFormat(XmlInputFormat.class);
     //conf.setCombinerClass(WikipediaDatasetCreatorReducer.class);
-    conf.setReducerClass(WikipediaDatasetCreatorReducer.class);    
+    conf.setReducerClass(WikipediaDatasetCreatorReducer.class);
     conf.setOutputFormat(WikipediaDatasetCreatorOutputFormat.class);
     conf.set("io.serializations", "org.apache.hadoop.io.serializer.JavaSerialization,org.apache.hadoop.io.serializer.WritableSerialization"); // Dont ever forget this. People should keep track of how hadoop conf parameters and make or break a piece of code
-      
-    
+
+
     try {
       FileSystem dfs = FileSystem.get(conf);
       if (dfs.exists(outPath))
         dfs.delete(outPath, true);
-      
-      HashSet<String> countries= new HashSet<String>();
-      
-      
+
+      Set<String> countries= new HashSet<String>();
+
+
       BufferedReader reader = new BufferedReader(new InputStreamReader(
           new FileInputStream(countriesFile), "UTF-8"));
-      String line = null;
+      String line;
       while((line = reader.readLine())!=null){
         countries.add(line);
       }
       reader.close();
       
-      DefaultStringifier<HashSet<String>> setStringifier = new DefaultStringifier<HashSet<String>>(conf,GenericsUtil.getClass(countries));
+      DefaultStringifier<Set<String>> setStringifier = new DefaultStringifier<Set<String>>(conf,GenericsUtil.getClass(countries));
 
       String countriesString = setStringifier.toString(countries);  
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorMapper.java Sat Aug 23 09:48:28 2008
@@ -17,6 +17,7 @@
  * limitations under the License.
  */
 
+import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.hadoop.io.DefaultStringifier;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.JobConf;
@@ -25,21 +26,22 @@
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.hadoop.util.GenericsUtil;
-import org.apache.lucene.analysis.*;
-import org.apache.lucene.analysis.standard.*;
-import org.apache.commons.lang.StringEscapeUtils;
-import java.io.*;
-import java.util.*;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.Token;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
-
-/**
- * 
- * 
- */
 public class WikipediaDatasetCreatorMapper extends MapReduceBase implements
     Mapper<Text, Text, Text, Text> {
 
-  static HashSet<String> countries = null;
+  static Set<String> countries = null;
 
   
   @SuppressWarnings("deprecation")
@@ -55,7 +57,7 @@
     
     String country = getCountry(categories);
     
-    if(country != "Unknown"){
+    if(!country.equals("Unknown")){
       document = StringEscapeUtils.unescapeHtml(document.replaceFirst("<text xml:space=\"preserve\">", "").replaceAll("</text>", ""));
       TokenStream stream = analyzer.tokenStream(country, new StringReader(document));
       while(true){
@@ -68,7 +70,7 @@
     }
   }
   
-  public String getCountry(HashSet<String> categories)
+  public String getCountry(Set<String> categories)
   {
     for(String category : categories)
     {
@@ -85,7 +87,7 @@
   public List<String> findAllCategories(String document){
     List<String> categories =  new ArrayList<String>();
     int startIndex = 0;
-    int categoryIndex = -1;
+    int categoryIndex;
     
     while((categoryIndex = document.indexOf("[[Category:", startIndex))!=-1)
     {
@@ -107,7 +109,7 @@
       if(countries ==null){
         countries = new HashSet<String>();
 
-        DefaultStringifier<HashSet<String>> setStringifier = new DefaultStringifier<HashSet<String>>(job,GenericsUtil.getClass(countries));
+        DefaultStringifier<Set<String>> setStringifier = new DefaultStringifier<Set<String>>(job,GenericsUtil.getClass(countries));
 
         String countriesString = setStringifier.toString(countries);  
         countriesString = job.get("wikipedia.countries", countriesString);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaXmlSplitter.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaXmlSplitter.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaXmlSplitter.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaXmlSplitter.java Sat Aug 23 09:48:28 2008
@@ -17,24 +17,25 @@
  * limitations under the License.
  */
 
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
 import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.cli.Option;
-import java.io.*;
-import java.text.DecimalFormat;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.text.DecimalFormat;
 
-/**
- * 
- * 
- */
 public class WikipediaXmlSplitter {
 
   @SuppressWarnings("static-access")
-  public static void main(String[] args) throws IOException,
-      ClassNotFoundException, IllegalAccessException, InstantiationException {
+  public static void main(String[] args) throws Exception {
     Options options = new Options();
     Option dumpFileOpt = OptionBuilder.withLongOpt("dumpfile").isRequired().hasArg().withDescription("The path to the wikipedia dump file").create("d");
     options.addOption(dumpFileOpt);
@@ -42,7 +43,7 @@
     options.addOption(outputDirOpt);
     Option chunkSizeOpt = OptionBuilder.withLongOpt("chunkSize").isRequired().hasArg().withDescription("the Size of chunk in Megabytes").create("c");
     options.addOption(chunkSizeOpt);
-    CommandLine cmdLine = null;
+    CommandLine cmdLine;
     try {
       PosixParser parser = new PosixParser();
       cmdLine = parser.parse(options, args);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java Sat Aug 23 09:48:28 2008
@@ -23,7 +23,12 @@
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
-import org.apache.hadoop.mapred.*;
+import org.apache.hadoop.mapred.FileSplit;
+import org.apache.hadoop.mapred.InputSplit;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.RecordReader;
+import org.apache.hadoop.mapred.Reporter;
+import org.apache.hadoop.mapred.TextInputFormat;
 
 import java.io.IOException;
 
@@ -34,10 +39,6 @@
     public static final String START_TAG_KEY = "xmlinput.start";
     public static final String END_TAG_KEY = "xmlinput.end";
 
-    public void configure(JobConf jobConf) {
-        super.configure(jobConf);
-    }
-
     @SuppressWarnings("unchecked")
     public RecordReader getRecordReader(InputSplit inputSplit, JobConf jobConf, Reporter reporter) throws IOException {
         return new XmlRecordReader((FileSplit) inputSplit, jobConf);
@@ -49,7 +50,7 @@
         private long start;
         private long end;
         private FSDataInputStream fsin;
-        private DataOutputBuffer buffer = new DataOutputBuffer();
+        private final DataOutputBuffer buffer = new DataOutputBuffer();
 
         public XmlRecordReader(FileSplit split, JobConf jobConf) throws IOException {
             startTag = jobConf.get("xmlinput.start").getBytes("utf-8");

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java Sat Aug 23 09:48:28 2008
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.MapReduceBase;
@@ -29,6 +25,10 @@
 import org.apache.mahout.matrix.DenseVector;
 import org.apache.mahout.matrix.Vector;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 public class InputMapper extends MapReduceBase implements
     Mapper<LongWritable, Text, Text, Text> {
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/OutputMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/OutputMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/OutputMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/OutputMapper.java Sat Aug 23 09:48:28 2008
@@ -17,8 +17,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.MapReduceBase;
@@ -29,6 +27,8 @@
 import org.apache.mahout.matrix.AbstractVector;
 import org.apache.mahout.matrix.Vector;
 
+import java.io.IOException;
+
 public class OutputMapper extends MapReduceBase implements
     Mapper<LongWritable, Text, Text, Text> {
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/OutputMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/OutputMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/OutputMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/OutputMapper.java Sat Aug 23 09:48:28 2008
@@ -17,8 +17,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.MapReduceBase;
@@ -29,6 +27,8 @@
 import org.apache.mahout.matrix.AbstractVector;
 import org.apache.mahout.matrix.Vector;
 
+import java.io.IOException;
+
 public class OutputMapper extends MapReduceBase implements
     Mapper<LongWritable, Text, Text, Text> {
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java Sat Aug 23 09:48:28 2008
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.MapReduceBase;
@@ -30,6 +26,10 @@
 import org.apache.mahout.matrix.DenseVector;
 import org.apache.mahout.matrix.Vector;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 public class InputMapper extends MapReduceBase implements
     Mapper<LongWritable, Text, Text, Text> {
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java Sat Aug 23 09:48:28 2008
@@ -22,7 +22,6 @@
 import org.apache.hadoop.mapred.JobClient;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.mahout.clustering.meanshift.MeanShiftCanopyJob;
-import org.apache.mahout.clustering.syntheticcontrol.meanshift.InputDriver;
 
 import java.io.IOException;
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/OutputMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/OutputMapper.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/OutputMapper.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/OutputMapper.java Sat Aug 23 09:48:28 2008
@@ -17,8 +17,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
-
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.MapReduceBase;
 import org.apache.hadoop.mapred.Mapper;
@@ -27,6 +25,8 @@
 import org.apache.mahout.clustering.meanshift.MeanShiftCanopy;
 import org.apache.mahout.matrix.Vector;
 
+import java.io.IOException;
+
 public class OutputMapper extends MapReduceBase implements
     Mapper<Text, Text, Text, Text> {
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDCrossover.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDCrossover.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDCrossover.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDCrossover.java Sat Aug 23 09:48:28 2008
@@ -17,12 +17,12 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
+import org.uncommons.watchmaker.framework.operators.AbstractCrossover;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 
-import org.uncommons.watchmaker.framework.operators.AbstractCrossover;
-
 /**
  * Crossover operator.
  */

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFactory.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFactory.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFactory.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFactory.java Sat Aug 23 09:48:28 2008
@@ -17,10 +17,10 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
-import java.util.Random;
-
 import org.uncommons.watchmaker.framework.factories.AbstractCandidateFactory;
 
+import java.util.Random;
+
 /**
  * Factory used by Watchmaker to generate the initial population.
  */

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java Sat Aug 23 09:48:28 2008
@@ -17,12 +17,12 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
+import org.apache.hadoop.io.Writable;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hadoop.io.Writable;
-
 /**
  * Fitness of the class discovery problem. 
  */

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitnessEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitnessEvaluator.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitnessEvaluator.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitnessEvaluator.java Sat Aug 23 09:48:28 2008
@@ -17,15 +17,15 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.fs.Path;
 import org.apache.mahout.ga.watchmaker.STFitnessEvaluator;
 import org.apache.mahout.ga.watchmaker.cd.hadoop.CDMahoutEvaluator;
 import org.apache.mahout.ga.watchmaker.cd.hadoop.DatasetSplit;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Class Discovery Fitness Evaluator. Delegates to Mahout the task of evaluating
  * the fitness.

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDGA.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDGA.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDGA.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDGA.java Sat Aug 23 09:48:28 2008
@@ -17,10 +17,6 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.hadoop.fs.Path;
 import org.apache.mahout.ga.watchmaker.STEvolutionEngine;
 import org.apache.mahout.ga.watchmaker.STFitnessEvaluator;
@@ -37,6 +33,10 @@
 import org.uncommons.watchmaker.framework.selection.RouletteWheelSelection;
 import org.uncommons.watchmaker.framework.termination.GenerationCount;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Class Discovery Genetic Algorithm main class. Has the following parameters:
  * <ul>
@@ -63,10 +63,6 @@
  */
 public class CDGA {
 
-  /**
-   * @param args
-   * @throws IOException
-   */
   public static void main(String[] args) throws IOException {
     String dataset = "build/classes/wdbc";
     int target = 1;
@@ -90,7 +86,7 @@
       genCount = Integer.parseInt(args[8]);
     } else {
       System.out.println("Invalid arguments, working with default parameters instead");
-	}
+	  }
 
     long start = System.currentTimeMillis();
 
@@ -154,13 +150,13 @@
 
   static void printElapsedTime(long milli) {
     long seconds = milli / 1000;
-    milli = milli % 1000;
+    milli %= 1000;
 
     long minutes = seconds / 60;
-    seconds = seconds % 60;
+    seconds %= 60;
 
     long hours = minutes / 60;
-    minutes = minutes % 60;
+    minutes %= 60;
 
     System.out.println("Elapsed time (Hours:minutes:seconds:milli) : " + hours
         + ":" + minutes + ":" + seconds + ":" + milli);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDMutation.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDMutation.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDMutation.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDMutation.java Sat Aug 23 09:48:28 2008
@@ -17,12 +17,12 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
+import org.uncommons.watchmaker.framework.EvolutionaryOperator;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 
-import org.uncommons.watchmaker.framework.EvolutionaryOperator;
-
 /**
  * Mutation operator.
  */

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDRule.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDRule.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDRule.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDRule.java Sat Aug 23 09:48:28 2008
@@ -17,10 +17,10 @@
  * limitations under the License.
  */
 
-import java.util.Random;
-
 import org.uncommons.maths.binary.BitString;
 
+import java.util.Random;
+
 /**
  * Binary classification rule of the form:
  * 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/FileInfoParser.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/FileInfoParser.java?rev=688364&r1=688363&r2=688364&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/FileInfoParser.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/FileInfoParser.java Sat Aug 23 09:48:28 2008
@@ -17,13 +17,6 @@
 
 package org.apache.mahout.ga.watchmaker.cd;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Scanner;
-import java.util.StringTokenizer;
-
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -31,6 +24,13 @@
 import org.apache.mahout.ga.watchmaker.cd.DataSet.NominalAttr;
 import org.apache.mahout.ga.watchmaker.cd.DataSet.NumericalAttr;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Scanner;
+import java.util.StringTokenizer;
+
 /**
  * Initializes a DataSet using a special format file.<br>
  * The file contains for each attribute one of the following:<br>



Mime
View raw message