Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
anonymizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
anonymizer
Commits
45e0daf7
Commit
45e0daf7
authored
Oct 18, 2023
by
Bartlomiej
Browse files
Options
Downloads
Patches
Plain Diff
Add ner annotation
parent
3edf55cb
No related branches found
No related tags found
1 merge request
!11
Clarin json support
Pipeline
#14197
passed
Oct 18, 2023
Stage: check_style
Stage: build_clarin_json
Changes
1
Pipelines
1
Show 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%
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