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

summa_qa is not working #49

Open
nilanjansircar80 opened this issue Nov 1, 2023 · 0 comments
Open

summa_qa is not working #49

nilanjansircar80 opened this issue Nov 1, 2023 · 0 comments

Comments

@nilanjansircar80
Copy link

nilanjansircar80 commented Nov 1, 2023

Hi,
I installed the package ang tried to the example code for summa_qa but it gives following error. Can you please help me with this error?
Code:

`from summ_eval.summa_qa_metric import QG_masked, QA_Metric
question_generator = QG_masked()

article = """Super Bowl 50 was an American football game to determine the champion of the National Football League (NFL) for the 2015 season. The American Football Conference (AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion Carolina Panthers 24–10 to earn their third Super Bowl title. The game was played on February 7, 2016, at Levi's Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th Super Bowl, the league emphasized the "golden anniversary" with various gold-themed initiatives, as well as temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (under which the game would have been known as "Super Bowl L"), so that the logo could prominently feature the Arabic numerals 50."""

masked_questions, answer_spans = question_generator.get_questions(article)
Error: AttributeError: 'str' object has no attribute 'sents'

File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/summ_eval/summa_qa_utils.py:92, in QG_masked.get_questions(self, text_input)
89 masked_questions = []
90 asws = []
---> 92 for sent in text_input.sents:
93 for ent in sent.ents:
94 id_start = ent.start_char - sent.start_char

AttributeError: 'str' object has no attribute 'sents'
`

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

No branches or pull requests

1 participant