LAB/016 · Running · Self-directed, not client work
Redacting Personal Data on Your Own Machine, Lithuanian First
Before documents go to a lawyer, an auditor or a cloud AI service, personal data has to come out. Plain rules plus a small local model removed every detail from 96.5% of Lithuanian test documents, once inflected names were handled.
Saulius Beconis ·
The question
Can we anonymise documents on our own machine before they leave the office, and how many personal details are left behind, in Lithuanian especially?
What it showed
Rules with check digits plus a small local model (GLiNER), with one extra step for Lithuanian name endings, found 99.2% of personal details and left 96.5% of Lithuanian test documents with no leak, at 1.1% over-redaction and a hundredth of a second per document. A local LLM alone did worse.
What it means in practice
Local redaction works well enough to use, but only when it is built for the language. Lithuanian names change their endings, and a tool that finds "Vaitkiene" can still miss "Vaitkienė". Measure leaks per document on your own documents before relying on it.
Many teams would like to send documents to an outside AI service, a lawyer or an auditor, but cannot send the personal data in them. Redacting it first, on your own machine, is the obvious answer. The question that matters is not “how accurate is the tool” but “how many personal details are still in the document when it leaves?” This Lab counts them.
The test
Lithuanian documents: 600 short fictional documents (complaints, HR notes, contracts, emails, insurance claims, meeting minutes), 514 used for testing. Names appear in every grammatical case (Jonas, Jono, Jonui, Joną, Jonu, Jonai), and personal codes and IBANs have valid check digits. Company names and codes, amounts, contract numbers and dates are mixed in, because redacting those is also a cost. No public Lithuanian dataset of this kind exists, so the generator is published with the Lab.
English and German: 300 test items each from ai4privacy’s open dataset of synthetic personal data, mapped to the same six classes.
Methods, all local:rules (regular expressions with check digits for personal codes, IBANs, phones and emails); GLiNER, a small multilingual model trained to find personal data; Qwen3-8B, a local language model asked to copy out every personal detail; and combinations. The model threshold and the prompt were chosen on a separate development set, never on the test set.
Scoring: a detail counts as found only if every letter and digit of it is redacted. Half a name is a leak.
Results
of 514 Lithuanian test documents left with no personal detail
96.5%
of redacted text was not personal data
1.1%
per document, on one machine, no outside service
0.01 s
Leaks against over-redaction, Lithuanian test setOne point per method · up and to the left is better
The 514 Lithuanian test documents: which ones still contained a personal detailOne mark per document · circles still contain at least one personal detail
GLiNER
No personal detail left28555.4%
At least one detail left22944.6%
Rules + GLiNER + name forms
No personal detail left49696.5%
At least one detail left183.5%
Lithuanian (synthetic): 514 test documents. A detail counts as found only if every letter and digit of it is redacted.
Details found
Documents with no leak
Over-redaction
Seconds per document
Rules
37.0%
0.0%
0.1%
0.00
GLiNER
86.3%
55.4%
1.0%
0.01
Qwen3-8B
89.6%
63.8%
11.0%
2.38
Rules + GLiNER
96.0%
81.7%
1.0%
0.01
Rules + Qwen3-8B
91.8%
67.1%
10.8%
2.38
Rules + GLiNER + Qwen3-8B
98.8%
94.4%
10.5%
2.39
Rules + GLiNER + name forms
99.2%
96.5%
1.1%
0.01
Rules + Qwen3-8B + name forms
94.7%
78.4%
10.7%
2.38
Rules + GLiNER + Qwen3-8B + name forms
99.9%
99.6%
10.5%
2.39
LAB/016 · measured 2026-10-10 · RTX 4070 12 GB
Lithuanian names change their endings
The biggest single source of leaks was grammar. A tool that finds a person’s name in one sentence often misses the same name with a different ending in the next:
Same person, different case ending: found once, missed onceWrong
Fictional document
Pokalbis su Austėja Vaitkiene vyko 2026-07-21. Vaitkienė turi penkerių metų patirtį logistikoje. Rekomendacijas suteikė Vaida Ramanauskienė (8 66680 005). Kontaktai: austeja.vaitkiene@gmail.com, 8 641 14386.
Redacted by GLiNER
Pokalbis su ███████ █████████ vyko 2026-07-21. Vaitkienė turi penkerių metų patirtį logistikoje. Rekomendacijas suteikė █████ █████████████ (█ █████ ███). Kontaktai: ███████.█████████@█████.███, █ ███ █████.
Missed
Vaitkienė
Synthetic Lithuanian document lt-0009 (fictional, generated for this Lab).
The fix is plain code: once a name is found anywhere in a document, every other form of it is redacted too. That one step lifted name recall for every method:
Lithuanian names found, before and after the name-forms stepShare of names fully redacted
WithoutWith name forms
GLiNERWithout 92.6% →With name forms98.7%
Qwen3-8BWithout 88.4% →With name forms93.8%
Rules + GLiNER + Qwen3-8BWithout 97.7% →With name forms99.8%
80.0%100.0%
The language model was asked explicitly to list every form of every name, and still skipped many. A version of the prompt with more detailed Lithuanian instructions did worse on the development set (81% of details found instead of 94.5%) and was not used.
By class and language
Share of details found by class, best combination (Rules + GLiNER + name forms).
Lithuanian
English
German
Names
98.7%
98.2%
97.0%
Personal and tax codes
100.0%
31.1%
64.0%
Email addresses
100.0%
100.0%
100.0%
Phone numbers
100.0%
93.0%
96.4%
Bank accounts (IBAN)
100.0%
—
—
Addresses
99.6%
83.5%
88.5%
LAB/016 · measured 2026-10-10 · RTX 4070 12 GB
English (ai4privacy): 300 test documents. A detail counts as found only if every letter and digit of it is redacted.
Details found
Documents with no leak
Over-redaction
Seconds per document
Rules
8.6%
3.3%
0.0%
0.00
GLiNER
88.5%
78.7%
6.0%
0.01
Qwen3-8B
88.3%
77.7%
5.2%
0.83
Rules + GLiNER
88.8%
79.0%
6.0%
0.01
Rules + Qwen3-8B
88.8%
78.7%
5.2%
0.83
Rules + GLiNER + Qwen3-8B
96.7%
93.7%
9.1%
0.84
Rules + GLiNER + name forms
88.8%
79.0%
6.0%
0.01
Rules + Qwen3-8B + name forms
88.8%
78.7%
5.2%
0.83
Rules + GLiNER + Qwen3-8B + name forms
96.7%
93.7%
9.1%
0.84
LAB/016 · measured 2026-10-10 · RTX 4070 12 GB
German (ai4privacy): 300 test documents. A detail counts as found only if every letter and digit of it is redacted.
Details found
Documents with no leak
Over-redaction
Seconds per document
Rules
10.1%
6.3%
0.8%
0.00
GLiNER
91.5%
85.3%
7.9%
0.01
Qwen3-8B
84.1%
75.3%
5.7%
1.07
Rules + GLiNER
91.5%
85.3%
7.9%
0.01
Rules + Qwen3-8B
84.1%
75.3%
5.9%
1.07
Rules + GLiNER + Qwen3-8B
97.3%
95.0%
11.1%
1.08
Rules + GLiNER + name forms
91.5%
85.3%
8.3%
0.01
Rules + Qwen3-8B + name forms
84.1%
75.3%
6.1%
1.07
Rules + GLiNER + Qwen3-8B + name forms
97.3%
95.0%
11.5%
1.08
LAB/016 · measured 2026-10-10 · RTX 4070 12 GB
In English and German the same combination missed many ID numbers. The rules here were written for Lithuanian formats, and the ai4privacy items use dozens of national ID, passport and tax formats. Adding the language model raised English and German to 94–95% of documents with no leak, at the price of more over-redaction and about a second per document.
What this means in practice
Count leaks per document, not accuracy. One missed name is enough for a document to count as personal data.
Build for the language. Lithuanian inflection is the main risk, and a few lines of plain code fix most of it.
Rules for structured IDs, a small model for names and addresses. Check-digit rules found every personal code and IBAN in the formats they were written for; the model found what rules cannot. Adding the language model raised Lithuanian documents with no leak from 96.5% to 99.6%, but it redacted ten times as much text that was not personal and took 2.4 seconds per document.
It runs anywhere. The recommended combination needs a hundredth of a second per document and no outside service.
Method and environment
data
Lithuanian: 600 synthetic documents (514 test), names declined in all cases, personal codes and IBANs with valid check digits, non-personal distractors. English and German: 300 test items each from ai4privacy open-pii-masking-500k (validation split), labels mapped to six classes
methods
rules (regular expressions with check digits); GLiNER multi PII v1, threshold 0.3 chosen on dev; Qwen3-8B Q4_K_M in llama.cpp, thinking off, greedy, prompt fixed on dev; unions; name forms = also redact every inflected form of a capitalised word already redacted
scoring
a detail is leaked unless every letter and digit of it is redacted; over-redaction = share of redacted characters that are not personal data; dates, ages and titles in ai4privacy are ignored
environment
gpu: RTX 4070 12 GB
measured
2026-10-10
Limits
The Lithuanian documents are synthetic and short, written from templates; real documents have typos, unusual names, foreign names and layouts, and will leak more. The rules were written by the same person who wrote the generator, so their perfect score on Lithuanian IDs is an upper bound. Dates of birth, ages and job titles were not scored. ai4privacy items are synthetic, generated with Llama models; only aggregate results are shown. One run per method. The code is in labs/gdpr-redaction in this site’s repository.
Data: redaction-2026-10-10.json (JSON), free to reuse under CC BY 4.0 with credit to Saulius Beconis.Source data and quoted excerpts keep their own licences, listed in the file.
New Lab results by email
A short email when a new measurement is published, a few times a year. No newsletter fluff, reply to unsubscribe.