Skip to content

Commit

Permalink
eval scirpt
Browse files Browse the repository at this point in the history
  • Loading branch information
ptakopysk committed Dec 17, 2017
1 parent 1a042d8 commit e8c89af
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions tools/eval_joined.shc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/bin/bash
#
# SGE CONFIGURATION
#
# !!! Memory limit
#$ -hard
#$ -l mem_free=1g
#$ -l act_mem_free=1g
#$ -l h_vmem=1g
#
# Run in this directory
#$ -cwd
#
# Use bash
#$ -S /bin/bash
#
# Export environment variables
#$ -V
#
# Logs
#$ -o /home/rosa/logs
#$ -e /home/rosa/logs
# Do not merge stderr with stdout
#$ -j n
#
# 1 thread
#$ -pe smp 1

# Print each command to STDERR before executing (expanded), prefixed by "+ "
set -o xtrace

renice 10 $$ >&2

evaldir=eval

cd ..
mkdir -p $evaldir

function GOLD() {
echo treebanks/$1-ud-dev.conllu
}

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

function ECHOT (){
echo -ne "$@\t"
}

function EVALLANG() {
l=$1

# lang
ECHOT $l

# LAS
for s in tlt_BASE tlt_VERBAUX tlt_NOUNPROPN tlt_PRONDET tlt_NMODCOMPOUND
do
ECHOT $(tools/evaluator.py --joined -m las `GOLD $l` `OUTX $l $s`)
done

echo
}

function EVAL() {
#t est
# EVALLANG cs
# exit 1

# low
for l in hi eu vi fa ar tr uk hu he fi
do
EVALLANG $l
done
echo -e '\n\n'

# med
for l in sl lv et pl ro hr el id ru cs sk nl gl ca bg
do
EVALLANG $l
done
echo -e '\n\n'

# high
for l in sv de da fr it no pt
do
EVALLANG $l
done
echo -e '\n\n'

# en
EVALen
}

EVAL > $evaldir/eval_new_experiments_las_joined.tsv

0 comments on commit e8c89af

Please sign in to comment.