interscript-maps 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,240 @@
1
+ system "ALA-LC:kaz-Arab:Latn:2012" {
2
+
3
+ metadata {
4
+ authority_id alalc
5
+ id 2012
6
+ language iso-639-2:kaz
7
+ source_script Arab
8
+ destination_script Latn
9
+ name "Romanization Table -- Kazakh (2012)"
10
+ url http://catdir.loc.gov/catdir/cpso/romanization/kazakh.pdf
11
+ creation_date 2012
12
+ confirmation_date 2012
13
+ description { ALA-LC Romanization table for Kazakh (in Arabic Script), 2012 version (no earlier versions)
14
+ }
15
+
16
+ notes {
17
+ note "Letters of the Alphabet: 37 rows transcribed in full. Letters joining on both sides carry initial/medial/final/alone forms; letters that do not join to the following (alif, dal, reh, zain, waw, and the hamza-bearing vowel letters) carry final/alone forms only, shown as '--' in the table."
18
+
19
+ note "Rule 1. When a hamzah appears as part of the vowel ٵ (ä), ٶ (ö), ٷ (ü), or ٴى (ï), it is not romanized separately. When a high hamzah (ٴ) appears with any other letter at the beginning of a word, it is romanized as alif (ʼ)."
20
+
21
+ note "Rule 2. Romanize foreign words that occur in a Kazakh context and are written in Kazakh letters according to these rules for romanizing Kazakh."
22
+
23
+ note "Rule 3. Follow the rules for the capitalization of English. This is a convention for writers of romanization; the source document's own examples are lowercase, so this map leaves case untouched."
24
+
25
+ note "The vowel letter he (ه) is listed twice in the alphabet: row 8 romanizes it e and row 29 romanizes it h. The two readings are homographs in the Arabic script and cannot be distinguished without vocalization; this map encodes the e reading, which is the one exercised by the document's own example (evfemyzm) and is the common reading of word-final he."
26
+
27
+ note "The source document's text layer encodes the Arabic letters in their Unicode presentation forms (joining shapes). This map carries those presentation forms so that input transcribed from the source document romanizes exactly; plain (unshaped) codepoints are handled by the base-letter rules."
28
+ }
29
+ }
30
+
31
+ tests {
32
+ # Letters of the Alphabet (2012 version, every row)
33
+ "ا" -> "a"
34
+ "ٵ" -> "ä"
35
+ "ب" -> "b"
36
+ "ۆ" -> "v"
37
+ "گ" -> "g"
38
+ "ع" -> "ğ"
39
+ "د" -> "d"
40
+ "ه" -> "e"
41
+ "ج" -> "j"
42
+ "ز" -> "z"
43
+ "ي" -> "y"
44
+ "ك" -> "k"
45
+ "ق" -> "q"
46
+ "ل" -> "l"
47
+ "م" -> "m"
48
+ "ن" -> "n"
49
+ "ڭ" -> "ñ"
50
+ "و" -> "o"
51
+ "ٶ" -> "ö"
52
+ "پ" -> "p"
53
+ "ر" -> "r"
54
+ "س" -> "s"
55
+ "ت" -> "t"
56
+ "ۋ" -> "w"
57
+ "ۇ" -> "u"
58
+ "ٷ" -> "ü"
59
+ "ف" -> "f"
60
+ "ح" -> "x"
61
+ # row 29: he romanized h (homograph of row 8, see notes)
62
+ "چ" -> "č"
63
+ "ش" -> "š"
64
+ "ى" -> "i"
65
+ "ٴى" -> "ï"
66
+ "ٴ" -> "ʼ" # romanized as alif
67
+ # Rule 1 examples (hamzah as part of a vowel is not romanized separately)
68
+ "ٵﺭ" -> "är"
69
+ "ٶﺯﻯ" -> "özi"
70
+ "ﯝﺷﯩﻨﺸﻰ" -> "üšinši"
71
+ "ٴﯨﻠﯩﻢ" -> "ïlim"
72
+ # Rule 1, continued (high hamzah word-initially romanized as alif)
73
+ "ٴﻣﺎﻟﯩﻢ" -> "ʼmalim"
74
+ "ٴﺳﻮﺯ" -> "ʼsoz"
75
+ "ٴﺗﯘﺒﯩﺮ" -> "ʼtubir"
76
+ "ٴﺗﯩﻠﻰ" -> "ʼtili"
77
+ # Rule 2 example (foreign word romanized per Kazakh rules)
78
+ "هﯙﻓﻪﻣﻴﺰﻡ" -> "evfemyzm"
79
+ }
80
+
81
+ stage main {
82
+
83
+ # CHARACTERS
84
+ parallel {
85
+ # Unicode presentation forms carried by the source document's text
86
+ # layer (joining shapes), mapped to the romanization of their base
87
+ # letter
88
+ sub "ﺍ" "a"
89
+ sub "ﺎ" "a"
90
+ sub "ٵ" "ä"
91
+ sub "ٶ" "ö"
92
+ sub "ٷ" "ü"
93
+ sub "ﯝ" "ü"
94
+ sub "ﺏ" "b"
95
+ sub "ﺐ" "b"
96
+ sub "ﺑ" "b"
97
+ sub "ﺒ" "b"
98
+ sub "ﭖ" "p"
99
+ sub "ﭗ" "p"
100
+ sub "ﭘ" "p"
101
+ sub "ﭙ" "p"
102
+ sub "ﭺ" "č"
103
+ sub "ﭻ" "č"
104
+ sub "ﭼ" "č"
105
+ sub "ﭽ" "č"
106
+ sub "ح" "x"
107
+ sub "ﺡ" "x"
108
+ sub "ﺢ" "x"
109
+ sub "ﺣ" "x"
110
+ sub "ﺤ" "x"
111
+ sub "ش" "š"
112
+ sub "ﺵ" "š"
113
+ sub "ﺶ" "š"
114
+ sub "ﺷ" "š"
115
+ sub "ﺸ" "š"
116
+ sub "ﻙ" "k"
117
+ sub "ﻚ" "k"
118
+ sub "ﻛ" "k"
119
+ sub "ﻜ" "k"
120
+ sub "ﮒ" "g"
121
+ sub "ﮓ" "g"
122
+ sub "ﮔ" "g"
123
+ sub "ﮕ" "g"
124
+ sub "ﻉ" "ğ"
125
+ sub "ﻊ" "ğ"
126
+ sub "ﻋ" "ğ"
127
+ sub "ﻌ" "ğ"
128
+ sub "ﺩ" "d"
129
+ sub "ﺪ" "d"
130
+ sub "ﻩ" "e"
131
+ sub "ﻪ" "e"
132
+ sub "ﻫ" "e"
133
+ sub "ﻬ" "e"
134
+ sub "ﺝ" "j"
135
+ sub "ﺞ" "j"
136
+ sub "ﺟ" "j"
137
+ sub "ﺠ" "j"
138
+ sub "ﺯ" "z"
139
+ sub "ﺰ" "z"
140
+ sub "ﻱ" "y"
141
+ sub "ﻲ" "y"
142
+ sub "ﻳ" "y"
143
+ sub "ﻴ" "y"
144
+ sub "ﻯ" "i"
145
+ sub "ﻰ" "i"
146
+ sub "ﯨ" "i"
147
+ sub "ﯩ" "i"
148
+ sub "ﯓ" "ñ"
149
+ sub "ﯔ" "ñ"
150
+ sub "ﯕ" "ñ"
151
+ sub "ﯖ" "ñ"
152
+ sub "ﻭ" "o"
153
+ sub "ﻮ" "o"
154
+ sub "ﯙ" "v"
155
+ sub "ﯚ" "v"
156
+ sub "پ" "p"
157
+ sub "ر" "r"
158
+ sub "ﺭ" "r"
159
+ sub "ﺮ" "r"
160
+ sub "س" "s"
161
+ sub "ﺱ" "s"
162
+ sub "ﺲ" "s"
163
+ sub "ﺳ" "s"
164
+ sub "ﺴ" "s"
165
+ sub "ت" "t"
166
+ sub "ﺕ" "t"
167
+ sub "ﺖ" "t"
168
+ sub "ﺗ" "t"
169
+ sub "ﺘ" "t"
170
+ sub "ۋ" "w"
171
+ sub "ﯞ" "w"
172
+ sub "ﯟ" "w"
173
+ sub "ۇ" "u"
174
+ sub "ﯗ" "u"
175
+ sub "ﯘ" "u"
176
+ sub "ف" "f"
177
+ sub "ﻑ" "f"
178
+ sub "ﻒ" "f"
179
+ sub "ﻓ" "f"
180
+ sub "ﻔ" "f"
181
+ sub "ق" "q"
182
+ sub "ﻕ" "q"
183
+ sub "ﻖ" "q"
184
+ sub "ﻗ" "q"
185
+ sub "ﻘ" "q"
186
+ sub "ل" "l"
187
+ sub "ﻝ" "l"
188
+ sub "ﻞ" "l"
189
+ sub "ﻟ" "l"
190
+ sub "ﻠ" "l"
191
+ sub "م" "m"
192
+ sub "ﻡ" "m"
193
+ sub "ﻢ" "m"
194
+ sub "ﻣ" "m"
195
+ sub "ﻤ" "m"
196
+ sub "ن" "n"
197
+ sub "ﻥ" "n"
198
+ sub "ﻦ" "n"
199
+ sub "ﻧ" "n"
200
+ sub "ﻨ" "n"
201
+ sub "ڭ" "ñ"
202
+ sub "ب" "b"
203
+ sub "ج" "j"
204
+ sub "ز" "z"
205
+ sub "ي" "y"
206
+ sub "ك" "k"
207
+ sub "ى" "i"
208
+ sub "ا" "a"
209
+ sub "و" "o"
210
+ sub "د" "d"
211
+ sub "ع" "ğ"
212
+ sub "ح" "x"
213
+ sub "ه" "e"
214
+ sub "چ" "č"
215
+ sub "ش" "š"
216
+ sub "گ" "g"
217
+ sub "ۆ" "v"
218
+
219
+ # Rule 1: high hamzah. As part of the vowel letter ( فى the sequence
220
+ # ٴى) it is not romanized separately; with any other letter at the
221
+ # beginning of a word it is romanized as alif (ʼ). The vowel letter
222
+ # ى appears in the source text both as the plain codepoint and as
223
+ # presentation forms, so the sequence carries all four shapes.
224
+ sub "ٴى" "ï"
225
+ sub "ٴﯨ" "ï"
226
+ sub "ٴﯩ" "ï"
227
+ sub "ٴﻯ" "ï"
228
+ sub "ٴﻰ" "ï"
229
+ sub "ٴ" "ʼ"
230
+
231
+ # Rule 1: composed spellings of the hamza-bearing vowel letters
232
+ # (compatibility decompositions of ٵ, ٶ, ٷ)
233
+ sub "اٴ" "ä"
234
+ sub "وٴ" "ö"
235
+ sub "ۇٴ" "ü"
236
+ }
237
+
238
+ }
239
+
240
+ }
@@ -0,0 +1,335 @@
1
+ system "ALA-LC:kur-Arab:Latn:2012" {
2
+
3
+ metadata {
4
+ authority_id alalc
5
+ id 2012
6
+ language iso-639-2:kur
7
+ source_script Arab
8
+ destination_script Latn
9
+ name "Romanization Table -- Kurdish (2012)"
10
+ url http://catdir.loc.gov/catdir/cpso/romanization/kurdish.pdf
11
+ creation_date 2012
12
+ confirmation_date 2012
13
+ description { ALA-LC Romanization table for Kurdish, 2012 version (earlier versions: 2004, 2002).
14
+ Trilingual table (Roman Hawar / Cyrillic / Arabic); this map encodes the Arabic column into the Roman (Hawar) column.
15
+ }
16
+
17
+ notes {
18
+ note "Vowels (Roman/Cyrillic/Arabic): A a / А а / ا or word-initial ئا; E e / Ә ә / ه or word-initial ئه; Ê ê / Е е / ێ or word-initial ئێ; I i / Ь ь / kasrah (◌ِ) under the preceding consonant, or word-initial ئِ; Î î / И и / ي [vowel] or word-initial ئي; O o / О о / ۆ or word-initial ئۆ; U u / Ӧ ӧ / و [vowel] or word-initial ئو; Û û / У у / وو or word-initial ئوو; ‘E (E') / Ә' ә' / عه. Footnote to the vowel rows: initial vowels begin with a kursi hamza (ئ)."
19
+
20
+ note "Consonants: B b ب; C c ج; Ç ç چ; Ç' ç' چ; D d د; [Ḍ] [ḍ] ض; ‘E (E') عه; F f ف; G g گ; H h ھ; Ḧ (H') ح; J j ژ; K k ك; K' k' ك; L l ل; Ł ł ڵ; M m م; N n ن; P p پ; P' p' پ; Q q ق; R r ر; R̄ r̄ ڕ; S s س; Ş ş ش; Ṣ ṣ ص; T t ت; T' t' ت; Ṭ ṭ ط; V v ڤ; W w و [consonant]; X x خ; Ẍ ẍ غ; Y y ي [consonant]; Z z ز; and the final row - / ‘ / ع (the ‘ayin, written ‘ in roman)."
21
+
22
+ note "Note 1. In Sorani, the conjunction 'and' (و) should be rendered u if the preceding word ends in a consonant, and w following a vowel. In Kurmanji, it is spelled û in Latin orthography and should be romanized that way as well. The conjunction is a word-level, context-dependent particle; this map renders و by the general waw rules."
23
+
24
+ note "Note 2. In the Arabic orthography for Kurdish, all vowels are written out, with the exception of i (short i), which is expressed by a kasrah under the preceding consonant, although that kasrah is rarely written. At the beginning of a word, the i is preceded by a kursi hamza (see note 3). Examples: kirin ('to do') كرن; k'ir̄īn ('to buy') كڕين; int'īn ('to sigh') ئنتين. The rarely-written kasrah must be supplied for a mechanical romanization: this map renders the kasrah as i, and word-initial ئ before a consonant as i. The unvocalized spellings كرن and كڕين additionally carry information this map cannot invent (see note 6 on aspiration)."
25
+
26
+ note "Note 3. In the Arabic orthography for Kurdish, when a vowel comes at the beginning of a word, or when a vowel directly follows another vowel, a kursi hamza precedes it. Examples: agir ('fire') ئاگر; oxir ('luck') ئۆغر; exte ('nag horse') ئهخته; naêm ('I don't come') نائێم. The kursi hamza itself is not romanized: this map strips it before a vowel letter and renders it as i before a consonant."
27
+
28
+ note "Note 4. In the Arabic orthography for Kurdish, the four forms of the Arabic letter hā' (هههه) have been reinterpreted. Two forms (initial ﻫ and medial ﻬ) are the letter H, while two forms (final ﻪ and independent ه) are the letter E. Final and independent H are both expressed by the initial form (ﻫ). Hence, the full paradigm for H is: initial ﻫ; medial ﻬ; final ﻫ; independent ﻫ. Examples: initial ﻫ: her ('each') ﻫﻪر, hatin ('to come') ﻫﺎﺗﻦ, lehī ('flood') ﻟﻪﻫﻲ; medial ﻬ: bihīstin ('to hear') ﺑﻬﻴﺴﺘﻦ; final ﻫ: cih ('place; bed') ﺟﻫ; independent ﻫ: meh ('month') ﻣﻪﻫ. E (ه) behaves like the letters alif (ا), wāw (و), dāl (د), and rā (ر) in that it never joins to the following letter. The full paradigm for E is: initial ﺋﻪ; [medial: replaced by final, as with alif, wāw, etc.]; final ﻪ; independent ﻪ. Examples: initial ﺋﻪ: enī ('forehead') ﺋﻪﻧﻲ, esp ('horse' (Sorani)) ﺋﻪﺳﭙ; final ﻪ: lehī ﻟﻪﻫﻲ, ç'em ('river') ﭼﻪم, ême ('we' (Sorani)) ﺋێﻤﮫ, p'īne ('patch') ﭘﻴﻨﻪ; independent ﻪ: dest ('hand') دﻩﺳﺖ, wek ('like, as') وهك. Because the H/E distinction rides on the joining form of the heh, this map renders the heh presentation forms exactly (ﻫ ﻬ → h; ﻪ ﻩ → e; the heh-doachashmee forms accordingly, with the isolated ﮪ of the alphabet table as h and the final ﮫ as e, per the ême example). Plain (unshaped) heh codepoints are resolved by context: word-initial he and he before a dual-joining letter read h, otherwise e. Adjacent plain heh letter pairs (an E followed by an H, as in lehī) cannot be resolved from codepoints alone and require shaped input or a zero-width non-joiner; shaped input romanizes exactly."
29
+
30
+ note "Note 5. The Arabic letter yā' (ي) has two equivalents in the roman orthography: it can be the vowel î and the consonant y. Likewise, the Arabic letter wāw (و) can be both the vowel u and the consonant w. If preceded by a consonant, yā' and wāw are the vowels î and u respectively. Examples: dītī ('s/he saw' (Sorani)) ديتي; bībīnim ('if I see it' (Sorani)) بيبينم; Soranī سۆراني; K'urd كورد; tu ('thou, you') تو. Likewise yā' and wāw are the consonants y and w respectively: (a) at the beginning of a word: yarmetī ('help' (Sorani)) يارمهتي; witin ('to say' (Sorani)) وتن; wutin ('to say' (Sorani)) ووتن. (b) if preceded by a vowel (including short i, which is not written): şayan ('worthy' (Sorani)) شايان; naybīnim ('I don't see it' (Sorani)) نايبينم; aw ('water' (Sorani)) ئاو; bedew ('beautiful') ﺑﻪدهو; diwēre ('s/he dares') دوێره; biyanī ('foreign') بياني; şiyan ('to be able') شيان. Footnote: also bīyanī (بيياني). (c) if preceded by a consonant and followed by a vowel: birwa ('belief' (Sorani)) بروا; xwarin ('to eat') خوارن; dītyan ('they saw' (Sorani)) ديتيان; asyaw ('mill' (Sorani)) ئاسياو. This map applies the note-5 rules mechanically: word-initial ي/و → y/w; after a vowel → y/w; after a consonant and before a vowel → y/w; otherwise (after a consonant, not before a vowel) → î/u. Mid-word وو reads û (the û vowel row); word-initial وو reads w+u (the wutin example), since word-initial û is written with the kursi hamza carrier ئوو."
31
+
32
+ note "Note 6. In the Cyrillic orthography for Kurdish, the distinction between aspirated stops (ç', k', p', t') and unaspirated stops (ç, k, p, t) is always written, and Soviet scholars also preserve this distinction in the roman orthography. Elsewhere it is generally ignored, and consequently this distinction does not exist in the Arabic orthography for Kurdish. Accordingly the Arabic-script source cannot carry the aspiration apostrophe: examples that the source documents with aspirated romanizations (k'ir̄īn كڕين, int'īn ئنتين, K'urd كورد, ç'em ﭼﻪم, p'īne ﭘﻴﻨﻪ) romanize here without it."
33
+
34
+ note "Note 7. Soviet scholars created the e' (Cyrillic ә'), which represents two different sounds. When the sound is ['ayin] + e, as at the beginning of a word (in Arabic script written عه), a preferable spelling is 'e, placing the apostrophe before the vowel. By analogy, one also finds 'a (ءا), 'ī (ءي), 'o (ءۆ), 'û (ءوو). The original e' (with the apostrophe after the vowel) is reserved for cases where the vowel [e] is followed by the ['ayin], as in the word me'r (مهءر), a dialectal variant of mar ('snake'). Since e' could be identified either as a vowel or as a consonant, it has been added to both categories in the Kurdish orthographic table."
35
+
36
+ note "Standard reference dictionaries for Kurdish include: Kurmanji (northern dialects): Michael L. Chyet. Kurdish-English dictionary = Ferhenga Kurmancî-Inglîzî (New Haven and London: Yale University Press, 2003); Ferdîdon Çelebî and Danko Sipka. Kurmanji Kurdish-English glossary (Springfield, VA: Dunwoody, 2002). Sorani (central dialects): Shafiq Qazzaz. The Sharezoor: Kurdish-English dictionary (Erbil: Aras, 2000)."
37
+
38
+ note "The source document's text layer encodes most Arabic letters in Unicode presentation forms (joining shapes); this map normalizes those to their base codepoints, except the heh family whose joining forms carry the H/E distinction of note 4 and are rendered semantically. A zero-width non-joiner is removed (it controls shaping, not content)."
39
+ }
40
+ }
41
+
42
+ tests {
43
+ # Vowel rows (Arabic column). The cell marked * (word-initial with the
44
+ # kursi hamza carrier) is the mechanically testable form of each vowel.
45
+ "ئا" -> "a"
46
+ "ئه" -> "e"
47
+ "ئێ" -> "ê"
48
+ "ئِ" -> "i"
49
+ "ئي" -> "î"
50
+ "ئۆ" -> "o"
51
+ "ئو" -> "u"
52
+ "ئوو" -> "û"
53
+ "عه" -> "‘e"
54
+ # plain vowel letters
55
+ "ا" -> "a"
56
+ "ۆ" -> "o"
57
+ "ێ" -> "ê"
58
+ "ِ" -> "i" # the kasrah of the I row
59
+ # Consonant rows (Arabic column, every row)
60
+ "ب" -> "b"
61
+ "ج" -> "c"
62
+ "چ" -> "ç"
63
+ "د" -> "d"
64
+ "ض" -> "ḍ"
65
+ "ف" -> "f"
66
+ "گ" -> "g"
67
+ "ﮪ" -> "h" # H row: heh doachashmee, isolated form
68
+ "ح" -> "ḧ"
69
+ "ژ" -> "j"
70
+ "ك" -> "k"
71
+ "ل" -> "l"
72
+ "ڵ" -> "ł"
73
+ "م" -> "m"
74
+ "ن" -> "n"
75
+ "پ" -> "p"
76
+ "ق" -> "q"
77
+ "ر" -> "r"
78
+ "ڕ" -> "r̄"
79
+ "س" -> "s"
80
+ "ش" -> "ş"
81
+ "ص" -> "ṣ"
82
+ "ت" -> "t"
83
+ "ط" -> "ṭ"
84
+ "ڤ" -> "v"
85
+ "و" -> "w" # W row: و [consonant]
86
+ "خ" -> "x"
87
+ "غ" -> "ẍ"
88
+ "ي" -> "y" # Y row: ي [consonant]
89
+ "ز" -> "z"
90
+ "ع" -> "‘"
91
+ # Note 2 examples. The rarely-written kasrah of the short i is supplied
92
+ # per note 2's orthographic rule (under each consonant that precedes an
93
+ # unwritten i); the source prints كرن كڕين unvocalized.
94
+ # - source: كرن (unvocalized), expected: kirin
95
+ "كِرِن" -> "kirin"
96
+ # - source: كڕين (unvocalized), expected: k’ir̄în (aspiration per note 6
97
+ # is not carried by the Arabic script); mechanical: kir̄in
98
+ # - source: ئنتين, expected: int’în (aspiration; mechanical: intîn)
99
+ "ئنتين" -> "intîn"
100
+ # Note 3 examples
101
+ # - source: ئاگر (unvocalized), expected: agir
102
+ "ئاگِر" -> "agir"
103
+ # - source: ئۆغر (unvocalized), expected: oẍir
104
+ "ئۆغِر" -> "oẍir"
105
+ "ئهخته" -> "exte"
106
+ "نائێم" -> "naêm"
107
+ # Note 4 examples (source text-layer encodings carried verbatim)
108
+ "ﻫﻪر" -> "her"
109
+ # - source: ﻫﺎﺗﻦ (unvocalized), expected: hatin
110
+ "ﻫﺎﺗِﻦ" -> "hatin"
111
+ "ﻟﻪﻫﻲ" -> "lehî"
112
+ # - source: ﺑﻬﻴﺴﺘﻦ (unvocalized), expected: bihîstin
113
+ "ﺑِﻬﻴﺴﺘِﻦ" -> "bihîstin"
114
+ # - source: ﺟﻫ (unvocalized), expected: cih
115
+ "ﺟِﻫ" -> "cih"
116
+ "ﻣﻪﻫ" -> "meh"
117
+ "دﻩﺳﺖ" -> "dest"
118
+ "وﻩك" -> "wek"
119
+ "ﭼﻪم" -> "çem" # ç'em in Kurmanji romanization (aspiration, note 6)
120
+ "ﺋێﻤﮫ" -> "ême"
121
+ "ﺋﻪﻧﻲ" -> "enî"
122
+ "ﺋﻪﺳﭙ" -> "esp"
123
+ # - source: ﭘﻴﻨﻪ, expected: p’îne (aspiration; mechanical: pîne)
124
+ "ﭘﻴﻨﻪ" -> "pîne"
125
+ # Note 5 examples
126
+ "ديتي" -> "dîtî"
127
+ "بيبينِم" -> "bîbînim"
128
+ "سۆراني" -> "soranî"
129
+ # - source: كورد, expected: K’urd (aspiration; mechanical: kurd)
130
+ "كورد" -> "kurd"
131
+ "تو" -> "tu"
132
+ "ﻳﺎرﻣﻪﺗﻲ" -> "yarmetî"
133
+ # - source: وتن (unvocalized), expected: witin
134
+ "وِتِن" -> "witin"
135
+ # - source: ووتن (unvocalized), expected: wutin
136
+ "ووتِن" -> "wutin"
137
+ "شايان" -> "şayan"
138
+ "نايبينِم" -> "naybînim"
139
+ "ئاو" -> "aw"
140
+ "ﺑﻪدهو" -> "bedew"
141
+ # - source: دوێره (unvocalized), expected: diwêre
142
+ "دِوێره" -> "diwêre"
143
+ # - source: بياني (unvocalized), expected: biyanî
144
+ "بِياني" -> "biyanî"
145
+ "بيياني" -> "bîyanî" # the footnote's alternate spelling, romanized as printed
146
+ # - source: شيان (unvocalized), expected: şiyan
147
+ "شِيان" -> "şiyan"
148
+ # - source: بروا (unvocalized), expected: birwa
149
+ "بِروا" -> "birwa"
150
+ # - source: خوارن (unvocalized), expected: xwarin
151
+ "خوارِن" -> "xwarin"
152
+ "ديتيان" -> "dîtyan"
153
+ "ئاسياو" -> "asyaw"
154
+ }
155
+
156
+ stage main {
157
+ sequence {
158
+ # 1. Presentation-form normalization (the source document's text layer
159
+ # encodes joining shapes). The heh family (ﻫ ﻬ ﻪ ﻩ ﮪ ﮫ) is excluded
160
+ # here - its forms carry the H/E distinction of note 4 and are
161
+ # rendered semantically below.
162
+ sub "ﭗ" "پ"
163
+ sub "ﭘ" "پ"
164
+ sub "ﭼ" "چ"
165
+ sub "ﮔ" "گ"
166
+ sub "ﯪ" "ئا"
167
+ sub "ﯮ" "ئو"
168
+ sub "ﯲ" "ئۆ"
169
+ sub "ﰄ" "ئي"
170
+ sub "ﺋ" "ئ"
171
+ sub "ﺎ" "ا"
172
+ sub "ﺑ" "ب"
173
+ sub "ﺒ" "ب"
174
+ sub "ﺖ" "ت"
175
+ sub "ﺗ" "ت"
176
+ sub "ﺘ" "ت"
177
+ sub "ﺟ" "ج"
178
+ sub "ﺧ" "خ"
179
+ sub "ﺮ" "ر"
180
+ sub "ﺳ" "س"
181
+ sub "ﺴ" "س"
182
+ sub "ﺷ" "ش"
183
+ sub "ﻋ" "ع"
184
+ sub "ﻏ" "غ"
185
+ sub "ﻛ" "ك"
186
+ sub "ﻟ" "ل"
187
+ sub "ﻢ" "م"
188
+ sub "ﻣ" "م"
189
+ sub "ﻤ" "م"
190
+ sub "ﻦ" "ن"
191
+ sub "ﻧ" "ن"
192
+ sub "ﻨ" "ن"
193
+ sub "ﻮ" "و"
194
+ sub "ﻲ" "ي"
195
+ sub "ﻳ" "ي"
196
+ sub "ﻴ" "ي"
197
+ sub "ﭙ" "پ"
198
+ sub "ﭻ" "چ"
199
+
200
+ # 2. Vowel carriers (kursi hamza + vowel letter) and the kasrah
201
+ sub "ئوو" "û"
202
+ sub "ئو" "u"
203
+ sub "ئا" "a"
204
+ sub "ئﻪ" "e"
205
+ sub "ئه" "e"
206
+ sub "ئێ" "ê"
207
+ sub "ئي" "î"
208
+ sub "ئۆ" "o"
209
+ sub "ئِ" "i"
210
+ sub "ِ" "i"
211
+
212
+ # 3. Note 4 - the heh family. Shaped forms first (exact), then the
213
+ # plain-codepoint context fallback.
214
+ sub "ﻫ" "h"
215
+ sub "ﻬ" "h"
216
+ sub "ﮬ" "h"
217
+ sub "ﮭ" "h"
218
+ sub "ﮪ" "h"
219
+ sub "ﻪ" "e"
220
+ sub "ﻩ" "e"
221
+ sub "ﮫ" "e"
222
+ sub {
223
+ from boundary + "ه"
224
+ to "h"
225
+ after any("بجچحخسشصطعغفقكلمنپيڵڤهھئ")
226
+ }
227
+ sub {
228
+ from boundary + "ھ"
229
+ to "h"
230
+ after any("بجچحخسشصطعغفقكلمنپيڵڤهھئ")
231
+ }
232
+ sub {
233
+ from "ه"
234
+ to "h"
235
+ after any("بجچحخسشصطعغفقكلمنپيڵڤهھئ")
236
+ }
237
+ sub {
238
+ from "ھ"
239
+ to "h"
240
+ after any("بجچحخسشصطعغفقكلمنپيڵڤهھئ")
241
+ }
242
+ sub "ه" "e"
243
+ sub "ھ" "e"
244
+
245
+ # 4. Consonant letters with a single reading
246
+ sub "ا" "a"
247
+ sub "ب" "b"
248
+ sub "ج" "c"
249
+ sub "چ" "ç"
250
+ sub "د" "d"
251
+ sub "ض" "ḍ"
252
+ sub "ع" "‘"
253
+ sub "ف" "f"
254
+ sub "گ" "g"
255
+ sub "ح" "ḧ"
256
+ sub "ژ" "j"
257
+ sub "ك" "k"
258
+ sub "ل" "l"
259
+ sub "ڵ" "ł"
260
+ sub "م" "m"
261
+ sub "ن" "n"
262
+ sub "پ" "p"
263
+ sub "ق" "q"
264
+ sub "ر" "r"
265
+ sub "ڕ" "r̄"
266
+ sub "س" "s"
267
+ sub "ش" "ş"
268
+ sub "ص" "ṣ"
269
+ sub "ت" "t"
270
+ sub "ط" "ṭ"
271
+ sub "ڤ" "v"
272
+ sub "خ" "x"
273
+ sub "غ" "ẍ"
274
+ sub "ز" "z"
275
+ sub "ێ" "ê"
276
+ sub "ۆ" "o"
277
+
278
+ # 5. Kursi hamza leftovers: word-initial carrier of the short i
279
+ # (note 2/3); elsewhere an unromanized carrier
280
+ sub {
281
+ from boundary + "ئ"
282
+ to "i"
283
+ }
284
+ sub "ئ" ""
285
+
286
+ # 6. Shaping control character
287
+ sub "‌" ""
288
+
289
+ # 7. Note 5 - waw: word-initial and post-vocalic w; after a consonant
290
+ # before a vowel w; otherwise the vowel u. Mid-word وو reads û;
291
+ # word-initial وو reads w+u (wutin), since word-initial û is
292
+ # written ئوو.
293
+ sub {
294
+ from boundary + "وو"
295
+ to "wu"
296
+ }
297
+ sub "وو" "û"
298
+ sub {
299
+ from boundary + "و"
300
+ to "w"
301
+ }
302
+ sub {
303
+ from "و"
304
+ to "w"
305
+ before any(["a", "e", "ê", "i", "î", "o", "u", "û"])
306
+ }
307
+ sub {
308
+ from "و"
309
+ to "w"
310
+ after any(["a", "e", "ê", "i", "î", "o", "u", "û"])
311
+ }
312
+ sub "و" "u"
313
+
314
+ # 8. Note 5 - yeh: word-initial and post-vocalic y; after a consonant
315
+ # before a vowel y; otherwise the vowel î
316
+ sub {
317
+ from boundary + "ي"
318
+ to "y"
319
+ }
320
+ sub {
321
+ from "ي"
322
+ to "y"
323
+ before any(["a", "e", "ê", "i", "î", "o", "u", "û"])
324
+ }
325
+ sub {
326
+ from "ي"
327
+ to "y"
328
+ after any(["a", "e", "ê", "i", "î", "o", "u", "û"])
329
+ }
330
+ sub "ي" "î"
331
+ }
332
+
333
+ }
334
+
335
+ }