Open serenayj opened 2 years ago
Hi Yanjun,
There are two versions of ROUGE, one which is a wrapper around the original Perl implementation and one which is written (by me) in Python.
For the Perl version:
from sacrerouge.metrics import Rouge
metric = Rouge(compute_rouge_l=True)
results = metric.score("The summary to score", ["The list of references"])
There are different methods for scoring depending on whether you have multiple summaries, etc. The information is here.
The Python version is basically identical, except there's a different class you use:
from sacrerouge.metrics import PythonRouge
metric = PythonRouge(compute_rouge_l=True)
It has the same scoring functions as the Perl version.
Hope this helps!
Hi Daniel,
Kudos to the wonderful pacakge! I wonder how to use Rouge-L under the python interface, i.e. the example you shown in the tutorial. Thanks!