20 #ifndef KALDI_DECODER_TRAINING_GRAPH_COMPILER_H_ 21 #define KALDI_DECODER_TRAINING_GRAPH_COMPILER_H_ 25 #include "fst/fstlib.h" 42 transition_scale(transition_scale),
43 self_loop_scale(self_loop_scale),
48 opts->
Register(
"transition-scale", &transition_scale,
"Scale of transition " 49 "probabilities (excluding self-loops)");
50 opts->
Register(
"self-loop-scale", &self_loop_scale,
"Scale of self-loop vs. " 51 "non-self-loop probability mass ");
52 opts->
Register(
"reorder", &reorder,
"Reorder transition ids for greater decoding efficiency.");
53 opts->
Register(
"rm-eps", &rm_eps,
"Remove [most] epsilons before minimization (only applicable " 54 "if disambig symbols present)");
63 fst::VectorFst<fst::StdArc> *lex_fst,
66 const std::vector<int32> &disambig_syms,
75 bool CompileGraph(
const fst::VectorFst<fst::StdArc> &word_grammar,
76 fst::VectorFst<fst::StdArc> *out_fst);
81 const std::vector<
const fst::VectorFst<fst::StdArc> *> &word_fsts,
82 std::vector<fst::VectorFst<fst::StdArc> *> *out_fsts);
85 bool CompileGraphFromText(
const std::vector<int32> &transcript,
86 fst::VectorFst<fst::StdArc> *out_fst);
89 bool CompileGraphsFromText(
90 const std::vector<std::vector<int32> > &word_grammar,
91 std::vector<fst::VectorFst<fst::StdArc> *> *out_fsts);
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
const ContextDependency & ctx_dep_
fst::TableComposeCache< fst::Fst< fst::StdArc > > lex_cache_
BaseFloat self_loop_scale
const TransitionModel & trans_model_
fst::VectorFst< fst::StdArc > * lex_fst_
virtual void Register(const std::string &name, bool *ptr, const std::string &doc)=0
void Register(OptionsItf *opts)
TableComposeCache lets us do multiple compositions while caching the same matcher.
int32 subsequential_symbol_
std::vector< int32 > disambig_syms_
BaseFloat transition_scale
TrainingGraphCompilerOptions opts_
TrainingGraphCompilerOptions(BaseFloat transition_scale=1.0, BaseFloat self_loop_scale=1.0, bool b=true)