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 top-k best candidate sequences when using CRF for decoding? #47

Closed
zfyu opened this issue Apr 12, 2019 · 4 comments
Closed

Comments

@zfyu
Copy link

zfyu commented Apr 12, 2019

how to get top-k best candidate sequences when using CRF for decoding in tensorflow?

@guillaumegenthial
Copy link
Owner

Hi @zfyu, sorry to tell you that, but you can't! Theoretically you could, but you would need to modify the tensorflow crf implementation so that the dynamic decoding keeps track of the top k at every recurrence step.

@zfyu
Copy link
Author

zfyu commented Apr 12, 2019

Thank you for your suggestion. @guillaumegenthial

@zfyu zfyu closed this as completed Apr 12, 2019
@createmomo
Copy link

how to get top-k best candidate sequences when using CRF for decoding in tensorflow?

Hi, maybe you can consider re-implement the n-best output algorithm mentioned in this tool by yourself,
https://taku910.github.io/crfpp/

@zfyu
Copy link
Author

zfyu commented Apr 13, 2019

@createmomo
Thank you very much. I'll try it. BTW, I found that I read your blog "CRF Layer on the Top of BiLSTM - 1" a few days ago. What a coincidence! It is very helpful!

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

3 participants