mosesdecoder/mert/example/README.oldmert
nicolabertoldi 291260abf7 - made output more compliant with old version
- added PerSCorer.h and BleuScorer.h
- stored feature names
- fixed bug about output of best Point


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1796 1f5c12ca-751b-0410-a591-d2e778427230
2008-05-27 16:50:52 +00:00

40 lines
1.4 KiB
Plaintext

scorecmd=/Users/nicolabertoldi/workspace/mosesdecoder/trunk/scripts/training/cmert-0.5/score-nbest.py
mertcmd=/Users/nicolabertoldi/workspace/mosesdecoder/trunk/scripts/training/cmert-0.5/mert
size=15
#cat NBEST | $scorecmd ${casetype} ${normtype} ${reflentype} REF.0 REF.1 REF.2 ./$basename.
$mertcmd -d $size
exit
lines=10
for casetype in '' '-c' ; do
for normtype in '' '-n' ; do
for reflentype in '' '-a' '-s' '-e' ; do
basename=OLDMERT${casetype}${normtype}${reflentype}
cat NBEST | $scorecmd ${casetype} ${normtype} ${reflentype} REF.0 REF.1 REF.2 ./$basename.
#cat NBEST NBEST | sort -mnk 1,1 | $scorecmd ${casetype} ${normtype} ${reflentype} REF.0 REF.1 REF.2 ./$basename.
cat ./$basename.feats.opt | cut -d' ' -f 16- > ./$basename.SCORESTAT.out
cat ./$basename.feats.opt | cut -d' ' -f 1-15 > ./$basename.FEATSTAT.out
echo comparing SCORESTAT.out and $basename.SCORESTAT.out
cat SCORESTAT.out | perl -pe 's/[ ]+$//' | sort | grep -v "^SCORE"> AAA$$
cat $basename.SCORESTAT.out | sort >BBB$$
wc AAA$$ BBB$$
cmp AAA$$ BBB$$
echo comparing FEATSTAT.out and $basename.FEATSTAT.out
cat FEATSTAT.out | perl -pe 's/\-/\@\-\@/g; s/(\s)([0-9])/$1\-$2/g; s/\@\-\@//g; s/\-?0\b/0/g; s/[ ]+$//' | sort | grep -v "^FEAT" > AAA$$
cat $basename.FEATSTAT.out | perl -pe 's/\-?0\.0\b/0/g; s/\.0\b//g' | sort > BBB$$
wc AAA$$ BBB$$
cmp AAA$$ BBB$$
#rm AAA$$ BBB$$
echo
done
done
done