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
Commits
be181ccf
Commit
be181ccf
authored
3 years ago
by
Charlotte Mauvezin
Browse files
Options
Downloads
Patches
Plain Diff
linter
parent
1925e390
No related branches found
No related tags found
1 merge request
!10
Multiple input
Pipeline
#103816
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nerval/evaluate.py
+5
-5
5 additions, 5 deletions
nerval/evaluate.py
with
5 additions
and
5 deletions
nerval/evaluate.py
+
5
−
5
View file @
be181ccf
# -*- coding: utf-8 -*-
import
argparse
import
glob
import
logging
import
os
import
re
from
pathlib
import
Path
import
editdistance
import
edlib
import
termtables
as
tt
import
glob
from
pathlib
import
Path
import
pandas
as
pd
import
termtables
as
tt
NOT_ENTITY_TAG
=
"
O
"
...
...
@@ -86,6 +84,8 @@ def parse_bio(path: str) -> dict:
try
:
word
,
label
=
line
.
split
()
except
ValueError
:
print
(
index
)
print
(
line
)
raise
(
Exception
(
f
"
The file
{
path
}
given in input is not in BIO format.
"
))
# Preserve hyphens to avoid confusion with the hyphens added later during alignment
...
...
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