You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by gs...@apache.org on 2009/06/18 02:33:13 UTC
svn commit: r785867 -
/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java
Author: gsingers
Date: Thu Jun 18 00:33:13 2009
New Revision: 785867
URL: http://svn.apache.org/viewvc?rev=785867&view=rev
Log:
MAHOUT-126: default Weight
Modified:
lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java
Modified: lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java?rev=785867&r1=785866&r2=785867&view=diff
==============================================================================
--- lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java (original)
+++ lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java Thu Jun 18 00:33:13 2009
@@ -80,7 +80,7 @@
abuilder.withName("dictOut").withMinimum(1).withMaximum(1).create()).
withDescription("The output of the dictionary").withShortName("t").create();
- Option weightOpt = obuilder.withLongName("weight").withRequired(true).withArgument(
+ Option weightOpt = obuilder.withLongName("weight").withRequired(false).withArgument(
abuilder.withName("weight").withMinimum(1).withMaximum(1).create()).
withDescription("The kind of weight to use. Currently TF or TFIDF").withShortName("w").create();
@@ -132,6 +132,8 @@
} else {
throw new OptionException(weightOpt);
}
+ } else {
+ weight = new TFIDF();
}
String field = cmdLine.getValue(fieldOpt).toString();
TermInfo termInfo = new CachedTermInfo(reader, field, 1, 99);