Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseStatisticsStoreBuilder.java |
— | — | @@ -127,6 +127,8 @@ |
128 | 128 | // bias = 1 - ( log(d) / log(D) ) |
129 | 129 | |
130 | 130 | int numberOfConcepts = getNumberOfConcepts(); |
| 131 | + if (numberOfConcepts<=0) throw new PersistenceException("bad number of concepts: "+numberOfConcepts); |
| 132 | + |
131 | 133 | String bias = " 1 - ( log("+degreeField+") / "+Math.log(numberOfConcepts)+" )"; |
132 | 134 | |
133 | 135 | int n = buildDistributionCoefficient(biasField, degreeTable, biasField, bias, degreeField + " > 0"); |