solidprivacy-nl commited on
Commit
22c81f5
·
1 Parent(s): d86e9b2

Document v12.3 review table simplification

Browse files
Files changed (1) hide show
  1. CHANGELOG.md +87 -138
CHANGELOG.md CHANGED
@@ -26,12 +26,73 @@ This prevents one-off fixes and protects existing behaviour.
26
 
27
  ---
28
 
29
- ## v12.2 — Review focus filters
30
 
31
  Status: implemented; awaiting GitHub Actions and Hugging Face verification.
32
 
33
  Purpose:
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  - Add practical focus filters on top of the v12.1 review-status model.
36
  - Help the legal reviewer quickly inspect only the rows that matter for a specific task.
37
  - Keep export semantics safe: the filter is an overview/focus tool, not the authoritative edited replacement table.
@@ -51,24 +112,7 @@ Main changes:
51
  - `Alleen juridische referenties`
52
  - `Alleen namen/adressen`
53
  - `Alleen lage zekerheid`
54
- - Added filter groups for legal/admin reference entity types, including:
55
- - legal case numbers;
56
- - rolnummers;
57
- - rekestnummers;
58
- - parketnummers;
59
- - dossier/client numbers;
60
- - incident/claim/reference numbers;
61
- - invoice/order/contract references;
62
- - immigration, municipal, police, healthcare and insurance references;
63
- - ECLI, KvK, VAT, BIG and vehicle/object references.
64
- - Added filter group for names/address-like data, including:
65
- - `PERSON`;
66
- - `NL_LEGAL_PARTY_NAME`;
67
- - `LOCATION`;
68
- - `NL_ADDRESS`;
69
- - `NL_POSTCODE`;
70
- - `ORGANIZATION`;
71
- - `NL_COURT_OR_AUTHORITY`.
72
  - Added low-confidence filtering based on either Dutch confidence label `Laag` or numeric score below `0.60`.
73
  - Added tests for all filter modes.
74
  - Extended the Streamlit startup patch so the review step gets a `Focusfilter voor controle` selectbox.
@@ -84,8 +128,8 @@ Important design decision:
84
  Testing:
85
 
86
  - Added unit tests for `review_filters.py`.
87
- - GitHub Actions status still needs to be checked after this changelog update.
88
- - Hugging Face app should be checked after sync.
89
 
90
  Intentionally not changed:
91
 
@@ -128,17 +172,7 @@ Main changes:
128
  - `Onthouden vervanging`
129
  - Added sorting order so rows needing review appear before automatically applied rows.
130
  - Added tests for source-to-status mapping and ordering.
131
- - Extended the existing Streamlit startup patch so the replacement table gets:
132
- - a visible `Status` column;
133
- - hidden/internal `review_status` and `review_order` fields;
134
- - a compact status summary above the editor;
135
- - status values included in report rows where supported by downstream exports.
136
-
137
- Important design decision:
138
-
139
- - v12.1 introduced status only.
140
- - It did not add filters yet.
141
- - Filters and further table simplification were reserved for v12.2 and v12.3.
142
 
143
  Testing:
144
 
@@ -186,11 +220,7 @@ Main changes:
186
  - `GEM-HLM-2026-2210` → `NL_LEGAL_CASE_NUMBER`
187
  - `200.345.678/01 OK` → `NL_LEGAL_CASE_NUMBER`
188
  - `76543210` after KvK context → `NL_KVK_NUMBER`
189
- - Verified value-only behavior:
190
- - context such as `Zaaknummer:` must remain readable;
191
- - context such as `intern incidentnummer` must remain readable;
192
- - context such as `Claimreferentie verzekeraar:` must remain readable;
193
- - context such as `KvK-nummer vennootschap:` must remain readable.
194
 
195
  Testing:
196
 
@@ -225,29 +255,16 @@ Files changed:
225
  Main changes:
226
 
227
  - Expanded the regression set with concrete Dutch legal/admin examples reported during testing.
228
- - Added/validated cases for:
229
- - court / case numbers;
230
- - incident numbers;
231
- - camera/video references;
232
- - insurance claim references;
233
- - repair numbers;
234
- - administrative law case numbers;
235
- - immigration case numbers;
236
- - municipal case references;
237
- - enterprise chamber / appellate style case numbers;
238
- - KvK numbers in labelled context.
239
- - Added a lightweight KvK fallback to the candidate scanner:
240
- - `KvK-nummer vennootschap: 76543210` now yields value-only candidate `76543210` as `NL_KVK_NUMBER` when not already detected.
241
- - Kept the candidate scanner as a review/audit layer:
242
- - candidates remain unchecked by default in the UI;
243
- - the user decides whether to include them.
244
  - Updated the case-reference contract test to use the broader contextual value regex instead of only the strict formal court-number regex.
245
 
246
  Important design decision:
247
 
248
  - `GEM-HLM-2026-2210` is not a classic court-number format by itself.
249
  - It becomes a legal case number because it appears near context such as `zaaknummer`.
250
- - Therefore the test should reflect contextual recognition, not only raw pattern recognition.
251
 
252
  Testing:
253
 
@@ -284,15 +301,8 @@ Main changes:
284
 
285
  - Added synthetic Dutch legal regression cases.
286
  - Added candidate scanner tests for expected reference-like values.
287
- - Added false-positive guards for:
288
- - legal article references, e.g. `7:669 BW`;
289
- - dates, e.g. `15-12-2025`;
290
- - money/amount context, e.g. `EUR 1.250,00`.
291
- - Added context preservation contract tests:
292
- - `Slachtoffer` must stay readable;
293
- - `minderjarige` must stay readable;
294
- - `Verzoeker` must stay readable;
295
- - role/context words must not be swallowed into the replacement span.
296
  - Added a GitHub Actions workflow for Python regression tests.
297
  - Fixed import path handling by setting `PYTHONPATH` to the repository root.
298
  - Kept early tests lightweight to avoid unnecessary full Streamlit/Presidio/spaCy startup cost.
@@ -361,34 +371,12 @@ Files added or changed:
361
 
362
  Main changes:
363
 
364
- - Added Dutch product language:
365
- - `Scrub Legal`
366
- - `Lokale juridische documentcontrole`
367
- - `Controlemodus`
368
- - `Manier van vervangen`
369
- - `Voeg document of tekst toe`
370
- - `Controleer gevonden gegevens`
371
- - `Mogelijke gemiste waarden`
372
- - `Download opgeschoonde bestanden`
373
- - Added a separate Dutch UI copy layer in `ui_texts_nl.py`.
374
- - Added Dutch display labels for technical entity types in `display_labels_nl.py`.
375
  - Reworked the main Streamlit app to make the workflow more legal-user oriented.
376
- - Kept technical settings under advanced sections.
377
- - Kept technical recognizer labels available, but made them less central in the interface.
378
- - Restored/kept synthetic legal test example loading in the interface.
379
  - Added a startup hotfix for Streamlit’s nested-expander limitation.
380
 
381
- Important bug fixed:
382
-
383
- - Streamlit does not allow an expander inside another expander.
384
- - The first v9 implementation nested `Woordenlijsten` inside `Geavanceerde instellingen`.
385
- - Added `fix_streamlit_nested_expanders.py` and updated the Docker startup command to patch this before Streamlit starts.
386
-
387
- Testing:
388
-
389
- - GitHub → Hugging Face sync passed.
390
- - User confirmed app startup and interface were working.
391
-
392
  Known limitation:
393
 
394
  - Some Streamlit-native widget labels remain English, such as upload button internals (`Browse files`, `Drag and drop file here`). These come from Streamlit itself and are not fully controlled by normal UI strings.
@@ -413,22 +401,9 @@ Main changes:
413
 
414
  - Added a GitHub Actions workflow for syncing to Hugging Face.
415
  - Initial `huggingface/hub-sync` approach failed on SDK and API-rate issues.
416
- - Replaced it with a simpler direct Git push workflow:
417
- - checkout GitHub repo;
418
- - add Hugging Face Space as remote;
419
- - force-push `HEAD:main` to the Space.
420
  - Added concurrency handling to avoid overlapping sync runs.
421
 
422
- Problems encountered and fixed:
423
-
424
- - Missing or insufficient Hugging Face token caused initial `Space not found` / authentication behavior.
425
- - Space SDK mismatch was corrected from `streamlit` to `docker`.
426
- - API `429 Too Many Requests` from `huggingface/hub-sync` was avoided by switching to direct Git push.
427
-
428
- Testing:
429
-
430
- - Sync workflow passed repeatedly after direct Git push implementation.
431
-
432
  Security/ops note:
433
 
434
  - The workflow expects a GitHub Actions secret named `HF_TOKEN`.
@@ -452,46 +427,31 @@ Main themes:
452
  - Recognition of Dutch legal references, case numbers and administrative identifiers.
453
  - Candidate scanner / audit-layer idea.
454
  - Synthetic legal examples for testing.
455
- - Context preservation principle:
456
- - do not mask role words such as `slachtoffer`, `minderjarige`, `verzoeker`, `verweerder`;
457
- - mask the person/value, not the legal meaning of the sentence.
458
 
459
  Important design conclusions:
460
 
461
  - A local deterministic scrubber is a better MVP path than relying on cloud LLMs.
462
  - Local LLMs may be useful later, but they are not the best first layer for a fast legal scrubber.
463
- - The MVP should combine:
464
- - deterministic recognizers;
465
- - Dutch legal/admin taxonomy;
466
- - review table;
467
- - candidate scanner;
468
- - regression tests;
469
- - eventually local packaging.
470
 
471
  ---
472
 
473
- ## Planned next phase — v12.3 Table simplification
474
 
475
  Status: planned, not yet implemented.
476
 
477
  Goal:
478
 
479
- - Reduce visual noise in the replacement table while preserving technical auditability.
480
 
481
  Planned scope:
482
 
483
- - Keep essential columns prominent:
484
- - include;
485
- - remember;
486
- - status;
487
- - found text;
488
- - replacement;
489
- - type;
490
- - confidence.
491
- - Move technical source/reason/context/score/entity-type fields into a separate technical details view where feasible.
492
- - Preserve the full data for exports and reports.
493
 
494
- Non-goals for v12.3:
495
 
496
  - No recognizer changes.
497
  - No MSI/local desktop packaging yet.
@@ -503,18 +463,7 @@ Non-goals for v12.3:
503
 
504
  Possible directions:
505
 
506
- - Further recognizer expansion by legal domain:
507
- - family law;
508
- - criminal law;
509
- - labour law;
510
- - immigration law;
511
- - administrative law;
512
- - housing/real estate;
513
- - insurance / personal injury.
514
- - Local packaging research:
515
- - Windows desktop app;
516
- - local-only processing;
517
- - MSI installer path;
518
- - model/runtime size constraints.
519
  - More advanced DOCX/PDF preservation.
520
  - Better synthetic long-form legal test documents.
 
26
 
27
  ---
28
 
29
+ ## v12.3 — Review table simplification
30
 
31
  Status: implemented; awaiting GitHub Actions and Hugging Face verification.
32
 
33
  Purpose:
34
 
35
+ - Reduce visual noise in the replacement table.
36
+ - Keep the main review table focused on the columns legal users actually need to edit.
37
+ - Preserve technical/audit information in a separate details view.
38
+ - Keep recognizer and export semantics unchanged.
39
+
40
+ Files added or changed:
41
+
42
+ - `review_table_config.py`
43
+ - `tests/test_review_table_config.py`
44
+ - `fix_streamlit_nested_expanders.py`
45
+ - `CHANGELOG.md`
46
+
47
+ Main changes:
48
+
49
+ - Added a central table configuration module.
50
+ - Main editable review table now focuses on:
51
+ - `Meenemen`
52
+ - `Onthouden`
53
+ - `Status`
54
+ - `Gevonden tekst`
55
+ - `Vervangen door`
56
+ - `Type gegeven`
57
+ - `Zekerheid`
58
+ - Technical and audit-oriented columns are moved out of the primary editing view:
59
+ - `Bron`
60
+ - `Reden`
61
+ - `Context`
62
+ - `Technisch type`
63
+ - `Technische score`
64
+ - `Technische bron`
65
+ - Added a separate `Technische details bij de vervangtabel` expander.
66
+ - Added tests to enforce that technical fields are not part of the main review columns.
67
+
68
+ Important design decision:
69
+
70
+ - The full data remains present in the underlying dataframe.
71
+ - The main table is simplified visually, but exports and reports still use the available row data.
72
+ - The technical details remain accessible for debugging, auditability and future tuning.
73
+
74
+ Testing:
75
+
76
+ - Added unit tests for `review_table_config.py`.
77
+ - GitHub Actions status still needs to be checked after this changelog update.
78
+ - Hugging Face app should be checked after sync.
79
+
80
+ Intentionally not changed:
81
+
82
+ - No recognizer changes.
83
+ - No entity-type expansion.
84
+ - No export semantics change.
85
+ - No MSI/local installer work.
86
+ - No LLM/cloud feature.
87
+
88
+ ---
89
+
90
+ ## v12.2 — Review focus filters
91
+
92
+ Status: completed and green in GitHub Actions.
93
+
94
+ Purpose:
95
+
96
  - Add practical focus filters on top of the v12.1 review-status model.
97
  - Help the legal reviewer quickly inspect only the rows that matter for a specific task.
98
  - Keep export semantics safe: the filter is an overview/focus tool, not the authoritative edited replacement table.
 
112
  - `Alleen juridische referenties`
113
  - `Alleen namen/adressen`
114
  - `Alleen lage zekerheid`
115
+ - Added filter groups for legal/admin reference entity types, names and address-like data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  - Added low-confidence filtering based on either Dutch confidence label `Laag` or numeric score below `0.60`.
117
  - Added tests for all filter modes.
118
  - Extended the Streamlit startup patch so the review step gets a `Focusfilter voor controle` selectbox.
 
128
  Testing:
129
 
130
  - Added unit tests for `review_filters.py`.
131
+ - GitHub Actions `Tests` passed.
132
+ - GitHub → Hugging Face sync passed.
133
 
134
  Intentionally not changed:
135
 
 
172
  - `Onthouden vervanging`
173
  - Added sorting order so rows needing review appear before automatically applied rows.
174
  - Added tests for source-to-status mapping and ordering.
175
+ - Extended the existing Streamlit startup patch so the replacement table gets a visible `Status` column, internal status fields and a compact status summary above the editor.
 
 
 
 
 
 
 
 
 
 
176
 
177
  Testing:
178
 
 
220
  - `GEM-HLM-2026-2210` → `NL_LEGAL_CASE_NUMBER`
221
  - `200.345.678/01 OK` → `NL_LEGAL_CASE_NUMBER`
222
  - `76543210` after KvK context → `NL_KVK_NUMBER`
223
+ - Verified value-only behavior so context such as `Zaaknummer:`, `intern incidentnummer`, `Claimreferentie verzekeraar:` and `KvK-nummer vennootschap:` remains readable.
 
 
 
 
224
 
225
  Testing:
226
 
 
255
  Main changes:
256
 
257
  - Expanded the regression set with concrete Dutch legal/admin examples reported during testing.
258
+ - Added/validated cases for court/case numbers, incident numbers, camera/video references, insurance claim references, repair numbers, immigration numbers, municipal references and KvK numbers in labelled context.
259
+ - Added a lightweight KvK fallback to the candidate scanner.
260
+ - Kept the candidate scanner as a review/audit layer with candidates unchecked by default.
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  - Updated the case-reference contract test to use the broader contextual value regex instead of only the strict formal court-number regex.
262
 
263
  Important design decision:
264
 
265
  - `GEM-HLM-2026-2210` is not a classic court-number format by itself.
266
  - It becomes a legal case number because it appears near context such as `zaaknummer`.
267
+ - Therefore the test reflects contextual recognition, not only raw pattern recognition.
268
 
269
  Testing:
270
 
 
301
 
302
  - Added synthetic Dutch legal regression cases.
303
  - Added candidate scanner tests for expected reference-like values.
304
+ - Added false-positive guards for legal article references, dates and money/amount context.
305
+ - Added context preservation contract tests for words such as `Slachtoffer`, `minderjarige` and `Verzoeker`.
 
 
 
 
 
 
 
306
  - Added a GitHub Actions workflow for Python regression tests.
307
  - Fixed import path handling by setting `PYTHONPATH` to the repository root.
308
  - Kept early tests lightweight to avoid unnecessary full Streamlit/Presidio/spaCy startup cost.
 
371
 
372
  Main changes:
373
 
374
+ - Added Dutch product language and workflow language such as `Scrub Legal`, `Lokale juridische documentcontrole`, `Controlemodus`, `Voeg document of tekst toe`, `Controleer gevonden gegevens`, `Mogelijke gemiste waarden` and `Download opgeschoonde bestanden`.
375
+ - Added a separate Dutch UI copy layer and Dutch display labels for technical entity types.
 
 
 
 
 
 
 
 
 
376
  - Reworked the main Streamlit app to make the workflow more legal-user oriented.
377
+ - Restored/kept synthetic legal test example loading.
 
 
378
  - Added a startup hotfix for Streamlit’s nested-expander limitation.
379
 
 
 
 
 
 
 
 
 
 
 
 
380
  Known limitation:
381
 
382
  - Some Streamlit-native widget labels remain English, such as upload button internals (`Browse files`, `Drag and drop file here`). These come from Streamlit itself and are not fully controlled by normal UI strings.
 
401
 
402
  - Added a GitHub Actions workflow for syncing to Hugging Face.
403
  - Initial `huggingface/hub-sync` approach failed on SDK and API-rate issues.
404
+ - Replaced it with a simpler direct Git push workflow.
 
 
 
405
  - Added concurrency handling to avoid overlapping sync runs.
406
 
 
 
 
 
 
 
 
 
 
 
407
  Security/ops note:
408
 
409
  - The workflow expects a GitHub Actions secret named `HF_TOKEN`.
 
427
  - Recognition of Dutch legal references, case numbers and administrative identifiers.
428
  - Candidate scanner / audit-layer idea.
429
  - Synthetic legal examples for testing.
430
+ - Context preservation principle: do not mask role words such as `slachtoffer`, `minderjarige`, `verzoeker`, `verweerder`; mask the person/value, not the legal meaning of the sentence.
 
 
431
 
432
  Important design conclusions:
433
 
434
  - A local deterministic scrubber is a better MVP path than relying on cloud LLMs.
435
  - Local LLMs may be useful later, but they are not the best first layer for a fast legal scrubber.
436
+ - The MVP should combine deterministic recognizers, Dutch legal/admin taxonomy, review table, candidate scanner, regression tests and eventually local packaging.
 
 
 
 
 
 
437
 
438
  ---
439
 
440
+ ## Planned next phase — v12.4 Review guidance text
441
 
442
  Status: planned, not yet implemented.
443
 
444
  Goal:
445
 
446
+ - Add clearer user guidance around review workflow and candidate handling.
447
 
448
  Planned scope:
449
 
450
+ - Explain the difference between automatically applied rows and candidate rows.
451
+ - Add short help text near the focus filter and technical details expander.
452
+ - Make it clearer that only checked rows are exported.
 
 
 
 
 
 
 
453
 
454
+ Non-goals for v12.4:
455
 
456
  - No recognizer changes.
457
  - No MSI/local desktop packaging yet.
 
463
 
464
  Possible directions:
465
 
466
+ - Further recognizer expansion by legal domain: family law, criminal law, labour law, immigration law, administrative law, housing/real estate and insurance/personal injury.
467
+ - Local packaging research: Windows desktop app, local-only processing, MSI installer path and model/runtime size constraints.
 
 
 
 
 
 
 
 
 
 
 
468
  - More advanced DOCX/PDF preservation.
469
  - Better synthetic long-form legal test documents.