preprocess_pubmedqa.py 183 Bytes
Newer Older
Ethan Smith's avatar
Ethan Smith committed
1
def doc_to_text(doc) -> str:
2
    ctxs = "\n".join(doc["CONTEXTS"])
3
    return "Abstract: {}\nQuestion: {}\nAnswer:".format(
4
        ctxs, doc["QUESTION"], doc["final_decision"]
5
    )