taishi-i / nagisa

A Japanese tokenizer based on recurrent neural networks
https://huggingface.co/spaces/taishi-i/nagisa-demo
MIT License
379 stars 22 forks source link

Suppress output messages #25

Closed manga-ai closed 3 years ago

manga-ai commented 3 years ago

Currently, every time I import nagisa, messages regarding nagisa and dynet appear.

Is there an option/argument to suppress these output messages?

taishi-i commented 3 years ago

Hi @manga-ai. Thank you for using nagisa! Sorry. We can't turn off the output at import because it's hard-coded in DyNet. So, there is not an option/argument.

It is not a suitable method, but we can turn off the output with the following command by merging the standard error output with the standard output and not displaying the standard output.

python sample.py > /dev/null 2>&1
manga-ai commented 3 years ago

Thank you for the response!

I have also tried setting nagisa's logging levels to "Warning", so nagisa itself won't be logging more output.