FST  openfst-1.8.1
OpenFst Library
pdtreplace.cc
Go to the documentation of this file.
1 // Copyright 2005-2020 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the 'License');
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an 'AS IS' BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // See www.openfst.org for extensive documentation on this weighted
16 // finite-state transducer library.
17 //
18 // Converts an RTN represented by FSTs and non-terminal labels into a PDT.
19 
20 #include <fst/flags.h>
21 #include <fst/fst.h>
22 
23 DEFINE_string(pdt_parentheses, "", "PDT parenthesis label pairs");
24 DEFINE_string(pdt_parser_type, "left",
25  "Construction method, one of: \"left\", \"left_sr\"");
26 DEFINE_int64(start_paren_labels, fst::kNoLabel,
27  "Index to use for the first inserted parentheses; if not "
28  "specified, the next available label beyond the highest output "
29  "label is used");
30 DEFINE_string(left_paren_prefix, "(_",
31  "Prefix to attach to SymbolTable "
32  "labels for inserted left parentheses");
33 DEFINE_string(right_paren_prefix, ")_",
34  "Prefix to attach to SymbolTable "
35  "labels for inserted right parentheses");
36 
37 int pdtreplace_main(int argc, char **argv);
38 
39 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:201
DEFINE_string(pdt_parentheses,"","PDT parenthesis label pairs")
int pdtreplace_main(int argc, char **argv)
int main(int argc, char **argv)
Definition: pdtreplace.cc:39