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