Go to the source code of this file.
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 116 of file fstdeterminizestart.cc.
References ParseOptions::GetOptArg(), fst::InputDeterminizeSingleState(), ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), fst::ReadFstKaldi(), ParseOptions::Register(), and fst::WriteFstKaldi().
118 using namespace kaldi;
123 "Removes some (but not all) epsilons in an algorithm that will always reduce the number of\n" 124 "arcs+states. Option to preserves equivalence in tropical or log semiring, and\n" 125 "if in tropical, stochasticit in either log or tropical.\n" 127 "Usage: fstrmepslocal [in.fst [out.fst] ]\n";
130 bool use_log =
false;
131 bool stochastic_in_log =
true;
132 po.Register(
"use-log", &use_log,
133 "Preserve equivalence in log semiring [false->tropical]\n");
134 po.Register(
"stochastic-in-log", &stochastic_in_log,
135 "Preserve stochasticity in log semiring [false->tropical]\n");
138 if (po.NumArgs() > 2) {
143 std::string fst_in_filename = po.GetOptArg(1),
144 fst_out_filename = po.GetOptArg(2);
152 }
catch(
const std::exception &e) {
153 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
static void InputDeterminizeSingleState(StdArc::StateId s, VectorFst< StdArc > *fst)
This utility function input-determinizes a specified state s of the FST 'fst'.
void WriteFstKaldi(std::ostream &os, bool binary, const VectorFst< Arc > &t)
void ReadFstKaldi(std::istream &is, bool binary, VectorFst< Arc > *fst)