Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Commits
168a2211
Commit
168a2211
authored
1 year ago
by
Solene Tarride
Browse files
Options
Downloads
Plain Diff
Merge branch 'support-missing-entities' into 'main'
Support missing entities during nerval evaluation Closes
#270
See merge request
!396
parents
52581004
391d80e5
No related branches found
No related tags found
1 merge request
!396
Support missing entities during nerval evaluation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dan/ocr/evaluate.py
+6
-1
6 additions, 1 deletion
dan/ocr/evaluate.py
with
6 additions
and
1 deletion
dan/ocr/evaluate.py
+
6
−
1
View file @
168a2211
...
...
@@ -143,7 +143,12 @@ def eval_nerval(
scores
=
{
key
:
{
k
:
round
(
value
*
100
,
2
)
if
k
in
[
"
P
"
,
"
R
"
,
"
F1
"
]
else
value
k
:
round
(
value
*
100
,
2
)
if
k
in
[
"
P
"
,
"
R
"
,
"
F1
"
]
and
value
is
not
None
# Value can be None when
# no entity is predicted for a specific entity type
# there is no entity in the labels for a specific entity type
else
(
value
or
0
)
for
k
,
value
in
values
.
items
()
}
for
key
,
values
in
evaluate
(
ground_truths
,
predictions
,
threshold
).
items
()
...
...
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