FST  openfst-1.7.1
OpenFst Library
fstrandgen.cc
Go to the documentation of this file.
1 #include <unistd.h>
2 
3 #include <climits>
4 #include <ctime>
5 
6 #include <fst/flags.h>
7 
8 DEFINE_int32(max_length, INT32_MAX, "Maximum path length");
9 DEFINE_int32(npath, 1, "Number of paths to generate");
10 DEFINE_int32(seed, time(nullptr) + getpid(), "Random seed");
11 DEFINE_string(select, "uniform",
12  "Selection type: one of: "
13  " \"uniform\", \"log_prob\" (when appropriate),"
14  " \"fast_log_prob\" (when appropriate)");
15 DEFINE_bool(weighted, false,
16  "Output tree weighted by path count vs. unweighted paths");
17 DEFINE_bool(remove_total_weight, false,
18  "Remove total weight when output weighted");
19 
20 int fstrandgen_main(int argc, char **argv);
21 
22 int main(int argc, char **argv) { return fstrandgen_main(argc, argv); }
int fstrandgen_main(int argc, char **argv)
DEFINE_int32(max_length, INT32_MAX,"Maximum path length")
DEFINE_bool(weighted, false,"Output tree weighted by path count vs. unweighted paths")
int main(int argc, char **argv)
Definition: fstrandgen.cc:22
DEFINE_string(select,"uniform","Selection type: one of: "" \"uniform\", \"log_prob\" (when appropriate),"" \"fast_log_prob\" (when appropriate)")