1 #--------------------------------------------------------------------
2 # Copyright (c) 1999-2004, International Business Machines
3 # Corporation and others. All Rights Reserved.
4 #--------------------------------------------------------------------
5 # For modern Greek, based on UNGEGN rules.
7 # Rules are predicated on running NFD first, and NFC afterwards
8 # MINIMAL FILTER GENERATED FOR: Greek-Latin/UNGEGN
9 # WARNING: need to add accents to both filters ###
10 # :: [́̄̆̈;µ·ÀÂÈÊÌÎÒÔÙÛàâèêìîòôùûĈ-ĉĜ-ĝĤ-ĥĴ-ĵŜ-ŝŴ-ŷǛ-ǜǸ-ǹ̀̂̓-̔̀͂-̓ͅͺ;Ά-ΊΌΎ-ΡΣ-ώϐ-ϖϰ-ϵЀЍѐѝḔ-ḕṐ-ṑẀ-ẁẐ-ẑẤ-ậẰ-ằẾ-ệỐ-ộỜ-ờỪ-ừỲ-ỳἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼι῁-ῄῆ-῍῏-ΐῖ-Ί῝῟-῭ῲ-ῴῶ-ῼΩ\u03F7-\u07FB\u03F9] ;
12 :: [[[:Greek:][:Mn:][:Me:]] [\:-;?\u00B7\u037E\u0387]] ;
17 $lower = [[:latin:][:greek:] & [:Ll:]] ;
18 $upper = [[:latin:][:greek:] & [:Lu:]] ;
19 $accent = [[:Mn:][:Me:]] ;
24 $lcgvowel = [αεηιουω] ;
25 $ucgvowel = [ΑΕΗΙΟΥΩ] ;
26 $gvowel = [$lcgvowel $ucgvowel] ;
27 $lcgvowelC = [$lcgvowel $accent] ;
29 $evowel = [aeiouyAEIOUY];
30 $vowel = [ $evowel $gvowel] ;
32 $beforeLower = $accent * $lower ;
34 $gammaLike = [ΓΚΞΧγκξχϰ] ;
35 $egammaLike = [GKXCgkxc] ;
40 $softener = [βΒγΓδΔζΖλΛμΜνΝρΡ$gvowel] ;
46 $afterLetter = [:L:] [\'$accent]* ;
47 $beforeLetter = [\'$accent]* [:L:] ;
58 # Fix any ancient characters that creep in
68 # need to have these up here so the rules don't mask
73 Ψ } $beforeLower <> Ps ;
80 # at begining or end of word, convert mp to b
82 [^[:L:]$accent] { μπ > b ;
83 μπ } [^[:L:]$accent] > b ;
84 [^[:L:]$accent] { [Μμ][Ππ] > B ;
85 [Μμ][Ππ] } [^[:L:]$accent] > B ;
88 Μπ < B } $beforeLower ;
91 # handle diphthongs ending with upsilon
98 $fmaker = [aeiAEI] $under ? ;
99 $shiftForwardVowels = [[:Mn:]-[\u0308]]; # note: a diaeresis keeps the items separate
101 $fmaker { υ ( $shiftForwardVowels )* } $softener > $1 v $under ;
102 υ $1 < ( $shiftForwardVowels )* v $under ;
104 $fmaker { υ ( $shiftForwardVowels )* } > $1 f $under;
105 υ $1 < ( $shiftForwardVowels )* f $under ;
107 $fmaker { Υ } $softener <> V $under ;
108 $fmaker { Υ <> U $under ;
121 γ } $gammaLike <> n } $egammaLike ;
123 Γ } $gammaLike <> N } $egammaLike ;
136 Θ } $beforeLower <> Th ;
151 ν } $gammaLike > n\' ;
153 Ν } $gammaLike <> N\' ;
168 # insert separator before things that turn into s
169 [Pp] { } [ςσΣϷϸϺϻ] > \' ;
173 Ϸ <> Š ; # Ϸ GREEK CAPITAL LETTER SHO Uppercase_Letter Grek - L
174 ϸ <> š ; #ϸ GREEK SMALL LETTER SHO Lowercase_Letter Grek - L
175 Ϻ <> Ŝ ; # Ϻ GREEK CAPITAL LETTER SAN Uppercase_Letter Grek - L
176 ϻ <> ŝ ; # ϻ GREEK SMALL LETTER SAN Lowercase_Letter Grek - L
178 # Caron means exception
180 # before a letter, initial
181 ς } $beforeLetter <> s $under } $beforeLetter;
182 σ } $beforeLetter <> s } $beforeLetter;
184 # otherwise, after a letter = final
185 $afterLetter { σ <> $afterLetter { s $under;
186 $afterLetter { ς <> $afterLetter { s ;
188 # otherwise (isolated) = initial
202 Χ } $beforeLower <> Ch ;
205 # Completeness for ASCII
207 # $ignore = [[:Mark:]''] * ;
227 # Completeness for Greek
238 Ϲ > | Σ; #U+03F9 GREEK CAPITAL LUNATE SIGMA SYMBOL
244 # delete any trailing ' marks used for roundtripping
247 < [Νν] { \' } $egammaLike ;
251 # MINIMAL FILTER GENERATED FOR: Latin-Greek/UNGEGN BACKWARD
252 :: ([[[:Latin:][:Mn:][:Me:]] ['\:?]]) ;