From 4ea98b2ad8f40800e0219c8543d931e27a638e5e Mon Sep 17 00:00:00 2001 From: Devrim <46989091+devrimcavusoglu@users.noreply.github.com> Date: Wed, 21 Sep 2022 16:09:18 +0300 Subject: [PATCH] WER & CER Test outputs corrected. (#114) - unbabel-comet is updated to more recent version. --- requirements-dev.txt | 1 - setup.py | 1 + .../expected_outputs/metrics/test_cer.json | 16 ++++++++-------- .../expected_outputs/metrics/test_wer.json | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 381a21c..c0aed03 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,6 @@ # Jury metrics # Falling back to fork for Windows related issue: https://github.com/google-research/bleurt/issues/49 bleurt @ git+https://github.com/devrimcavusoglu/bleurt.git -unbabel-comet @ git+https://github.com/Unbabel/COMET.git@c772b679e20725e6cc79b2107d50594f9ea7a4ae # for datasets metric test math_equivalence @ git+https://github.com/hendrycks/math.git diff --git a/setup.py b/setup.py index bf4fa0a..94caa1f 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,7 @@ def add_pywin(reqs: List[str]) -> None: "jiwer>=2.3.0", "seqeval==1.2.2", "sentencepiece==0.1.96", + "unbabel-comet>=1.1.2", ] _METRIC_REQUIREMENTS.extend(_PRISM_REQUIREMENTS) diff --git a/tests/test_data/expected_outputs/metrics/test_cer.json b/tests/test_data/expected_outputs/metrics/test_cer.json index 9dc0497..316cd08 100644 --- a/tests/test_data/expected_outputs/metrics/test_cer.json +++ b/tests/test_data/expected_outputs/metrics/test_cer.json @@ -31,10 +31,10 @@ "cer": { "score": 0.7272727272727273, "overall": { - "substitutions": 6.25, - "deletions": 5.5, - "insertions": 1.5, - "hits": 16.25 + "substitutions": 4.75, + "deletions": 6.25, + "insertions": 2.25, + "hits": 17.0 } } }, @@ -44,10 +44,10 @@ "cer": { "score": 0.8484848484848485, "overall": { - "substitutions": 6.625, - "deletions": 3.875, - "insertions": 3.625, - "hits": 17.5 + "substitutions": 5.125, + "deletions": 4.625, + "insertions": 4.375, + "hits": 18.25 } } } diff --git a/tests/test_data/expected_outputs/metrics/test_wer.json b/tests/test_data/expected_outputs/metrics/test_wer.json index 7be8e5f..b69b3f1 100644 --- a/tests/test_data/expected_outputs/metrics/test_wer.json +++ b/tests/test_data/expected_outputs/metrics/test_wer.json @@ -31,10 +31,10 @@ "wer": { "score": 1.0, "overall": { - "substitutions": 3.25, - "deletions": 0.5, - "insertions": 0.25, - "hits": 2.0 + "substitutions": 2.75, + "deletions": 0.75, + "insertions": 0.5, + "hits": 2.25 } } }, @@ -44,10 +44,10 @@ "wer": { "score": 1.2, "overall": { - "substitutions": 3.0, - "deletions": 0.375, - "insertions": 0.625, - "hits": 2.375 + "substitutions": 2.75, + "deletions": 0.5, + "insertions": 0.75, + "hits": 2.5 } } }