Skip to content

Commit

Permalink
[scripts] subset_data_dir.sh: preserve the comments in STM file (kald…
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayc11 authored and danpovey committed Aug 18, 2018
1 parent bba22b5 commit c999329
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions egs/wsj/s5/utils/subset_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ function do_filtering {
[ -f $srcdir/reco2file_and_channel ] && \
utils/filter_scp.pl $destdir/reco <$srcdir/reco2file_and_channel >$destdir/reco2file_and_channel

# Filter the STM file for proper sclite scoring (this will also remove the comments lines)
[ -f $srcdir/stm ] && utils/filter_scp.pl $destdir/reco < $srcdir/stm > $destdir/stm
# Filter the STM file for proper sclite scoring
# Copy over the comments from STM file
[ -f $srcdir/stm ] && grep "^;;" $srcdir/stm > $destdir/stm
[ -f $srcdir/stm ] && utils/filter_scp.pl $destdir/reco < $srcdir/stm >> $destdir/stm

rm $destdir/reco
else
Expand Down

0 comments on commit c999329

Please sign in to comment.