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

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

Open
jpilaul opened this issue Nov 26, 2018 · 0 comments
Open

Comments

@jpilaul
Copy link

jpilaul commented Nov 26, 2018

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):
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