Skip to content

Conversation

@ZZZZkp
Copy link

@ZZZZkp ZZZZkp commented Apr 5, 2024

Nlp hasn't been updated in a long time and conflicts with the latest dill. So I replaced nlp with datasets. Now it can preprocess the data correctly.

@terry07
Copy link

terry07 commented Jul 18, 2024

Thanks @ZZZZkp for that fix. However, the question_generation.ipynb file still does not work, returning the next message:

`ValueError Traceback (most recent call last)
in <cell line: 1>()
----> 1 nlp(text3)

1 frames
/content/question_generation/pipelines.py in _prepare_inputs_for_qg_from_answers_hl(self, sents, answers)
140 answer_text = answer_text.strip()
141
--> 142 ans_start_idx = sent.index(answer_text)
143
144 sent = f"{sent[:ans_start_idx]} {answer_text} {sent[ans_start_idx + len(answer_text): ]}"

ValueError: substring not found`

Do you have any remedy here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants