egypttranslit
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
- Institut français d’archéologie orientale (IFAO), Polices de caractères: https://www.ifao.egnet.net/publications/publier/outils-ed/polices/
- Institut français d’archéologie orientale (IFAO), Convertisseurs vers Unicode: https://www.ifao.egnet.net/publications/publier/outils-ed/convertisseurs/
- Unicode Consortium, UAX #57: Unicode Egyptian Hieroglyph Database: https://unicode.org/reports/tr57/
- Unicode Consortium, Egyptian Hieroglyph Format Controls: https://www.unicode.org/charts/nameslist/n_13430.html
License
Apache-2.0. Attribution information is provided in NOTICE and citation metadata in CITATION.cff.
Metadata
Release files for egypttranslit 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| egypttranslit-1.0.1.tar.gz | 37.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| egypttranslit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.6 kB
Release files / egypttranslit-1.0.1.tar.gz
| Download URL | egypttranslit-1.0.1.tar.gz |
|---|---|
| Size | 37.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3edcce94bf93f632315a0808436ebbbaa4e7855ed665fb907a99328264b0a222
|
|
BLAKE2b-256 checksum How to use checksums |
e9dd6e9957a0c517682ce21d0337e31d5d9ddaf3b69e2c395dade690eb6fb2a0
|
| 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 logRelease files / egypttranslit-1.0.1-py3-none-any.whl
| Download URL | egypttranslit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d9e3887297afec896e68f32100ac0e4a7f1ac18c056f716b6787b1bb738e88f
|
|
BLAKE2b-256 checksum How to use checksums |
6e279c2411c289c603e5b1b43b8f6d878f0206f917c43149d3a95b2ac98eeb36
|
| 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