Skip to content

Commit

Permalink
Fix naming of offset in answers of TransformersReader (for consistenc…
Browse files Browse the repository at this point in the history
…y with FARMReader) (#204)
  • Loading branch information
guillim authored Jul 7, 2020
1 parent b4f4388 commit 9733e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haystack/reader/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def predict(self, question: str, documents: List[Document], top_k: Optional[int]
answers.append({
"answer": pred["answer"],
"context": doc.text[context_start:context_end],
"offset_answer_start": pred["start"],
"offset_answer_end": pred["end"],
"offset_start": pred["start"],
"offset_end": pred["end"],
"probability": pred["score"],
"score": None,
"document_id": doc.id,
Expand Down

0 comments on commit 9733e0b

Please sign in to comment.