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
0af138c0
There was an error fetching the commit references. Please try again later.
Commit
0af138c0
authored
1 year ago
by
Paweł Walkowiak
Browse files
Options
Downloads
Patches
Plain Diff
Freeze defaultdict
parent
9f4cf5ab
1 merge request
!13
Fix anonymizer errors
Pipeline
#15185
passed with stages
in 1 minute and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dictionaries/morphosyntactic/ner_file.py
+3
-0
3 additions, 0 deletions
src/dictionaries/morphosyntactic/ner_file.py
with
3 additions
and
0 deletions
src/dictionaries/morphosyntactic/ner_file.py
+
3
−
0
View file @
0af138c0
...
...
@@ -57,6 +57,9 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary):
ner_tag
,
word
,
lemma
,
morpho_tag
=
line
.
split
(
"
\t
"
)
replacement_dictionary
[
ner_tag
][
morpho_tag
][
lemma
]
=
word
replacement_dictionary
=
{
k
:
dict
(
v
)
for
k
,
v
in
replacement_dictionary
.
items
()
if
v
}
# freeze dict
return
replacement_dictionary
def
get_supported_detection_classes
(
self
)
->
List
[
Type
[
Detection
]]:
...
...
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