Only ignore (expected) missing trie error in generate_package.py
This commit is contained in:
parent
4db20b3cd6
commit
361e216297
@ -52,7 +52,9 @@ def create_bundle(
|
||||
scorer.set_alphabet(alphabet)
|
||||
scorer.set_utf8_mode(use_utf8)
|
||||
scorer.reset_params(default_alpha, default_beta)
|
||||
scorer.load_lm(lm_path)
|
||||
err = scorer.load_lm(lm_path)
|
||||
if err != ds_ctcdecoder.DS_ERR_SCORER_NO_TRIE:
|
||||
print('Error loading language model file: 0x{:X}.'.format(err))
|
||||
scorer.fill_dictionary(list(words))
|
||||
shutil.copy(lm_path, package_path)
|
||||
scorer.save_dictionary(package_path, True) # append, not overwrite
|
||||
|
Loading…
x
Reference in New Issue
Block a user