This release is a pre-release and may not be stable for production use.
arche-core
Know what's real.
An open engine for messy data. Find the entities, resolve who or what they are, and decide which records are the same thing — with the evidence, the refutations, and a signed decision you can re-check.
arche is an open pipeline for turning messy data into resolved real-world entities. It tells you and your agent what — and who — your data is actually talking about: it finds the entities in any document or system, standardises them for the names and addresses people actually use, and works out which real-world thing each one refers to.
It keeps disagreement between sources instead of erasing it, says plainly when it will not decide, and signs every decision so you can re-check it months later.
Match, don't guess. When the evidence isn't distinctive enough, resolution returns review rather than a verdict — two people who share a name are not one person, and a system that merges them has not scored slightly worse, it has deleted someone. Calibrated on the world's hardest identity data — Africa's — and built for how the world actually writes names and addresses everywhere.
Numbers we publish come with the script that produces them, and with what they do not prove. The current one is the place benchmark: reconciling Nigeria's GRID3 reference data against OpenStreetMap for Kano State gives 88.1% agreement with an LGA weak label. That is a consistency check, not validation — OpenStreetMap's health facilities for this state share lineage with GRID3, which the page demonstrates from the data rather than asserting. It is a sound basis for tuning a threshold and no evidence that the matcher is right about the world. The page states the methodology, its five limitations, and a case where it demonstrably gets a match wrong.
[!WARNING] Status: pre-beta (development) -
arche-coreis under active development. APIs may change between alpha releases. v0.3.0a1 is the first alpha of the beta line — not beta itself.
arche-core detects PII across various jurisdictions; government IDs, names, phone numbers, addresses, and grounds every detection in the data protection statute that governs it. NDPA, POPIA, Kenya DPA, Ghana DPA, GDPR. Six closed policy actions. Runs offline on CPU, and composes with Presidio and GLiNER.
Presidio detects PII. GLiNER does multilingual NER. Splink links records. None of them know that a BVN is sensitive under NDPA §30, or that "Adeyẹmí" and "Adeyemi" are the same Yoruba name with and without tonal marks, or that "behind Total filling station, Madina Junction" is a parseable Ghanaian address.
arche-coredoes that one job.
from arche import Pipeline
pipeline = Pipeline(jurisdiction="NG") # auto-loads NDPA-2023
result = pipeline.process(
"Fatima Abdullahi, NIN 12345678901, BVN 22100987654."
)
for d in result.detections:
print(f"{d.category:11} tier={d.sensitivity_tier.value:9} {d.regulatory_citation}")
# PII-2-BVN tier=high NDPA-2023 s.30, CBN BVN policy 2014
# PII-2-NIN tier=high NDPA-2023 s.30, NIMC Act s.27
# PII-1-NAME tier=moderate NDPA-2023 s.30 (×2 — given + family name)
print(result.redacted_text)
# NAME_... NAME_..., NIN [NIN], BVN [BVN].
Same code works for jurisdiction="ZA" (POPIA), "KE" (Kenya DPA), "GH" (Ghana DPA). Six statute packs ship, three at v1.0 (NDPA-2023, GDPR, HIPAA Safe Harbor) and three at v0.1-scaffold (POPIA, Kenya DPA, Ghana DPA — complete category mappings, version held until their cited sections have a second reading). Every pack declares that maturity in its version field and, separately, whether it is self-reviewed or regulator-reviewed. None claims regulator review.
Install
pip install arche-core # ~2.5 MB base — pure-Python detectors, statute policy
pip install arche-core[all] # everything (GLiNER + Presidio + Splink + docling + LLM)
(Or uv add arche-core / uv add arche-core[all].) Heavy capabilities are opt-in extras:
| Extra | Adds |
|---|---|
arche-core[detect] |
GLiNER2-PII via ONNX runtime (multilingual neural soft-PII) |
arche-core[presidio] |
Microsoft Presidio recognizer plugin |
arche-core[resolve] |
Splink + DuckDB for large-scale entity resolution |
arche-core[doc] |
docling for PDF / DOCX / PPTX / XLSX ingestion |
Coverage
Per-launch-jurisdiction detection coverage. Every detector validates check-digits where the underlying spec supports it.
| Jurisdiction | Statute | Detectors |
|---|---|---|
| Nigeria (NG) | NDPA-2023 | NIN (11 digits), BVN (11 digits, 22-prefix), TIN, RC, voter PVC, driver's licence |
| Kenya (KE) | Kenya DPA 2019 | National ID, KRA PIN, NHIF |
| South Africa (ZA) | POPIA | SA ID (13-digit Luhn + DOB/gender/citizenship decode), tax reference, passport |
| Ghana (GH) | Ghana DPA 2012 | Ghana Card, SSNIT, TIN |
| + 11 more African patterns | — | Egypt, Uganda, Rwanda, Tanzania, Cameroon, Senegal, ... |
Plus libphonenumber-backed normalization for 30+ African phone networks, landmark-anchored address parsing for NG and ZA, and currency detection (Naira, Cedi, Rand, CFA).
The statute layer
Every detection emits a category, a sensitivity tier (high / moderate / low), and the specific statute section that classifies it. The Pipeline maps each to one of six closed actions — mask, tokenize, drop, generalize, audit, retain — per the configured jurisdiction's statute YAML.
for o in result.policy_outcomes:
print(o.category, o.action, o.statute_reference)
# PII-2-BVN mask NDPA-2023 s.30, CBN BVN policy 2014
# PII-2-NIN mask NDPA-2023 s.30, NIMC Act s.27
# PII-1-NAME tokenize NDPA-2023 s.30
Statute YAMLs live at arche/policy/statutes/<STATUTE-ID>.yaml and are human-readable. Statute amendments are policy-file changes, not code changes.
Cultural naming intelligence
arche-core ships a 114-group African name equivalence lexicon covering 454 name forms across 20+ ethnic and linguistic traditions:
- Mohammed = Muhammad = Mamadou = Muhammadu (Pan-Islamic)
- Diallo = Jallow = Jalloh (Fulani cross-ethnic orthography)
- Fatou = Fatoumata (West African diminutive)
- Adeyemi = Adeyẹmi = Adeyẹmí (Yoruba tonal marks)
- Pierre = Peter = Pedro (colonial-era cross-linguistic)
- Irorere, Aibuedfe (Benin/Edo names with semantic meaning)
Growing via Wikidata + community curation. See datasets/ for the full dataset and contribution guide.
Composing with Presidio and GLiNER
arche-core is designed to compose with the incumbent tools, not replace them. The three integration patterns:
# Presidio's English recognizers + arche's African recognizers
pip install arche-core[presidio]
# arche.protect uses Presidio when it is installed and falls back to regex
# when it is not. (There is no importable arche.detect.presidio API.)
# GLiNER's multilingual NER + arche's statute classification
pip install arche-core[detect]
# arche.extract.extract(text, backend="gliner") routes soft-PII through GLiNER.
# Pipeline() has no backend= parameter — its constructor takes jurisdiction,
# statute, detectors, address_parsing, audit, tokenize_salt, overlays,
# transparency_notice.
# Splink's record linkage — the deprecated v0.1 path only
pip install arche-core[resolve]
# arche.resolve.resolve_entities(entities, use_splink=True) feeds Splink.
# NOTE: this is the ONLY code path that imports Splink. The shipped surface
# — resolve.pairwise, resolve.crosswalk, the frequency tables and the name
# lexicon — implements Fellegi-Sunter itself and imports no Splink at all.
Audit log
arche.graph.audit ships an SQLite-backed append-only log that records every detection, every policy decision, and every action taken — queryable by compliance officers and regulators. PII values are never stored; only categories, span offsets, and document hashes. Markdown compliance report generator for regulator-ready exports.
Power-user features
These ship in the package but are not in the headline pitch — they support specific identity workflows on top of the detection layer:
arche.sign— Ed25519 + JWS + did:key signing forPipeline.Resultenvelopes. SD-JWT-VC issue / verify viaarche.credentials.sd_jwt. Seeexamples/02_sign_share_extract.pyandexamples/04_sd_jwt_credential.py.arche.workflow.dsar— citizen-side DSAR draft generation with per-jurisdiction statute citations. Seeexamples/03_dsar_workflow.py.arche.resolve— lightweight Fellegi-Sunter matcher with jurisdiction-specific priors.from arche import matchfor two-record comparison;from arche import linkfor cross-source resolution.arche.workflow._review— MPI review queue for human-in-the-loop match decisions. Not on the public surface; import from the canonical path.arche.resolve_places/arche.list_places— jurisdictional place lookup with verifiable audit receipts.
These are real tools we depend on internally. They are not the lead pitch.
License
Apache 2.0. By Unpatterned Labs.
arche-coreis under active development. APIs may change between alpha releases.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arche_core-0.4.0a1.tar.gz.
File metadata
- Download URL: arche_core-0.4.0a1.tar.gz
- Upload date:
- Size: 3.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f3a44e10eded09149dc0524a6e35e1eb85c1726b179701bafbf767023334bb5
|
|
| MD5 |
b42b303b63059e313a4140dd2fab9ed5
|
|
| BLAKE2b-256 |
cfed787f0d18626bce9da3f399e7800dd0d5ba8106ec255b298e5f60352f88c1
|
File details
Details for the file arche_core-0.4.0a1-py3-none-any.whl.
File metadata
- Download URL: arche_core-0.4.0a1-py3-none-any.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f06c0f27b637b0712cbb10c17eca3b82c6143acd7e6e8def5921d3bfd525581
|
|
| MD5 |
3512d2ee310fc3b53dacb4134b57b168
|
|
| BLAKE2b-256 |
4bca516cf0dce0df61a39f34afaaf02c4ce9c29074d4eb005782119a38cc86c3
|