Skip to main content

Biblical Hebrew and Koine Greek transliteration in three schemes (SBL, Simple, Phonetic).

Project description

biblical-transliteration

tests Python License: MIT

Biblical Hebrew and Koine Greek transliteration in three schemes — academic (SBL), simple ASCII, and phonetic. Pure Python, no dependencies.

from biblical_transliteration import (
    HebrewTransliterator, HebrewScheme, HebrewOptions,
    GreekTransliterator, GreekScheme, GreekOptions,
)

heb = HebrewTransliterator(HebrewOptions(scheme=HebrewScheme.SBL))
heb.transliterate("בְּרֵאשִׁית")
# 'bǝrēʾšîṯ'

grk = GreekTransliterator(GreekOptions(scheme=GreekScheme.SBL))
grk.transliterate("Ἐν ἀρχῇ ἦν ὁ λόγος")
# 'En archē ēn ho logos'

Install

pip install biblical-transliteration

Requires Python 3.10+. Zero runtime dependencies.

Schemes

Each transliterator supports three output styles via TransliterationScheme:

Scheme Hebrew (שָׁלוֹם) Greek (λόγος) Use when
SBL šālôm logos Academic writing, scholarly publications, lexicon entries. Full SBL Handbook of Style diacritics.
SIMPLE shalom logos Reader-friendly Latin, no diacritics. Good for UI labels and casual contexts.
PHONETIC sha-LOM LO-gos Pronunciation cues with syllable boundaries and stress (capitalized syllable). For learners and audio-aligned uses.

What this handles

Hebrew (~1,000 lines of rules):

  • Full nikkud (vowel point) coverage, including hataf vowels
  • BeGaD KeFaT spirantization with proper SBL macron-under marks (ḇ ḡ ḏ ḵ p̄ ṯ)
  • Vocal vs silent shewa distinction
  • Qamats qatan (o) vs qamats gadol (a) detection
  • Dagesh forte vs lene
  • Shin/sin dot disambiguation
  • Final letter forms (ך ם ן ף ץ)
  • Optional cantillation marks
  • Maqaf, meteg, sof pasuq

Koine Greek (~800 lines of rules):

  • Diphthongs in canonical order (αι, ει, οι, υι, αυ, ευ, ηυ, ου)
  • Breathing marks read off either vowel of a diphthong
  • Iota subscript (η̄ in SBL, dropped elsewhere)
  • Final sigma (ς)
  • Koine-correct phonemes — β = b (not modern v), φ = ph (not modern f), υ = u in diphthongs
  • Eta/omega macron distinction in SBL
  • Accents and breathing marks normalized

Why three schemes?

Open-source transliterators tend to pick one and stick with it, which forces you to choose between accuracy (SBL is hard to read for non-specialists) and readability (loose ASCII loses important phonemic distinctions). Three schemes lets you produce SBL-compliant output for academic work, ASCII for UI labels, and pronunciation cues for learners — from the same source text.

Why a separate Hebrew + Greek package?

Most existing PyPI packages are language-specific and use inconsistent APIs. This package presents a single mental model — Transliterator(Options(scheme=...)) — that works identically across both languages, so consumer code that transliterates whatever script it encounters stays clean.

Comparison with related packages

This package fills a specific gap in the Python biblical-NLP ecosystem. Other tools cover adjacent problems well; here's what they do differently so you can pick the right one:

Package Scope Notes
biblical-transliteration (this) Hebrew + Koine Greek, three schemes (SBL/Simple/Phonetic) Designed for biblical use specifically. Koine-correct phonemes for Greek; full nikkud + begadkefat + qamats qatan handling for Hebrew. Single consistent API across both languages.
transliterate 9 languages including (Modern/Classical) Greek; no Hebrew Excellent general-purpose romanizer for European/Caucasian scripts. Greek pack is calibrated for Modern Greek phonology, not Koine — β→v, φ→f, eta and epsilon collapsed. Use this if you need Russian/Armenian/Georgian/Bulgarian etc. alongside Greek.
beta-code Greek only Solves a different problem: BETA encoding ↔ Greek Unicode (e.g. mh=ninμῆνιν). Pair it with this package when working with CCAT/TLG sources — first beta→Unicode with beta-code, then Unicode→Latin with this.
Hebrew transliteration on PyPI As of 2026, there is no actively maintained Biblical Hebrew transliterator on PyPI. This package fills that gap.

If your workflow needs SBL Handbook of Style-compliant academic transliteration with proper diacritics for both Hebrew (bǝrēʾšîṯ, šālôm) and Greek (logos, Iēsous), this package is the only option in the Python ecosystem at the time of writing.

Limitations

  • Hebrew text must be Unicode (with or without nikkud). Beta-coded Hebrew (CCAT/Michigan-Claremont format) is not handled by this library — use a beta→Unicode converter first.
  • Greek text is assumed Koine. Modern Greek and Classical Greek work with the SBL and SIMPLE schemes, but PHONETIC is calibrated for Koine and may not match what you expect for Classical or Modern texts.
  • Qamats qatan detection is rule-based, not perfect. Texts with explicit U+05C7 marking (modern WLC) work reliably; older texts using the ambiguous U+05B8 may occasionally guess wrong.

Examples

from biblical_transliteration import HebrewTransliterator, HebrewOptions, HebrewScheme

# All three schemes for the same word
word = "שָׁלוֹם"
for scheme in HebrewScheme:
    t = HebrewTransliterator(HebrewOptions(scheme=scheme))
    print(f"{scheme.value:10} {t.transliterate(word)}")
# sbl        šālôm
# simple     shalom
# phonetic   sha-LOM
from biblical_transliteration import GreekTransliterator, GreekOptions, GreekScheme

# John 1:1
text = "Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος."
for scheme in GreekScheme:
    t = GreekTransliterator(GreekOptions(scheme=scheme))
    print(f"{scheme.value:10} {t.transliterate(text)}")

Development

git clone https://github.com/curran-gehring/biblical-transliteration.git
cd biblical-transliteration
python -m venv .venv
source .venv/bin/activate     # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest

License

MIT — see LICENSE.

Acknowledgments

Transliteration rules were developed against the Society of Biblical Literature Handbook of Style (2nd ed., 2014) and validated against verses from the CATSS parallel corpus.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biblical_transliteration-0.1.0.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biblical_transliteration-0.1.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file biblical_transliteration-0.1.0.tar.gz.

File metadata

File hashes

Hashes for biblical_transliteration-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9357c3e77d31a3a6996efa945863ff450e54bf0021a3d9e9375aaba404e13e72
MD5 6711191ffc9afabee7a7c3e2d5272c08
BLAKE2b-256 43f06713587e36835a8b2eacd9923be393ca885b2741f6ab6ab10af116d1302c

See more details on using hashes here.

File details

Details for the file biblical_transliteration-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for biblical_transliteration-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c65f36dee9dcf674ccce59138ec0556858ed1dd8274776b905e4cc2202826dc
MD5 d40105719f6062ad7e2a80caa915cf55
BLAKE2b-256 16df44a67ae78aebc271497a4dc3637278430d290de3224c1a1470fdb2446a86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page