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
f99a6a2e
There was an error fetching the commit references. Please try again later.
Commit
f99a6a2e
authored
1 year ago
by
Michał Pogoda
Browse files
Options
Downloads
Patches
Plain Diff
added more detection categoies
parent
7b7f287c
3 merge requests
!10
Anonimizer v2
,
!9
Fix infancy erorrs based on Magdalena's report
,
!7
Better coverage
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/detections/detection.py
+35
-0
35 additions, 0 deletions
src/detections/detection.py
with
35 additions
and
0 deletions
src/detections/detection.py
+
35
−
0
View file @
f99a6a2e
...
@@ -32,6 +32,35 @@ class SurnameDetection(MorphosyntacticInfoMixin, Detection):
...
@@ -32,6 +32,35 @@ class SurnameDetection(MorphosyntacticInfoMixin, Detection):
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
LocationDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
location
"
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
OrganizationNameDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
organization_name
"
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
def
ProperNameDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
proper_name
"
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
TitleDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
title
"
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
HydronymDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
hydronym
"
def
__init__
(
self
,
morpho_tag
:
Optional
[
str
]
=
None
)
->
None
:
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
StreetNameDetection
(
MorphosyntacticInfoMixin
,
Detection
):
class
StreetNameDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
street_name
"
TYPE_NAME
=
"
street_name
"
...
@@ -47,6 +76,7 @@ class CityDetection(MorphosyntacticInfoMixin, Detection):
...
@@ -47,6 +76,7 @@ class CityDetection(MorphosyntacticInfoMixin, Detection):
super
().
__init__
(
morpho_tag
=
morpho_tag
)
super
().
__init__
(
morpho_tag
=
morpho_tag
)
class
CountryDetection
(
MorphosyntacticInfoMixin
,
Detection
):
class
CountryDetection
(
MorphosyntacticInfoMixin
,
Detection
):
TYPE_NAME
=
"
country
"
TYPE_NAME
=
"
country
"
...
@@ -102,6 +132,11 @@ class KRSDetection(Detection): # National Court Register
...
@@ -102,6 +132,11 @@ class KRSDetection(Detection): # National Court Register
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
super
().
__init__
()
super
().
__init__
()
class
SerialNumberDetection
(
Detection
):
TYPE_NAME
=
"
serial_number
"
def
__init__
(
self
)
->
None
:
super
().
__init__
()
class
OtherDetection
(
Detection
):
# Non standard entity
class
OtherDetection
(
Detection
):
# Non standard entity
TYPE_NAME
=
"
other
"
TYPE_NAME
=
"
other
"
...
...
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