diff options
Diffstat (limited to 'spellchecker')
-rw-r--r-- | spellchecker/src/SpellCorrector.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spellchecker/src/SpellCorrector.java b/spellchecker/src/SpellCorrector.java index ab41c3d..3202949 100644 --- a/spellchecker/src/SpellCorrector.java +++ b/spellchecker/src/SpellCorrector.java @@ -234,7 +234,7 @@ public class SpellCorrector { // Now obtain n-gram probabilities. Use interpolation to combine // unigrams and bigrams. - p = LAMBDAS[0] * cr.getSmoothedCount(word); + p = LAMBDAS[0] * cr.getSmoothedCount(word) / cr.getUnigramCount(); // Add probability of bi-grams. // For words u and w, P(w|u) = P(u, w) / P(u). |