diff --git a/docs/en/api/metrics.rst b/docs/en/api/metrics.rst index ab7bb3f7..f3e287ba 100644 --- a/docs/en/api/metrics.rst +++ b/docs/en/api/metrics.rst @@ -49,3 +49,4 @@ Metrics DOTAMeanAP ROUGE KeypointEndPointError + OneMinusNormEditDistance diff --git a/docs/zh_cn/api/metrics.rst b/docs/zh_cn/api/metrics.rst index ab7bb3f7..f3e287ba 100644 --- a/docs/zh_cn/api/metrics.rst +++ b/docs/zh_cn/api/metrics.rst @@ -49,3 +49,4 @@ Metrics DOTAMeanAP ROUGE KeypointEndPointError + OneMinusNormEditDistance diff --git a/tests/test_metrics/test_one_minus_norm_edit_distance.py b/tests/test_metrics/test_one_minus_norm_edit_distance.py index 3582d7db..e488f928 100644 --- a/tests/test_metrics/test_one_minus_norm_edit_distance.py +++ b/tests/test_metrics/test_one_minus_norm_edit_distance.py @@ -15,3 +15,8 @@ def test_one_minus_norm_edit_distance_metric(letter_case, expected): metric = OneMinusNormEditDistance(letter_case=letter_case) res = metric(['helL', 'HEL'], ['hello', 'HELLO']) assert abs(res['1-N.E.D'] - expected) < 1e-7 + metric.reset() + for pred, label in zip(['helL', 'HEL'], ['hello', 'HELLO']): + metric.add([pred], [label]) + res = metric.compute() + assert abs(res['1-N.E.D'] - expected) < 1e-7