UNPKG

greek-text-utils

Version:

A collection of greek text utils, including conversion to ISO 843/ELOT 743, Greeklish, Phonetic Latin, and Transliterated Latin

142 lines 5.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.greekToISO843Type1Map = void 0; /** * Type 1 - Transliteration (μεταγραμματισμός) according to ELOT 743/ISO 843 * Simple, consistent character mapping - always reversible * Used for bibliographic references, catalogs, databases */ exports.greekToISO843Type1Map = [ // Fixed digraphs - no context sensitivity in Type 1 { find: 'αι', replace: 'ai' }, { find: 'αί', replace: 'ai' }, { find: 'οι', replace: 'oi' }, { find: 'οί', replace: 'oi' }, { find: 'ου', replace: 'ou' }, { find: 'ού', replace: 'ou' }, { find: 'ει', replace: 'ei' }, { find: 'εί', replace: 'ei' }, // Type 1: Always consistent mapping (no context sensitivity) { find: 'αυ', replace: 'au' }, { find: 'αύ', replace: 'au' }, { find: 'ευ', replace: 'eu' }, { find: 'εύ', replace: 'eu' }, { find: 'ηυ', replace: 'iy' }, { find: 'ηύ', replace: 'iy' }, { find: 'μπ', replace: 'mp' }, // Consonant clusters { find: 'ντ', replace: 'nt' }, { find: 'τσ', replace: 'ts' }, { find: 'τς', replace: 'ts' }, { find: 'τζ', replace: 'tz' }, { find: 'γγ', replace: 'ng' }, { find: 'γκ', replace: 'gk' }, { find: 'γχ', replace: 'nch' }, { find: 'γξ', replace: 'nx' }, // Uppercase digraphs { find: 'ΑΙ', replace: 'AI' }, { find: 'ΑΊ', replace: 'AI' }, { find: 'ΟΙ', replace: 'OI' }, { find: 'ΟΊ', replace: 'OI' }, { find: 'ΟΥ', replace: 'OU' }, { find: 'ΟΎ', replace: 'OU' }, { find: 'ΕΙ', replace: 'EI' }, { find: 'ΕΊ', replace: 'EI' }, { find: 'ΑΥ', replace: 'AU' }, { find: 'ΑΎ', replace: 'AU' }, { find: 'ΕΥ', replace: 'EU' }, { find: 'ΕΎ', replace: 'EU' }, { find: 'ΗΥ', replace: 'IY' }, { find: 'ΗΎ', replace: 'IY' }, { find: 'ΜΠ', replace: 'MP' }, { find: 'ΝΤ', replace: 'NT' }, { find: 'ΤΣ', replace: 'TS' }, { find: 'ΤΖ', replace: 'TZ' }, { find: 'ΓΓ', replace: 'NG' }, { find: 'ΓΚ', replace: 'GK' }, { find: 'ΓΧ', replace: 'NCH' }, { find: 'ΓΞ', replace: 'NX' }, // Mixed case digraphs { find: 'Αυ', replace: 'Au' }, { find: 'Αύ', replace: 'Au' }, { find: 'Ευ', replace: 'Eu' }, { find: 'Εύ', replace: 'Eu' }, { find: 'Ηυ', replace: 'Iy' }, { find: 'Ηύ', replace: 'Iy' }, { find: 'Μπ', replace: 'Mp' }, { find: 'Ου', replace: 'Ou' }, { find: 'Ού', replace: 'Ou' }, // Basic alphabet - lowercase { find: 'α', replace: 'a' }, { find: 'ά', replace: 'a' }, { find: 'β', replace: 'v' }, { find: 'γ', replace: 'g' }, { find: 'δ', replace: 'd' }, { find: 'ε', replace: 'e' }, { find: 'έ', replace: 'e' }, { find: 'ζ', replace: 'z' }, { find: 'η', replace: 'i' }, { find: 'ή', replace: 'i' }, { find: 'θ', replace: 'th' }, { find: 'ι', replace: 'i' }, { find: 'ί', replace: 'i' }, { find: 'ϊ', replace: 'i' }, { find: 'ΐ', replace: 'i' }, { find: 'κ', replace: 'k' }, { find: 'λ', replace: 'l' }, { find: 'μ', replace: 'm' }, { find: 'ν', replace: 'n' }, { find: 'ξ', replace: 'x' }, { find: 'ο', replace: 'o' }, { find: 'ό', replace: 'o' }, { find: 'π', replace: 'p' }, { find: 'ρ', replace: 'r' }, { find: 'σ', replace: 's' }, { find: 'ς', replace: 's' }, { find: 'τ', replace: 't' }, { find: 'υ', replace: 'y' }, { find: 'ύ', replace: 'y' }, { find: 'ϋ', replace: 'y' }, { find: 'ΰ', replace: 'y' }, { find: 'φ', replace: 'f' }, { find: 'χ', replace: 'ch' }, { find: 'ψ', replace: 'ps' }, { find: 'ω', replace: 'o' }, { find: 'ώ', replace: 'o' }, // Basic alphabet - uppercase { find: 'Α', replace: 'A' }, { find: 'Ά', replace: 'A' }, { find: 'Β', replace: 'V' }, { find: 'Γ', replace: 'G' }, { find: 'Δ', replace: 'D' }, { find: 'Ε', replace: 'E' }, { find: 'Έ', replace: 'E' }, { find: 'Ζ', replace: 'Z' }, { find: 'Η', replace: 'I' }, { find: 'Ή', replace: 'I' }, { find: 'Θ', replace: 'TH' }, { find: 'Ι', replace: 'I' }, { find: 'Ί', replace: 'I' }, { find: 'Ϊ', replace: 'I' }, { find: 'Κ', replace: 'K' }, { find: 'Λ', replace: 'L' }, { find: 'Μ', replace: 'M' }, { find: 'Ν', replace: 'N' }, { find: 'Ξ', replace: 'X' }, { find: 'Ο', replace: 'O' }, { find: 'Ό', replace: 'O' }, { find: 'Π', replace: 'P' }, { find: 'Ρ', replace: 'R' }, { find: 'Σ', replace: 'S' }, { find: 'Τ', replace: 'T' }, { find: 'Υ', replace: 'Y' }, { find: 'Ύ', replace: 'Y' }, { find: 'Ϋ', replace: 'Y' }, { find: 'Φ', replace: 'F' }, { find: 'Χ', replace: 'CH' }, { find: 'Ψ', replace: 'PS' }, { find: 'Ω', replace: 'O' }, { find: 'Ώ', replace: 'O' }, ]; exports.default = exports.greekToISO843Type1Map; //# sourceMappingURL=greek-to-iso843-type1-map.js.map