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

Added var to evaluate to chose the ref file

parent ac45f4fd
No related branches found
No related tags found
No related merge requests found
......@@ -37,22 +37,29 @@ fi
TEST=$(find $UD_ROOT*$KEYWORD -type f -name '*test*.conllu')
TESTRAW=$(find $UD_ROOT*$KEYWORD -type f -name '*test*.txt')
DEV=$(find $UD_ROOT*$KEYWORD -type f -name '*dev*.conllu')
DEVRAW=$(find $UD_ROOT*$KEYWORD -type f -name '*dev*.txt')
TRAIN=$(find $UD_ROOT*$KEYWORD -type f -name '*train*.conllu')
TRAINRAW=$(find $UD_ROOT*$KEYWORD -type f -name '*train*.txt')
if has_space "$TEST";
EVALTARGET=$DEV
if has_space "$EVALTARGET";
then
>&2 echo "ERROR : more than 1 match with keyword" $KEYWORD
>&2 echo "TEST : " $TEST
>&2 echo "TEST : " $EVALTARGET
print_usage_and_exit
fi
if test ! -f $TEST;
if test ! -f $EVALTARGET;
then
>&2 echo "ERROR : no test file found with keyword" $KEYWORD
>&2 echo "$TEST"
>&2 echo "ERROR : no target file found with keyword" $KEYWORD
>&2 echo "$EVALTARGET"
print_usage_and_exit
fi
EVALCONLL="../scripts/conll18_ud_eval.py"
OUTPUT=$EXPNAME"/predicted_eval.tsv"
macaon_decode --model $EXPNAME --mcd $MCD --inputTSV $TEST $@ || exit 1
macaon_decode --model $EXPNAME --mcd $MCD --inputTSV $EVALTARGET $@ > $OUTPUT && $EVALCONLL $EVALTARGET $OUTPUT -v || 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