From 9534d336ed96bb3ae82aad0b448c7f9bc1bdc245 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 5 Jul 2015 11:31:07 +0200 Subject: [PATCH] * Ensure word senses are loaded, even if not in probabilities file --- 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 449dd5c02..bedd61252 100644 --- a/bin/init_model.py +++ b/bin/init_model.py @@ -110,7 +110,7 @@ def setup_vocab(src_dir, dst_dir): lexicon = [] for word, prob in reversed(sorted(probs.items(), key=lambda item: item[1])): entry = get_lex_props(word) - if word in clusters or float(prob) >= -17: + if word in clusters or word in senses or float(prob) >= -17: entry['prob'] = float(prob) cluster = clusters.get(word, '0') # Decode as a little-endian string, so that we can do & 15 to get