pyfst icon indicating copy to clipboard operation
pyfst copied to clipboard

support for openFst new versions

Open mohamad-hasan-sohan-ajini opened this issue 7 years ago • 6 comments

Hi

I try to install OpenFst 1.6 and then install pyfst. but I get error while installing pyfst. However by reverting OpenFst to version 1.3, the problem was solved, but is there any plan to support most recently releases of OpenFst (1.6 at this time)?

regards

Indeed, Kaldi 5.1.65 seems to require openfst > 1.6.0, downgrading to 1.3.x is not an option anymore.

My openfst is built with --enable-far, but pyfst isn't able to build even with "-std=c++11"

Any other ideas?

lkraav avatar May 02 '17 06:05 lkraav

This fork https://github.com/UFAL-DSG/pyfst/ gets us a step further, but I think we're still incompatible with openfst 1.6.

fst/_fst.cpp: In function ‘PyObject* __pyx_pf_3fst_4_fst_12LogVectorFst_120draw(__pyx_obj_3fst_4_fst_LogVectorFst*, __pyx_obj_3fst_4_fst_SymbolTable*, __pyx_obj_3fst_4_fst_SymbolTable*, __pyx_obj_3fst_4_fst_SymbolTable*)’:
fst/_fst.cpp:30720:191: error: no matching function for call to ‘fst::FstDrawer<fst::ArcTpl<fst::LogWeightTpl<float> > >::FstDrawer(fst::VectorFst<fst::ArcTpl<fst::LogWeightTpl<float> > >&, fst::SymbolTable*&, fst::SymbolTable*&, fst::SymbolTable*&, int, std::string&, double, double, int, int, double, double, int, int, int)’
   __pyx_v_drawer = new fst::FstDrawer<fst::LogArc> ((__pyx_v_self->fst[0]), __pyx_v_isyms_table, __pyx_v_osyms_table, __pyx_v_ssyms_table, 0, __pyx_t_5, 8.5, 11.0, 1, 0, 0.40, 0.25, 14, 5, 0);
                                                                                                                                                                                               ^
fst/_fst.cpp:30720:191: note: candidate is:
In file included from /usr/include/fst/script/draw.h:10:0,
                 from fst/_fst.cpp:292:
/usr/include/fst/script/draw-impl.h:29:3: note: fst::FstDrawer<Arc>::FstDrawer(const fst::Fst<Arc>&, const fst::SymbolTable*, const fst::SymbolTable*, const fst::SymbolTable*, bool, const string&, float, float, bool, bool, float, float, int, int, const string&, bool) [with Arc = fst::ArcTpl<fst::LogWeightTpl<float> >; std::string = std::basic_string<char>]
   FstDrawer(const Fst<Arc> &fst, const SymbolTable *isyms,
   ^
/usr/include/fst/script/draw-impl.h:29:3: note:   candidate expects 16 arguments, 15 provided
command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1

lkraav avatar May 02 '17 07:05 lkraav

The FstDrawer function signatures are incompatible across OpenFST 1.6 and the current version of pyfst. I had to fix the two files fst/libfst.pxd.tpl and fst/_fst.pyx.tpl to get it to work with 1.6.2.

ekshaks avatar May 30 '17 10:05 ekshaks

Y'all realize there's an official OpenFst Python wrapper with significantly more functionality than pyfst, that it is continuously maintained, it's compatible with recent versions of OpenFst, right?

python.openfst.org

(Please forgive cross-promotion here.)

On May 30, 2017 6:43 AM, "Nishant Sinha" [email protected] wrote:

The FstDrawer function signatures are incompatible across OpenFST 1.6 and the current version of pyfst. I had to fix the two files fst/libfst.pxd.tpl and fst/_fst.pyx.tpl to get it to work with 1.6.2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vchahun/pyfst/issues/32#issuecomment-304841132, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJuOdKvenYvjhpq5a15C7asAVno1ARwks5r-_K9gaJpZM4Mhi7O .

kylebgorman avatar May 30 '17 15:05 kylebgorman

This branch(https://github.com/placebokkk/pyfst) supports 1.6 by fix FstDrawer interface.

placebokkk avatar Apr 02 '18 02:04 placebokkk

Y'all realize there's an official OpenFst Python wrapper with significantly more functionality than pyfst, that it is continuously maintained, it's compatible with recent versions of OpenFst, right?

No we don't, https://www.openfst.org/ is down most of the time and not easy to navigate, so thanks for the hint ! But in the end I could not make it work, nor any other existing wrapper.

Pierre-Bartet avatar Apr 26 '24 09:04 Pierre-Bartet