Skip to content

Commit

Permalink
Updated for ValueError: substring not found patil-suraj#78
Browse files Browse the repository at this point in the history
  • Loading branch information
neelkantnewra authored Jun 1, 2021
1 parent bffa0a5 commit b93fb5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b93fb5c

Please sign in to comment.