Loading…
Loading…
almanach/camembert-baseSecond iteration of the French PII detection model. Improvement over v1: a coarse 8-class taxonomy and training on realistic mixed data, which lifted out-of-distribution F1 from 0.65 → 0.74.
private_person, private_address, private_email, private_phone,
private_url, private_date, account_number, secret.
These match the TheoDB/french-pii-eval / openai/privacy-filter taxonomy. The
56 fine-grained ai4privacy types are collapsed into these 8 (e.g. all of
FIRSTNAME/LASTNAME/MIDDLENAME/PREFIX → private_person).
almanach/camembert-baseTheoDB/french-pii-eval train + val (57.7K) mixed with the French
subset of ai4privacy/pii-masking-200k (61.9K), mapped to 8 classes and
deduplicated (~67K unique examples)Held-out split (in-distribution): F1 0.985.
Out-of-distribution, TheoDB/french-pii-eval test (2,500 examples), span-level exact match:
| Model | Precision | Recall | F1 |
|---|---|---|---|
| v1 (56-class) | 0.51 | 0.87 | 0.65 |
| v2 (8-class) | 0.62 | 0.92 | 0.74 |
Per-class F1 (v2): private_email 0.99, private_address 0.88,
account_number 0.84, private_date 0.84, private_phone 0.80,
private_person 0.62, secret 0.44, private_url 0.41.
Threshold: F1 is flat (0.737–0.739) across thresholds 0.3–0.9. For anonymization, favor a lower threshold (higher recall, e.g. 0.3–0.5); for less over-redaction, use 0.7–0.8.
from transformers import pipeline
nlp = pipeline("token-classification", model="Spyridon/camembert-pii-fr-v2",
aggregation_strategy="simple")
nlp("Contactez Jean Dupont au 06 12 34 56 78 ou jean.dupont@email.fr")