Menu

Confusion Network Like lattice-tool in SRILM ?

2015-05-26
2015-05-26
  • Xiong Zhang (bearzx)

    Hi all,

    I was using SRILM's lattice-tool to generate confusion network (or "sausage") from lattice output, basically for getting nbest words with alignments. But it requires me to convert the Kaldi's lattice format to HTK's slf first. So I wonder if there is a way to do the same thing in Kaldi's toolkits?

    I know there is a tool called lattice-mbr-decode, but when I run it I got something like (I don't quite get to understand the format though):

    4518272196.jpg_767 [ 0 1 ] [ 9308 1 ] [ 0 0.9841778 148369 0.005043522 9315 0.003608911 150155 0.003147973 167 0.002945446 149109 0.0003758957 80508 0.0002937762 68633 0.0001437934 12780 9.342388e-005 176766 6.596502e-005 83877 5.303775e-005 187506 5.051023e-005 ] [ 161317 0.8782344 161186 0.08479465 150152 0.02646259 161200 0.003566667 80508 0.002682726 62244 0.002649865 148369 0.0005249402 9315 0.0003707979 150155 0.0002987151 161817 0.0001408067 161793 0.00012842 0 0.0001074524 149109 3.566921e-005 167 2.016247e-006 68633 1.010033e-007 12780 6.562275e-008 176766 4.633511e-008 83877 3.725475e-008 187506 3.547937e-008 ] [ 0 0.8995036 167 0.09363493 161186 0.002847476 191 0.001930076 85446 0.001106271 88634 0.0002877983 129336 0.0002315193 178 0.0001700427 161200 7.344459e-005 9306 6.739829e-005 179 3.65439e-005 9302 3.269734e-005 81 2.630023e-005 77 2.62195e-005 7 2.572359e-005 ] [ 118969 0.5653722 167 0.1487492 119062 0.1407928 119373 0.1032146 119803 0.02277994 119521 0.01371174 191 0.001180191 161186 0.001043956 159580 0.000895098 0 0.0007302673 119490 0.0002941477 117497 0.0002292604 119257 0.0002016498 88634 0.0001584339 118827 0.0001003268 178 8.213201e-005 119693 7.953306e-005 163230 7.828859e-005 125745 6.900959e-005 120203 4.92718e-005 85446 3.579366e-005 120264 3.354122e-005 119061 3.034769e-005 129336 2.449697e-005 9306 2.192274e-005 150152 1.878236e-005 161317 1.096635e-005 161200 3.931643e-006 62244 1.955045e-006 80508 1.818692e-006 148369 7.387889e-007 179 6.237085e-007 9302 5.580579e-007 9315 5.24489e-007 81 4.488759e-007 77 4.47498e-007 7 4.390342e-007 150155 4.362138e-007 161817 8.826303e-008 149109 5.208778e-008 161793 2.674299e-008 68633 1.782654e-008 12780 1.158207e-008 176766 8.177901e-009 83877 6.575265e-009 187506 6.261919e-009 ] [ 0 0.8509155 119062 0.06621546 119803 0.05183231 119373 0.02738653 119521 0.002564905 119490 0.0003035958 80508 0.0002073852 159580 0.0001857428 163230 0.0001457091 117497 0.0001020836 167 6.103046e-005 119257 3.634863e-005 125745 2.31549e-005 118827 2.028643e-005 ] [ 84142 0.9725395 80508 0.01513889 0 0.008329476 118969 0.001817037 119062 0.0007782043 129440 0.0007465958 119803 0.0003341469 167 0.0001391517 13033 6.377468e-005 119521 5.149372e-005 81994 2.063753e-005 83877 1.583235e-005 161186 1.500542e-005 150152 3.953637e-006 191 2.21575e-006 161317 1.881653e-006 161200 6.705364e-007 178 5.409767e-007 62244 4.425445e-007 88634 3.220201e-007 9306 7.541254e-008 179 3.200002e-008 9302 2.863174e-008 81 2.303005e-008 77 2.295936e-008 7 2.252511e-008 161817 2.20917e-008 ] [ 0 0.9997779 80508 0.0002216035 118969 3.55786e-007 119062 2.098552e-007 ] [ 123704 0.9978061 80508 0.001234094 0 0.0004012825 185765 0.0002599984 119062 0.0001566084 118969 6.339062e-005 119803 5.069081e-005 185753 2.780149e-005 ] [ 0 1 ] [ 191 0.7455723 0 0.248641 167 0.003150384 185765 0.00128007 84143 0.0005590889 9309 0.0004878156 166 0.0001099483 9302 9.786533e-005 186985 6.690795e-005 1 3.466096e-005 ] [ 0 1 ] [ 9307 1 ] [ 0 1 ]

    So there's no time information in its output, right?

    Thanks,
    Xiong

     

    Last edit: Xiong Zhang (bearzx) 2015-05-26
    • Jan "yenda" Trmal

      If you look at the help the lattice-mbr-decode prints when you run it
      without parameters, it will tell you how to get the time information.
      IIRC you need to provide one more parameter (filename into which the
      timestamps will be written). You will have to correlate the two files,
      but it should be straightforward.
      Y.
      On May 26, 2015 4:18 AM, "Xiong Zhang (bearzx)" bearzx@users.sf.net wrote:

      Hi all,

      I was using SRILM's lattice-tool to generate confusion network (or
      "sausage") from lattice output, basically for getting nbest words with
      alignments. But it requires me to convert the Kaldi's lattice format to
      HTK's slf first. So I wonder if there is a way to do the same thing in
      Kaldi's toolkits?

      I know there is a tool called lattice-mbr-decode, but when I run it I got
      something like (I don't quite get to understand the format though):

      4518272196.jpg_767 [ 0 1 ] [ 9308 1 ] [ 0 0.9841778 148369 0.005043522
      9315 0.003608911 150155 0.003147973 167 0.002945446 149109 0.0003758957
      80508 0.0002937762 68633 0.0001437934 12780 9.342388e-005 176766
      6.596502e-005 83877 5.303775e-005 187506 5.051023e-005 ]
      [ 161317 0.8782344
      161186 0.08479465 150152 0.02646259 161200 0.003566667 80508 0.002682726
      62244 0.002649865 148369 0.0005249402 9315 0.0003707979 150155 0.0002987151
      161817 0.0001408067 161793 0.00012842 0 0.0001074524 149109 3.566921e-005
      167 2.016247e-006 68633 1.010033e-007 12780 6.562275e-008 176766
      4.633511e-008 83877 3.725475e-008 187506 3.547937e-008 ]
      [ 0 0.8995036 167
      0.09363493 161186 0.002847476 191 0.001930076 85446 0.001106271 88634
      0.0002877983 129336 0.0002315193 178 0.0001700427 161200 7.344459e-005 9306
      6.739829e-005 179 3.65439e-005 9302 3.269734e-005 81 2.630023e-005 77
      2.62195e-005 7 2.572359e-005 ]
      [ 118969 0.5653722 167 0.1487492 119062
      0.1407928 119373 0.1032146 119803 0.02277994 119521 0.01371174 191
      0.001180191 161186 0.001043956 159580 0.000895098 0 0.0007302673 119490
      0.0002941477 117497 0.0002292604 119257 0.0002016498 88634 0.0001584339
      118827 0.0001003268 178 8.213201e-005 119693 7.953306e-005 163230
      7.828859e-005 125745 6.900959e-005 120203 4.92718e-005 85446 3.579366e-005
      120264 3.354122e-005 119061 3.034769e-005 129336 2.449697e-005 9306
      2.192274e-005 150152 1.878236e-005 161317 1.096635e-005 161200
      3.931643e-006 62244 1.955045e-006 80508 1.818692e-006 148369 7.387889e-007
      179 6.237085e-007 9302 5.580579e-007 9315 5.24489e-007 81 4.488759e-007 77
      4.47498e-007 7 4.390342e-007 150155 4.362138e-007 161817 8.826303e-008
      149109 5.208778e-008 161793 2.674299e-008 68633 1.782654e-008 12780
      1.158207e-008 176766 8.177901e-009 83877 6.575265e-009 187506 6.261919e-009
      ]
      [ 0 0.8509155 119062 0.06621546 119803 0.05183231 119373 0.02738653
      119521 0.002564905 119490 0.0003035958 80508 0.0002073852 159580
      0.0001857428 163230 0.0001457091 117497 0.0001020836 167 6.103046e-005
      119257 3.634863e-005 125745 2.31549e-005 118827 2.028643e-005 ]
      [ 84142
      0.9725395 80508 0.01513889 0 0.008329476 118969 0.001817037 119062
      0.0007782043 129440 0.0007465958 119803 0.0003341469 167 0.0001391517 13033
      6.377468e-005 119521 5.149372e-005 81994 2.063753e-005 83877 1.583235e-005
      161186 1.500542e-005 150152 3.953637e-006 191 2.21575e-006 161317
      1.881653e-006 161200 6.705364e-007 178 5.409767e-007 62244 4.425445e-007
      88634 3.220201e-007 9306 7.541254e-008 179 3.200002e-008 9302 2.863174e-008
      81 2.303005e-008 77 2.295936e-008 7 2.252511e-008 161817 2.20917e-008 ]
      [ 0
      0.9997779 80508 0.0002216035 118969 3.55786e-007 119062 2.098552e-007 ]

      123704 0.9978061 80508 0.001234094 0 0.0004012825 185765 0.0002599984
      119062 0.0001566084 118969 6.339062e-005 119803 5.069081e-005 185753
      2.780149e-005
      [ 0 1 ] [ 191 0.7455723 0 0.248641 167 0.003150384 185765
      0.00128007 84143 0.0005590889 9309 0.0004878156 166 0.0001099483 9302
      9.786533e-005 186985 6.690795e-005 1 3.466096e-005 ]
      [ 0 1 ] [ 9307 1 ] [ 0
      1 ]

      So there's no time information in its output, right?

      Thanks,
      Xiong


      Confusion Network Like lattice-tool in SRILM ?


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/kaldi/discussion/1355347/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>