lang=ps
tgt=en
pair=psen
python ./order_res.py $1
cp $1.ordered test.${pair}.${lang}.norm.tok.cased.bpe.out
#cp $1 test.${pair}.${lang}.norm.tok.cased.bpe.out
./delbpe.sh test.${pair}.${lang}.norm.tok.cased.bpe.out
#./delbpe.sh valid.ja.txt
./detruecase.perl < test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe >  test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased
./detokenizer.perl -u -l ${tgt} < test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased > test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased.detok
#python split_single.py valid.ch.out.delbpe
#python split_single.py valid.ja.txt.delbpe
./wrap-xml.perl ${tgt} newstest2020-${pair}-src.${lang}.sgm wc_test < test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased.detok > test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased.detok.sgm
./mteval-v13a.pl -c -r newstest2020-${pair}-ref.${tgt}.sgm -s newstest2020-${pair}-src.${lang}.sgm -t test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased.detok.sgm > $1.eval
#./multi-bleu.perl -lc test.${pair}.${tgt}.norm <  test.${pair}.${lang}.norm.tok.cased.bpe.out.delbpe.decased.detok > $1
#./multi-bleu.perl -lc valid.ja.txt.delbpe.single < valid.ch.out.delbpe.single > ${1}.char
