Skip to content

Commit 56328f6

Browse files
Merge pull request #372 from code-kern-ai/pii-cognition-mappings
Added congition mapping as well as groupings to all PII bricks
2 parents 4440ef2 + aaf8f03 commit 56328f6

File tree

11 files changed

+39
-3
lines changed

11 files changed

+39
-3
lines changed

extractors/dates_and_times/date_extraction/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def get_config():
1515
available_for=["refinery", "common"],
1616
part_of_group=[
1717
"dates_and_times",
18+
"personal_identifiers"
1819
], # first entry should be parent directory
1920
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "Date"
23+
},
2024
integrator_inputs={
2125
"name": "date_extraction",
2226
"refineryDataType": RefineryDataType.TEXT.value,

extractors/dates_and_times/time_extraction/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def get_config():
1515
available_for=["refinery", "common"],
1616
part_of_group=[
1717
"dates_and_times",
18+
"personal_identifiers"
1819
], # first entry should be parent directory
1920
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "Time"
23+
},
2024
integrator_inputs={
2125
"name": "time_extraction",
2226
"refineryDataType": RefineryDataType.TEXT.value,

extractors/numbers/ip_extraction/code_snippet_refinery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33

44
ATTRIBUTE: str = "text" # only text attributes
5-
LABEL: str = "IP-address"
5+
LABEL: str = "IP Address"
66

77
def ip_extraction(record):
88
regex = re.compile(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")

extractors/numbers/ip_extraction/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def get_config():
1515
available_for=["refinery", "common"],
1616
part_of_group=[
1717
"numbers",
18+
"personal_identifiers"
1819
], # first entry should be parent directory
1920
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "IP Address"
23+
},
2024
integrator_inputs={
2125
"name": "ip_extraction",
2226
"refineryDataType": RefineryDataType.TEXT.value,
@@ -31,7 +35,7 @@ def get_config():
3135
},
3236
"LABEL": {
3337
"selectionType": SelectionType.CHOICE.value,
34-
"defaultValue": "IP-address",
38+
"defaultValue": "IP Address",
3539
"optional": "false",
3640
"addInfo": [
3741
BricksVariableType.LABEL.value,

extractors/numbers/phone_number_extraction/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def get_config():
1515
available_for=["refinery", "common"],
1616
part_of_group=[
1717
"numbers",
18+
"personal_identifiers"
1819
], # first entry should be parent directory
1920
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "Phone number"
23+
},
2024
integrator_inputs={
2125
"name": "phone_number_extraction",
2226
"refineryDataType": RefineryDataType.TEXT.value,

extractors/paths/url_extraction/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def get_config():
1515
available_for=["refinery", "common"],
1616
part_of_group=[
1717
"paths",
18+
"personal_identifiers"
1819
], # first entry should be parent directory
1920
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "URL"
23+
},
2024
integrator_inputs={
2125
"name": "url_extraction",
2226
"refineryDataType": RefineryDataType.TEXT.value,

extractors/personal_identifiers/address_extraction/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ def get_config():
1818
"personal_identifiers",
1919
], # first entry should be parent directory
2020
# bricks integrator information
21+
cognition_init_mapping={
22+
"@@LABEL@@": "Address"
23+
},
2124
integrator_inputs={
2225
"name": "address_extraction",
2326
"refineryDataType": RefineryDataType.TEXT.value,

extractors/personal_identifiers/email_extraction/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ def get_config():
1717
"personal_identifiers",
1818
], # first entry should be parent directory
1919
# bricks integrator information
20+
cognition_init_mapping={
21+
"@@LABEL@@": "E-Mail"
22+
},
2023
integrator_inputs={
2124
"name": "email_extraction",
2225
"refineryDataType": RefineryDataType.TEXT.value,

extractors/personal_identifiers/person_extraction/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ def get_config():
1616
part_of_group=[
1717
"personal_identifiers",
1818
], # first entry should be parent directory
19-
# bricks integrator information
19+
# bricks integrator information
20+
cognition_init_mapping={
21+
"@@LABEL@@": "Person"
22+
},
2023
integrator_inputs={
2124
"name": "person_extraction",
2225
"refineryDataType": RefineryDataType.TEXT.value,

extractors/personal_identifiers/zipcode_extraction/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ def get_config():
1717
"personal_identifiers",
1818
], # first entry should be parent directory
1919
# bricks integrator information
20+
cognition_init_mapping={
21+
"@@LABEL@@": "Zip code"
22+
},
2023
integrator_inputs={
2124
"name": "zipcode_extraction",
2225
"refineryDataType": RefineryDataType.TEXT.value,

0 commit comments

Comments
 (0)