def rouge_1(hypotheses, references):
    """
    Calculate ROUGE-1 F1, precision, recall scores
    """
    rouge_1 = [
        rouge_n([hyp], [ref], 1) for hyp, ref in zip(hypotheses, references)
    ]
    rouge_1_f, _, _ = map(np.mean, zip(*rouge_1))
    return rouge_1_f
def rouge_1 ( hypotheses , references ) : rouge_1 = [ rouge_n ( [ hyp ] , [ ref ] , 1 ) for hyp , ref in zip ( hypotheses , references ) ] rouge_1_f , _ , _ = map ( np . mean , zip ( * rouge_1 ) ) return rouge_1_f
Calculate ROUGE-1 F1, precision, recall scores