Skip to content

Commit 7a14ec8

Browse files
roark-googlecopybara-github
authored andcommitted
To avoid default STDERR verbiage from decoder.
PiperOrigin-RevId: 625764682
1 parent 7765649 commit 7a14ec8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

nisaba/translit/fst/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ cc_binary(
3535
"@com_google_absl//absl/flags:parse",
3636
"@com_google_absl//absl/log",
3737
"@com_google_absl//absl/log:check",
38+
"@com_google_absl//absl/log:initialize",
3839
"@com_google_absl//absl/status",
3940
"@com_google_protobuf//:protobuf",
4041
],

nisaba/translit/fst/pairlm_decoder_main.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@
2727

2828
#include <string>
2929

30-
#include "google/protobuf/text_format.h"
3130
#include "absl/flags/flag.h"
3231
#include "absl/flags/parse.h"
3332
#include "absl/log/check.h"
33+
#include "absl/log/initialize.h"
3434
#include "absl/log/log.h"
3535
#include "absl/status/status.h"
3636
#include "nisaba/port/file_util.h"
3737
#include "nisaba/translit/fst/pairlm_decoder_options.pb.h"
3838
#include "nisaba/translit/fst/pairlm_decoder_runner.h"
39+
#include "google/protobuf/text_format.h"
3940

4041
ABSL_FLAG(std::string, ifile, "",
4142
"Input filename in text format. One input item per line.");
@@ -97,6 +98,7 @@ bool Run() {
9798

9899
int main(int argc, char** argv) {
99100
absl::ParseCommandLine(argc, argv);
101+
absl::InitializeLog();
100102

101103
if (!nisaba::Run()) {
102104
LOG(ERROR) << "Decoder failed";

0 commit comments

Comments
 (0)