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

[Bug] BLEUScorer uses wrong default tokenizer. #49

Open
landert opened this issue Apr 29, 2021 · 0 comments
Open

[Bug] BLEUScorer uses wrong default tokenizer. #49

landert opened this issue Apr 29, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@landert
Copy link

landert commented Apr 29, 2021

🐛 Bug

vizseq.scorers.bleu.BLEUScorer does not use Tokenizer13a by default. When I look at the code, it looks like it should be used by default. sacrebleu library uses the Tokenizer13a by default as well.

To reproduce

Minimal Code/Config snippet to reproduce

import vizseq

scorer = vizseq.scorers.bleu.BLEUScorer()
print(scorer.score(["This is really nice."], [["That's really nice."]]))
# corpus_score = 31.947

scorer = vizseq.scorers.bleu.BLEUScorer(extra_args={'tokenizer': '13a'})
print(scorer.score(["This is really nice."], [["That's really nice."]]))
# corpus_score = 39.764

Stack trace/error message

The problem is here. Variable tokenizer is set to string none. When calling method get_default_args (here), default value 13a for parameter tokenize is not used, because the string none is passed.

Expected Behavior

vizseq.scorers.bleu.BLEUScorer should use Tokenizer13a by default.

System information

  • vizseq==0.1.15
  • python==3.7.3
  • macOS
@landert landert added the bug Something isn't working label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant