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