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

how to get text score? #34

Open
ziyaxuanyi opened this issue Aug 27, 2021 · 1 comment
Open

how to get text score? #34

ziyaxuanyi opened this issue Aug 27, 2021 · 1 comment

Comments

@ziyaxuanyi
Copy link

what should I do if I want to get the text score?

I don't know what the return path means.

@ziyaxuanyi
Copy link
Author

for viterbi_search, I can get the right result by using this code:

seq, path = viterbi_search(posteriors, alphabet)
scores = [posteriors[path[i]][dict[seq[i]]] for i in range(len(path))]

where dict can convert text-label into text-index.

but for beam search,it get wrong result.Why?

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