solidprivacy-nl commited on
Commit
af6d785
·
1 Parent(s): 50adbbc

Add person-name recognizer contract fixture

Browse files
tests/fixtures/person_name_recognizer_contract_cases.json ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "status": "contract_only",
4
+ "synthetic": true,
5
+ "product_gate": false,
6
+ "thresholds_enforced": false,
7
+ "product_claim": false
8
+ },
9
+ "positive_cases": [
10
+ {
11
+ "case_id": "care_role_arts_single_surname_value_only",
12
+ "text": "Later noteerde arts Bakker dat de cliënt stabiel was.",
13
+ "expected_sensitive_value": "Bakker",
14
+ "expected_entity_type": "PERSON",
15
+ "mode": "hard_recognizer_future",
16
+ "context_type": "care_role_single_surname",
17
+ "preserve_terms": ["arts", "cliënt"],
18
+ "strong_context": true,
19
+ "notes": "Role words must remain readable; only the surname is sensitive."
20
+ },
21
+ {
22
+ "case_id": "legal_role_getuige_full_name_value_only",
23
+ "text": "Later noteerde de rechter dat getuige Fatima El Amrani aanwezig was.",
24
+ "expected_sensitive_value": "Fatima El Amrani",
25
+ "expected_entity_type": "PERSON",
26
+ "mode": "hard_recognizer_future",
27
+ "context_type": "legal_role_full_name",
28
+ "preserve_terms": ["getuige"],
29
+ "strong_context": true,
30
+ "notes": "Legal role remains readable; only the following name is sensitive."
31
+ },
32
+ {
33
+ "case_id": "care_role_client_full_name_value_only",
34
+ "text": "De cliënt Youssef Ait Ben kreeg aanvullende begeleiding.",
35
+ "expected_sensitive_value": "Youssef Ait Ben",
36
+ "expected_entity_type": "PERSON",
37
+ "mode": "hard_recognizer_future",
38
+ "context_type": "care_role_full_name",
39
+ "preserve_terms": ["cliënt"],
40
+ "strong_context": true,
41
+ "notes": "Care role remains readable; only the name value is sensitive."
42
+ },
43
+ {
44
+ "case_id": "care_role_verpleegkundige_full_name_value_only",
45
+ "text": "Verpleegkundige Sara El Idrissi sprak met de mantelzorger.",
46
+ "expected_sensitive_value": "Sara El Idrissi",
47
+ "expected_entity_type": "PERSON",
48
+ "mode": "hard_recognizer_future",
49
+ "context_type": "care_role_full_name",
50
+ "preserve_terms": ["Verpleegkundige", "mantelzorger"],
51
+ "strong_context": true,
52
+ "notes": "Care role is context; name value is sensitive."
53
+ },
54
+ {
55
+ "case_id": "care_role_mantelzorger_full_name_value_only",
56
+ "text": "Mantelzorger Fatima Zahra kreeg de planning per e-mail.",
57
+ "expected_sensitive_value": "Fatima Zahra",
58
+ "expected_entity_type": "PERSON",
59
+ "mode": "hard_recognizer_future",
60
+ "context_type": "care_role_full_name",
61
+ "preserve_terms": ["Mantelzorger"],
62
+ "strong_context": true,
63
+ "notes": "Only the name value is sensitive; role meaning must remain."
64
+ },
65
+ {
66
+ "case_id": "professional_title_mr_dutch_tussenvoegsel_value_only",
67
+ "text": "mr. Lina de Vries bespreekt de zaak met de cliënt.",
68
+ "expected_sensitive_value": "Lina de Vries",
69
+ "expected_entity_type": "PERSON",
70
+ "mode": "hard_recognizer_future",
71
+ "context_type": "professional_title_full_name",
72
+ "preserve_terms": ["mr.", "cliënt"],
73
+ "strong_context": true,
74
+ "notes": "Professional title remains readable; Dutch tussenvoegsel name is sensitive."
75
+ },
76
+ {
77
+ "case_id": "professional_title_mr_second_dutch_tussenvoegsel_value_only",
78
+ "text": "mr. Noor van Dijk belt later terug over het dossier.",
79
+ "expected_sensitive_value": "Noor van Dijk",
80
+ "expected_entity_type": "PERSON",
81
+ "mode": "hard_recognizer_future",
82
+ "context_type": "professional_title_full_name",
83
+ "preserve_terms": ["mr."],
84
+ "strong_context": true,
85
+ "notes": "Professional title remains readable; only the name value is sensitive."
86
+ },
87
+ {
88
+ "case_id": "care_role_arts_jansen_single_surname_value_only",
89
+ "text": "Arts Jansen bevestigde dat de minderjarige stabiel was.",
90
+ "expected_sensitive_value": "Jansen",
91
+ "expected_entity_type": "PERSON",
92
+ "mode": "hard_recognizer_future",
93
+ "context_type": "care_role_single_surname",
94
+ "preserve_terms": ["Arts", "minderjarige"],
95
+ "strong_context": true,
96
+ "notes": "Single surname is only allowed with strong role context and value-only span."
97
+ }
98
+ ],
99
+ "candidate_only_cases": [
100
+ {
101
+ "case_id": "contact_pair_two_names_candidate_only",
102
+ "text": "Hassan El Amrani en Mila van Dijk zijn bereikbaar via hassan.elamrani@example.test en 06-55667788.",
103
+ "expected_sensitive_value": "Hassan El Amrani",
104
+ "additional_sensitive_values": ["Mila van Dijk"],
105
+ "expected_entity_type": "PERSON",
106
+ "mode": "candidate_only_future",
107
+ "context_type": "name_near_contact_data",
108
+ "review_required": true,
109
+ "automatic_replacement_allowed": false,
110
+ "preserve_terms": [],
111
+ "notes": "Names near contact data should be review candidates unless a later contract promotes them."
112
+ },
113
+ {
114
+ "case_id": "email_context_arabic_moroccan_name_candidate_only",
115
+ "text": "Omar Ben Salah reageert via omar.bensalah@example.test op het verzoek.",
116
+ "expected_sensitive_value": "Omar Ben Salah",
117
+ "expected_entity_type": "PERSON",
118
+ "mode": "candidate_only_future",
119
+ "context_type": "name_near_contact_data",
120
+ "review_required": true,
121
+ "automatic_replacement_allowed": false,
122
+ "preserve_terms": [],
123
+ "notes": "Name near email is useful as a candidate, not automatic replacement."
124
+ },
125
+ {
126
+ "case_id": "legal_reference_pair_names_candidate_only",
127
+ "text": "Zaakreferentie ZK-WOON-55091 noemt Nora El Yassini en Tariq de Jong als betrokkenen.",
128
+ "expected_sensitive_value": "Nora El Yassini",
129
+ "additional_sensitive_values": ["Tariq de Jong"],
130
+ "expected_entity_type": "PERSON",
131
+ "mode": "candidate_only_future",
132
+ "context_type": "name_near_legal_reference",
133
+ "review_required": true,
134
+ "automatic_replacement_allowed": false,
135
+ "preserve_terms": [],
136
+ "notes": "Names near legal references need human review before inclusion."
137
+ },
138
+ {
139
+ "case_id": "phone_context_name_candidate_only",
140
+ "text": "Sami El Amrani is bereikbaar via 06-12345678 voor overleg.",
141
+ "expected_sensitive_value": "Sami El Amrani",
142
+ "expected_entity_type": "PERSON",
143
+ "mode": "candidate_only_future",
144
+ "context_type": "name_near_contact_data",
145
+ "review_required": true,
146
+ "automatic_replacement_allowed": false,
147
+ "preserve_terms": [],
148
+ "notes": "Name near phone number should not be automatic without review."
149
+ }
150
+ ],
151
+ "negative_cases": [
152
+ {
153
+ "case_id": "court_name_rechtbank_den_haag_not_person",
154
+ "text": "Rechtbank Den Haag behandelde de zaak op 1 maart.",
155
+ "expected_sensitive_value": null,
156
+ "mode": "must_not_match_person",
157
+ "context_type": "court_or_authority",
158
+ "notes": "Court names must not become PERSON matches."
159
+ },
160
+ {
161
+ "case_id": "court_name_hof_van_discipline_not_person",
162
+ "text": "Het Hof van Discipline verwijst naar een eerdere beslissing.",
163
+ "expected_sensitive_value": null,
164
+ "mode": "must_not_match_person",
165
+ "context_type": "court_or_authority",
166
+ "notes": "Professional body name must not become PERSON."
167
+ },
168
+ {
169
+ "case_id": "care_location_afdeling_rozenhof_not_person",
170
+ "text": "Afdeling Rozenhof 3 nam contact op met de zorgmedewerker.",
171
+ "expected_sensitive_value": null,
172
+ "mode": "must_not_match_person",
173
+ "context_type": "care_location",
174
+ "notes": "Care location is not a PERSON-name span."
175
+ },
176
+ {
177
+ "case_id": "address_parklaan_not_person",
178
+ "text": "Parklaan 188, 3512 ZX Utrecht staat in het dossier.",
179
+ "expected_sensitive_value": null,
180
+ "mode": "must_not_match_person",
181
+ "context_type": "address",
182
+ "notes": "Address text must not become PERSON."
183
+ },
184
+ {
185
+ "case_id": "legal_article_not_person",
186
+ "text": "artikel 7:669 BW wordt genoemd als wettelijke grondslag.",
187
+ "expected_sensitive_value": null,
188
+ "mode": "must_not_match_person",
189
+ "context_type": "legal_article",
190
+ "notes": "Legal article references must not become PERSON."
191
+ },
192
+ {
193
+ "case_id": "production_reference_not_person",
194
+ "text": "productie 3 bevat de bijlage bij het verzoekschrift.",
195
+ "expected_sensitive_value": null,
196
+ "mode": "must_not_match_person",
197
+ "context_type": "document_navigation",
198
+ "notes": "Document navigation references must not become PERSON."
199
+ },
200
+ {
201
+ "case_id": "attachment_reference_not_person",
202
+ "text": "bijlage 2 bevat alleen algemene instructies.",
203
+ "expected_sensitive_value": null,
204
+ "mode": "must_not_match_person",
205
+ "context_type": "document_navigation",
206
+ "notes": "Attachment references must not become PERSON."
207
+ },
208
+ {
209
+ "case_id": "single_surname_bakker_without_context_not_person",
210
+ "text": "Bakker staat los in deze synthetische zin zonder rolcontext.",
211
+ "expected_sensitive_value": null,
212
+ "mode": "must_not_match_person",
213
+ "context_type": "single_surname_without_strong_context",
214
+ "single_surname": "Bakker",
215
+ "strong_context": false,
216
+ "notes": "Single surname without strong role/title context must not become a hard PERSON match."
217
+ },
218
+ {
219
+ "case_id": "single_surname_jansen_without_context_not_person",
220
+ "text": "Jansen staat los in deze synthetische zin zonder rolcontext.",
221
+ "expected_sensitive_value": null,
222
+ "mode": "must_not_match_person",
223
+ "context_type": "single_surname_without_strong_context",
224
+ "single_surname": "Jansen",
225
+ "strong_context": false,
226
+ "notes": "Single surname without strong role/title context must not become a hard PERSON match."
227
+ }
228
+ ],
229
+ "preserve_terms": [
230
+ "cliënt",
231
+ "slachtoffer",
232
+ "minderjarige",
233
+ "arts",
234
+ "getuige",
235
+ "eiser",
236
+ "verweerder",
237
+ "verpleegkundige",
238
+ "zorgmedewerker",
239
+ "behandelaar",
240
+ "mantelzorger",
241
+ "mr."
242
+ ]
243
+ }