From bd345e8e2627b01d33fc5ba80b314a5b5c8f85c2 Mon Sep 17 00:00:00 2001 From: pietrzakkuba Date: Sun, 3 Apr 2022 15:27:51 +0200 Subject: [PATCH] 470628 --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 1117903..e447d1b 100644 --- a/run.py +++ b/run.py @@ -63,10 +63,10 @@ model_len = len(model) for index, words_1_3 in enumerate(model): if index % 100000 == 0: print(f'normalizacja: {index / model_len}') - occurences = sum(model[words_1_3].values()) + occurrences = sum(model[words_1_3].values()) for word_2 in model[words_1_3]: model[words_1_3][word_2] += alpha - model[words_1_3][word_2] /= float(occurences + alpha + len(word_2)) + model[words_1_3][word_2] /= float(occurrences + alpha + len(word_2)) make_prediction('test-A')