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') ...@@ -40,15 +40,17 @@ DEV=$(find $CORPUS -type f -name '*dev*.conllu')
DEVRAW=$(find $CORPUS -type f -name '*dev*.txt') DEVRAW=$(find $CORPUS -type f -name '*dev*.txt')
TEST=$(find $CORPUS -type f -name '*test*.conllu') TEST=$(find $CORPUS -type f -name '*test*.conllu')
TESTRAW=$(find $CORPUS -type f -name '*test*.txt') TESTRAW=$(find $CORPUS -type f -name '*test*.txt')
MCD=$(find $CORPUS -type f -name '*.mcd')
REF=$TEST REF=$TEST
REFRAW=$TESTRAW REFRAW=$TESTRAW
if has_space "$REF" || has_space "$REFRAW"; if has_space "$REF" || has_space "$REFRAW" || has_space "$MCD";
then then
>&2 echo "ERROR : more than 1 match" >&2 echo "ERROR : more than 1 match"
>&2 echo "REF : " $REF >&2 echo "REF : " $REF
>&2 echo "REFRAW : " $REFRAW >&2 echo "REFRAW : " $REFRAW
>&2 echo "MCD : " $MCD
print_usage_and_exit print_usage_and_exit
fi fi
...@@ -65,7 +67,11 @@ then ...@@ -65,7 +67,11 @@ then
print_usage_and_exit print_usage_and_exit
fi fi
MCD=$EXPPATH"/data/*\.mcd" if test -z $MCD;
then
MCD=$EXPPATH"/data/*\.mcd"
fi
EVALCONLL="../scripts/conll18_ud_eval.py" EVALCONLL="../scripts/conll18_ud_eval.py"
OUTPUT=$EXPPATH"/predicted_eval.tsv" OUTPUT=$EXPPATH"/predicted_eval.tsv"
......
...@@ -43,17 +43,19 @@ DEV=$(find $CORPUS -type f -name '*dev*.conllu') ...@@ -43,17 +43,19 @@ DEV=$(find $CORPUS -type f -name '*dev*.conllu')
DEVRAW=$(find $CORPUS -type f -name '*dev*.txt') DEVRAW=$(find $CORPUS -type f -name '*dev*.txt')
TEST=$(find $CORPUS -type f -name '*test*.conllu') TEST=$(find $CORPUS -type f -name '*test*.conllu')
TESTRAW=$(find $CORPUS -type f -name '*test*.txt') 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 then
>&2 echo "ERROR : more than 1 match with keyword" $KEYWORD >&2 echo "ERROR : more than 1 match with keyword" $KEYWORD
>&2 echo "TRAIN : " $TRAIN >&2 echo "TRAIN : " $TRAIN
>&2 echo "DEV : " $DEV >&2 echo "DEV : " $DEV
>&2 echo "TEST : " $TEST >&2 echo "TEST : " $TEST
>&2 echo "MCD : " $MCD
print_usage_and_exit print_usage_and_exit
fi fi
if test ! -f $TRAIN; if test -z $TRAIN;
then then
>&2 echo "ERROR : no train file found in" $CORPUS >&2 echo "ERROR : no train file found in" $CORPUS
>&2 echo "$TRAIN" >&2 echo "$TRAIN"
...@@ -61,7 +63,7 @@ then ...@@ -61,7 +63,7 @@ then
fi fi
if [ "$MODE" = "txt" ]; then if [ "$MODE" = "txt" ]; then
if test ! -f $TRAINRAW; if test -z $TRAINRAW;
then then
>&2 echo "ERROR : no train file found in" $CORPUS >&2 echo "ERROR : no train file found in" $CORPUS
>&2 echo "$TRAINRAW" >&2 echo "$TRAINRAW"
...@@ -69,7 +71,12 @@ then ...@@ -69,7 +71,12 @@ then
fi fi
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 if [ "$MODE" = "tsv" ]; then
macaon train --model $EXPPATH --mcd $MCD --trainTSV $TRAIN --devTSV $DEV "$@" || exit 1 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.
Finish editing this message first!
Please register or to comment