143b62d
1
2
3
4
5
6
from rouge_score import rouge_scorer scorer = rouge_scorer.RougeScorer(['rougeL'], use_stemmer=True) def metric_rouge_score(pred, ref): return scorer.score(pred, ref)['rougeL'].fmeasure