Tarnkappe v0.8: French, Spanish and much less memory
Tarnkappe v0.8.2 is out. It’s the small, open model I trained to find personal data in web pages: names, companies, emails, phone numbers, addresses. Until last week it read English and German. Now it also reads French and Spanish.
Open source
Get Tarnkappe on GitHub →
Apache 2.0 code, open weights and every benchmark.
Four languages
The new default model is trained on English, German, French and Spanish, from public data only. It covers France, French-speaking Switzerland, Belgium and Spain.
I tested it on 60 real pages from those countries, with 888 items of personal data, none of them used for training. v0.8.2 finds 97.2% of them, and 86.0% of what it flags is correct. The old v0.7 model got 89.6% and 68.7% on the same pages.
The rules around the model learned the new countries too:
- Phone formats for France, Switzerland, Belgium and Spain.
- Postcodes like “B-1300 Wavre”, legal forms like SARL, Sàrl and S.L., Spanish double surnames, and names written surname first, like “DUPONT Marie”.
- A new national ID type: the Spanish DNI and NIE, the French NIR, the Belgian national register number and the Swiss AHV number, each checked against its checksum.
Much less memory
Four languages first made it heavier. v0.8.0 needed 442 MB after start-up. v0.8.1 needs 202 MB, less than the English and German v0.7 did (310 MB). Loading the word vectors went from 0.9 to 0.5 seconds.
The vocabulary of 1.8 million words was a Python dictionary at about 150 bytes a word. It’s now a sorted list of 64-bit hashes, 12 bytes a word. The vector tables also stay in half precision until a row is actually used. Nothing else changed: same vectors, same scores, same model files.
v0.8.2: better English and German too
v0.8.2 reads French and Spanish and is now better than v0.7 at English and German as well. I retrained it with more weight on the hand-labelled English and German data and a wider layer for the word vectors of all four languages.
- English company names: 98.5% found in the Presidio test sentences, up from 97.0% in v0.7. That includes small start-up names without a GmbH or Ltd.
- German news: strict F1 0.715 on GermEval and 0.733 on German PUD, up from 0.687 and 0.694 in v0.7.
- English web text: strict F1 0.668, up from 0.646.
- Fewer false alarms on ordinary German nouns like “Kirche” or “Schule”.
- French and Spanish: 97.2% of the personal data on the 60 real pages is found, and every release bar passes.
Speed and memory stay the same: about 1.2 ms per short text and 200 MB.
The French and Spanish test pages were labelled with AI help, so treat those numbers as a first real test.
Try it
pip install "git+https://github.com/ncserny/betterprivacy-tarnkappe"
If you only want the model, it’s on Hugging Face. Tarnkappe is built for and sponsored by BetterPrivacy.me, which uses it to find your personal data on the web.
If it misses something in your language, open an issue on GitHub.