Skip to content

ImportError: cannot import name 'Rouge155' from 'pyrouge' (unknown location) #33

@Shanzaay

Description

@Shanzaay

I have installed pyrouge using this solution:
https://stackoverflow.com/questions/45894212/installing-pyrouge-gets-error-in-ubuntu

When executing the command :
python -m pyrouge.test

I am getting ok.

But when i import pyrouge like:
from pyrouge import Rouge155

I am getting the following error:
ImportError: cannot import name 'Rouge155' from 'pyrouge' (unknown location)

What is it that I am doing wrong?

Plus at readme file your wrote this script:
from pyrouge import Rouge155

r = Rouge155()
r.system_dir = 'path/to/system_summaries'
r.model_dir = 'path/to/model_summaries'
r.system_filename_pattern = 'some_name.(\d+).txt'
r.model_filename_pattern = 'some_name.[A-Z].#ID#.txt'

output = r.convert_and_evaluate()
print(output)
output_dict = r.output_to_dict(output)

Where am i suppose to add this code snippet in my code?

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