Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No suitable method found #29

Open
alreadytaikeune opened this issue Jun 28, 2016 · 0 comments
Open

No suitable method found #29

alreadytaikeune opened this issue Jun 28, 2016 · 0 comments

Comments

@alreadytaikeune
Copy link

alreadytaikeune commented Jun 28, 2016

Hi,

I am working on Ubuntu 14.04 and have a working version of openfst 1.3.4 installed. The one step installation process in the Readme doesn't seem to work for me.

LIBRARY_PATH=$FST/lib:$FST/lib/fst CPLUS_INCLUDE_PATH=$FST/include python setup.py build_ext --inplace

The paths are correct but I'm getting the following error from Cython "no suitable method found" on the call to libfst.Replace in the replace method. It seems that Cython can't match the provided argument types with the ones expected by libfst in any version of the overloaded function Replace.

Commenting out that function make the module build successfully. At this stage I don't really know what to do. The arg types seem sound and compliant with the doc of libfst and especially this function :

void fst::Replace   (   const std::vector< std::pair< typename Arc::Label, const Fst< Arc > * >> &      ifst_array,
        MutableFst< Arc > *     ofst,
        typename Arc::Label     root,
        bool    epsilon_on_replace   
    )   

Running

nm *.so -C | grep "Replace<"

in the fst lib directory tells me this among other things :

void fst::Replace<fst::ArcTpl<fst::LogWeightTpl<double> > >(std::vector<std::pair<fst::ArcTpl<fst::LogWeightTpl<double> >::Label, fst::Fst<fst::ArcTpl<fst::LogWeightTpl<double> > > const*>, std::allocator<std::pair<fst::ArcTpl<fst::LogWeightTpl<double> >::Label, fst::Fst<fst::ArcTpl<fst::LogWeightTpl<double> > > const*> > > const&, fst::MutableFst<fst::ArcTpl<fst::LogWeightTpl<double> > >*, fst::ArcTpl<fst::LogWeightTpl<double> >::Label, bool)

which leads me to think that the problem might be coming from the allocator because I have no clue what it could be otherwise. I've tried using doubles and floats instead of ints but that doesn't change anything to the problem.

Any help would be much appreciated !
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant