diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-04-02 11:41:02 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-04-02 11:41:02 +0200 |
commit | a9839f2a780c9ddf117ad3cf39daadd5333112ee (patch) | |
tree | 51e914197d31614f667645534abb939a87631e56 | |
parent | be34f8b98aa4942953deb383ea61156ee1bf20b1 (diff) | |
download | assignment4-a9839f2a780c9ddf117ad3cf39daadd5333112ee.tar.gz |
bigram smooth tweak
-rw-r--r-- | spellchecker/src/CorpusReader.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spellchecker/src/CorpusReader.java b/spellchecker/src/CorpusReader.java index 8281210..686f243 100644 --- a/spellchecker/src/CorpusReader.java +++ b/spellchecker/src/CorpusReader.java @@ -119,7 +119,8 @@ public class CorpusReader { // probability as result. if (NGram.indexOf(' ') != -1) { // bigram, must be the nominator - smoothedCount += 1; + // we do not have a lot of bigrams + smoothedCount += .01; } else { // unigram, must be the denominator smoothedCount += 1; |