Add document meta for Transformer Reader (#114)

This commit is contained in:
Stan Kirdey 2020-05-18 06:31:54 -07:00 committed by GitHub
parent bf8e506c45
commit f4455ee42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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