18 #ifndef FST_SCRIPT_COMPILE_H_ 19 #define FST_SCRIPT_COMPILE_H_ 66 args->
args.nkeep, args->
args.allow_negative_labels);
67 std::unique_ptr<Fst<Arc>>
fst;
68 if (args->
args.fst_type !=
"vector") {
69 std::unique_ptr<Fst<Arc>> tmp_fst(
70 Convert<Arc>(fstcompiler.
Fst(), args->
args.fst_type));
72 FSTERROR() <<
"Failed to convert FST to desired type: " 73 << args->
args.fst_type;
75 fst = std::move(tmp_fst);
79 args->
retval = fst ? std::make_unique<FstClass>(std::move(fst)) :
nullptr;
83 const std::string &dest,
const std::string &
fst_type,
89 std::istream &istrm,
const std::string &source,
const std::string &fst_type,
90 const std::string &arc_type,
const SymbolTable *isyms,
92 bool okeep,
bool nkeep,
bool allow_negative_labels);
97 #endif // FST_SCRIPT_COMPILE_H_
void Convert(FarReader< Arc > &reader, FarWriter< Arc > &writer, std::string_view fst_type)
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, bool allow_negative_labels)
std::unique_ptr< T > WrapUnique(T *ptr)
const bool allow_negative_labels
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