From 77c6dfe723b02dac529160912232102f94b81daf Mon Sep 17 00:00:00 2001 From: ligen1 Date: Tue, 3 May 2022 19:54:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E6=8C=87=E6=A0=87=E7=9A=84=E7=B4=A2=E5=BC=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/metric.py | 2 +- src/prepare_for_upload.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/metric.py b/src/metric.py index ddcd8c9..aa3feb0 100644 --- a/src/metric.py +++ b/src/metric.py @@ -127,7 +127,7 @@ def compute_detect_correct_label_list(src_text, trg_text): if tag == 'replace': for count, src_i in enumerate(range(src_i1, src_i2)): - trg_token = trg_text[src_i+count] + trg_token = trg_text[trg_i1+count] detect_ref_list.append(src_i) correct_ref_list.append((src_i, trg_token)) diff --git a/src/prepare_for_upload.py b/src/prepare_for_upload.py index 1dbd0ed..7e725a6 100644 --- a/src/prepare_for_upload.py +++ b/src/prepare_for_upload.py @@ -22,7 +22,7 @@ def prepare_for_uploadfile(in_model_dir, if __name__ == '__main__': prepare_for_uploadfile( - in_model_dir='model/ctc_train_2022Y04M27D16H/epoch4,step1,testf1_25_3%,devf1_23_53%', - in_json_file='data/preliminary_data/preliminary_test_source.json', - out_json_file='data/preliminary_test_inference.json' + in_model_dir='model/model/ctc_train_2022Y04M27D16H/epoch2,step11,testf1_46_37%,devf1_26_66%', + in_json_file='data/preliminary_data/preliminary_b_test_source.json', + out_json_file='data/preliminary_b_test_inference.json' ) \ No newline at end of file