@stll/anonymize-wasm 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/address-boundaries.mjs +113 -5
- package/dist/address-stop-keywords.mjs +137 -0
- package/dist/address-stop-keywords.mjs.map +1 -0
- package/dist/address-stopwords.mjs +81 -0
- package/dist/address-stopwords.mjs.map +1 -0
- package/dist/address-street-types.mjs +67 -4
- package/dist/clause-noun-heads.mjs +75 -0
- package/dist/clause-noun-heads.mjs.map +1 -0
- package/dist/coreference.es.mjs +22 -0
- package/dist/coreference.es.mjs.map +1 -0
- package/dist/coreference.fr.mjs +32 -0
- package/dist/coreference.fr.mjs.map +1 -0
- package/dist/coreference.it.mjs +27 -0
- package/dist/coreference.it.mjs.map +1 -0
- package/dist/coreference.pl.mjs +27 -0
- package/dist/coreference.pl.mjs.map +1 -0
- package/dist/coreference.pt-br.mjs +14 -0
- package/dist/coreference.pt-br.mjs.map +1 -0
- package/dist/coreference.sk.mjs +22 -5
- package/dist/generic-roles.mjs +179 -1
- package/dist/hotword-rules.mjs +7 -3
- package/dist/legal-forms.mjs +3 -0
- package/dist/legal-role-heads.cs.mjs +42 -0
- package/dist/legal-role-heads.cs.mjs.map +1 -0
- package/dist/legal-role-heads.de.mjs +33 -0
- package/dist/legal-role-heads.de.mjs.map +1 -0
- package/dist/legal-role-heads.en.mjs +37 -0
- package/dist/legal-role-heads.en.mjs.map +1 -0
- package/dist/legal-role-heads.es.mjs +54 -0
- package/dist/legal-role-heads.es.mjs.map +1 -0
- package/dist/legal-role-heads.fr.mjs +72 -0
- package/dist/legal-role-heads.fr.mjs.map +1 -0
- package/dist/legal-role-heads.it.mjs +68 -0
- package/dist/legal-role-heads.it.mjs.map +1 -0
- package/dist/legal-role-heads.pl.mjs +84 -0
- package/dist/legal-role-heads.pl.mjs.map +1 -0
- package/dist/legal-role-heads.pt-br.mjs +63 -0
- package/dist/legal-role-heads.pt-br.mjs.map +1 -0
- package/dist/legal-role-heads.sk.mjs +80 -0
- package/dist/legal-role-heads.sk.mjs.map +1 -0
- package/dist/manifest.mjs +21 -8
- package/dist/names-exclusions.mjs +21 -1
- package/dist/person-stopwords.mjs +121 -1
- package/dist/section-headings.mjs +15 -3
- package/dist/sentence-verb-indicators.mjs +223 -0
- package/dist/sentence-verb-indicators.mjs.map +1 -0
- package/dist/triggers.cs.mjs +107 -3
- package/dist/triggers.es.mjs +43 -4
- package/dist/triggers.fr.mjs +206 -7
- package/dist/triggers.it.mjs +26 -4
- package/dist/triggers.pl.mjs +191 -4
- package/dist/triggers.pt-br.mjs +193 -0
- package/dist/triggers.pt-br.mjs.map +1 -0
- package/dist/triggers.sk.mjs +493 -0
- package/dist/vite.mjs.map +1 -1
- package/dist/wasm.d.mts +56 -3
- package/dist/wasm.mjs +2368 -1350
- package/dist/wasm.mjs.map +1 -1
- package/package.json +2 -2
package/dist/triggers.sk.mjs
CHANGED
|
@@ -1,5 +1,357 @@
|
|
|
1
1
|
//#region src/data/triggers.sk.json
|
|
2
2
|
var triggers_sk_default = [
|
|
3
|
+
{
|
|
4
|
+
"id": "sk-person-to-next-comma",
|
|
5
|
+
"label": "person",
|
|
6
|
+
"strategy": { "type": "to-next-comma" },
|
|
7
|
+
"triggers": [
|
|
8
|
+
"zastúpený",
|
|
9
|
+
"zastúpená",
|
|
10
|
+
"zastúpené",
|
|
11
|
+
"zastúpeným",
|
|
12
|
+
"zastúpenou",
|
|
13
|
+
"zastúpení",
|
|
14
|
+
"konajúci",
|
|
15
|
+
"konajúca",
|
|
16
|
+
"konajúcim",
|
|
17
|
+
"v zastúpení",
|
|
18
|
+
"splnomocnený zástupca",
|
|
19
|
+
"splnomocnená zástupkyňa",
|
|
20
|
+
"štatutárny orgán",
|
|
21
|
+
"štatutárny zástupca",
|
|
22
|
+
"konateľ spoločnosti",
|
|
23
|
+
"konateľka spoločnosti",
|
|
24
|
+
"konateľom",
|
|
25
|
+
"konateľkou",
|
|
26
|
+
"prokurista",
|
|
27
|
+
"prokuristom",
|
|
28
|
+
"predseda predstavenstva",
|
|
29
|
+
"podpredseda predstavenstva",
|
|
30
|
+
"člen predstavenstva",
|
|
31
|
+
"členka predstavenstva",
|
|
32
|
+
"riaditeľ",
|
|
33
|
+
"riaditeľka",
|
|
34
|
+
"riaditeľom",
|
|
35
|
+
"riaditeľkou",
|
|
36
|
+
"kontaktná osoba"
|
|
37
|
+
],
|
|
38
|
+
"extensions": ["add-colon"],
|
|
39
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "sk-person-trailing-space",
|
|
43
|
+
"label": "person",
|
|
44
|
+
"strategy": { "type": "to-next-comma" },
|
|
45
|
+
"triggers": [
|
|
46
|
+
"pán",
|
|
47
|
+
"pani",
|
|
48
|
+
"pána",
|
|
49
|
+
"panu",
|
|
50
|
+
"pánom",
|
|
51
|
+
"paniam"
|
|
52
|
+
],
|
|
53
|
+
"extensions": ["add-trailing-space"],
|
|
54
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "sk-address-full",
|
|
58
|
+
"label": "address",
|
|
59
|
+
"strategy": {
|
|
60
|
+
"type": "address",
|
|
61
|
+
"maxChars": 120
|
|
62
|
+
},
|
|
63
|
+
"triggers": [
|
|
64
|
+
"sídlo",
|
|
65
|
+
"sídlom",
|
|
66
|
+
"so sídlom",
|
|
67
|
+
"miesto podnikania",
|
|
68
|
+
"miestom podnikania",
|
|
69
|
+
"trvalý pobyt",
|
|
70
|
+
"trvalým pobytom",
|
|
71
|
+
"bytom",
|
|
72
|
+
"adresa",
|
|
73
|
+
"adresa trvalého pobytu",
|
|
74
|
+
"doručovacia adresa",
|
|
75
|
+
"korešpondenčná adresa",
|
|
76
|
+
"fakturačná adresa",
|
|
77
|
+
"miesto dodania",
|
|
78
|
+
"miesto plnenia"
|
|
79
|
+
],
|
|
80
|
+
"extensions": ["add-colon"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "sk-address-house-number",
|
|
84
|
+
"label": "address",
|
|
85
|
+
"strategy": {
|
|
86
|
+
"type": "n-words",
|
|
87
|
+
"count": 1
|
|
88
|
+
},
|
|
89
|
+
"triggers": [
|
|
90
|
+
"č.d.",
|
|
91
|
+
"súp. č.",
|
|
92
|
+
"súpisné číslo",
|
|
93
|
+
"or. č.",
|
|
94
|
+
"orientačné číslo"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "sk-address-psc",
|
|
99
|
+
"label": "address",
|
|
100
|
+
"strategy": {
|
|
101
|
+
"type": "n-words",
|
|
102
|
+
"count": 2
|
|
103
|
+
},
|
|
104
|
+
"triggers": ["PSČ"],
|
|
105
|
+
"extensions": ["add-colon", "add-trailing-space"]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "sk-organization-roles",
|
|
109
|
+
"label": "organization",
|
|
110
|
+
"strategy": { "type": "to-next-comma" },
|
|
111
|
+
"triggers": [
|
|
112
|
+
"zhotoviteľ",
|
|
113
|
+
"zhotoviteľom",
|
|
114
|
+
"objednávateľ",
|
|
115
|
+
"objednávateľom",
|
|
116
|
+
"dodávateľ",
|
|
117
|
+
"dodávateľom",
|
|
118
|
+
"odberateľ",
|
|
119
|
+
"odberateľom",
|
|
120
|
+
"poskytovateľ",
|
|
121
|
+
"poskytovateľom",
|
|
122
|
+
"prijímateľ",
|
|
123
|
+
"prijímateľom"
|
|
124
|
+
],
|
|
125
|
+
"extensions": ["add-colon"],
|
|
126
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "sk-organization-municipalities",
|
|
130
|
+
"label": "organization",
|
|
131
|
+
"strategy": { "type": "to-next-comma" },
|
|
132
|
+
"triggers": [
|
|
133
|
+
"mestská časť",
|
|
134
|
+
"mestskej časti",
|
|
135
|
+
"mestská polícia",
|
|
136
|
+
"hlavné mesto",
|
|
137
|
+
"hlavného mesta",
|
|
138
|
+
"obec",
|
|
139
|
+
"obce",
|
|
140
|
+
"obci"
|
|
141
|
+
],
|
|
142
|
+
"extensions": ["add-trailing-space"],
|
|
143
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "sk-organization-trailing-space",
|
|
147
|
+
"label": "organization",
|
|
148
|
+
"strategy": { "type": "to-next-comma" },
|
|
149
|
+
"triggers": [
|
|
150
|
+
"mesto",
|
|
151
|
+
"mesta",
|
|
152
|
+
"mestom",
|
|
153
|
+
"mestu"
|
|
154
|
+
],
|
|
155
|
+
"extensions": ["add-trailing-space"],
|
|
156
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "sk-organization-institutions",
|
|
160
|
+
"label": "organization",
|
|
161
|
+
"strategy": { "type": "to-next-comma" },
|
|
162
|
+
"triggers": [
|
|
163
|
+
"základná škola",
|
|
164
|
+
"základnej školy",
|
|
165
|
+
"stredná škola",
|
|
166
|
+
"strednej školy",
|
|
167
|
+
"materská škola",
|
|
168
|
+
"nemocnica",
|
|
169
|
+
"nemocnice",
|
|
170
|
+
"fakultná nemocnica",
|
|
171
|
+
"univerzita",
|
|
172
|
+
"univerzity",
|
|
173
|
+
"nadácia",
|
|
174
|
+
"príspevková organizácia",
|
|
175
|
+
"rozpočtová organizácia",
|
|
176
|
+
"občianske združenie"
|
|
177
|
+
],
|
|
178
|
+
"extensions": ["add-trailing-space"],
|
|
179
|
+
"validations": [{ "type": "starts-uppercase" }]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"id": "sk-organization-fixed-name-institutions",
|
|
183
|
+
"label": "organization",
|
|
184
|
+
"strategy": { "type": "to-next-comma" },
|
|
185
|
+
"triggers": [
|
|
186
|
+
"Najvyšší kontrolný úrad",
|
|
187
|
+
"Slovenský pozemkový fond",
|
|
188
|
+
"Sociálna poisťovňa",
|
|
189
|
+
"Všeobecná zdravotná poisťovňa",
|
|
190
|
+
"Národná banka Slovenska"
|
|
191
|
+
],
|
|
192
|
+
"includeTrigger": true,
|
|
193
|
+
"validations": [{
|
|
194
|
+
"type": "min-length",
|
|
195
|
+
"min": 3
|
|
196
|
+
}]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "sk-date-of-birth",
|
|
200
|
+
"label": "date of birth",
|
|
201
|
+
"strategy": { "type": "to-next-comma" },
|
|
202
|
+
"triggers": [
|
|
203
|
+
"nar.",
|
|
204
|
+
"narodený dňa",
|
|
205
|
+
"narodená dňa",
|
|
206
|
+
"narodený/á dňa",
|
|
207
|
+
"dát. nar.",
|
|
208
|
+
"dátum narodenia"
|
|
209
|
+
],
|
|
210
|
+
"extensions": ["add-colon"],
|
|
211
|
+
"validations": [{
|
|
212
|
+
"type": "max-length",
|
|
213
|
+
"max": 30
|
|
214
|
+
}]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"id": "sk-birth-number",
|
|
218
|
+
"label": "birth number",
|
|
219
|
+
"strategy": {
|
|
220
|
+
"type": "n-words",
|
|
221
|
+
"count": 1
|
|
222
|
+
},
|
|
223
|
+
"triggers": [
|
|
224
|
+
"r.č.",
|
|
225
|
+
"r. č.",
|
|
226
|
+
"rodné číslo"
|
|
227
|
+
],
|
|
228
|
+
"extensions": ["add-colon"]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "sk-bank-account-eol",
|
|
232
|
+
"label": "bank account number",
|
|
233
|
+
"strategy": { "type": "to-end-of-line" },
|
|
234
|
+
"triggers": ["bankové spojenie"],
|
|
235
|
+
"extensions": ["add-colon"],
|
|
236
|
+
"validations": [{ "type": "has-digits" }, {
|
|
237
|
+
"type": "min-length",
|
|
238
|
+
"min": 5
|
|
239
|
+
}]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"id": "sk-bank-account-nwords",
|
|
243
|
+
"label": "bank account number",
|
|
244
|
+
"strategy": {
|
|
245
|
+
"type": "n-words",
|
|
246
|
+
"count": 1
|
|
247
|
+
},
|
|
248
|
+
"triggers": [
|
|
249
|
+
"č. účtu",
|
|
250
|
+
"č.ú.",
|
|
251
|
+
"číslo účtu"
|
|
252
|
+
],
|
|
253
|
+
"extensions": ["add-colon"],
|
|
254
|
+
"validations": [{ "type": "has-digits" }, {
|
|
255
|
+
"type": "min-length",
|
|
256
|
+
"min": 5
|
|
257
|
+
}]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "sk-company-id",
|
|
261
|
+
"label": "registration number",
|
|
262
|
+
"strategy": { "type": "company-id-value" },
|
|
263
|
+
"triggers": [
|
|
264
|
+
"IČO",
|
|
265
|
+
"1ČO",
|
|
266
|
+
"lČO",
|
|
267
|
+
"identifikačné číslo",
|
|
268
|
+
"identifikačné číslo organizácie"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "sk-tax-id",
|
|
273
|
+
"label": "tax identification number",
|
|
274
|
+
"strategy": { "type": "company-id-value" },
|
|
275
|
+
"triggers": [
|
|
276
|
+
"DIČ",
|
|
277
|
+
"D1Č",
|
|
278
|
+
"daňové identifikačné číslo"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"id": "sk-vat-id",
|
|
283
|
+
"label": "tax identification number",
|
|
284
|
+
"strategy": { "type": "company-id-value" },
|
|
285
|
+
"triggers": ["IČ DPH", "IČDPH"]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "sk-vehicle-registration",
|
|
289
|
+
"label": "registration number",
|
|
290
|
+
"strategy": {
|
|
291
|
+
"type": "n-words",
|
|
292
|
+
"count": 1
|
|
293
|
+
},
|
|
294
|
+
"triggers": [
|
|
295
|
+
"EČV",
|
|
296
|
+
"ŠPZ",
|
|
297
|
+
"evidenčné číslo vozidla"
|
|
298
|
+
],
|
|
299
|
+
"extensions": ["add-colon"]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "sk-oddiel",
|
|
303
|
+
"label": "registration number",
|
|
304
|
+
"strategy": {
|
|
305
|
+
"type": "n-words",
|
|
306
|
+
"count": 1
|
|
307
|
+
},
|
|
308
|
+
"triggers": [
|
|
309
|
+
"oddiel",
|
|
310
|
+
"oddiele",
|
|
311
|
+
"oddielu",
|
|
312
|
+
"oddielom"
|
|
313
|
+
],
|
|
314
|
+
"extensions": ["add-colon", "add-trailing-space"],
|
|
315
|
+
"validations": [{
|
|
316
|
+
"type": "matches-pattern",
|
|
317
|
+
"pattern": "^(?:Sa|Sro|Sr|Po|Dr|Pšn|Insre|Po-Re)[,.;:]?$"
|
|
318
|
+
}]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"id": "sk-vlozka",
|
|
322
|
+
"label": "registration number",
|
|
323
|
+
"strategy": {
|
|
324
|
+
"type": "n-words",
|
|
325
|
+
"count": 1
|
|
326
|
+
},
|
|
327
|
+
"triggers": [
|
|
328
|
+
"vložka číslo",
|
|
329
|
+
"vložka č.",
|
|
330
|
+
"vložky číslo",
|
|
331
|
+
"vložky č.",
|
|
332
|
+
"vložka",
|
|
333
|
+
"vložky",
|
|
334
|
+
"vložke",
|
|
335
|
+
"vložkou"
|
|
336
|
+
],
|
|
337
|
+
"extensions": ["add-colon", "add-trailing-space"]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"id": "sk-sp-zn",
|
|
341
|
+
"label": "registration number",
|
|
342
|
+
"strategy": {
|
|
343
|
+
"type": "n-words",
|
|
344
|
+
"count": 2
|
|
345
|
+
},
|
|
346
|
+
"triggers": [
|
|
347
|
+
"sp. zn.",
|
|
348
|
+
"sp.zn.",
|
|
349
|
+
"spisovej značky",
|
|
350
|
+
"spisovou značkou",
|
|
351
|
+
"pod sp. zn.",
|
|
352
|
+
"pod sp.zn."
|
|
353
|
+
]
|
|
354
|
+
},
|
|
3
355
|
{
|
|
4
356
|
"id": "sk-parcel-number",
|
|
5
357
|
"label": "land parcel",
|
|
@@ -54,6 +406,147 @@ var triggers_sk_default = [
|
|
|
54
406
|
"type": "min-length",
|
|
55
407
|
"min": 3
|
|
56
408
|
}]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"id": "sk-ministry",
|
|
412
|
+
"label": "organization",
|
|
413
|
+
"strategy": { "type": "to-next-comma" },
|
|
414
|
+
"triggers": [
|
|
415
|
+
"ministerstvo",
|
|
416
|
+
"ministerstva",
|
|
417
|
+
"ministerstvu",
|
|
418
|
+
"ministerstvom"
|
|
419
|
+
],
|
|
420
|
+
"extensions": ["add-trailing-space"],
|
|
421
|
+
"includeTrigger": true,
|
|
422
|
+
"validations": [{
|
|
423
|
+
"type": "min-length",
|
|
424
|
+
"min": 6
|
|
425
|
+
}]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "sk-courts-nominative",
|
|
429
|
+
"label": "organization",
|
|
430
|
+
"strategy": {
|
|
431
|
+
"type": "to-next-comma",
|
|
432
|
+
"stopWords": [
|
|
433
|
+
"dňa",
|
|
434
|
+
"oddiel",
|
|
435
|
+
"oddiele",
|
|
436
|
+
"vložka",
|
|
437
|
+
"vložky",
|
|
438
|
+
"sp.zn.",
|
|
439
|
+
"sp. zn.",
|
|
440
|
+
"pod"
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
"triggers": [
|
|
444
|
+
"okresný súd",
|
|
445
|
+
"krajský súd",
|
|
446
|
+
"mestský súd",
|
|
447
|
+
"najvyšší súd",
|
|
448
|
+
"ústavný súd",
|
|
449
|
+
"špecializovaný trestný súd"
|
|
450
|
+
],
|
|
451
|
+
"includeTrigger": true,
|
|
452
|
+
"extensions": [],
|
|
453
|
+
"validations": [{
|
|
454
|
+
"type": "min-length",
|
|
455
|
+
"min": 3
|
|
456
|
+
}]
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"id": "sk-courts-genitive",
|
|
460
|
+
"label": "organization",
|
|
461
|
+
"strategy": {
|
|
462
|
+
"type": "to-next-comma",
|
|
463
|
+
"stopWords": [
|
|
464
|
+
"dňa",
|
|
465
|
+
"oddiel",
|
|
466
|
+
"oddiele",
|
|
467
|
+
"vložka",
|
|
468
|
+
"vložky",
|
|
469
|
+
"sp.zn.",
|
|
470
|
+
"sp. zn.",
|
|
471
|
+
"pod"
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
"triggers": [
|
|
475
|
+
"okresného súdu",
|
|
476
|
+
"krajského súdu",
|
|
477
|
+
"mestského súdu",
|
|
478
|
+
"najvyššieho súdu",
|
|
479
|
+
"ústavného súdu",
|
|
480
|
+
"špecializovaného trestného súdu"
|
|
481
|
+
],
|
|
482
|
+
"includeTrigger": true,
|
|
483
|
+
"extensions": [],
|
|
484
|
+
"validations": [{
|
|
485
|
+
"type": "min-length",
|
|
486
|
+
"min": 3
|
|
487
|
+
}]
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"id": "sk-courts-instrumental",
|
|
491
|
+
"label": "organization",
|
|
492
|
+
"strategy": {
|
|
493
|
+
"type": "to-next-comma",
|
|
494
|
+
"stopWords": [
|
|
495
|
+
"dňa",
|
|
496
|
+
"oddiel",
|
|
497
|
+
"oddiele",
|
|
498
|
+
"vložka",
|
|
499
|
+
"vložky",
|
|
500
|
+
"sp.zn.",
|
|
501
|
+
"sp. zn.",
|
|
502
|
+
"pod"
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
"triggers": [
|
|
506
|
+
"okresným súdom",
|
|
507
|
+
"krajským súdom",
|
|
508
|
+
"mestským súdom",
|
|
509
|
+
"najvyšším súdom",
|
|
510
|
+
"ústavným súdom",
|
|
511
|
+
"špecializovaným trestným súdom"
|
|
512
|
+
],
|
|
513
|
+
"includeTrigger": true,
|
|
514
|
+
"extensions": [],
|
|
515
|
+
"validations": [{
|
|
516
|
+
"type": "min-length",
|
|
517
|
+
"min": 3
|
|
518
|
+
}]
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"id": "sk-courts-locative",
|
|
522
|
+
"label": "organization",
|
|
523
|
+
"strategy": {
|
|
524
|
+
"type": "to-next-comma",
|
|
525
|
+
"stopWords": [
|
|
526
|
+
"dňa",
|
|
527
|
+
"oddiel",
|
|
528
|
+
"oddiele",
|
|
529
|
+
"vložka",
|
|
530
|
+
"vložky",
|
|
531
|
+
"sp.zn.",
|
|
532
|
+
"sp. zn.",
|
|
533
|
+
"pod"
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
"triggers": [
|
|
537
|
+
"okresnom súde",
|
|
538
|
+
"krajskom súde",
|
|
539
|
+
"mestskom súde",
|
|
540
|
+
"najvyššom súde",
|
|
541
|
+
"ústavnom súde",
|
|
542
|
+
"špecializovanom trestnom súde"
|
|
543
|
+
],
|
|
544
|
+
"includeTrigger": true,
|
|
545
|
+
"extensions": [],
|
|
546
|
+
"validations": [{
|
|
547
|
+
"type": "min-length",
|
|
548
|
+
"min": 3
|
|
549
|
+
}]
|
|
57
550
|
}
|
|
58
551
|
];
|
|
59
552
|
//#endregion
|
package/dist/vite.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.mjs","names":[],"sources":["../../src/vite.ts"],"sourcesContent":["/* Vite plugin that wires up @stll/anonymize-wasm so its transitive\n * napi-rs-generated wasm loaders survive Vite's dep pre-bundler. Adds\n * this package plus its @stll/*-wasm dependencies to optimizeDeps.exclude\n * so the loader modules are served with their original paths, keeping\n * `new URL(\"./foo.wasm\", import.meta.url)` correct. */\nimport type { Plugin } from \"vite\";\n\n// Only the napi-rs WASM packages need excluding — they use\n// `new URL(\"./foo.wasm\", import.meta.url)` which Vite's optimizer\n// would rewrite. @stll/anonymize-wasm itself is pure JS and should\n// NOT be excluded.\nconst PACKAGES = [\n \"@stll/text-search-wasm\",\n \"@stll/aho-corasick-wasm\",\n \"@stll/aho-corasick-wasm32-wasi\",\n \"@stll/fuzzy-search-wasm\",\n \"@stll/fuzzy-search-wasm32-wasi\",\n \"@stll/regex-set-wasm\",\n \"@stll/regex-set-wasm32-wasi\",\n];\n\nexport default function stllAnonymizeWasmVite(): Plugin {\n return {\n name: \"stll-anonymize-wasm\",\n apply: \"serve\",\n config() {\n return {\n optimizeDeps: { exclude: PACKAGES },\n };\n },\n };\n}\n"],"mappings":";AAWA,MAAM,WAAW;CACf;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,SAAwB,wBAAgC;
|
|
1
|
+
{"version":3,"file":"vite.mjs","names":[],"sources":["../../src/vite.ts"],"sourcesContent":["/* Vite plugin that wires up @stll/anonymize-wasm so its transitive\n * napi-rs-generated wasm loaders survive Vite's dep pre-bundler. Adds\n * this package plus its @stll/*-wasm dependencies to optimizeDeps.exclude\n * so the loader modules are served with their original paths, keeping\n * `new URL(\"./foo.wasm\", import.meta.url)` correct. */\nimport type { Plugin } from \"vite\";\n\n// Only the napi-rs WASM packages need excluding — they use\n// `new URL(\"./foo.wasm\", import.meta.url)` which Vite's optimizer\n// would rewrite. @stll/anonymize-wasm itself is pure JS and should\n// NOT be excluded.\nconst PACKAGES = [\n \"@stll/text-search-wasm\",\n \"@stll/aho-corasick-wasm\",\n \"@stll/aho-corasick-wasm32-wasi\",\n \"@stll/fuzzy-search-wasm\",\n \"@stll/fuzzy-search-wasm32-wasi\",\n \"@stll/regex-set-wasm\",\n \"@stll/regex-set-wasm32-wasi\",\n];\n\nexport default function stllAnonymizeWasmVite(): Plugin {\n return {\n name: \"stll-anonymize-wasm\",\n apply: \"serve\",\n config() {\n return {\n optimizeDeps: { exclude: PACKAGES },\n };\n },\n };\n}\n"],"mappings":";AAWA,MAAM,WAAW;CACf;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,SAAwB,wBAAgC;CACtD,OAAO;EACL,MAAM;EACN,OAAO;EACP,SAAS;GACP,OAAO,EACL,cAAc,EAAE,SAAS,UAAU,EACpC;;EAEJ"}
|
package/dist/wasm.d.mts
CHANGED
|
@@ -62,6 +62,16 @@ type GazetteerEntry = {
|
|
|
62
62
|
/** Extraction strategy — closed discriminated union. */
|
|
63
63
|
type TriggerStrategy = {
|
|
64
64
|
type: "to-next-comma";
|
|
65
|
+
/**
|
|
66
|
+
* Optional list of lowercase keywords that terminate
|
|
67
|
+
* the value scan, in addition to commas/newlines. Useful
|
|
68
|
+
* for triggers like court names that may continue past
|
|
69
|
+
* a missing comma into adjacent clause text ("Městským
|
|
70
|
+
* soudem v Praze dne 1. 1. 2020"); listing `"dne"` here
|
|
71
|
+
* stops the scan at the date boundary. Matched on a
|
|
72
|
+
* word-boundary, case-insensitive.
|
|
73
|
+
*/
|
|
74
|
+
stopWords?: string[];
|
|
65
75
|
} | {
|
|
66
76
|
type: "to-end-of-line";
|
|
67
77
|
} | {
|
|
@@ -72,6 +82,19 @@ type TriggerStrategy = {
|
|
|
72
82
|
} | {
|
|
73
83
|
type: "address";
|
|
74
84
|
maxChars?: number;
|
|
85
|
+
} | {
|
|
86
|
+
/**
|
|
87
|
+
* Extract the first regex match in the value text.
|
|
88
|
+
* Useful for shape-bounded values that follow a
|
|
89
|
+
* label on the same line as other fields, where
|
|
90
|
+
* `to-end-of-line` would over-capture. The pattern
|
|
91
|
+
* is anchored to the start of the (already
|
|
92
|
+
* leading-whitespace-stripped) value, so use
|
|
93
|
+
* `(?:.*?)` prefix only when intentional.
|
|
94
|
+
*/
|
|
95
|
+
type: "match-pattern";
|
|
96
|
+
pattern: string;
|
|
97
|
+
flags?: string;
|
|
75
98
|
};
|
|
76
99
|
/** Validation rules — closed discriminated union. */
|
|
77
100
|
type TriggerValidation = {
|
|
@@ -90,7 +113,21 @@ type TriggerValidation = {
|
|
|
90
113
|
type: "matches-pattern";
|
|
91
114
|
pattern: string;
|
|
92
115
|
flags?: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Run a named stdnum validator (checksum + length)
|
|
119
|
+
* against the captured value. Keeps the trigger
|
|
120
|
+
* path symmetrical with the formatted-regex
|
|
121
|
+
* detectors so e.g. `CPF nº 00000000000` does not
|
|
122
|
+
* survive as a tax-ID entity.
|
|
123
|
+
*/
|
|
124
|
+
| {
|
|
125
|
+
type: "valid-id";
|
|
126
|
+
validator: ValidIdValidator;
|
|
93
127
|
};
|
|
128
|
+
/** Built-in stdnum validators that can be referenced
|
|
129
|
+
* by `valid-id` validations. */
|
|
130
|
+
type ValidIdValidator = "br.cpf" | "br.cnpj";
|
|
94
131
|
/** Auto-generated trigger variants — closed set. */
|
|
95
132
|
type TriggerExtension = "add-colon" | "add-trailing-space" | "add-colon-space" | "normalize-spaces";
|
|
96
133
|
/** V2 trigger config entry (JSON shape). */
|
|
@@ -124,6 +161,9 @@ type CompiledValidation = {
|
|
|
124
161
|
} | {
|
|
125
162
|
type: "matches-pattern";
|
|
126
163
|
re: RegExp;
|
|
164
|
+
} | {
|
|
165
|
+
type: "valid-id";
|
|
166
|
+
check: (value: string) => boolean;
|
|
127
167
|
};
|
|
128
168
|
/**
|
|
129
169
|
* Runtime rule — one per trigger string after
|
|
@@ -310,7 +350,7 @@ type PipelineConfig = {
|
|
|
310
350
|
* every pipeline run and never persisted to the database.
|
|
311
351
|
* Renaming a label here requires no migration.
|
|
312
352
|
*/
|
|
313
|
-
declare const DEFAULT_ENTITY_LABELS: readonly ["person", "organization", "phone number", "address", "email address", "date", "date of birth", "bank account number", "iban", "tax identification number", "identity card number", "registration number", "credit card number", "passport number", "monetary amount", "land parcel"];
|
|
353
|
+
declare const DEFAULT_ENTITY_LABELS: readonly ["person", "organization", "phone number", "address", "email address", "date", "date of birth", "bank account number", "iban", "tax identification number", "identity card number", "birth number", "national identification number", "social security number", "registration number", "credit card number", "passport number", "monetary amount", "land parcel", "misc"];
|
|
314
354
|
//#endregion
|
|
315
355
|
//#region src/detectors/regex.d.ts
|
|
316
356
|
type RegexMeta = {
|
|
@@ -502,7 +542,9 @@ type PipelineContext = {
|
|
|
502
542
|
allowList: ReadonlySet<string> | null;
|
|
503
543
|
allowListPromise: Promise<ReadonlySet<string>> | null;
|
|
504
544
|
personStopwords: ReadonlySet<string> | null;
|
|
505
|
-
personStopwordsPromise: Promise<ReadonlySet<string>> | null;
|
|
545
|
+
personStopwordsPromise: Promise<ReadonlySet<string>> | null;
|
|
546
|
+
addressStopwords: ReadonlySet<string> | null;
|
|
547
|
+
addressStopwordsPromise: Promise<ReadonlySet<string>> | null; /** First-name exclusions for stopword filtering. */
|
|
506
548
|
firstNameExclusions: ReadonlySet<string> | null;
|
|
507
549
|
firstNameExclusionCorpusLen: number;
|
|
508
550
|
genericRoles: ReadonlySet<string> | null;
|
|
@@ -627,6 +669,7 @@ declare const DEFAULT_OPERATOR_CONFIG: OperatorConfig;
|
|
|
627
669
|
declare const resolveOperator: (config: OperatorConfig, label: string) => OperatorType;
|
|
628
670
|
//#endregion
|
|
629
671
|
//#region src/detectors/legal-forms.d.ts
|
|
672
|
+
declare const warmLegalRoleHeads: () => Promise<void>;
|
|
630
673
|
/**
|
|
631
674
|
* Build legal form regex pattern strings.
|
|
632
675
|
* Returns an array of regex strings for the unified
|
|
@@ -638,6 +681,14 @@ declare const buildLegalFormPatterns: () => Promise<string[]>;
|
|
|
638
681
|
* Process legal form matches from the unified search.
|
|
639
682
|
* Receives all matches; filters to the legal forms
|
|
640
683
|
* slice via sliceStart/sliceEnd.
|
|
684
|
+
*
|
|
685
|
+
* The role-head trimming step reads per-language data from
|
|
686
|
+
* a cache that `runPipeline` warms via `warmLegalRoleHeads()`
|
|
687
|
+
* before calling this. Callers that invoke
|
|
688
|
+
* `processLegalFormMatches` directly (without going through
|
|
689
|
+
* `runPipeline`) must `await warmLegalRoleHeads()` first;
|
|
690
|
+
* otherwise the trim falls back to a no-op and sentence-
|
|
691
|
+
* fragment fixes do not apply.
|
|
641
692
|
*/
|
|
642
693
|
declare const processLegalFormMatches: (allMatches: Match[], sliceStart: number, sliceEnd: number, fullText?: string) => Entity[];
|
|
643
694
|
//#endregion
|
|
@@ -819,6 +870,8 @@ type CountryCode = NonNullRegion[keyof NonNullRegion][number];
|
|
|
819
870
|
declare const resolveCountries: (regions?: string[], countries?: string[]) => Set<string> | null;
|
|
820
871
|
//#endregion
|
|
821
872
|
//#region src/filters/false-positives.d.ts
|
|
873
|
+
/** Ensure street-type vocabulary is loaded. */
|
|
874
|
+
declare const initAddressComponents: () => Promise<void>;
|
|
822
875
|
/**
|
|
823
876
|
* Filter out entities that are likely false positives:
|
|
824
877
|
* template placeholders, clause/section numbers,
|
|
@@ -1035,5 +1088,5 @@ declare const levenshtein: (rawA: string, rawB: string) => number;
|
|
|
1035
1088
|
*/
|
|
1036
1089
|
declare const normalizeForSearch: (text: string) => string;
|
|
1037
1090
|
//#endregion
|
|
1038
|
-
export { type AnonymisationOperator, CURRENCY_PATTERN_META, type CountryCode, type CustomDenyListEntry, type CustomRegexPattern, DATE_PATTERN_META, DEFAULT_ENTITY_LABELS, DEFAULT_OPERATOR_CONFIG, DETECTION_SOURCES, DETECTOR_PRIORITY, type DefinitionPattern, type DenyListCategory, type DenyListData, type DetectionSource, type Dictionaries, type DictionaryMeta, type DocumentZone, type Entity, type EntityResult, type GazetteerData, type GazetteerEntry, type HotwordRule, type NameCorpusData, type NerInferenceFn, OPERATOR_REGISTRY, OPERATOR_TYPES, type OperatorConfig, type OperatorType, type PipelineConfig, type PipelineContext, type PipelineOptions, REGEX_META, REGEX_PATTERNS, REGIONS, type RawInferenceResult, type RedactionResult, type RegexMeta, type RegionId, type ReviewDecision, type ReviewedEntity, type TriggerExtension, type TriggerGroupConfig, type TriggerRule, type TriggerStrategy, type TriggerValidation, type UnifiedResult, type UnifiedSearchInstance, ZONE_SCORE_ADJUSTMENTS, type ZoneSpan, applyHotwordRules, applyZoneAdjustments, boostNearMissEntities, buildDenyList, buildGazetteerPatterns, buildLegalFormPatterns, buildPlaceholderMap, buildStreetTypePatterns, buildTriggerPatterns, buildUnifiedSearch, chunkText, classifyZones, computeChunkOffsets, corefKey, createPipelineContext, deanonymise, decodeSpans, decodeTokenSpans, detectNameCorpus, ensureDenyListData, exportRedactionKey, extractDefinedTerms, filterFalsePositives, findCoreferenceSpans, getCurrencyPatterns, getDatePatterns, initHotwordRules, initNameCorpus, initZoneClassifier, levenshtein, mergeAndDedup, mergeChunkEntities, normalizeForSearch, prepareBatch, processAddressSeeds, processDenyListMatches, processGazetteerMatches, processLegalFormMatches, processRegexMatches, processTriggerMatches, propagateOrgNames, redactText, resolveCountries, resolveOperator, runPipeline, runUnifiedSearch, sanitizeEntities, tokenizeText };
|
|
1091
|
+
export { type AnonymisationOperator, CURRENCY_PATTERN_META, type CountryCode, type CustomDenyListEntry, type CustomRegexPattern, DATE_PATTERN_META, DEFAULT_ENTITY_LABELS, DEFAULT_OPERATOR_CONFIG, DETECTION_SOURCES, DETECTOR_PRIORITY, type DefinitionPattern, type DenyListCategory, type DenyListData, type DetectionSource, type Dictionaries, type DictionaryMeta, type DocumentZone, type Entity, type EntityResult, type GazetteerData, type GazetteerEntry, type HotwordRule, type NameCorpusData, type NerInferenceFn, OPERATOR_REGISTRY, OPERATOR_TYPES, type OperatorConfig, type OperatorType, type PipelineConfig, type PipelineContext, type PipelineOptions, REGEX_META, REGEX_PATTERNS, REGIONS, type RawInferenceResult, type RedactionResult, type RegexMeta, type RegionId, type ReviewDecision, type ReviewedEntity, type TriggerExtension, type TriggerGroupConfig, type TriggerRule, type TriggerStrategy, type TriggerValidation, type UnifiedResult, type UnifiedSearchInstance, ZONE_SCORE_ADJUSTMENTS, type ZoneSpan, applyHotwordRules, applyZoneAdjustments, boostNearMissEntities, buildDenyList, buildGazetteerPatterns, buildLegalFormPatterns, buildPlaceholderMap, buildStreetTypePatterns, buildTriggerPatterns, buildUnifiedSearch, chunkText, classifyZones, computeChunkOffsets, corefKey, createPipelineContext, deanonymise, decodeSpans, decodeTokenSpans, detectNameCorpus, ensureDenyListData, exportRedactionKey, extractDefinedTerms, filterFalsePositives, findCoreferenceSpans, getCurrencyPatterns, getDatePatterns, initAddressComponents, initHotwordRules, initNameCorpus, initZoneClassifier, levenshtein, mergeAndDedup, mergeChunkEntities, normalizeForSearch, prepareBatch, processAddressSeeds, processDenyListMatches, processGazetteerMatches, processLegalFormMatches, processRegexMatches, processTriggerMatches, propagateOrgNames, redactText, resolveCountries, resolveOperator, runPipeline, runUnifiedSearch, sanitizeEntities, tokenizeText, warmLegalRoleHeads };
|
|
1039
1092
|
//# sourceMappingURL=wasm.d.mts.map
|