You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by ss...@apache.org on 2013/03/12 20:06:50 UTC
svn commit: r1455671 -
/mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
Author: ssc
Date: Tue Mar 12 19:06:49 2013
New Revision: 1455671
URL: http://svn.apache.org/r1455671
Log:
MAHOUT-1075 ClusterDumper output file should be optional
Modified:
mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
Modified: mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java?rev=1455671&r1=1455670&r2=1455671&view=diff
==============================================================================
--- mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java (original)
+++ mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java Tue Mar 12 19:06:49 2013
@@ -106,7 +106,7 @@ public final class ClusterDumper extends
public int run(String[] args) throws Exception {
addInputOption();
addOutputOption();
- addOption(OUTPUT_FORMAT_OPT, "of", "The optional output format to write the results as. Options: TEXT, CSV or GRAPH_ML", "TEXT");
+ addOption(OUTPUT_FORMAT_OPT, "of", "The optional output format for the results. Options: TEXT, CSV or GRAPH_ML", "TEXT");
addOption(SUBSTRING_OPTION, "b", "The number of chars of the asFormatString() to print");
addOption(NUM_WORDS_OPTION, "n", "The number of top terms to print");
addOption(POINTS_DIR_OPTION, "p",
@@ -117,7 +117,9 @@ public final class ClusterDumper extends
addOption(DICTIONARY_TYPE_OPTION, "dt", "The dictionary file type (text|sequencefile)", "text");
addOption(buildOption(EVALUATE_CLUSTERS, "e", "Run ClusterEvaluator and CDbwEvaluator over the input. The output will be appended to the rest of the output at the end.", false, false, null));
addOption(DefaultOptionCreator.distanceMeasureOption().create());
- if (parseArguments(args) == null) {
+
+ // output is optional, will print to System.out per default
+ if (parseArguments(args, false, true) == null) {
return -1;
}