From b93fb5cc4de498abc66c0aaf6b67a6fea006e224 Mon Sep 17 00:00:00 2001 From: Neelkant Newra Date: Tue, 1 Jun 2021 13:05:12 +0530 Subject: [PATCH] Updated for ValueError: substring not found #78 --- pipelines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines.py b/pipelines.py index 2c9c681..4c26122 100644 --- a/pipelines.py +++ b/pipelines.py @@ -134,10 +134,10 @@ def _prepare_inputs_for_qg_from_answers_hl(self, sents, answers): for i, answer in enumerate(answers): if len(answer) == 0: continue for answer_text in answer: - sent = sents[i] + sent = sents[i].lower() sents_copy = sents[:] - answer_text = answer_text.strip() + answer_text = answer_text.strip().lower() ans_start_idx = sent.index(answer_text)