Ancient Greek Transliteration Tools.
Available in Python and JavaScript, it can be used as a library and a command line tool. It supports romanization and Modern Greek-like (but not fully compliant) accent monotonization.
Online Demo
Priority was given to the ease of recalling the spelling when Greek vocabulary was incorporated into English via Latin.
The transliteration rule is based on the Classical method. (except "ει" -> "ei")
Diacritical mark conversions are in the original system. Some rules can be disabled by the argument of romanize
.
- The circumflex accent on the diphthong is split into acute and grave.
ex. "πνεῦμα" -> "pnéùma" ("eû" -> "éù") - The caron is used for the acute accent on the long vowel. (
caron
argument)
ex. "φωνή" -> "phōně" ("ḗ" -> "èé" -> "ě") - The dot below is used for the iota subscript.
ex. "λόγῳ" -> "lógọ̄" - The apostrophe is used for the coronis.
ex. "κἀγώ" -> "ca'gǒ"
The dot below was chosen because the font composition is relatively supported compared to the other diacritical marks.
The vowel with the iota subscript is always long, so the macron is redundant. But it seems better to add this for those who are not familiar with it. (dotMacron
argument)
Monotonization integrates the acute (´), the grave (`), and the circumflex (ˆ) accent into the acute accent in polysyllabic words. The diaeresis (¨) is preserved. The accent in monosyllabic words and other diacritic marks are omitted.
The Wikipedia's example is reproduced.
But it does not take into account Modern Greek grammar and therefore does not conform to its orthography. For example, it cannot distinguish between η "the" and ή "or".
-m
option specifies to monotonize.
python greektrans.py [-m] file
or
deno run --allow-read greektrans.js [-m] file
Use as library.
import greektrans
text = "Πάτερ ἡμῶν ὁ ἐν τοῖς οὐρανοῖς·"
print(greektrans.romanize(text))
# Páter hēmôn ho en tóès ūranóès;
print(greektrans.monotonize(text))
# Πάτερ ημών ο εν τοις ουρανοίς·
Supports the browser and Deno.
import * as greektrans from "https://cdn.jsdelivr.net/gh/7shi/greektrans@0.7/greektrans.min.js";
const text = "Πάτερ ἡμῶν ὁ ἐν τοῖς οὐρανοῖς·";
console.log(greektrans.romanize(text));
// Páter hēmôn ho en tóès ūranóès;
console.log(greektrans.monotonize(text));
// Πάτερ ημών ο εν τοις ουρανοίς·
Examples of use. (translation is inaccurate)
Description of technology used. (in Japanese)
Explanation of motive. (in Japanese)