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
f34be700
Commit
f34be700
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
train and eval scripts now take mode as arguments
parent
29a89178
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
+16
-3
16 additions, 3 deletions
UD_any/evaluate.sh
UD_any/train.sh
+17
-4
17 additions, 4 deletions
UD_any/train.sh
with
33 additions
and
7 deletions
UD_any/evaluate.sh
+
16
−
3
View file @
f34be700
...
...
@@ -7,13 +7,14 @@ function has_space {
}
function
print_usage_and_exit
{
>
&2
echo
"USAGE : language_keyword templateName expName [arguments]"
>
&2
echo
"USAGE :
(tsv | txt)
language_keyword templateName expName [arguments]"
exit
1
}
MCD
=
data/conllu.mcd
KEYWORD
=
$1
EXPNAME
=
$2
MODE
=
$1
KEYWORD
=
$2
EXPNAME
=
$3
if
[
-z
"
$KEYWORD
"
]
;
then
...
...
@@ -27,6 +28,7 @@ then
print_usage_and_exit
fi
shift
shift
shift
...
...
@@ -43,6 +45,7 @@ TRAIN=$(find $UD_ROOT*$KEYWORD -type f -name '*train*.conllu')
TRAINRAW
=
$(
find
$UD_ROOT
*
$KEYWORD
-type
f
-name
'*train*.txt'
)
EVALTARGET
=
$TEST
EVALTARGETRAW
=
$TESTRAW
if
has_space
"
$EVALTARGET
"
;
then
...
...
@@ -61,5 +64,15 @@ fi
EVALCONLL
=
"../scripts/conll18_ud_eval.py"
OUTPUT
=
$EXPNAME
"/predicted_eval.tsv"
if
[
"
$MODE
"
=
"tsv"
]
;
then
macaon decode
--model
$EXPNAME
--mcd
$MCD
--inputTSV
$EVALTARGET
$@
>
$OUTPUT
&&
$EVALCONLL
$EVALTARGET
$OUTPUT
-v
||
exit
1
exit
0
fi
if
[
"
$MODE
"
=
"txt"
]
;
then
macaon decode
--model
$EXPNAME
--mcd
$MCD
--inputTXT
$EVALTARGETRAW
$@
>
$OUTPUT
&&
$EVALCONLL
$EVALTARGET
$OUTPUT
-v
||
exit
1
exit
0
fi
print_usage_and_exit
This diff is collapsed.
Click to expand it.
UD_any/train.sh
+
17
−
4
View file @
f34be700
...
...
@@ -7,14 +7,15 @@ function has_space {
}
function
print_usage_and_exit
{
>
&2
echo
"USAGE : language_keyword templateName expName [arguments]"
>
&2
echo
"USAGE :
(tsv | txt)
language_keyword templateName expName [arguments]"
exit
1
}
MCD
=
data/conllu.mcd
KEYWORD
=
$1
TEMPLATENAME
=
$2
EXPNAME
=
$3
MODE
=
$1
KEYWORD
=
$2
TEMPLATENAME
=
$3
EXPNAME
=
$4
if
[
-z
"
$KEYWORD
"
]
;
then
...
...
@@ -37,6 +38,7 @@ fi
shift
shift
shift
shift
if
[
"
$KEYWORD
"
=
"."
]
then
...
...
@@ -78,5 +80,16 @@ cp -r $TEMPLATENAME bin/$EXPNAME
EVALCONLL
=
"../scripts/conll18_ud_eval.py"
if
[
"
$MODE
"
=
"tsv"
]
;
then
macaon train
--model
bin/
$EXPNAME
--mcd
$MCD
--trainTSV
$TRAIN
--devTSV
$DEV
$@
||
exit
1
exit
0
fi
if
[
"
$MODE
"
=
"txt"
]
;
then
macaon train
--model
bin/
$EXPNAME
--mcd
$MCD
--trainTSV
$TRAIN
--trainTXT
$TRAINRAW
--devTSV
$DEV
--devTXT
$DEVRAW
$@
||
exit
1
exit
0
fi
print_usage_and_exit
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