Merge pull request #3435 from olafthiele/scorerchange
Conditional msg for missing lm.binary added
This commit is contained in:
commit
18b66adf46
@ -68,7 +68,8 @@ create_package(absl::optional<string> alphabet_path,
|
|||||||
int err = scorer.load_lm(lm_path);
|
int err = scorer.load_lm(lm_path);
|
||||||
if (err != DS_ERR_SCORER_NO_TRIE) {
|
if (err != DS_ERR_SCORER_NO_TRIE) {
|
||||||
cerr << "Error loading language model file: "
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
scorer.fill_dictionary(words);
|
scorer.fill_dictionary(words);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user