-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add a new binary for chain e2e #3945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments..
@@ -0,0 +1,121 @@ | |||
// chainbin/chain-make-num-fst-e2e.cc | |||
|
|||
// Copyright 2019 Johns Hopkins University (author: Yiwen Shao) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just put Yiwen Shao as the author as you are not an employee (or if you have a part-time job with Hopkins, at least you are not doing this in that status)
|
||
namespace kaldi { | ||
|
||
bool FstTransitionToPdf(const fst::StdVectorFst &fst_transition, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be .. ToPdfPlusOne(), since these are pdf+1. Also I think this conflicts with your comment or commit message in which you say they are zero-based, these seem to be one-based.
try { | ||
const char *usage = | ||
"Converts chain e2e numerator fst (containing transition-ids) to fst (containing pdf-ids, \n" | ||
"zero-based, eps-removed, and normalized by the normalization fst) \n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is where it says zero-based. Also this doesn't remove epsilons, it just checks that there are no epsilons.. might be good to clarify. should say pdf-ids + 1.
Thanks for the comments! I've made modifications according to it. |
Add a new binary: chainbin/chain-make-num-fst-e2e
It is used to converts chain e2e numerator fst (containing transition-ids) to fst (containing pdf-ids,
zero-based, eps-removed, and normalized by the normalization fst).
This step is usually in prepare_egs stage while this binary would be necessary for other outside toolkits (e.g. pychain) that directly use fst instead of egs.