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
ac45f4fd
Commit
ac45f4fd
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Added script to evaluate
parent
292aeae0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
UD_any/evaluate.sh
+58
-0
58 additions, 0 deletions
UD_any/evaluate.sh
with
58 additions
and
0 deletions
UD_any/evaluate.sh
0 → 100755
+
58
−
0
View file @
ac45f4fd
#! /bin/bash
source
config
function
has_space
{
[[
"
$1
"
!=
"
${
1
%[[
:space:]]
*
}
"
]]
&&
return
0
||
return
1
}
function
print_usage_and_exit
{
>
&2
echo
"USAGE : language_keyword templateName expName [arguments]"
exit
1
}
MCD
=
data/conllu.mcd
KEYWORD
=
$1
EXPNAME
=
$2
if
[
-z
"
$KEYWORD
"
]
;
then
>
&2
echo
"ERROR : missing argument 1 (keyword)"
print_usage_and_exit
fi
if
[
-z
"
$EXPNAME
"
]
;
then
>
&2
echo
"ERROR : missing argument 2 (expName)"
print_usage_and_exit
fi
shift
shift
if
[
"
$KEYWORD
"
=
"."
]
then
KEYWORD
=
""
fi
TEST
=
$(
find
$UD_ROOT
*
$KEYWORD
-type
f
-name
'*test*.conllu'
)
TESTRAW
=
$(
find
$UD_ROOT
*
$KEYWORD
-type
f
-name
'*test*.txt'
)
if
has_space
"
$TEST
"
;
then
>
&2
echo
"ERROR : more than 1 match with keyword"
$KEYWORD
>
&2
echo
"TEST : "
$TEST
print_usage_and_exit
fi
if
test
!
-f
$TEST
;
then
>
&2
echo
"ERROR : no test file found with keyword"
$KEYWORD
>
&2
echo
"
$TEST
"
print_usage_and_exit
fi
EVALCONLL
=
"../scripts/conll18_ud_eval.py"
macaon_decode
--model
$EXPNAME
--mcd
$MCD
--inputTSV
$TEST
$@
||
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