Skip to content
Snippets Groups Projects
Commit ac45f4fd authored by Franck Dary's avatar Franck Dary
Browse files

Added script to evaluate

parent 292aeae0
No related branches found
No related tags found
No related merge requests found
#! /bin/bash
source config
function has_space {
[[ "$1" != "${1%[[:space:]]*}" ]] && return 0 || return 1
}
function print_usage_and_exit {
>&2 echo "USAGE : language_keyword templateName expName [arguments]"
exit 1
}
MCD=data/conllu.mcd
KEYWORD=$1
EXPNAME=$2
if [ -z "$KEYWORD" ];
then
>&2 echo "ERROR : missing argument 1 (keyword)"
print_usage_and_exit
fi
if [ -z "$EXPNAME" ];
then
>&2 echo "ERROR : missing argument 2 (expName)"
print_usage_and_exit
fi
shift
shift
if [ "$KEYWORD" = "." ]
then
KEYWORD=""
fi
TEST=$(find $UD_ROOT*$KEYWORD -type f -name '*test*.conllu')
TESTRAW=$(find $UD_ROOT*$KEYWORD -type f -name '*test*.txt')
if has_space "$TEST";
then
>&2 echo "ERROR : more than 1 match with keyword" $KEYWORD
>&2 echo "TEST : " $TEST
print_usage_and_exit
fi
if test ! -f $TEST;
then
>&2 echo "ERROR : no test file found with keyword" $KEYWORD
>&2 echo "$TEST"
print_usage_and_exit
fi
EVALCONLL="../scripts/conll18_ud_eval.py"
macaon_decode --model $EXPNAME --mcd $MCD --inputTSV $TEST $@ || exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment