maschera-ch-v71f
A model for masking personal data in documents
2 min readupdated
A token classification model designed to find and anonymize personal data in Swiss documents in German, French, Italian, and English. It tags pieces of personal information so they can be replaced with placeholders before sending text to external AI services. The model is based on the jhu-clsp/mmBERT-base architecture (ModernBERT, 308M parameters), trained exclusively on synthetic data, and shipped as part of the local MASCHERA application.
Key features
- Support for four languages: German, French, Italian, and English (Romansh is not supported).
- Recognition of 95 BIO tags across 47 categories, including Swiss identifiers (AHV, IBAN, UID), addresses, names, and new tags for
JOBTITLEandFAMILYROLE. - Complete privacy: the model is part of a local masking tool that runs directly on your device.
- Context up to 512 tokens with window splitting supported in the tool itself.
What you can do
- Integrate the model into the MASCHERA desktop app for local document preprocessing.
- Automatically replace names, addresses, and document numbers with placeholders before sending corporate texts to cloud language models.
- Use the model to tag Swiss administrative and business correspondence.
Example
Example of the model tagging text:
Sehr geehrte Frau Brülhart -> Sehr geehrte Frau [FULLNAME_1]
AHV 756.1234.5678.97 -> AHV [AHVN13_1]
Lindenstrasse 12, 3011 Bern -> [STREET_1] [BUILDINGNUM_1], [ZIPCODE_1] [CITY_1]Read more
DetailsBase model: jhu-clsp/mmBERT-base (308M parameters)
Weights: model.safetensors, 1.2 GB (MIT license)
Metrics: micro-F1 0.900 on synthetic data, 0.757 on a gold test set of 9 real documents
Leakage rate on real documents: around 1.27%
Training: 2 epochs, learning rate 2e-5, batch size 8×2, precision bf16










Comments