25 #include "fst/fstlib.h" 35 int main(
int argc,
char *argv[]) {
37 using namespace kaldi;
42 "Minimizes FST after encoding [similar to fstminimize, but no weight-pushing]\n" 44 "Usage: fstminimizeencoded [in.fst [out.fst] ]\n";
48 po.
Register(
"delta", &delta,
"Delta likelihood used for quantization of weights");
56 std::string fst_in_filename = po.
GetOptArg(1),
67 }
catch(
const std::exception &e) {
68 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...
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
void MinimizeEncoded(VectorFst< Arc > *fst, float delta=kDelta)
void Register(const std::string &name, bool *ptr, const std::string &doc)
int main(int argc, char *argv[])
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables.
int NumArgs() const
Number of positional parameters (c.f. argc-1).
void WriteFstKaldi(std::ostream &os, bool binary, const VectorFst< Arc > &t)
void ReadFstKaldi(std::istream &is, bool binary, VectorFst< Arc > *fst)
std::string GetOptArg(int param) const