Skip to content

Commit

Permalink
Conditional msg for missing lm.binary added
Browse files Browse the repository at this point in the history
  • Loading branch information
Olaf Thiele committed Nov 23, 2020
1 parent dda2d22 commit 3ae77ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native_client/generate_scorer_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ create_package(absl::optional<string> alphabet_path,
int err = scorer.load_lm(lm_path);
if (err != DS_ERR_SCORER_NO_TRIE) {
cerr << "Error loading language model file: "
<< DS_ErrorCodeToErrorMessage(err) << "\n";
<< (err == DS_ERR_SCORER_UNREADABLE ? "Can't open binary LM file." : DS_ErrorCodeToErrorMessage(err))
<< "\n";
return 1;
}
scorer.fill_dictionary(words);
Expand Down

0 comments on commit 3ae77ca

Please sign in to comment.