Spaces:
Running
Running
Add Dutch legal audit candidate review layer
Browse files- legal_reference_taxonomy.py +66 -0
legal_reference_taxonomy.py
CHANGED
|
@@ -11,6 +11,10 @@ Examples:
|
|
| 11 |
|
| 12 |
All entries are local, deterministic and offline-compatible. They are intended
|
| 13 |
for Dutch Legal Strict mode and should be conservative: context is required.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"""
|
| 15 |
|
| 16 |
from __future__ import annotations
|
|
@@ -28,6 +32,24 @@ class ReferenceCategory(TypedDict):
|
|
| 28 |
|
| 29 |
|
| 30 |
LEGAL_REFERENCE_CATEGORIES: List[ReferenceCategory] = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
{
|
| 32 |
"entity_type": "NL_CLIENT_REFERENCE",
|
| 33 |
"placeholder": "CLIENT_REFERENTIE",
|
|
@@ -297,6 +319,42 @@ LEGAL_REFERENCE_CATEGORIES: List[ReferenceCategory] = [
|
|
| 297 |
],
|
| 298 |
"examples": ["HUUR-2026-8891", "VVE-AMS-2026-04", "OBJ-55091"],
|
| 299 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
]
|
| 301 |
|
| 302 |
|
|
@@ -312,3 +370,11 @@ WEAK_REFERENCE_KEYWORDS = {
|
|
| 312 |
"referentienr",
|
| 313 |
}
|
| 314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
All entries are local, deterministic and offline-compatible. They are intended
|
| 13 |
for Dutch Legal Strict mode and should be conservative: context is required.
|
| 14 |
+
|
| 15 |
+
V8 adds vehicle/object reference categories and a separate candidate-review
|
| 16 |
+
strategy. Auto-masking stays conservative; suspicious leftovers can be shown in
|
| 17 |
+
the UI as review candidates instead of silently remaining invisible.
|
| 18 |
"""
|
| 19 |
|
| 20 |
from __future__ import annotations
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
LEGAL_REFERENCE_CATEGORIES: List[ReferenceCategory] = [
|
| 35 |
+
{
|
| 36 |
+
"entity_type": "NL_DOSSIER_NUMBER",
|
| 37 |
+
"placeholder": "DOSSIERNUMMER",
|
| 38 |
+
"domain": "general_legal",
|
| 39 |
+
"score": 0.88,
|
| 40 |
+
"keywords": [
|
| 41 |
+
"dossiernummer",
|
| 42 |
+
"dossiernr",
|
| 43 |
+
"dossier nr",
|
| 44 |
+
"ons dossier",
|
| 45 |
+
"uw dossier",
|
| 46 |
+
"kantoordossier",
|
| 47 |
+
"procesdossier",
|
| 48 |
+
"zaakdossier",
|
| 49 |
+
"advocaatdossier",
|
| 50 |
+
],
|
| 51 |
+
"examples": ["DOSS/2026/1189", "FAM-2026-88721", "ARB-2026-00421"],
|
| 52 |
+
},
|
| 53 |
{
|
| 54 |
"entity_type": "NL_CLIENT_REFERENCE",
|
| 55 |
"placeholder": "CLIENT_REFERENTIE",
|
|
|
|
| 319 |
],
|
| 320 |
"examples": ["HUUR-2026-8891", "VVE-AMS-2026-04", "OBJ-55091"],
|
| 321 |
},
|
| 322 |
+
{
|
| 323 |
+
"entity_type": "NL_VEHICLE_REFERENCE",
|
| 324 |
+
"placeholder": "VOERTUIG_OF_KENTEKENREFERENTIE",
|
| 325 |
+
"domain": "vehicle_traffic_injury",
|
| 326 |
+
"score": 0.84,
|
| 327 |
+
"keywords": [
|
| 328 |
+
"kenteken",
|
| 329 |
+
"kentekennummer",
|
| 330 |
+
"nummerplaat",
|
| 331 |
+
"voertuigkenteken",
|
| 332 |
+
"voertuigidentificatie",
|
| 333 |
+
"voertuigreferentie",
|
| 334 |
+
"chassisnummer",
|
| 335 |
+
"vin",
|
| 336 |
+
"rdw-kenmerk",
|
| 337 |
+
"leaseautonummer",
|
| 338 |
+
"wagenparknummer",
|
| 339 |
+
],
|
| 340 |
+
"examples": ["XX123X", "12-ABC-3", "VIN-2026-77812"],
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"entity_type": "NL_OBJECT_REFERENCE",
|
| 344 |
+
"placeholder": "OBJECTREFERENTIE",
|
| 345 |
+
"domain": "objects_assets_property",
|
| 346 |
+
"score": 0.82,
|
| 347 |
+
"keywords": [
|
| 348 |
+
"objectreferentie",
|
| 349 |
+
"objectcode",
|
| 350 |
+
"inventarisnummer",
|
| 351 |
+
"assetnummer",
|
| 352 |
+
"serienummer",
|
| 353 |
+
"apparaatnummer",
|
| 354 |
+
"zaakobject",
|
| 355 |
+
],
|
| 356 |
+
"examples": ["OBJ-WOON-55091", "ASSET-2026-4410"],
|
| 357 |
+
},
|
| 358 |
]
|
| 359 |
|
| 360 |
|
|
|
|
| 370 |
"referentienr",
|
| 371 |
}
|
| 372 |
|
| 373 |
+
# Candidate scanner categories are intentionally not always auto-masked. They
|
| 374 |
+
# are used by candidate_scanner.py to surface suspicious unmasked values in the
|
| 375 |
+
# review table. The user can then decide whether to include them.
|
| 376 |
+
CANDIDATE_ENTITY_TYPES = [
|
| 377 |
+
"NL_SUSPICIOUS_REFERENCE_CANDIDATE",
|
| 378 |
+
"NL_POSSIBLE_LICENSE_PLATE",
|
| 379 |
+
]
|
| 380 |
+
|