bug fixed

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1487 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
nicolabertoldi 2007-10-25 14:34:49 +00:00
parent 1b0576ba6c
commit fd3ecd4334
2 changed files with 7 additions and 1 deletions

View File

@ -98,7 +98,7 @@ cat $tmpdir/feats.opt | perl $SCRIPTS_ROOTDIR/training/cmert-0.5/reduce-field.pl
active=`cat init.opt | head -1 | awk '{print NF}'`
$SCRIPTS_ROOTDIR/training/cmert-0.5/mert -d $active
$SCRIPTS_ROOTDIR/training/cmert-0.5/mert -d $active 2> reduced_cmert.log
for file in feats.opt init.opt; do
mv $file reduced_$file
@ -109,4 +109,9 @@ mv weights.txt reduced_weights.txt
cat reduced_weights.txt | perl $SCRIPTS_ROOTDIR/training/cmert-0.5/extend-field.pl $debug -weight $tmpdir/weight.opt -d $size -activate $activefields | normalize_weights > weights.txt
rm -r $tmpdir
bestpointline=`echo "Best point:"`
bestpointline="$bestpointline "`cat weights.txt`
bestpointline="$bestpointline => "`cat reduced_cmert.log | grep -i "Best point:" | awk '{print $NF}'`
echo $bestpointline > /dev/stderr
exit

View File

@ -684,6 +684,7 @@ while(1) {
safesystem ("\\mv -f reduced_feats.opt run$run.reduced_feats.opt ; gzip run$run.reduced_feats.opt") or die;
safesystem ("\\mv -f reduced_init.opt run$run.reduced_init.opt") or die;
safesystem ("\\mv -f reduced_weights.txt run$run.reduced_weights.txt") or die;
safesystem ("\\mv -f reduced_cmert.log run$run.reduced_cmert.log") or die;
}
print "run $run end at ".`date`;