FST  openfst-1.7.2
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 <ostream>
5 #include <string>
6 
7 #include <fst/script/fst-class.h>
8 #include <fst/script/print.h>
10 
11 namespace fst {
12 namespace script {
13 
14 void PrintFst(const FstClass &fst, std::ostream &ostrm, const string &dest,
15  const SymbolTable *isyms, const SymbolTable *osyms,
16  const SymbolTable *ssyms, bool accept, bool show_weight_one,
17  const string &missing_sym) {
18  const auto sep = FLAGS_fst_field_separator.substr(0, 1);
19  FstPrinterArgs args(fst, isyms, osyms, ssyms, accept, show_weight_one, &ostrm,
20  dest, sep, missing_sym);
21  Apply<Operation<FstPrinterArgs>>("PrintFst", fst.ArcType(), &args);
22 }
23 
27 
28 } // namespace script
29 } // namespace fst
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
void PrintFst(FstPrinterArgs *args)
Definition: print.h:52