Skip to content
greek conversion

Python

ALA-LC conformance corpus

The executable examples in tests/ala_lc_conformance_test.ts (opens in a new tab) are checked against the Library of Congress’s published Ancient and Medieval Greek (opens in a new tab) and Modern Greek (opens in a new tab) tables, which the ala-lc-ancient and ala-lc-modern presets implement. The ancient text examples are quoted from the former table; the short modern examples combine explicit alphabet and notes rows from the latter. The cases check Latin output, whether convert_detailed() detects information loss, and the stability of re-encoding that Latin output. They do not assert that the original Greek can be reconstructed from a romanization that omits marks or replaces alphabetic numerals with decimal numbers.

Reference Covered rules Inverse assessment
Ancient table, alphabet and examples β → b, η → ē, φ → ph, γγ/γκ/γξ/γχ → ng/nk/nx/nch, archaic koppa ϙ → ḳ, digamma ϝ → w, lunate sigma ϲ → s, rough breathing on vowels and rho, and contextual y/u with omitted diaeresis Unmarked letters and the selected consonant pairs re-encode stably. Source accents, smooth breathing, coronis, diaeresis, and iota subscript can disappear; those examples report loss.
Modern table, alphabet and notes β → v, initial μπ → b, initial ντ → d̲, positional γκ → gk/nk/gk, nasal gamma, Ῥ/ῥ → Rh/rh only when marked, a double rho included (Πύρρος → Pyrros), and omitted polytonic and monotonic marks The selected consonant combinations re-encode stably. Omitted source marks report loss; unmarked rho does not acquire an inferred rough breathing.
Both tables, numeral lists ϝʹ/ϛʹ/στʹ → 6, with στ also the units of a longer numeral (ιστʹ → 16), ϙʹ/ϟʹ → 90, ϡʹ → 900, and ͵α/͵αα/͵αβ → 1000/1001/1002 Decimal output re-encodes stably as decimal text but does not retain the Greek numeral spelling; convert_detailed() reports loss. A prefixed sequence that violates the descending numeral order is left untouched.
Source rule or example Why the preset cannot determine it from the input alone
Ancient table, all-capitals examples such as ΗΣΙΟΔΟΥ … → Hēsiodou … Greek capitals do not mark the missing rough breathing, and title-style Latin case requires editorial choices. A mechanical letter_case override does not infer either from the text.
Ancient example κεῖται παρ’ Ἅιδῃ → keitai par’ Hadē The table omits the iota adscript of Ἅιδῃ. The engine recognizes the marks on the capital as excluding a diphthong and keeps the iota as a letter; the preset produces Haidē.
Modern table, rough breathing missing from a polytonic text, as in all-capitals text Supplying h where the breathing does not appear requires language knowledge and sometimes evidence from the item. The preset uses only explicitly marked breathings. The current table states the rule among the notes on polytonic text, and says nothing of monotonic text, which has only the acute and the diaeresis; the preset supplies none there: Ελληνική gives Ellēnikē. The 2010 table supplied it in monotonic text too (Η υιοθεσία ενηλίκων, Hē huiothesia enēlikōn).
Modern table, polytonic versus monotonic identification The source asks cataloguers to inspect the item or use a publication-date fallback when orthography is unclear. A source string alone cannot supply that bibliographic context.

The selected corpus establishes specific, traceable behavior, not exhaustive conformance. See the preset reference for the current options and behavior audit for scope enforcement.