lattice-tool
Andreas Stolcke
stolcke at speech.sri.com
Fri Sep 30 12:05:58 PDT 2005
In message <1128103111.433d7cc79d9a8 at www.webmail.mcgill.ca>you wrote:
> Hello,
>
> I have a question concerning lattice-tool... Why, if I convert a htk file to
> pfsg and then back again, are the weights missing in the resulting htk file?
It's either an oversight or a feature, depending on your point of view.
The problem is that HTK lattices encode potentially many kinds of
scores, but PFSGs only one. So, when outputting a PFSGs as an HTK
lattice is is not clear what to map the PFSG weights to.
However, PFSG weights should probably not just be discarded in this
situation. A useful default behavior would be to map the PFSG weights to
HTK "acoustic" scores. The following small change in lattice-tool.cc will
have this effect.
*** /tmp/T0uymDr_ Fri Sep 30 12:01:40 2005
--- lattice-tool.cc Fri Sep 30 11:48:26 2005
***************
*** 613,618 ****
--- 613,623 ----
// by default we leave HTK lattices scores alone
HTKScoreMapping htkScoreMapping = mapHTKnone;
+ if (!readHTK) {
+ // preserve PFSG weights as HTK acoustic scores
+ htkScoreMapping = mapHTKacoustic;
+ }
+
if (lmFile) {
// remove pause and NULL nodes prior to LM application,
It will be in the next release unless someone objects.
It is still important to remember that converting HTK lattice to
PFSGs and back will not preserve all information (such as times,
multple scores, pronunciations, etc.).
--Andreas
More information about the SRILM-User
mailing list