Skip to main content

egypttranslit

PyPI version

A small Python library for converting Egyptological transliteration into clean Unicode.

It is intended for researchers, digital-humanities projects and scripts that need reliable Manuel de Codage-style transliteration conversion without a larger toolchain.

A web version built on top of this library for non-technical users is planned for a future release.

Install

Requires Python 3.10 or newer.

python -m pip install egypttranslit

Quick guide

API Use case Profile Example Result
parse(text) Conservative automatic detection default parse("nTr mAat") "nṯr mꜣꜥt"
parse_mdc(text) Known MdC transliteration default parse_mdc("nTr Htp xpr") "nṯr ḥtp ḫpr"
parse_mdc_profiled(text, profile="gardiner-1957") MdC with Gardiner-style j/q output gardiner-1957 parse_mdc_profiled("jr qd", profile="gardiner-1957") "ꞽr ḳd"
parse_mdc_many(texts) Batch of known MdC strings default parse_mdc_many(["nTr", "Htp"]) ("nṯr", "ḥtp")
parse_mdc_profiled_many(texts, profile=...) Batch MdC with one profile selected profile parse_mdc_profiled_many(["jr qd"], profile="gardiner-1957") ("ꞽr ḳd",)
normalize_unicode(text) Already-Unicode scholarly text none normalize_unicode("ȝ ʿ ỉ") canonical Unicode
analyze(text, mode=...) Detection + diagnostics selected mode analyze("mAat", mode="mdc") structured result
validate(text) Reject dangerous mixed encodings none validate("mAꜥt") raises ValueError

convert(text) is an alias for parse(text).

Examples

Automatic conversion

from egypttranslit import parse

assert parse("nTr mAat") == "nṯr mꜣꜥt"
assert parse("A taxi on the X axis.") == "A taxi on the X axis."

parse() is intentionally conservative: ambiguous ASCII is preserved rather than guessed.

Explicit MdC

from egypttranslit import parse_mdc

assert parse_mdc("nTr Htp xpr mAat") == "nṯr ḥtp ḫpr mꜣꜥt"
assert parse_mdc("A1-nTr-D36-Htp-T3") == "A1-nṯr-D36-ḥtp-T3"

Common mappings:

MdC Unicode MdC Unicode
A ꜣ a ꜥ
H ḥ x ḫ
X ẖ S š
T ṯ D ḏ
3 ꜣ

Gardiner/JSesh sign identifiers such as A1, D36 and T3 are preserved.

Batch conversion

Use the batch helpers when each transliteration is a separate record. They preserve input order and return a tuple. Lists, tuples and generators are accepted.

from egypttranslit.batch import parse_mdc_many, parse_mdc_profiled_many

texts = ["nTr Htp", "xpr mAat", "jr qd"]

assert parse_mdc_many(texts) == (
    "nṯr ḥtp",
    "ḫpr mꜣꜥt",
    "jr qd",
)

assert parse_mdc_profiled_many(
    texts,
    profile="gardiner-1957",
) == (
    "nṯr ḥtp",
    "ḫpr mꜣꜥt",
    "ꞽr ḳd",
)

parse_many() and normalize_unicode_many() provide the same batch behavior for conservative automatic parsing and Unicode normalization.

Profiles

The default behavior intentionally leaves plain j and q unchanged because editorial conventions differ.

Profile Behavior Notes
default preserves j and q safest general behavior
gardiner-1957 j → ꞽ, q → ḳ Gardiner-style output described in Unicode UAX #57
legacy-diacritics same as gardiner-1957 backward-compatible alias
from egypttranslit.converter import parse_mdc_profiled

assert parse_mdc_profiled(
    "jr qd nTr mAat",
    profile="default",
) == "jr qd nṯr mꜣꜥt"

assert parse_mdc_profiled(
    "jr qd nTr mAat",
    profile="gardiner-1957",
) == "ꞽr ḳd nṯr mꜣꜥt"

Profile metadata can be inspected programmatically:

from egypttranslit.profiles import get_profile_info, list_profile_info

info = get_profile_info("gardiner-1957")
assert info.mapping == (("j", "ꞽ"), ("q", "ḳ"))
assert info.alias_of is None

available = tuple(profile.name for profile in list_profile_info())
# ("default", "gardiner-1957", "legacy-diacritics")

No single ifao profile is imposed because IFAO documents editorial alternatives such as j or ỉ and q or ḳ.

Diagnostics

from egypttranslit.diagnostics import analyze, validate

result = analyze("mAat", mode="mdc")
assert result.text == "mꜣꜥt"
assert result.detected == "mdc"
assert result.warnings == ()

validate("mAꜥt")  # raises ValueError

detected is one of mdc, unicode, mixed, ambiguous or none. confidence is a deterministic heuristic score, not a philological probability.

Command line

egypttranslit "nTr mAat"
# nṯr mꜣꜥt

egypttranslit --mode mdc "nTr Htp xpr"
# nṯr ḥtp ḫpr

egypttranslit --mode mdc --profile gardiner-1957 "jr qd nTr"
# ꞽr ḳd nṯr

egypttranslit --mode unicode "ȝ ʿ ỉ"

For pipelines:

cat input.txt | egypttranslit --mode mdc --profile gardiner-1957 > output.txt

Modes are auto (default), mdc and unicode. Non-default profiles are valid only with --mode mdc.

Citation

Citation metadata is provided in CITATION.cff.

Barrios, E. J. egypttranslit [Computer software]. https://github.com/edujbarrios/egypttranslit

References

License

Apache-2.0. Attribution information is provided in NOTICE and citation metadata in CITATION.cff.

Metadata

Release files for egypttranslit 1.0.0

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

Source distribution (sdist)

Source distribution for egypttranslit 1.0.0
File Size Uploaded
egypttranslit-1.0.0.tar.gz 37.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for egypttranslit 1.0.0
File Interpreter ABI Platform
egypttranslit-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.9 kB

Release files / egypttranslit-1.0.0.tar.gz

Download URL egypttranslit-1.0.0.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0854458e09a07529d256356f5e09a580b6596cd7cffd67dd373d5035380b06bc
BLAKE2b-256 checksum
How to use checksums
9c6e5130106c3ec01b2a605755025c60ecbae15b9a3d51a7b4d99f6fc7d3528c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release files / egypttranslit-1.0.0-py3-none-any.whl

Download URL egypttranslit-1.0.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e19f9b64b1351535b86211d40d6dfc9135e681ff79a6a30fbbc85e9185c1c936
BLAKE2b-256 checksum
How to use checksums
fb3d041460436e93f0fbb8b0325ca93c78064fa725646782ae91d887790323c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

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