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

ctc decoder with language model #38

Open
edchengg opened this issue Oct 2, 2018 · 0 comments
Open

ctc decoder with language model #38

edchengg opened this issue Oct 2, 2018 · 0 comments

Comments

@edchengg
Copy link

edchengg commented Oct 2, 2018

Hi,
Thanks for your work!
I implemented a LM with your py-arpa-lm.. The output of lm.score_tg returns a ln scale score.

I just would like to check if the following is correct way to add LM:

# *NB* this would be a good place to include an LM score. insertion penalty lm_score = alpha * lm.score_tg(n_prefix) ins_p = beta * np.log(len(n_prefix)) next_beam[n_prefix] = (n_p_b + lm_score + ins_p, n_p_nb + lm_score + ins_p)

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