Commit 142b3be2 authored by Nagendra Goel's avatar Nagendra Goel
Browse files

use filter instead of grep for speed

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@5143 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent e97afef2
#!/bin/bash
# Copyright 2014 Guoguo Chen
# Copyright 2014 Guoguo Chen, 2015 GoVivace Inc. (Nagendra Goel)
# Apache 2.0
# Begin configuration section.
......@@ -74,9 +74,10 @@ done
# Figures out the proper HCLG.
sort -k1,1 -u < $graphdir/HCLG.fsts.scp > $graphdir/HCLG.fsts.scp.sorted
mv $graphdir/HCLG.fsts.scp.sorted $graphdir/HCLG.fsts.scp
for x in `seq 1 $nj`; do
for x in `seq 1 $nj`; do
cat $graphdir/HCLG.fsts.scp |\
grep -f <(cut -f 1 -d ' ' $sdata/$x/feats.scp) > $sdata/$x/graphs.scp
utils/filter_scp.pl -f 1 <(cut -f 1 -d ' ' $sdata/$x/feats.scp) > $sdata/$x/graphs.scp
num_feats=`cat $sdata/$x/feats.scp | wc -l`
num_graphs=`cat $sdata/$x/graphs.scp | wc -l`
if [ $num_graphs -ne $num_feats ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment