Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nerval
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Named Entity Recognition
nerval
Merge requests
!40
Add a message to assertion errors
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add a message to assertion errors
assertion-message
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Manon Blanco
requested to merge
assertion-message
into
master
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Closes
#23 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c8d4cf6e
1 commit,
1 year ago
2 files
+
14
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
nerval/evaluate.py
+
7
−
7
Options
@@ -58,10 +58,10 @@ def compute_matches(
Output : {TAG1 : nb_entity_matched, ...}, example : {
'
All
'
: 1,
'
OCC
'
: 0,
'
PER
'
: 1}
"""
assert
annotation
assert
prediction
assert
labels_annot
assert
labels_predict
assert
annotation
,
"
Annotation is empty
"
assert
prediction
,
"
Prediction is empty
"
assert
labels_annot
,
"
Annotation labels are empty
"
assert
labels_predict
,
"
Prediction labels are empty
"
entity_count
=
{
"
All
"
:
0
}
last_tag
=
NOT_ENTITY_TAG
@@ -190,9 +190,9 @@ def get_labels_aligned(original: str, aligned: str, labels_original: list) -> li
Output format :
list of strings
"""
assert
original
assert
aligned
assert
labels_original
assert
original
,
"
Original is empty
"
assert
aligned
,
"
Aligned is empty
"
assert
labels_original
,
"
Original labels are empty
"
labels_aligned
=
[]
index_original
=
0
Loading