r65809 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65808‎ | r65809 | r65810 >
Date:13:16, 2 May 2010
Author:daniel
Status:deferred
Tags:
Comment:
make püroximity calculation optional
Modified paths:
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/BuildProximity.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/BuildProximity.java
@@ -19,10 +19,13 @@
2020 public BuildProximity() {
2121 super("BuildProximity", true, true);
2222 }
23 -
 23+
2424 @Override
2525 protected void declareOptions() {
2626 super.declareOptions();
 27+
 28+ args.declareHelp("<wiki>", null); //FIXME: remove!
 29+ args.declare("features-only", null, false, Boolean.class, "build feature vectors, but do not calculate proximity values.");
2730 }
2831
2932 //protected WikiWordConceptStoreBuilder<?> conceptStore;
@@ -40,12 +43,14 @@
4144 section("-- build features --------------------------------------------------");
4245 this.proximityStore.buildFeatures();
4346
44 - section("-- build base proximity --------------------------------------------------");
45 - this.proximityStore.buildBaseProximity();
46 -
47 - section("-- build extended proximity --------------------------------------------------");
48 - this.proximityStore.buildExtendedProximity();
49 -
 47+ if (!args.isSet("features-only")) {
 48+ section("-- build base proximity --------------------------------------------------");
 49+ this.proximityStore.buildBaseProximity();
 50+
 51+ section("-- build extended proximity --------------------------------------------------");
 52+ this.proximityStore.buildExtendedProximity();
 53+ }
 54+
5055 section("-- statistics --------------------------------------------------");
5156 conceptStore.getProximityStoreBuilder().dumpTableStats(out);
5257 }

Status & tagging log