Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
anonymizer
Manage
Activity
Members
Labels
Plan
Issues
0
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
nlpworkers
anonymizer
Commits
45e0daf7
Commit
45e0daf7
authored
1 year ago
by
Bartlomiej
Browse files
Options
Downloads
Patches
Plain Diff
Add ner annotation
parent
3edf55cb
Branches
Branches containing commit
1 merge request
!11
Clarin json support
Pipeline
#14197
passed with stages
in 1 minute and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/input_parsers/wiktor_ner.py
+9
-1
9 additions, 1 deletion
src/input_parsers/wiktor_ner.py
with
9 additions
and
1 deletion
src/input_parsers/wiktor_ner.py
+
9
−
1
View file @
45e0daf7
...
...
@@ -2,7 +2,7 @@
from
typing
import
List
,
Tuple
from
src.annotations
import
Annotation
,
MorphosyntacticAnnotation
from
src.annotations
import
Annotation
,
MorphosyntacticAnnotation
,
NerAnnotation
from
src.input_parsers.interface
import
InputParser
...
...
@@ -99,5 +99,13 @@ class WiktorNERInputParser(InputParser):
),
)
)
# NER annotations
if
content
.
spans
:
for
entity
in
content
.
spans
(
'
ner
'
):
if
entity
.
start
and
entity
.
stop
:
if
entity
.
type
:
annotations
.
append
(
(
entity
.
start
,
entity
.
stop
,
NerAnnotation
(
entity
.
type
))
)
return
text
,
annotations
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