From f4455ee42facc96db8fc43f94038d6be8f05530f Mon Sep 17 00:00:00 2001 From: Stan Kirdey Date: Mon, 18 May 2020 06:31:54 -0700 Subject: [PATCH] Add document meta for Transformer Reader (#114) --- haystack/reader/transformers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haystack/reader/transformers.py b/haystack/reader/transformers.py index 7f53eb9a1..e362637be 100644 --- a/haystack/reader/transformers.py +++ b/haystack/reader/transformers.py @@ -87,7 +87,8 @@ class TransformersReader: "offset_answer_end": pred["end"], "probability": pred["score"], "score": None, - "document_id": doc.id + "document_id": doc.id, + "meta": doc.meta }) # sort answers by their `probability` and select top-k