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

Change the <pocketsphinx/search.h> API to be slightly more intuitive #298

Merged
merged 7 commits into from
Sep 18, 2022

Conversation

dhdaines
Copy link
Contributor

The functions in <pocketsphinx/search.h> were extremely badly named. If I call ps_set_lm() then I expect it to set the current language model. But it didn't actually do that! It just added the language model to a list of "search modules" and didn't actually change anything.

This is certainly a useful thing to do, but the function name should describe what it actually does. Since we are breaking a bunch of APIs anyway, the old function names are just removed, except in Python, where they are still there but give deprecation warnings (since it's not nice to make people's code crash, whereas making it fail to compile is just fine).

Ideally there would be a ps_set_lm() (for instance) which would actually do what you expect it to, but since the namespace has already been polluted, we probably can't do that. Oh well.

@dhdaines dhdaines merged commit c80db95 into master Sep 18, 2022
@dhdaines dhdaines deleted the fix_search_api branch September 21, 2022 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant