summaryrefslogtreecommitdiff
path: root/spellchecker/src/SpellCorrector.java
diff options
context:
space:
mode:
Diffstat (limited to 'spellchecker/src/SpellCorrector.java')
-rw-r--r--spellchecker/src/SpellCorrector.java2
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).