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

updated scripts to take into accound specifics mcd

parent 6f89810b
No related branches found
No related tags found
No related merge requests found
......@@ -40,15 +40,17 @@ DEV=$(find $CORPUS -type f -name '*dev*.conllu')
DEVRAW=$(find $CORPUS -type f -name '*dev*.txt')
TEST=$(find $CORPUS -type f -name '*test*.conllu')
TESTRAW=$(find $CORPUS -type f -name '*test*.txt')
MCD=$(find $CORPUS -type f -name '*.mcd')
REF=$TEST
REFRAW=$TESTRAW
if has_space "$REF" || has_space "$REFRAW";
if has_space "$REF" || has_space "$REFRAW" || has_space "$MCD";
then
>&2 echo "ERROR : more than 1 match"
>&2 echo "REF : " $REF
>&2 echo "REFRAW : " $REFRAW
>&2 echo "MCD : " $MCD
print_usage_and_exit
fi
......@@ -65,7 +67,11 @@ then
print_usage_and_exit
fi
MCD=$EXPPATH"/data/*\.mcd"
if test -z $MCD;
then
MCD=$EXPPATH"/data/*\.mcd"
fi
EVALCONLL="../scripts/conll18_ud_eval.py"
OUTPUT=$EXPPATH"/predicted_eval.tsv"
......
......@@ -43,17 +43,19 @@ DEV=$(find $CORPUS -type f -name '*dev*.conllu')
DEVRAW=$(find $CORPUS -type f -name '*dev*.txt')
TEST=$(find $CORPUS -type f -name '*test*.conllu')
TESTRAW=$(find $CORPUS -type f -name '*test*.txt')
MCD=$(find $CORPUS -type f -name '*.mcd')
if has_space "$TRAIN" || has_space "$DEV" || has_space "$TEST";
if has_space "$TRAIN" || has_space "$DEV" || has_space "$TEST" || has_space "$MCD";
then
>&2 echo "ERROR : more than 1 match with keyword" $KEYWORD
>&2 echo "TRAIN : " $TRAIN
>&2 echo "DEV : " $DEV
>&2 echo "TEST : " $TEST
>&2 echo "MCD : " $MCD
print_usage_and_exit
fi
if test ! -f $TRAIN;
if test -z $TRAIN;
then
>&2 echo "ERROR : no train file found in" $CORPUS
>&2 echo "$TRAIN"
......@@ -61,7 +63,7 @@ then
fi
if [ "$MODE" = "txt" ]; then
if test ! -f $TRAINRAW;
if test -z $TRAINRAW;
then
>&2 echo "ERROR : no train file found in" $CORPUS
>&2 echo "$TRAINRAW"
......@@ -69,7 +71,12 @@ then
fi
fi
MCD=$EXPPATH"/data/*\.mcd"
if test -z $MCD;
then
MCD=$EXPPATH"/data/*\.mcd"
fi
>&2 echo "Using MCD :" $MCD
if [ "$MODE" = "tsv" ]; then
macaon train --model $EXPPATH --mcd $MCD --trainTSV $TRAIN --devTSV $DEV "$@" || exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment