Skip to content
greek conversion

for Python

A library that converts Ancient, Byzantine, and Modern Greek between Greek script, Beta Code, and Latin script, with atomic options composed into standards‑based presets, and information‑loss diagnostics.

from greek_conversion import convert, convert_detailed, reencode
# Ancient Greek, from Beta Code as the TLG writes it
convert("*(/ELLHSIN E)GE/NETO", "beta-code", "greek")
# → Ἕλλησιν ἐγένετο
# Byzantine Greek: ϗ written kai, with the grave the manuscripts give it
kai = convert_detailed(
"ϗ τὰ λοιπά",
"greek",
"transliteration",
greek={"kai_accent": "byzantine"},
)
kai.output # → kaì tà loipá
kai.losses[0].code # → removed-glyph-variant
kai.losses[1].code # → added-diacritic
# Modern Greek, from polytonic to monotonic, as passports write it
reencode(
"Hi ’Athína ’eînai hi protévousa",
"transliteration",
preset="iso-843-type-2",
greek={"accentuation": "monotonic"},
)
# → I Athína eínai i protévousa