Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLEU and chrF2 on Chinese #240

Open
zhhl9101 opened this issue Sep 19, 2023 · 1 comment
Open

BLEU and chrF2 on Chinese #240

zhhl9101 opened this issue Sep 19, 2023 · 1 comment

Comments

@zhhl9101
Copy link

In [1]: from sacrebleu.metrics import BLEU, CHRF
...: refs = [["请关掉灯光。"]]
...: sys = ["请关闭灯光。"]
In [2]: bleu = BLEU(trg_lang="zh")
In [3]: bleu.corpus_score(sys, refs)
Out[3]: BLEU = 37.99 83.3/60.0/25.0/16.7 (BP = 1.000 ratio = 1.000 hyp_len = 6 ref_len = 6)
In [4]: bleu.get_signature()
Out[4]: nrefs:1|case:mixed|eff:no|tok:zh|smooth:exp|version:2.3.1
In [5]: chrf = CHRF()
In [6]: chrf_score = chrf.corpus_score(sys, refs)
In [7]: print(chrf_score)
Out[7]: chrF2 = 28.06

BLEU score 37.99 and chrF2 score 28.06, these two values ​​do not really reflect the close relationship between refs and sys.
What the more appropriate usage on Chinese?

@lxz1998
Copy link

lxz1998 commented Jul 6, 2024

正常人只说"请关下灯",如果需要在"请关掉灯光。"和"请关闭灯光。"里选一个关掉会比关闭更口语化一点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants