Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #15 from jakemannix/fix_vectordump

Fix vectordump
  • Loading branch information...
commit 5f43cc7a3a60789b948b4a675e63d68d9652944c 2 parents f4170fc + 627ff9f
@jakemannix authored
View
11 integration/src/main/java/org/apache/mahout/utils/vectors/VectorDumper.java
@@ -88,9 +88,10 @@ public int run(String[] args) throws Exception {
addOption("sizeOnly", "sz", "Dump only the size of the vector", false);
addOption("numItems", "ni", "Output at most <n> vecors", false);
addOption("vectorSize", "vs", "Truncate vectors to <vs> length when dumping (most useful when in"
- + " conjunction with -sort", false);
- addOption(buildOption("filter", "fi", "Only dump out those vectors whose name matches the filter." +
- " Multiple items may be specified by repeating the argument.", true, 1, 100, false, null));
+ + " conjunction with -sort", "100");
+ // temporarily comment out the "filter" option, as it makes help formatting broken
+// addOption(buildOption("filter", "fi", "Only dump out those vectors whose name matches the filter." +
+// " Multiple items may be specified by repeating the argument.", true, 1, 100, false, null));
if (parseArguments(args, false, true) == null) {
return -1;
@@ -176,8 +177,8 @@ public int run(String[] args) throws Exception {
writer.append("#Max Items to dump: ").append(String.valueOf(numItems)).append('\n');
}
}
- int maxIndexesPerVector = hasOption("numIndexesPerVector")
- ? Integer.parseInt(getOption("numIndexesPerVector").toString())
+ int maxIndexesPerVector = hasOption("vectorSize")
+ ? Integer.parseInt(getOption("vectorSize").toString())
: Integer.MAX_VALUE;
long itemCount = 0;
int fileCount = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.