add blank_penalty for offline transducer (#542)
This commit is contained in:
@@ -28,6 +28,13 @@ void OfflineRecognizerConfig::Register(ParseOptions *po) {
|
||||
po->Register("max-active-paths", &max_active_paths,
|
||||
"Used only when decoding_method is modified_beam_search");
|
||||
|
||||
po->Register("blank-penalty", &blank_penalty,
|
||||
"The penalty applied on blank symbol during decoding. "
|
||||
"Note: It is a positive value. "
|
||||
"Increasing value will lead to lower deletion at the cost"
|
||||
"of higher insertions. "
|
||||
"Currently only applicable for transducer models.");
|
||||
|
||||
po->Register(
|
||||
"hotwords-file", &hotwords_file,
|
||||
"The file containing hotwords, one words/phrases per line, and for each"
|
||||
@@ -74,7 +81,8 @@ std::string OfflineRecognizerConfig::ToString() const {
|
||||
os << "decoding_method=\"" << decoding_method << "\", ";
|
||||
os << "max_active_paths=" << max_active_paths << ", ";
|
||||
os << "hotwords_file=\"" << hotwords_file << "\", ";
|
||||
os << "hotwords_score=" << hotwords_score << ")";
|
||||
os << "hotwords_score=" << hotwords_score << ", ";
|
||||
os << "blank_penalty=" << blank_penalty << ")";
|
||||
|
||||
return os.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user