How we measure Anonimatum’s AI in 10 languages: corpus, recall and precision

An anonymization tool is judged by what it misses. That is why every time Anonimatum’s AI changes, we test it against a corpus of 6,123 documents in 10 languages (Spanish, Catalan, Galician, Basque, English, French, German, Italian, Portuguese and Romanian) and compare what it detects with what it should detect. This article explains what is in that corpus, how we measure, and today’s figures, including the ones we are not happy with yet.
What is in the test corpus
The corpus mixes two kinds of documents. The real ones (4,805) are, for the most part, publications by public bodies released under re-use licences: official gazettes and journals, court judgments and orders, decisions by data protection and freedom-of-information authorities, minutes, agreements and EU legislation. The synthetic ones (1,318) are generated with made-up data to cover what rarely appears in real documents: payslips, invoices, contracts, medical reports, forms, emails, spreadsheets and Word or OpenDocument files with complex layouts. They include invoices in every shape: text PDFs, scans, phone photos, Word and Excel files, email attachments and XML e-invoices.
1,272 documents are scans: before looking for personal data they go through OCR with the model for the document’s language. They include skewed or rotated pages, stamps, stains, faxes, phone photos and handwriting, because that is where anonymization fails in practice (see OCR risks when redacting scanned documents).
| Language | Documents | Scans | Document types | Real | Synthetic | Hand-reviewed |
|---|---|---|---|---|---|---|
| Spanish | 645 | 114 | 43 | 515 | 130 | 84 |
| Catalan | 615 | 143 | 38 | 485 | 130 | 72 |
| Galician | 573 | 101 | 35 | 443 | 130 | 71 |
| Basque | 575 | 112 | 52 | 445 | 130 | 53 |
| English | 627 | 110 | 41 | 491 | 136 | 56 |
| French | 637 | 208 | 39 | 501 | 136 | 62 |
| German | 666 | 107 | 39 | 530 | 136 | 61 |
| Italian | 635 | 103 | 45 | 499 | 136 | 55 |
| Portuguese | 580 | 98 | 34 | 444 | 136 | 57 |
| Romanian | 570 | 176 | 54 | 452 | 118 | 32 |
| Total | 6,123 | 1,272 | — | 4,805 | 1,318 | 603 |
How we measure: recall and precision
- Recall: of all the personal data in a document, how much the AI detects. A recall of 0.95 means 5 out of 100 slip through. It is the metric that matters most for anonymization: what is not detected gets published.
- Precision: of everything the AI marks, how much really is personal data. Low precision does not leak data, but it means removing extra marks during review.
- Structured identifiers (national ID numbers, tax numbers, IBANs…): all of them must be detected in documents with a text layer; in scans we tolerate OCR misreading a digit.
Hand-reviewed versus automatic annotation
To measure recall you need to know which personal data each document contains. For synthetic documents we know, because we made them up. For real ones there are two levels:
Hand-reviewed real documents (603)
A person marks everything that should be anonymized: names, addresses, phone numbers, identifiers and companies. It is the most reliable measure and the one we enforce: at least 20 documents per language and a minimum recall of 0.95 (0.92 for Basque, for now).
Real documents with automatic annotation (4,182)
Only the names given by the publication’s own metadata are marked, such as the members of a court or the judge rapporteur. It is not a complete annotation, but it covers thousands of documents and targets the hard cases: signatures in scans and stand-alone names without context.
That is why we give two recall figures for real documents: hand-reviewed, which best reflects a complete document, and all real documents (hand-reviewed plus automatic annotation), which is harsher because it concentrates names exactly where mistakes are easiest. Precision is measured on synthetic and hand-reviewed documents, which have everything marked.
Results by language
Figures from AI test run #18, October 21, 2026. Precision is between 0.966 and 0.993 in every language.
- Hand-reviewed real documents
- All real documents (hand + automatic)
- Spanish
- Hand-reviewed real documents: 0.985All real documents (hand + automatic): 0.916
- Catalan
- Hand-reviewed real documents: 0.957All real documents (hand + automatic): 0.920
- Galician
- Hand-reviewed real documents: 0.956All real documents (hand + automatic): 0.944
- Basque
- Hand-reviewed real documents: 0.921All real documents (hand + automatic): 0.975
- English
- Hand-reviewed real documents: 0.981All real documents (hand + automatic): 0.925
- French
- Hand-reviewed real documents: 0.981All real documents (hand + automatic): 0.960
- German
- Hand-reviewed real documents: 0.987All real documents (hand + automatic): 0.985
- Italian
- Hand-reviewed real documents: 1.000All real documents (hand + automatic): 0.899
- Portuguese
- Hand-reviewed real documents: 0.994All real documents (hand + automatic): 0.870
- Romanian
- Hand-reviewed real documents: 0.974All real documents (hand + automatic): 0.855
| Language | Recall, synthetic | Recall, hand-reviewed | Recall, all real | Precision |
|---|---|---|---|---|
| Spanish | 0.982 | 0.985 | 0.916 | 0.966 |
| Catalan | 0.974 | 0.957 | 0.920 | 0.974 |
| Galician | 0.977 | 0.956 | 0.944 | 0.989 |
| Basque | 0.966 | 0.921 | 0.975 | 0.985 |
| English | 0.987 | 0.981 | 0.925 | 0.984 |
| French | 0.978 | 0.981 | 0.960 | 0.991 |
| German | 0.986 | 0.987 | 0.985 | 0.992 |
| Italian | 0.979 | 1.000 | 0.899 | 0.990 |
| Portuguese | 0.986 | 0.994 | 0.870 | 0.989 |
| Romanian | 0.963 | 0.974 | 0.855 | 0.993 |
On hand-reviewed real documents, 9 of the 10 languages reach 0.95 or more; the lowest value is 0.921 (Basque). Across all real documents, the lowest values are 0.855 (Romanian), 0.870 (Portuguese) and 0.899 (Italian). Among synthetic documents, which gather the hardest cases in the corpus (handwritten scans, faxes, stains, rotated pages), the lowest value is 0.963 (Romanian).
What changed in October 2026
Before this month’s improvements the figures were considerably worse. For the Iberian languages we compare recall on hand-reviewed real documents; for the rest, recall on all real documents, which is where the problem was.
- Before the improvements
- Now
- Spanish
- Before the improvements: 0.921Now: 0.985
- Catalan
- Before the improvements: 0.814Now: 0.957
- Galician
- Before the improvements: 0.895Now: 0.956
- Basque
- Before the improvements: 0.597Now: 0.921
- Before the improvements
- Now
- English
- Before the improvements: 0.832Now: 0.925
- French
- Before the improvements: 0.809Now: 0.960
- German
- Before the improvements: 0.745Now: 0.985
- Italian
- Before the improvements: 0.846Now: 0.899
- Portuguese
- Before the improvements: 0.769Now: 0.870
- Romanian
- Before the improvements: 0.412Now: 0.855
- Basque (0.597 → 0.921): addresses with the street type after the street name («kalea», «hiribidea», «solairua»), signatures in capitals, honorifics such as «andrea» and «jauna», and legal forms such as «S. Koop.» or «Fundazioa».
- French, German, Italian, Portuguese, English and Romanian (Romanian from 0.412 to 0.855): honorifics before names, court compositions, lists of names, the Italian codice fiscale, addresses and each country’s legal forms.
- No regressions: every improvement is tested against the full corpus, so a gain in one language cannot cost another.
What is left to improve
What slips through today falls into two cases, and both show up mostly in the all-real figure:
- Names misread by OCR. In a scan, a name can come out glued to the next word, hyphenated at the end of a line or with swapped letters. If OCR does not read it as a name, the AI does not recognise it.
- Stand-alone names without context. An uncommon surname in a list, with no honorific, role or verb around it, is hard to tell apart from any other word. This is what separates the two figures most in the languages with the lowest recall across all real documents.
- In Basque, split surnames carrying their case ending and foreign names on top of that. Its provisional minimum of 0.92 can only go up, until it reaches the 0.95 of the other languages.
In the meantime, the practical answer is the usual one: automatic detection proposes and a person reviews before applying, especially with scans. Zone-based visual anonymization covers whatever OCR cannot read.
It runs on every AI change
These tests are not a snapshot for the blog. The full corpus runs through continuous integration on every change to the AI, before it reaches production: text is extracted (with OCR for scans), personal data is detected and the result is compared with what is expected. Each language has a minimum recall and precision that can only go up; a change that falls below it is not merged. The figures in this article come from those reports and we will update them when they change.
Frequently asked questions
What does a recall of 0.98 mean?
That out of every 100 personal data items in the documents, the AI detects 98. The other 2 have to be caught in the human review before anonymization is applied.
Why is recall on all real documents lower than on hand-reviewed ones?
Because automatic annotation only marks the names given by the publication (members of a court, rapporteurs…), which often sit in scanned signatures or in lists without context, exactly where detection fails most. Hand-reviewed documents measure the whole document.
Is any document from the corpus published?
No. We only publish counts and ratios per language. No document, text, name or personal data from the corpus leaves the tests.
