Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/builder/BuildStatistics.java |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | @Override |
25 | 25 | protected void declareOptions() { |
26 | 26 | super.declareOptions(); |
| 27 | + args.declare("no-term-stats", null, false, Boolean.class, "skip (slow) term frequency statistics."); |
27 | 28 | } |
28 | 29 | |
29 | 30 | //protected WikiWordConceptStoreBuilder<?> conceptStore; |
— | — | @@ -37,8 +38,13 @@ |
38 | 39 | |
39 | 40 | @Override |
40 | 41 | protected void run() throws Exception { |
41 | | - section("-- buildstats --------------------------------------------------"); |
42 | | - this.statisticsStore.buildStatistics(); |
| 42 | + if (!args.isSet("no-term-stats")) { |
| 43 | + section("-- term stats --------------------------------------------------"); |
| 44 | + this.statisticsStore.buildTermStatistics(); |
| 45 | + } |
| 46 | + |
| 47 | + section("-- concept stats --------------------------------------------------"); |
| 48 | + this.statisticsStore.buildConceptStatistics(); |
43 | 49 | |
44 | 50 | section("-- statistics --------------------------------------------------"); |
45 | 51 | conceptStore.getConceptStore().getStatisticsStore().dumpStatistics(getLogOutput()); |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DebugLocalConceptStoreBuilder.java |
— | — | @@ -255,10 +255,14 @@ |
256 | 256 | log("* prepareImport *"); |
257 | 257 | } |
258 | 258 | |
259 | | - public void buildStatistics() throws PersistenceException { |
260 | | - log("* buildStatistics *"); |
| 259 | + public void buildTermStatistics() throws PersistenceException { |
| 260 | + log("* buildTermStatistics *"); |
261 | 261 | } |
262 | 262 | |
| 263 | + public void buildConceptStatistics() throws PersistenceException { |
| 264 | + log("* buildConceptStatistics *"); |
| 265 | + } |
| 266 | + |
263 | 267 | public void clear() throws PersistenceException { |
264 | 268 | log("* clearStatistics *"); |
265 | 269 | } |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseStatisticsStoreBuilder.java |
— | — | @@ -55,10 +55,14 @@ |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
| 59 | + public void buildTermStatistics() throws PersistenceException { |
| 60 | + //noop |
| 61 | + } |
| 62 | + |
59 | 63 | /** |
60 | 64 | * Builds the statistics tables. For a specification of their content, refer to StatisticsStoreSchema |
61 | 65 | */ |
62 | | - public void buildStatistics() throws PersistenceException { |
| 66 | + public void buildConceptStatistics() throws PersistenceException { |
63 | 67 | if (beginTask("buildStatistics", "stats.prepareDegreeTable")) { |
64 | 68 | int n = prepareDegreeTable(); |
65 | 69 | endTask("buildStatistics", "stats.prepareDegreeTable", n+" entries"); |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/StatisticsStoreBuilder.java |
— | — | @@ -4,7 +4,9 @@ |
5 | 5 | |
6 | 6 | public interface StatisticsStoreBuilder extends WikiWordStoreBuilder { |
7 | 7 | |
8 | | - public void buildStatistics() throws PersistenceException; |
| 8 | + public void buildTermStatistics() throws PersistenceException; |
| 9 | + public void buildConceptStatistics() throws PersistenceException; |
| 10 | + |
9 | 11 | public void clear() throws PersistenceException; |
10 | 12 | |
11 | 13 | } |
\ No newline at end of file |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java |
— | — | @@ -1342,7 +1342,7 @@ |
1343 | 1343 | } |
1344 | 1344 | |
1345 | 1345 | @Override |
1346 | | - public void buildStatistics() throws PersistenceException { |
| 1346 | + public void buildTermStatistics() throws PersistenceException { |
1347 | 1347 | //TODO: characteristic path length and cluster coef |
1348 | 1348 | //TODO: stats about collocations |
1349 | 1349 | |
— | — | @@ -1355,11 +1355,14 @@ |
1356 | 1356 | buildDistributionStats("term zipf", termTable, "rank", "freq"); |
1357 | 1357 | endTask("buildStatistics", "stats.termZipf"); |
1358 | 1358 | } |
1359 | | - |
1360 | | - super.buildStatistics(); |
1361 | 1359 | } |
1362 | 1360 | |
| 1361 | + @Override |
| 1362 | + public void buildConceptStatistics() throws PersistenceException { |
| 1363 | + super.buildConceptStatistics(); |
| 1364 | + } |
1363 | 1365 | |
| 1366 | + |
1364 | 1367 | /** |
1365 | 1368 | * Builds term frequency statistics. |
1366 | 1369 | */ |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseGlobalConceptStoreBuilder.java |
— | — | @@ -915,13 +915,12 @@ |
916 | 916 | |
917 | 917 | protected DatabaseGlobalStatisticsStoreBuilder(StatisticsStoreSchema database, TweakSet tweaks, Agenda agenda) throws SQLException { |
918 | 918 | super(DatabaseGlobalConceptStoreBuilder.this, database, tweaks, agenda); |
919 | | - // TODO Auto-generated constructor stub |
920 | 919 | } |
921 | 920 | |
922 | 921 | @Override |
923 | | - public void buildStatistics() throws PersistenceException { |
924 | | - //TODO: node-degree stats, etc! |
925 | | - super.buildStatistics(); |
| 922 | + public void buildConceptStatistics() throws PersistenceException { |
| 923 | + //TODO: langlink-stats, etc |
| 924 | + super.buildConceptStatistics(); |
926 | 925 | } |
927 | 926 | |
928 | 927 | } |