Closed sefeoglu closed 1 month ago
Hi, Some of wikipedia context is an empty list, so this should be checked. You can fix it with following lines:
wiki_context = "" for wiki_text in example['wiki_data']: # sentences = ['. '.join(list(item.values())) for item in wiki_text] if len(wiki_text)>0: sentences=str(wiki_text).split('.') wiki_evidence = evidence_sentence_selection( example['question'], sentences, conserved_percentage=0.2, max_num=40 ) wiki_context = '. '.join(wiki_evidence)
Best,
https://github.com/nikolas-rauscher/ARDI-Scholarly-QALD/blob/cf7d8b84c78f4a011c95bc2bfedd30e9346bb166/src/models/prepare_prompts_context.py#L47-L54
Hi, Some of wikipedia context is an empty list, so this should be checked. You can fix it with following lines:
Best,
https://github.com/nikolas-rauscher/ARDI-Scholarly-QALD/blob/cf7d8b84c78f4a011c95bc2bfedd30e9346bb166/src/models/prepare_prompts_context.py#L47-L54