From 12df03471d3c35e7df96e0984f7243b0dfd048ab Mon Sep 17 00:00:00 2001 From: zhonghaoxi Date: Wed, 23 May 2018 16:14:55 +0800 Subject: [PATCH] fix --- judger/judger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/judger/judger.py b/judger/judger.py index 6470652..00cf849 100644 --- a/judger/judger.py +++ b/judger/judger.py @@ -23,7 +23,7 @@ def __init__(self, accusation_path, law_path): # Format the result generated by the Predictor class @staticmethod - def format_result(self, result): + def format_result(result): if not (type(result) is dict): return {"accusation": [], "articles": [], "imprisonment": -3} @@ -132,7 +132,7 @@ def gen_new_result(self, result, truth, label): # Calculate precision, recall and f1 value # According to https://github.com/dice-group/gerbil/wiki/Precision,-Recall-and-F1-measure @staticmethod - def get_value(self, res): + def get_value(res): if res["TP"] == 0: if res["FP"] == 0 and res["FN"] == 0: precision = 1.0