def test_different_rouge(self): ref = "this is a string" self.assertDictClose(metrics.rouge([ref, ref], ["", ""]), { "rouge1": 0, "rouge2": 0, "rougeLsum": 0 })
def test_same_rouge(self): ref = "this is a string" self.assertDictClose(metrics.rouge([ref, ref], [ref, ref]), { "rouge1": 100, "rouge2": 100, "rougeLsum": 100 })