Skip to content

Commit

Permalink
ečval reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
ptakopysk committed Dec 17, 2017
1 parent e8c89af commit b62c22e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
29 changes: 19 additions & 10 deletions tools/eval_all.shc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ function OUTS() {
echo outputs/en-$1.sup-w2v.tlt.dev.conllu
}

function OUTB() {
echo outputs/en-$1.transmoses-w2v-xtag.tlt_BASE.dev.conllu
}

function OUTR() {
echo outputs/en-$1.transmoses-w2v-xtag.tlt_REORDER.dev.conllu
}

function ECHOT (){
echo -ne "$@\t"
}
Expand All @@ -59,22 +67,23 @@ function EVALLANG() {
ECHOT $l

# para words (EN)
ECHOT $(wc -w < para/OpenSubtitles2016.$l-en.en)
# ECHOT $(wc -w < para/OpenSubtitles2016.$l-en.en)

# treebank size
ECHOT $(grep -P -c '^[0-9]*\t' treebanks/$l-ud-train.conllu)
ECHOT $(grep -P -c '^[0-9]*\t' treebanks/$l-ud-dev.conllu)
# ECHOT $(grep -P -c '^[0-9]*\t' treebanks/$l-ud-train.conllu)
# ECHOT $(grep -P -c '^[0-9]*\t' treebanks/$l-ud-dev.conllu)

# BLEU
ECHOT $(mtrics -b -c para/OpenSubtitles2016.en-$l.clean.test.en.mosestranslate -r para/OpenSubtitles2016.en-$l.clean.test.$l | grep -o '0\..*')
ECHOT $(mtrics -b -c para/OpenSubtitles2016.en-$l.clean.test.en.mosestranslate -r para/OpenSubtitles2016.en-$l.clean.test.$l | grep -o '0\..*')
ECHOT $(mtrics -b -c para/OpenSubtitles2016.en-$l.clean.test.en.mosestranslate.reorder -r para/OpenSubtitles2016.en-$l.clean.test.$l | grep -o '0\..*')

# POS acc
ECHOT $(tools/evaluator.py --joined -m pos `GOLD $l` `OUTX $l`)
ECHOT $(tools/evaluator.py --joined -m pos `GOLD $l` `OUTS $l`)
ECHOT $(tools/evaluator.py --joined -m pos `GOLD $l` `OUTB $l`)
ECHOT $(tools/evaluator.py --joined -m pos `GOLD $l` `OUTR $l`)

# LAS
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTX $l`)
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTS $l`)
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTB $l`)
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTR $l`)

echo
}
Expand Down Expand Up @@ -133,8 +142,8 @@ function EVAL() {
echo -e '\n\n'

# en
EVALen
# EVALen
}

EVAL > eval_langs_table_for_paper.tsv
EVAL > $evaldir/eval_langs_table_reorder.tsv

4 changes: 2 additions & 2 deletions tools/eval_joined.shc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function EVALLANG() {
ECHOT $l

# LAS
for s in tlt_BASE tlt_VERBAUX tlt_NOUNPROPN tlt_PRONDET tlt_NMODCOMPOUND
for s in tlt_REORDER
do
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTX $l $s`)
done
Expand Down Expand Up @@ -93,5 +93,5 @@ function EVAL() {
EVALen
}

EVAL > $evaldir/eval_new_experiments_las_joined.tsv
EVAL > $evaldir/eval_new_experiments_reorder_las_joined.tsv

0 comments on commit b62c22e

Please sign in to comment.