FST  openfst-1.7.7
OpenFst Library
print.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 #include <fst/script/print.h>
5 
7 
8 namespace fst {
9 namespace script {
10 
11 void Print(const FstClass &fst, std::ostream &ostrm, const std::string &dest,
12  const SymbolTable *isyms, const SymbolTable *osyms,
13  const SymbolTable *ssyms, bool accept, bool show_weight_one,
14  const std::string &missing_sym) {
15  const auto sep = FLAGS_fst_field_separator.substr(0, 1);
16  PrintArgs args(fst, isyms, osyms, ssyms, accept, show_weight_one, ostrm, dest,
17  sep, missing_sym);
18  Apply<Operation<PrintArgs>>("Print", fst.ArcType(), &args);
19 }
20 
21 // TODO(kbg,2019-09-01): Deprecated.
22 void PrintFst(const FstClass &fst, std::ostream &ostrm, const std::string &dest,
23  const SymbolTable *isyms, const SymbolTable *osyms,
24  const SymbolTable *ssyms, bool accept, bool show_weight_one,
25  const std::string &missing_sym) {
26  Print(fst, ostrm, dest, isyms, osyms, ssyms, accept, show_weight_one,
27  missing_sym);
28 }
29 
31 
32 } // namespace script
33 } // namespace fst
REGISTER_FST_OPERATION_3ARCS(Compress, CompressArgs)
const std::string & ArcType() const final
Definition: fst-class.h:300
void Print(PrintArgs *args)
Definition: print.h:50
void PrintFst(const FstClass &fst, std::ostream &ostrm, const std::string &dest, const SymbolTable *isyms, const SymbolTable *osyms, const SymbolTable *ssyms, bool accept, bool show_weight_one, const std::string &missing_sym="")
Definition: print.cc:22