(question, answer, cluster_chain_of_entities, file_name)
| 154 | |
| 155 | |
| 156 | def save_2_jsonl(question, answer, cluster_chain_of_entities, file_name): |
| 157 | dict = {"question":question, "results": answer, "reasoning_chains": cluster_chain_of_entities} |
| 158 | with open("ToG_{}.jsonl".format(file_name), "a") as outfile: |
| 159 | json_str = json.dumps(dict) |
| 160 | outfile.write(json_str + "\n") |
| 161 | |
| 162 | |
| 163 | def extract_answer(text): |
no test coverage detected