File size: 260 Bytes
400b4d5
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
import evaluate
rouge_score = evaluate.load("rouge")

def get_rouge_scores(genererated_summary:str,reference_summary:str)->dict:

    rouge_result = rouge_score.compute(predictions=[genererated_summary], references=[reference_summary])

    return rouge_result