Skip to content
greek conversion

Python

BnF, ISO 843, and BGN/PCGN conformance corpus

The spellings in the executable cases in tests/preset_conformance_test.ts (opens in a new tab) come from the cited tables and examples. Each case records its section, Greek input, expected Latin output, and an expected lossy flag derived from what the inverse parser can recover. The test also checks that re-encoding the Latin result is stable. NFC comparison allows equivalent precomposed and combining Latin accents; it does not replace the reference’s choice of letters or punctuation.

This is a selected, source-traceable corpus, not a claim that either preset implements every rule. The BnF source describes both its main ISO-based transliteration (β → v, η → ī, φ → f) and optional ancient-Greek variants (b, ē, ph). bnf-ancient selects the latter. It cannot decide whether a catalogue record also needs the main form or an access-point variant. iso-843-type-1 selects the main ISO forms. iso-843-type-2 is a transcription, not reversible by design (§ 1 of the standard): most of its cases report loss, and the test checks that the output is nevertheless stable. The BGN/PCGN table romanizes Modern Greek by the transcription of ELOT 743, the Greek national standard, which is also ISO 843 Type 2: every example of its table and of its notes 1 and 2 is a case for iso-843-type-2.

Reference Covered cases Inverse assessment
BnF, §§ 2.1–2.3 (opens in a new tab) Ancient variants βηφ → bēph, αυ/ευ/ου, and examples Θάλασσα → Thálassa, Χαρά → Chará, Ψάρι → Psári The covered letters reparse without reported loss; ch is parsed before the standalone Byzantine-sigma c.
BnF, §§ 4.1–4.3, 7.2 Initial rough breathing, coronis, smooth breathing, circumflex, U+2010 hyphen, quantity marks, both keraiai, and marked uppercase archaic numerals Explicit macron/breve are omitted. Numeral keraiai can collide with ordinary comma/accent; the lowercase Latin spellings for uppercase stigma/sampi also lose case. These cases report loss.
BnF, § 4.3.5 and example 12 rh for a rho with a rough breathing (Ῥητορικὴ → Rhētorikḕ), and rr for a double rho without one, as ISO 843 writes it (Πύρρος → Pýrros) Reparse without reported loss.
ISO 843:1997, Table 1 and note 1 (opens in a new tab) βηφ → vīf, αυ/ευ/ου → au/eu/ou The selected letter forms reparse without reported loss.
ISO 843:1997, Tables 1 and 3 ρ → r, h only for a written rough breathing, a double rho included (Πύρρος → Pýrros, Ερρίκος → Erríkos, Type 2) Reparse without reported loss.
ISO 843:1997, Table 1 and note 11 Capitals TH, CH, PS among capitals (ΘΑΛΑΣΣΑ → THALASSA), Th before lowercase text, for every preset (tests/orthography_test.ts) Full capitals reparse to the same capitals.
ISO 843:1997, Tables 3–4 Smooth and rough breathings, perispomeni as circumflex (τοῦ → toû), question mark versus ano teleia, iota subscript, enotikon, digamma and yot; missing archaic mappings in a bound strict converter The apostrophe of the smooth breathing reads back before the vowel group of a word, and that of the coronis between its vowel and a letter (ka’gṓ); a hyphen for enotikon is insufficient to reconstruct that distinction, and reports loss.
ISO 843:1997, Table 2, lines 5–7, 19–21, 24–26, notes 3, 4, 9, 10 (Type 2) αυ/ευ/ηυ → av/ev/iv before a voiced sound, af/ef/if before a voiceless one or at the end of a word, ay after an accented vowel or before ϋ; the accent of that upsilon moves to the vowel (Εύβοια → Évvoia, δεῦρο → dêvro) v and f reparse as beta and phi; loss is reported. A circumflex on e before v or f can only come from εῦ and reparses as such.
ISO 843:1997, Table 2, lines 10–13, 32–35, 41–42, 48 (Type 2) γγ/γξ/γχ → ng/nx/nch, γκ → gk; μπ → b at either end of a word and mp inside; ντ → nt; ου → ou, oy after an accented vowel; υι → yi Reparse without reported loss.
BGN/PCGN, ELOT 743 System, 1996 Agreement (opens in a new tab), table and notes 1–2 (Type 2) Every example: vowels and vowel pairs, with or without diaeresis (Δοϊράνι → Doïráni); αυ/ευ → av/af/ay, ev/ef (Ταΰγετος → Taÿ́getos); η/υ/ω → i/y/o; γ/γγ/γκ/γχ; μπ/ντ; the other consonants; the stress, moved to the vowel before v or f (Καλλιπεύκα → Kallipéfka); the diaeresis with the stress (Αχαΐα → Achaḯa) Vowels, vowel pairs, and consonant pairs reparse without reported loss; eta, omega, and the v or f of αυ/ευ read back as iota, omicron, beta, and phi, and loss is reported.
ISO 843:1997, Table 2, lines 23, 52, and Tables 1, 3 (Type 2) η → i, ω → o, capitals (ΕΥΡΩΠΗ → EVROPI), perispomeni and ypogegrammeni (ᾠδῇ → ’o̧dî̧) Eta and omega reparse as iota and omicron, except where a circumflex or an iota subscript only fits the long vowel (tôn → τῶν); loss is reported.
Source rule Reference expectation Current boundary
BnF, § 4.1.2: Cypriot syndyazomeno Upper U+0306 and lower U+032E are retained U+0306 is also the ordinary breve that BnF omits; the source character alone cannot identify which meaning applies. U+032E is not modelled as a semantic mark.
ISO 843:1997, note 2: reading s back A Latin s followed by a letter or a hyphen is read as medial σ The parser treats a hyphen as a word boundary and reads final ς (as-ta → ας‐τα). The note concerns a word divided at the end of a line; a hyphen in running text more often joins two words.
BGN/PCGN, note 1: stress in unaccented text The stress is marked even where the Greek leaves it out, as in capitals (ΑΘΗΝΑ → ATHÍNA) Where the stress falls cannot be read from unaccented letters; it takes a dictionary. The preset gives ATHINA.
BGN/PCGN, note 1: abbreviations An abbreviation is written without accent Nothing in the text tells an abbreviation from a word; the preset keeps any accent the source writes.
BGN/PCGN, note 3: older accents A grave or circumflex accent is written as an acute, and the other polytonic marks are left out The preset follows ISO 843 Table 3, which writes them. Converting the text to monotonic first (reencode() with greek.accentuation: "monotonic") writes every remaining accent as an acute and, by the monotonic rules, drops that of most monosyllables.
BnF, §§ 2.1–2.2 and 9.4: catalogue variants and Homeric numerals Additional forms depend on the record and work Neither the source text nor a preset identifier provides the required cataloguing context.

The out_of_scope_behavior="reject" policy checks recognized characters and known undefined preset mappings. It is not a validator for these contextual rules and does not imply that all accepted conversions are reversible. Consult convert_detailed().losses for represented distinctions that disappear and the behavior audit for the broader preset boundaries.