summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/data/translit/Grek_Latn_UNGEGN.txt
blob: 0e6dcc86a73d4c3ebe7ee1b4b86511a3df85c01c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# © 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
#
# File: Grek_Latn_UNGEGN.txt
# Generated from CLDR
#

# For modern Greek, based on UNGEGN rules.
# Rules are predicated on running NFD first, and NFC afterwards
# MINIMAL FILTER GENERATED FOR: Greek-Latin/UNGEGN
# WARNING: need to add accents to both filters ###
# :: [\u0301\u0304\u0306\u0308;µ·ÀÂÈÊÌÎÒÔÙÛàâèêìîòôùûĈ-ĉĜ-ĝĤ-ĥĴ-ĵŜ-ŝŴ-ŷǛ-ǜǸ-ǹ\u0300\u0302\u0313-\u0314\u0340\u0342-\u0343\u0345ͺ;Ά-ΊΌΎ-ΡΣ-ώϐ-ϖϰ-ϵЀЍѐѝḔ-ḕṐ-ṑẀ-ẁẐ-ẑẤ-ậẰ-ằẾ-ệỐ-ộỜ-ờỪ-ừỲ-ỳἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼι῁-ῄῆ-῍῏-ΐῖ-Ί῝῟-῭ῲ-ῴῶ-ῼΩϷ-\u07FBϹ] ;
:: [[[:Greek:][:Mn:][:Me:]] [\:-;?·;·]] ;
::NFD (NFC) ;
# Useful variables
$lower = [[:latin:][:greek:] & [:Ll:]] ;
$upper = [[:latin:][:greek:] & [:Lu:]] ;
$accent = [[:Mn:][:Me:]] ;
$macron = \u0304 ;
$ddot = \u0308 ;
$lcgvowel = [αεηιουω] ;
$ucgvowel = [ΑΕΗΙΟΥΩ] ;
$gvowel = [$lcgvowel $ucgvowel] ;
$lcgvowelC = [$lcgvowel $accent] ;
$evowel = [aeiouyAEIOUY];
$vowel = [ $evowel $gvowel] ;
$beforeLower = $accent * $lower ;
$gammaLike = [ΓΚΞΧγκξχϰ] ;
$egammaLike = [GKXCgkxc] ;
$smooth = \u0313 ;
$rough = \u0314 ;
$iotasub = \u0345 ;
$softener = [βΒγΓδΔζΖλΛμΜνΝρΡ$gvowel] ;
$under = \u0331;
$caron = \u030C;
$afterLetter = [:L:] [\'$accent]* ;
$beforeLetter = [\'$accent]* [:L:] ;
# Fix punctuation
# preserve original
\: ↔ \: $under ;
\? ↔ \? $under ;
\; ↔ \? ;
· ↔ \: ;
# Fix any ancient characters that creep in
\u0342 → \u0301 ;
\u0302 → \u0301 ;
\u0300 → \u0301 ;
$smooth → ;
$rough → ;
$iotasub → ;
ͺ → ;
# need to have these up here so the rules don't mask
η ↔ i $under ;
Η ↔ I $under ;
Ψ } $beforeLower ↔ Ps ;
Ψ ↔ PS ;
ψ ↔ ps ;
ω ↔ o $under ;
Ω ↔  O $under;
# at begining or end of word, convert mp to b
[^[:L:]$accent] { μπ → b ;
μπ } [^[:L:]$accent] → b ;
[^[:L:]$accent] { [Μμ][Ππ] → B ;
[Μμ][Ππ] } [^[:L:]$accent] → B ;
μπ ← b ;
Μπ ← B } $beforeLower ;
ΜΠ ← B ;
# handle diphthongs ending with upsilon
ου ↔ ou ;
ΟΥ ↔ OU ;
Ου ↔ Ou ;
οΥ ↔ oU ;
$fmaker = [aeiAEI] $under ? ;
$shiftForwardVowels = [[:Mn:]-[\u0308]]; # note: a diaeresis keeps the items separate
$fmaker { υ ( $shiftForwardVowels )* } $softener → $1 v $under ;
υ $1 ← ( $shiftForwardVowels )* v $under ;
$fmaker { υ ( $shiftForwardVowels )* } → $1 f $under;
υ $1 ← ( $shiftForwardVowels )* f $under ;
$fmaker { Υ } $softener ↔ V $under ;
$fmaker { Υ ↔ U $under ;
υ ↔ y ;
Υ ↔ Y ;
# NORMAL
α ↔ a ;
Α ↔ A ;
β ↔ v ;
Β ↔ V ;
γ } $gammaLike ↔ n } $egammaLike ;
γ ↔ g ;
Γ } $gammaLike ↔ N } $egammaLike ;
Γ ↔ G ;
δ ↔ d ;
Δ ↔ D ;
ε ↔ e ;
Ε ↔ E ;
ζ ↔ z ;
Ζ ↔ Z ;
θ ↔ th ;
Θ } $beforeLower ↔ Th ;
Θ ↔ TH ;
ι ↔ i ;
Ι ↔ I ;
κ ↔ k ;
Κ ↔ K ;
λ ↔ l ;
Λ ↔ L ;
μ ↔ m ;
Μ ↔ M ;
ν } $gammaLike → n\' ;
ν ↔ n ;
Ν } $gammaLike ↔ N\' ;
Ν ↔ N ;
ξ ↔ x ;
Ξ ↔ X ;
ο ↔ o ;
Ο ↔ O ;
π ↔ p ;
Π ↔ P ;
ρ ↔ r ;
Ρ ↔ R ;
# insert separator before things that turn into s
[Pp] { } [ςσΣϷϸϺϻ] → \' ;
# special S variants
Ϸ ↔ S\u030C ; # Ϸ GREEK CAPITAL LETTER SHO Uppercase_Letter Grek - L
ϸ ↔ s\u030C ; #ϸ GREEK SMALL LETTER SHO Lowercase_Letter Grek - L
Ϻ ↔ S\u0302 ; # Ϻ GREEK CAPITAL LETTER SAN Uppercase_Letter Grek - L
ϻ ↔ s\u0302 ; # ϻ GREEK SMALL LETTER SAN Lowercase_Letter Grek - L
# Caron means exception
# before a letter, initial
ς } $beforeLetter ↔ s $under } $beforeLetter;
σ } $beforeLetter ↔ s } $beforeLetter;
# otherwise, after a letter = final
$afterLetter { σ ↔ $afterLetter { s $under;
$afterLetter { ς ↔ $afterLetter { s ;
# otherwise (isolated) = initial
ς ↔ s $under;
σ ↔ s ;
# [Pp] { Σ ↔ \'S ;
Σ ↔ S ;
τ ↔ t ;
Τ ↔ T ;
φ ↔ f ;
Φ ↔ F ;
χ ↔ ch ;
Χ } $beforeLower ↔ Ch ;
Χ ↔ CH ;
# Completeness for ASCII
# $ignore = [[:Mark:]''] * ;
| ch ← h ;
| k  ← c ;
| i  ← j ;
| k ← q ;
| b ← u } $vowel ;
| b ← w } $vowel ;
| y ← u ;
| y ← w ;
| Ch ← H ;
| K ← C ;
| I ← J ;
| K ← Q ;
| B ← W } $vowel ;
| B ← U } $vowel ;
| Y ← W ;
| Y ← U ;
# Completeness for Greek
ϐ → | β ;
ϑ → | θ ;
ϒ → | Υ ;
ϕ → | φ ;
ϖ → | π ;
ϰ → | κ ;
ϱ → | ρ ;
ϲ → | σ ;
Ϲ → | Σ; #U+03F9 GREEK CAPITAL LUNATE SIGMA SYMBOL
ϳ → j ;
ϴ → | Θ ;
ϵ → | ε ;
µ → | μ ;
# delete any trailing ' marks used for roundtripping
← [Ππ] { \' } [Ss] ;
← [Νν] { \' } $egammaLike ;
::NFC (NFD) ;
# MINIMAL FILTER GENERATED FOR: Latin-Greek/UNGEGN BACKWARD
:: ([[[:Latin:][:Mn:][:Me:]] ['\:?]]) ;