def compute_score()

in DianJin-R1/src/rl/reward_score_cflue.py [0:0]


def compute_score(data_source, solution_str, ground_truth, extra_info=None):
    answer = extract_answer(solution_str)
    if answer is None:
        return 0.0
    else:
        gt = get_choices(ground_truth)
        if answer == gt:
            return 1.0
        else:
            return 0.0