FST  openfst-1.7.3
OpenFst Library
pdtreplace.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 //
4 // Converts an RTN represented by FSTs and non-terminal labels into a PDT.
5 
6 #include <fst/flags.h>
7 #include <fst/fst.h>
8 
9 DEFINE_string(pdt_parentheses, "", "PDT parenthesis label pairs");
10 DEFINE_string(pdt_parser_type, "left",
11  "Construction method, one of: \"left\", \"left_sr\"");
12 DEFINE_int64(start_paren_labels, fst::kNoLabel,
13  "Index to use for the first inserted parentheses; if not "
14  "specified, the next available label beyond the highest output "
15  "label is used");
16 DEFINE_string(left_paren_prefix, "(_", "Prefix to attach to SymbolTable "
17  "labels for inserted left parentheses");
18 DEFINE_string(right_paren_prefix, ")_", "Prefix to attach to SymbolTable "
19  "labels for inserted right parentheses");
20 
21 int pdtreplace_main(int argc, char **argv);
22 
23 int main(int argc, char **argv) { return pdtreplace_main(argc, argv); }
DEFINE_int64(start_paren_labels, fst::kNoLabel,"Index to use for the first inserted parentheses; if not ""specified, the next available label beyond the highest output ""label is used")
constexpr int kNoLabel
Definition: fst.h:178
DEFINE_string(pdt_parentheses,"","PDT parenthesis label pairs")
int pdtreplace_main(int argc, char **argv)
int main(int argc, char **argv)
Definition: pdtreplace.cc:23