Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
f2a2d53e
Commit
f2a2d53e
authored
13 years ago
by
Adam Radziszewski
Browse files
Options
Downloads
Patches
Plain Diff
tagger-eval script reports percentage unknown and segchane
parent
af005af1
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/tagger-eval.py
+10
-0
10 additions, 0 deletions
utils/tagger-eval.py
with
10 additions
and
0 deletions
utils/tagger-eval.py
+
10
−
0
View file @
f2a2d53e
...
...
@@ -138,6 +138,9 @@ class Metric:
# heur recover
PUNCHIT_PUNCONLY
=
([
Feat
.
ALLPUNC_HIT
],
None
)
PUNCHIT_AROUND
=
([
Feat
.
PUNCAROUND_HIT
],
None
)
# percentage of known and unknown tokens
KN
=
([
Feat
.
KNOWN
],
None
)
UNK
=
([
Feat
.
UNKNOWN
],
None
)
# percentage of tokens subjected to seg change
SEG_CHANGE
=
([
Feat
.
SEG_CHANGE
],
None
)
SEG_NOCHANGE
=
([
Feat
.
SEG_NOCHANGE
],
None
)
...
...
@@ -355,6 +358,9 @@ def go():
unk_weak
=
0.0
unk_strong_pos
=
0.0
perc_unk
=
0.0
perc_segchange
=
0.0
for
fold_idx
in
range
(
num_folds
):
tag_fn
=
args
[
fold_idx
]
# filename of tagged fold @ fold_idx
ref_fn
=
args
[
fold_idx
+
num_folds
]
# ... reference fold @ fold_idx
...
...
@@ -375,6 +381,8 @@ def go():
strong_pos
+=
res
.
value_of
(
Metric
.
POS_SC
)
unk_weak
+=
res
.
value_of
(
Metric
.
UNK_WC
)
unk_strong_pos
+=
res
.
value_of
(
Metric
.
UNK_POS_SC
)
perc_unk
+=
res
.
value_of
(
Metric
.
UNK
)
perc_segchange
+=
res
.
value_of
(
Metric
.
SEG_CHANGE
)
print
'
AVG weak corr lower bound
\t
%.4f%%
'
%
(
weak_lower_bound
/
num_folds
)
print
'
AVG weak corr upper bound
\t
%.4f%%
'
%
(
weak_upper_bound
/
num_folds
)
...
...
@@ -382,6 +390,8 @@ def go():
print
'
AVG POS strong corr
\t
%.4f%%
'
%
(
strong_pos
/
num_folds
)
print
'
AVG UNK weak corr (heur)
\t
%.4f%%
'
%
(
unk_weak
/
num_folds
)
print
'
AVG UNK POS strong corr
\t
%.4f%%
'
%
(
unk_strong_pos
/
num_folds
)
print
'
AVG percentage UNK
\t
%.4f%%
'
%
(
perc_unk
/
num_folds
)
print
'
AVG percentage seg change
\t
%.4f%%
'
%
(
perc_segchange
/
num_folds
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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