2012-02-16 22:53:52 +04:00
|
|
|
#!/bin/sh
|
|
|
|
extractor=$1
|
|
|
|
mert=$2
|
|
|
|
size=$3
|
|
|
|
|
|
|
|
if [ $# -ne 3 ]; then
|
|
|
|
echo "Usage: ./normal_test.sh extracto mert size"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -f NBEST.gz ]; then
|
|
|
|
gzip NBEST
|
|
|
|
fi
|
|
|
|
|
|
|
|
$extractor --nbest NBEST.gz --reference REF.0,REF.1,REF.2 \
|
|
|
|
--ffile FEATSTAT_gz --scfile SCORESTAT_gz \
|
|
|
|
--sctype BLEU 2> extractor_gz1.log
|
|
|
|
|
2012-02-20 03:02:23 +04:00
|
|
|
gzip -d NBEST.gz
|
|
|
|
|
2012-02-16 22:53:52 +04:00
|
|
|
$extractor --nbest NBEST --reference REF.0,REF.1,REF.2 \
|
|
|
|
--prev-ffile FEATSTAT --prev-scfile SCORESTAT \
|
|
|
|
--ffile FEATSTAT2 --scfile SCORESTAT2 \
|
|
|
|
--sctype BLEU 2> extractor_gz2.log
|
|
|
|
|
|
|
|
# Now we want to test reading gzipped files.
|
|
|
|
# We will first compress the output previously.
|
|
|
|
|
|
|
|
for f in FEATSTAT_gz SCORESTAT_gz; do
|
|
|
|
printf "Compressing %s " $f
|
|
|
|
gzip $f
|
|
|
|
echo "done."
|
|
|
|
done
|
|
|
|
|
2012-02-20 03:02:23 +04:00
|
|
|
$extractor --nbest NBEST --reference REF.0,REF.1,REF.2 \
|
2012-02-16 22:53:52 +04:00
|
|
|
--prev-ffile FEATSTAT_gz.gz --prev-scfile SCORESTAT_gz.gz \
|
|
|
|
--ffile FEATSTAT2_gz --scfile SCORESTAT2_gz \
|
|
|
|
--sctype BLEU 2> extractor_gz3.log
|
|
|
|
|
2012-02-20 03:02:23 +04:00
|
|
|
gzip -d FEATSTAT_gz.gz SCORESTAT_gz.gz
|
2012-02-16 22:53:52 +04:00
|
|
|
echo "Done."
|