Skip to content
Snippets Groups Projects
Commit 3c6b63c4 authored by Dan Povey's avatar Dan Povey
Browse files

some cosmetic changes: add comments to RNNLM rescoring utilities to refer to...

some cosmetic changes: add comments to RNNLM rescoring utilities to refer to each other; improve messages printed out by 'configure'
parent e1f68e8d
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,8 @@
# Copyright 2015 Guoguo Chen
# Apache 2.0
# This script rescores lattices with RNNLM.
# This script rescores lattices with RNNLM. See also rnnlmrescore.sh which is
# an older script using n-best lists.
# Begin configuration section.
cmd=run.pl
......
#!/bin/bash
# please see lmrescore_rnnlm_lat.sh which is a newer script using lattices.
# Begin configuration section.
N=10
......@@ -104,14 +105,14 @@ if [ "$oldlm" == "$oldlang/G.fst" ]; then
if [ $stage -le 2 ]; then
echo "$0: removing old LM scores."
# Use the phi-matcher style of composition.. this is appropriate
# if the old LM scores were added e.g. by lmrescore.sh, using
# if the old LM scores were added e.g. by lmrescore.sh, using
# phi-matcher composition.
$cmd JOB=1:$nj $dir/log/remove_old.JOB.log \
lattice-scale --acoustic-scale=-1 --lm-scale=-1 "ark:gunzip -c $dir/nbest1.JOB.gz|" ark:- \| \
lattice-compose --phi-label=$phi ark:- $oldlm ark:- \| \
lattice-scale --acoustic-scale=-1 --lm-scale=-1 ark:- "ark:|gzip -c >$dir/nbest2.JOB.gz" \
|| exit 1;
fi
fi
else
if [ $stage -le 2 ]; then
echo "$0: removing old LM scores."
......@@ -189,7 +190,7 @@ if [ $stage -le 7 ]; then
echo "$0: reconstructing total LM+graph scores including interpolation of RNNLM and old LM scores."
for n in `seq $nj`; do
paste $adir.$n/lmwt.nolm $adir.$n/lmwt.lmonly $adir.$n/lmwt.rnn | awk -v rnnweight=$rnnweight \
'{ key=$1; graphscore=$2; lmscore=$4; rnnscore=$6;
'{ key=$1; graphscore=$2; lmscore=$4; rnnscore=$6;
score = graphscore+(rnnweight*rnnscore)+((1-rnnweight)*lmscore);
print $1,score; } ' > $adir.$n/lmwt.interp.$rnnweight || exit 1;
done
......
......@@ -439,7 +439,7 @@ function configure_cuda {
# Determine 'CUDA_ARCH',
CUDA_VERSION=$($CUDATKDIR/bin/nvcc -V | tr '.,' '_ ' | awk '/release/{sub(/.*release/,""); print $1;}') # MAJOR_MINOR,
if [ -z "$CUDA_VERSION" ] ; then
echo "Cannot figure out CUDA_VERSION from the nvcc output. Either your CUDA is too new or too old."
echo "Cannot figure out CUDA_VERSION from the nvcc output. Either your CUDA is too new or too old."
exit 1
fi
......@@ -485,7 +485,8 @@ function linux_configure_speex {
spx_type=so
fi
if [ ! -f "$SPEEXLIBDIR/libspeex.${spx_type}" ];then
echo "Static=[$static_speex] Speex library not found: You can still build Kaldi without Speex."
echo "Info: configuring Kaldi not to link with Speex (don't worry, it's only needed if you"
echo "intend to use 'compress-uncompress-speex', which is very unlikely)"
return
fi
......@@ -726,7 +727,7 @@ function linux_check_dynamic {
return 0;
fi
done
echo "... no {libatlas,lib${pt}atlas}.so in $dir";
# echo "... no {libatlas,lib${pt}atlas}.so in $dir";
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment