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

Verbosity #69

Closed
mjpost opened this issue Sep 18, 2019 · 4 comments
Closed

Verbosity #69

mjpost opened this issue Sep 18, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@mjpost
Copy link

mjpost commented Sep 18, 2019

It seems that the command line always prints a progress bar. I suggest one of the following options:

  1. (preferred) it only print if --verbose|-v is specified (silent by default); or
  2. that one could suppress this with --quiet|-q

Thanks for a great too, BTW

@alvations alvations added the enhancement New feature or request label Sep 18, 2019
@alvations alvations mentioned this issue Sep 20, 2019
@alvations
Copy link
Contributor

alvations commented Sep 20, 2019

@mjpost Good idea on the verbosity!

My preference is for --quiet instead of --verbose since tqdm (progress bar) would be print to stderr. And I do get panic attack if I see nothing moving when using the CLI commands on larger datasets =)

But if more people would vot go for --verbose and default silent instead, I'll be glad to make the appropriate changes to #70

P/S: The name is inspired by sacrebleu, thank you for the great tool too! =)

@mjpost
Copy link
Author

mjpost commented Sep 20, 2019

I think the UNIX convention is to default to silence, but it seems the Moses tools are the opposite. It's your tool, so I think you can decide! I'll be happy as long as I can shut it off.

BTW, did you ever run any regression tests on large data piles to see if sacremoses produces the same results as the Perl tools?

@alvations
Copy link
Contributor

--quiet it is =)

pip install -U sacremoses>=0.034
$ sacremoses --version
sacremoses, version 0.0.34

$ sacremoses tokenize --help
Usage: sacremoses tokenize [OPTIONS]

Options:
  -l, --language TEXT            Use language specific rules when tokenizing
  -j, --processes INTEGER        No. of processes.
  -a, --aggressive-dash-splits   Triggers dash split rules.
  -x, --xml-escape               Escape special characters for XML.
  -p, --protected-patterns TEXT  Specify file with patters to be protected in
                                 tokenisation.
  -c, --custom-nb-prefixes TEXT  Specify a custom non-breaking prefixes file,
                                 add prefixes to the default ones from the
                                 specified language.
  -e, --encoding TEXT            Specify encoding of file.
  -q, --quiet                    Disable progress bar.
  -h, --help                     Show this message and exit.

I haven't run a real regression test on the CLI vs the perl scripts from mosesdecoder. Been on the TODO list #37 though =)

@mjpost
Copy link
Author

mjpost commented Sep 23, 2019

Awesome thank you!

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

No branches or pull requests

2 participants