25 #include "fst/fstlib.h"    30 int main(
int argc, 
char *argv[]) {
    32     using namespace kaldi;
    37         "Pushes weights in an FST such that all the states\n"    38         "in the FST have arcs and final-probs with weights that\n"    39         "sum to the same amount (viewed as being in the log semiring).\n"    40         "Thus, the \"extra weight\" is distributed throughout the FST.\n"    41         "Tolerance parameter --delta controls how exact this is, and the\n"    44         "Usage:  fstpushspecial [options] [in.fst [out.fst] ]\n";
    48     po.
Register(
"delta", &delta, 
"Delta cost: after pushing, all states will "    49                 "have a total weight that differs from the average by no more "    58     std::string fst_in_filename = po.
GetOptArg(1),
    68   } 
catch(
const std::exception &e) {
    69     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]. 
 
int main(int argc, char *argv[])
 
void Register(const std::string &name, bool *ptr, const std::string &doc)
 
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 PushSpecial(VectorFst< StdArc > *fst, float delta)
 
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