Esempio n. 1
0
def main():
    save_dir = os.path.join(output_path, "pc_qc")
    exist_or_mkdir(save_dir)
    for split in splits:
        queries = get_qck_queries(split)
        eval_candidate = get_eval_candidates_as_qck(split)
        save_path = os.path.join(save_dir, split)
        make_pc_qc(queries, eval_candidate, is_correct_factory(), save_path)
Esempio n. 2
0
def main():
    save_dir = os.path.join(output_path, "pc_qc4")
    exist_or_mkdir(save_dir)
    split_filename = split_name2
    for split in splits:
        qids: Iterable[str] = get_qids_for_split(split_filename, split)
        queries = get_qck_queries_from_cids(lmap(int, qids))
        eval_candidate = get_qck_candidate_for_split(split_filename, split)
        save_path = os.path.join(save_dir, split)
        make_pc_qc(queries, eval_candidate, is_correct_factory(), save_path)
Esempio n. 3
0
def main():
    save_dir = os.path.join(output_path, "pc_qc2")
    exist_or_mkdir(save_dir)
    for split in splits:
        queries = get_qck_queries(split)
        q_res_path = os.path.join("output",
                                  "perspective_experiments",
                                  "q_res_{}.txt".format(split))
        eval_candidate = get_qck_candidate_from_ranked_list_path(q_res_path)
        save_path = os.path.join(save_dir, split)
        make_pc_qc(queries, eval_candidate, is_correct_factory(), save_path)