From 5c04dcd7c100df72003bd6a8922c7907b0301ba4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 25 Jul 2015 23:33:02 +0200 Subject: [PATCH] * Fix init_model --- bin/init_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/init_model.py b/bin/init_model.py index 31aac7ce8..4083f4a73 100644 --- a/bin/init_model.py +++ b/bin/init_model.py @@ -80,13 +80,13 @@ def _read_clusters(loc): def _read_probs(loc): if not loc.exists(): print("Warning: Probabilities file not found") - return {} + return {}, 0.0 probs = {} for i, line in enumerate(codecs.open(str(loc), 'r', 'utf8')): prob, word = line.split() prob = float(prob) probs[word] = prob - return probs + return probs, probs['-OOV-'] def _read_freqs(loc):