Skip to content

summa_qa is not working #49

@nilanjansircar80

Description

@nilanjansircar80

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'
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions