preprocess_pubmedqa.py 169 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
5
        ctxs,
        doc["QUESTION"],
6
    )