From 4bbad604ebddcb64f37e83cacbb54202ea4466e4 Mon Sep 17 00:00:00 2001 From: Lysandre Debut Date: Fri, 5 Feb 2021 11:40:30 +0100 Subject: [PATCH] Clarify QA pipeline output based on character (#10021) * Clarify QA pipeline output based on character * Style --- src/transformers/pipelines/question_answering.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transformers/pipelines/question_answering.py b/src/transformers/pipelines/question_answering.py index b03981cbda..e63d0d6ba9 100644 --- a/src/transformers/pipelines/question_answering.py +++ b/src/transformers/pipelines/question_answering.py @@ -196,8 +196,9 @@ class QuestionAnsweringPipeline(Pipeline): A :obj:`dict` or a list of :obj:`dict`: Each result comes as a dictionary with the following keys: - **score** (:obj:`float`) -- The probability associated to the answer. - - **start** (:obj:`int`) -- The start index of the answer (in the tokenized version of the input). - - **end** (:obj:`int`) -- The end index of the answer (in the tokenized version of the input). + - **start** (:obj:`int`) -- The character start index of the answer (in the tokenized version of the + input). + - **end** (:obj:`int`) -- The character end index of the answer (in the tokenized version of the input). - **answer** (:obj:`str`) -- The answer to the question. """ # Set defaults values