Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use datasets instead of nlp. And add requirements.txt. #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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