From 3c210f45fadd1134f1efa3eaabf9e48620212040 Mon Sep 17 00:00:00 2001 From: Yaser Martinez Palenzuela Date: Thu, 17 Mar 2016 12:19:52 +0100 Subject: [PATCH] make use of log_smooth_count --- bin/init_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/init_model.py b/bin/init_model.py index 19cfcdc25..b14015b39 100644 --- a/bin/init_model.py +++ b/bin/init_model.py @@ -129,7 +129,7 @@ def _read_freqs(loc, max_length=100, min_doc_freq=0, min_freq=200): word = key smooth_count = counts.smoother(int(freq)) log_smooth_count = math.log(smooth_count) - probs[word] = math.log(smooth_count) - log_total + probs[word] = log_smooth_count - log_total oov_prob = math.log(counts.smoother(0)) - log_total return probs, oov_prob