Skip to content

Preserve the comments in STM file on subsetting data directory#2627

Merged
danpovey merged 5 commits intokaldi-asr:masterfrom
akshayc11:Issue-1765-Preserve-Comments-in-STM-on-subset
Aug 18, 2018
Merged

Preserve the comments in STM file on subsetting data directory#2627
danpovey merged 5 commits intokaldi-asr:masterfrom
akshayc11:Issue-1765-Preserve-Comments-in-STM-on-subset

Conversation

@akshayc11
Copy link
Contributor

Addresses #1765

[ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be a command not found; need space. Test before making PR!
But thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies... fixed...

[ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better to use '^;;' as the pattern, to avoid over-matching.

@akshayc11
Copy link
Contributor Author

@danpovey Addressed your comments.

[ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the curly braces from destdir? It's just inconsistent-looking.

@danpovey danpovey merged commit c999329 into kaldi-asr:master Aug 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants