Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon_data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
macaon_data
Commits
8a77b1cb
Commit
8a77b1cb
authored
4 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
updated scripts to take into accound specifics mcd
parent
6f89810b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
UD_any/evaluate.sh
+8
-2
8 additions, 2 deletions
UD_any/evaluate.sh
UD_any/train.sh
+11
-4
11 additions, 4 deletions
UD_any/train.sh
with
19 additions
and
6 deletions
UD_any/evaluate.sh
+
8
−
2
View file @
8a77b1cb
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
UD_any/train.sh
+
11
−
4
View file @
8a77b1cb
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment