You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vision proposal: worldwide language and locale coverage
Follow-up to #33, but bigger in scope, so it deserves its own discussion. The proposal: make "works for any language and any country" an explicit roadmap goal, reached in stages instead of ad hoc.
What the core already gives us
A useful part of the work is already language-agnostic by design: email, IBAN, payment card, IP, and URL credential detection are structural, normalization uses NFKC + casefold, and the adversarial corpus already covers RTL/BiDi text. There is even a German corpus (tests/corpus/de.jsonl) acting as a seed. What is missing is the country- and language-specific layer.
Staged plan
Locale identifier framework. Decide once how country packs plug in (this generalizes the core-vs-extension question asked in Proposal: Italian identifier detectors, ONNX long-text handling, and next contributions #33): naming, entity types (e.g. a generic NATIONAL_ID / TAX_ID rather than one enum member per country), detector registration, and how packs are discovered and documented.
Country identifier packs, prioritized by demand: national IDs and tax numbers with checksum validation wherever the spec allows it (codice fiscale, NIE/DNI, NINo, Steuer-ID, CPF, SSN patterns, etc.). Checksum-first keeps the zero-false-positive philosophy of the existing Luhn/mod-97 validators.
Phone realism per region. The current heuristic is deliberately conservative; a per-country prefix/length table (still stdlib-only, no external deps) could raise recall without hurting precision.
Multilingual ML guidance. The ONNX backend is model-agnostic, so multilingual coverage is mostly a documentation and label-mapping problem: document tested multilingual NER models, extend the label-suffix mapping beyond CoNLL/Ai4Privacy where needed, and state clearly which languages a given setup covers.
Per-language test corpora. Grow the tests/corpus/ set (synthetic only, as per the release gates) one language at a time, so every claimed language is actually tested.
Design questions
Do you want locale packs in the core (stdlib-only detectors seem compatible with the zero-dependency rule) or as external pseudonymize-locale-* packages listed in the docs?
One generic entity type per category (NATIONAL_ID, TAX_ID) or country-specific types? The first keeps the enum stable; the second gives finer policies.
Which 3-5 countries first? I would start from where users actually are (EU first, given the regulatory pull).
I am happy to do the implementation work in the usual one-PR-per-item style once the framework decision is made.
Vision proposal: worldwide language and locale coverage
Follow-up to #33, but bigger in scope, so it deserves its own discussion. The proposal: make "works for any language and any country" an explicit roadmap goal, reached in stages instead of ad hoc.
What the core already gives us
A useful part of the work is already language-agnostic by design: email, IBAN, payment card, IP, and URL credential detection are structural, normalization uses NFKC + casefold, and the adversarial corpus already covers RTL/BiDi text. There is even a German corpus (
tests/corpus/de.jsonl) acting as a seed. What is missing is the country- and language-specific layer.Staged plan
NATIONAL_ID/TAX_IDrather than one enum member per country), detector registration, and how packs are discovered and documented.tests/corpus/set (synthetic only, as per the release gates) one language at a time, so every claimed language is actually tested.Design questions
pseudonymize-locale-*packages listed in the docs?NATIONAL_ID,TAX_ID) or country-specific types? The first keeps the enum stable; the second gives finer policies.I am happy to do the implementation work in the usual one-PR-per-item style once the framework decision is made.