Ejemplo n.º 1
0
 def test_evaluate(self):
     """Test that comparing an SDP graph against itself returns perfect F1"""
     for _, ref, sdp_id in read_test_sdp():
         scores = evaluate(ref, ref)
         self.assertAlmostEqual(scores.average_f1(), 1)
Ejemplo n.º 2
0
def evaluate_sdp(*args, **kwargs):
    from semstr.evaluation import sdp
    return sdp.evaluate(*args, **kwargs)
Ejemplo n.º 3
0
 def convert_and_evaluate(self, passage, ref):
     converted = to_sdp(passage)
     scores = evaluate(converted, ref)
     self.assertAlmostEqual(scores.average_f1(), 1, msg="\n" + "\n".join(converted))