Skip to content

Reference summary list structure not accessed correctly in for loop #32

Description

@jpilaul

in lines https://github.com/tagucci/pythonrouge/blob/master/pythonrouge/pythonrouge.py#L159-L165, the for loop accesses references before individual summaries. You have:

for j, ref in enumerate(self.reference):
    for k, doc in enumerate(ref):

Since,

reference = [
[[summaryA_ref1_sent1, summaryA_ref1_sent2], [summaryA_ref2_sent1,  summaryA_ref2_sent2]], 
[[summaryB_ref1_sent1, summaryB_ref1_sent2], [summaryB_ref2_sent1, summaryB_ref2_sent2]]
]

your for loop should access summaries first such that:

for k, doc in enumerate(self.reference):
    for j, ref in enumerate(doc):

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions