in exec_application_eval.py [0:0]
def get_application_score(args):
_path = args.save_result_dir
file_path = f'{_path}/{args.model_name}_application_result.json'
result = {}
print('Model: %s' % args.model_name)
# QA
rouge_l, qa_bert = compute_finqa(file_path)
result['QA'] = {'rouge-L': rouge_l,
'Bert': qa_bert}
# TG
rouge_l_tg, _, tg_bert, _ = compute_text_generation(file_path)
result['TG'] = {'rouge-L': rouge_l_tg,
'Bert': tg_bert}
# MT-e2zh
bleu, comet = compute_nmt_en2zh(file_path)
result['MT-e2zh'] = {'BLEU': bleu,
'COMET': comet}
# MT-zh2e
bleu, comet = compute_nmt_zh2en(file_path)
result['MT-zh2e'] = {'BLEU': bleu,
'COMET': comet}
# TC
acc, _ = compute_text_classification(file_path)
result['TC'] = {'ACC': acc}
# RE
f1, _ = compute_extraction(file_path)
result['RE'] = {'F1-score': f1}