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

fst.ext.determinize_star wrapping might be wrong #284

Open
Ithilan opened this issue Aug 24, 2021 · 1 comment
Open

fst.ext.determinize_star wrapping might be wrong #284

Ithilan opened this issue Aug 24, 2021 · 1 comment

Comments

@Ithilan
Copy link

Ithilan commented Aug 24, 2021

According to https://kaldi-asr.org/doc/group__fst__extensions.html#gac6d4823e83f5353ae5b5ce569a7a29a3
The boolean returned by determinzestar is False on success
Caution, the return status is un-intuitive: this function will return false if determinization completed normally, and true if it was stopped early by reaching the 'max-states' limit, and a partial FST was generated.

However in the pykaldi implementation we can see that the treatment is incorrect

   ofst = _fst.StdVectorFst()
    success = _special_ops._determinize_star(ifst, ofst, delta, max_states,
                                             allow_partial)
    if success:
        return ofst
    else:
        raise RuntimeError("Determinization failed.")

from https://github.com/pykaldi/pykaldi/blob/master/kaldi/fstext/special.py

It should be if not success

@bmilde
Copy link
Contributor

bmilde commented Feb 27, 2022

That seems to be the correct interpretation according to the docu, did you try this out and did you encounter a RuntimeError where you basically shouldn't?

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

2 participants