Skip to main content

meddeid-language-en

Versioned English language capabilities for MedDeID. The package deliberately contains two locale profiles rather than a generic en profile:

  • en-GB covers England, Scotland, Wales, and Northern Ireland.
  • en-US covers the 50 states, District of Columbia, Puerto Rico, U.S. Virgin Islands, Guam, American Samoa, and the Northern Mariana Islands.

Bare en is rejected because numeric dates, addresses, identifiers, clinical terminology, and synthetic-safe phone ranges differ materially between the two profiles.

The Python package provides post-processing, structured lookup records, resource manifests, date/age parsing and pseudonymization. The npm package provides matching subannotation profiles for the browser toolchain.

English parsing and wording use the same suite-wide declarative age policy as every other profile; there is no independent English maximum-age algorithm. Trusted full patient.birth_date values are expanded only into bounded, locale-correct full-year representations.

Mixed-locale subannotation

meddeid-subannotate can route a mixed corpus without splitting it. Install this package and pin both ordinary profiles in one workspace:

npm install --no-save @meddeid/language-en@0.2.1
npm run profile -- set en-GB en-US

The application selects a child profile by an exact metadata.lang match for each document. It fails when metadata is missing or unsupported rather than guessing. The router manifest pins both profile descriptors and their lookup hashes, while every document continues to use only its locale's rules.

Resource workflow

python -m meddeid_language_en.resources audit --profile en-GB
python -m meddeid_language_en.resources audit --profile en-US
python -m meddeid_language_en.resources fetch --profile en-US --cache-dir .cache/sources
python -m meddeid_language_en.resources build --profile en-US --cache-dir .cache/sources
python -m meddeid_language_en.resources diff --profile en-US --cache-dir .cache/sources

fetch verifies the source hash recorded in sources/*/sources.lock.json. build is deterministic and writes only licence-compatible derived records. Unrestricted raw downloads remain in the ignored cache. Each runtime record retains its source identifier and regional scope.

The committed audits enforce minimum counts and category-level regional coverage, verify provenance completeness and logical multi-file hashes, and report malformed values, duplicate keys, semantic collisions, count regressions, and source drift. Current builds contain roughly 326,000 GB and 345,000 US structured lookup records; exact counts and hashes are recorded in the profile audit manifests.

The included resources are designed for recognition and deterministic synthetic generation. Real given-name and family-name tokens are sampled independently; no person-level source records are ingested. Public institution, street, and locality names may be used, while phones, email domains, and identifiers use official fictional/test or deliberately non-assignable forms.

Synthetic labels

English synthetic generation uses the 14-label token-classifier taxonomy and must never emit Anonymize_Other. The full 15-label MedDeID taxonomy remains valid for annotation import and other interoperability paths.

The generation allowlist, in its load-bearing order, is exactly:

Address_Location:Caregiver
Address_Location:Other
Address_Location:Patient
Age_Birthdate
Contactdetails
Date
ID:Caregiver
ID:Patient
Name:Caregiver
Name:Other
Name:Patient
Organization:Healthcare
Organization:Other
Profession

Stable name aliases (Python 0.2.3)

The Python name provider uses the existing en-GB / en-US first-name and family-name resources. It does not download another name database. The shared core renderer preserves recognized titles, initials and case. English profiles also supply their own recognized suffixes and credentials.

from meddeid_language_en import pseudonymize_name_text

# Synthetic reproducibility fixture only; use a protected random key in production.
pseudonymize_name_text("Mark Peters", key=bytes(range(32)), scope="study-a")
# "[Bogomil Mackenzie]"

pseudonymize_name_text() returns a bracketed alias or None for an unsupported shape. Callers must use the original entity label on None, never the source name. The profile hook replace_name() returns the same body without brackets. For HTTP inference, set render.name_replacement to true and pass the patient ID in render.pseudonymization_scope. The gateway reads the mapping key from its configured secret file. Rendering guide

The helper uses the supplied key and scope for deterministic component aliases. A lone given name or surname keeps its alias when rendered as part of a full name. A missing middle name omits only that component. Initials use the first letter of the corresponding alias. Include the study ID in the scope when a patient should receive study-specific aliases. The same alias or initial can refer to multiple people. Workers cache public catalog resources per profile. The JavaScript package exports subannotations separately.

Metadata

Release files for meddeid-language-en 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meddeid-language-en 0.2.4
File Size Uploaded Provenance Actions
meddeid_language_en-0.2.4.tar.gz 12.3 MB With provenance Details for meddeid_language_en-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meddeid-language-en 0.2.4
File Interpreter ABI Platform Actions
meddeid_language_en-0.2.4-py3-none-any.whl Python 3 none any Details for meddeid_language_en-0.2.4-py3-none-any.whl

Total release size: 25.2 MB

Release files / meddeid_language_en-0.2.4.tar.gz

Download URL meddeid_language_en-0.2.4.tar.gz
Size 12.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2c0aac0cbdc958e71b4671f338dd3407a580793bfb0b5ebfabfb98db7cd4ad73
BLAKE2b-256 checksum
How to use checksums
19603c9ca890770980f95ac741f2dae2213955fe7703c247bffd25697d4e4701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / meddeid_language_en-0.2.4-py3-none-any.whl

Download URL meddeid_language_en-0.2.4-py3-none-any.whl
Size 12.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9e7aeff00b11d60af13d571cf99689de370a1f2ebaeae73fed2190b515d01932
BLAKE2b-256 checksum
How to use checksums
798a8f2456c496930ef6cd34e31116a673bda58cd9b4bad28d2bef08306eb4c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for meddeid-language-en 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for meddeid_language_en-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page