Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseProximityStoreBuilder.java |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | * Builds feature vectors. For a specification, refer to ProximityStoreSchema |
125 | 125 | */ |
126 | 126 | protected int buildFeatures(DatabaseTable t, String conceptField, String featureField, ConceptSetRestriction restriction, double w, String baseBiasField, double baseBiasCoef, String targetBiasField, double targetBiasCoef) throws PersistenceException { |
127 | | - if (!conceptStore.areStatsComplete()) throw new IllegalStateException("statistics need to be built before concept infos!"); |
| 127 | + if (!conceptStore.areStatsComplete()) throw new IllegalStateException("statistics need to be built before feature sets!"); |
128 | 128 | |
129 | 129 | String v = ""+w; |
130 | 130 | if (baseBiasField!=null && baseBiasCoef>0) v = getBiasFormula("B."+baseBiasField, baseBiasCoef) + " * " + v; |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | String update = " ON DUPLICATE KEY UPDATE total_weight = total_weight + VALUES(total_weight)"; |
143 | 143 | |
144 | 144 | int n = restriction==null || restriction.doChunk () |
145 | | - ? executeChunkedUpdate("buildFeatures", "feature#"+t.getName()+"."+featureField, sql, update, t, conceptField) |
| 145 | + ? executeChunkedUpdate("buildFeatures", "feature#"+t.getName()+"."+featureField, sql, update, t, conceptField, 20) |
146 | 146 | : executeUpdate("buildFeatures::feature#"+t.getName()+"."+featureField, sql+" "+update); |
147 | 147 | |
148 | 148 | return n; |
Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/ProximityStoreBuilder.java |
— | — | @@ -74,20 +74,20 @@ |
75 | 75 | } |
76 | 76 | |
77 | 77 | public ProximityParameters(Map<?, ?> params, ProximityParameters defaults) { |
78 | | - selfWeight = params.containsKey("selfWeight") ? ((Number)params.get("proximity.selfWeight")).doubleValue() : defaults.selfWeight; |
79 | | - proximityThreshold = params.containsKey("threshold") ? ((Number)params.get("proximity.threshold")).doubleValue() : defaults.proximityThreshold; |
| 78 | + selfWeight = params.containsKey("selfWeight") ? ((Number)params.get("selfWeight")).doubleValue() : defaults.selfWeight; |
| 79 | + proximityThreshold = params.containsKey("threshold") ? ((Number)params.get("threshold")).doubleValue() : defaults.proximityThreshold; |
80 | 80 | |
81 | | - downWeight = params.containsKey("downWeight") ? ((Number)params.get("proximity.downWeight")).doubleValue() : defaults.downWeight; |
82 | | - downBiasCoef = params.containsKey("downBiasCoef") ? ((Number)params.get("proximity.downBiasCoef")).doubleValue() : defaults.downWeight; |
| 81 | + downWeight = params.containsKey("downWeight") ? ((Number)params.get("downWeight")).doubleValue() : defaults.downWeight; |
| 82 | + downBiasCoef = params.containsKey("downBiasCoef") ? ((Number)params.get("downBiasCoef")).doubleValue() : defaults.downWeight; |
83 | 83 | |
84 | | - upWeight = params.containsKey("upWeight") ? ((Number)params.get("proximity.upWeight")).doubleValue() : defaults.upWeight; |
85 | | - upBiasCoef = params.containsKey("upBiasCoef") ? ((Number)params.get("proximity.upBiasCoef")).doubleValue() : defaults.upBiasCoef; |
| 84 | + upWeight = params.containsKey("upWeight") ? ((Number)params.get("upWeight")).doubleValue() : defaults.upWeight; |
| 85 | + upBiasCoef = params.containsKey("upBiasCoef") ? ((Number)params.get("upBiasCoef")).doubleValue() : defaults.upBiasCoef; |
86 | 86 | |
87 | | - inWeight = params.containsKey("inWeight") ? ((Number)params.get("proximity.inWeight")).doubleValue() : defaults.inWeight; |
88 | | - inBiasCoef = params.containsKey("inBiasCoef") ? ((Number)params.get("proximity.inBiasCoef")).doubleValue() : defaults.inBiasCoef; |
| 87 | + inWeight = params.containsKey("inWeight") ? ((Number)params.get("inWeight")).doubleValue() : defaults.inWeight; |
| 88 | + inBiasCoef = params.containsKey("inBiasCoef") ? ((Number)params.get("inBiasCoef")).doubleValue() : defaults.inBiasCoef; |
89 | 89 | |
90 | | - outWeight = params.containsKey("outWeight") ? ((Number)params.get("proximity.outWeight")).doubleValue() : defaults.outWeight; |
91 | | - outBiasCoef = params.containsKey("outBiasCoef") ? ((Number)params.get("proximity.outBiasCoef")).doubleValue() : defaults.outBiasCoef; |
| 90 | + outWeight = params.containsKey("outWeight") ? ((Number)params.get("outWeight")).doubleValue() : defaults.outWeight; |
| 91 | + outBiasCoef = params.containsKey("outBiasCoef") ? ((Number)params.get("outBiasCoef")).doubleValue() : defaults.outBiasCoef; |
92 | 92 | } |
93 | 93 | } |
94 | 94 | |