theekshana's picture
rouge score
400b4d5
raw
history blame contribute delete
260 Bytes
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