15 #ifndef FST_EXTENSIONS_FAR_CONVERT_H_ 16 #define FST_EXTENSIONS_FAR_CONVERT_H_ 25 #include <string_view> 31 std::string_view fst_type) {
33 [&fst_type](std::string_view key,
const Fst<Arc> *ifst) {
34 if (fst_type.empty() || ifst->
Type() == fst_type) {
39 FSTERROR() <<
"FarConvert: Cannot convert FST with key " 40 << key <<
" to " << fst_type;
48 #endif // FST_EXTENSIONS_FAR_CONVERT_H_ void Convert(FarReader< Arc > &reader, FarWriter< Arc > &writer, std::string_view fst_type)
std::unique_ptr< T > WrapUnique(T *ptr)
void Map(FarReader< Arc > &reader, FarWriter< Arc > &writer, Functor functor)
virtual const std::string & Type() const =0
virtual Fst * Copy(bool safe=false) const =0