18 #ifndef FST_SCRIPT_COMPILE_H_ 19 #define FST_SCRIPT_COMPILE_H_ 72 std::unique_ptr<Fst<Arc>>
fst;
73 if (args->
args.fst_type !=
"vector") {
74 std::unique_ptr<Fst<Arc>> tmp_fst(
75 Convert<Arc>(fstcompiler.
Fst(), args->
args.fst_type));
77 FSTERROR() <<
"Failed to convert FST to desired type: " 78 << args->
args.fst_type;
80 fst = std::move(tmp_fst);
84 args->
retval = fst ? std::make_unique<FstClass>(std::move(fst)) :
nullptr;
88 const std::string &dest,
const std::string &
fst_type,
94 std::istream &istrm,
const std::string &source,
const std::string &fst_type,
95 const std::string &arc_type,
const SymbolTable *isyms,
97 bool okeep,
bool nkeep);
102 #endif // FST_SCRIPT_COMPILE_H_
void Convert(FarReader< Arc > &reader, FarWriter< Arc > &writer, std::string_view fst_type)
std::unique_ptr< T > WrapUnique(T *ptr)
void Compile(std::istream &istrm, const std::string &source, const std::string &dest, const std::string &fst_type, const std::string &arc_type, const SymbolTable *isyms, const SymbolTable *osyms, const SymbolTable *ssyms, bool accep, bool ikeep, bool okeep, bool nkeep)
const fst::SymbolTable * ssyms
const fst::SymbolTable * osyms
VectorFst * Copy(bool safe=false) const override
const std::string & fst_type
void CompileInternal(FstCompileArgs *args)
const fst::SymbolTable * isyms
const std::string & source
const VectorFst< Arc > & Fst() const