From b6f858fa1e5b9d7a3f2d0afe9b98d0be2bf82fc0 Mon Sep 17 00:00:00 2001 From: alesad7 Date: Sun, 3 Apr 2022 22:36:26 +0200 Subject: [PATCH] 434780 --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index d8f7cab..8c8ccbf 100644 --- a/run.py +++ b/run.py @@ -35,7 +35,7 @@ def predict(before, after): prob += value result += f'{key}:{value} ' if prob == 0.0: - return 'to:0.02 be:0.02 the:0.02 or:0.01 not:0.01 and:0.01 a:0.01 :0.9' + return 'to:0.015 be:0.015 the:0.015 not:0.01 and:0.02 a:0.02 :0.9' result += f':{max(1 - prob, 0.01)}' return result @@ -46,7 +46,7 @@ def make_prediction(file): for _, row in data.iterrows(): before, after = word_tokenize(data_preprocessing(str(row[6]))), word_tokenize(data_preprocessing(str(row[7]))) if len(before) < 3 or len(after) < 3: - prediction = 'to:0.02 be:0.02 the:0.02 or:0.01 not:0.01 and:0.01 a:0.01 :0.9' + prediction = 'to:0.015 be:0.015 the:0.015 not:0.01 and:0.02 a:0.02 :0.9' else: prediction = predict(before[-1], after[0]) file_out.write(prediction + '\n')