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,442 @@
1
+ system "ALA-LC:urd-Arab:Latn:2013" {
2
+
3
+ metadata {
4
+ authority_id alalc
5
+ id 2013
6
+ language iso-639-2:urd
7
+ source_script Arab
8
+ destination_script Latn
9
+ name "Romanization Table -- Urdu (2013)"
10
+ url http://catdir.loc.gov/catdir/cpso/romanization/urdu.pdf
11
+ creation_date 2013
12
+ confirmation_date 2013
13
+ description { ALA-LC Romanization table for Urdu (in Arabic script), 2013 version (earlier versions: 2011, 1997)
14
+ }
15
+
16
+ notes {
17
+ note "Letters of the Alphabet: alif ا omit (see Note 1); ب b; پ p; ت t; ٹ ṭ; ث s; ج j; چ c; ح ḥ; خ kh; د d; ڈ ḍ; ذ z; ر r; ڑ ṛ; ز z; ژ zh; س s; ش sh; ص ṣ; ض ẓ; ط t̤; ظ z̤; ع ‘ (ayn); غ gh; ف f; ق q; ك k; گ g; ل l; م m; ن n; ں n (see Note 2; rule 6 romanizes undotted and dotted noon alike n); و v; ه h; ة t (see Rule 10); ي/ے/ى y (see Note 3)."
18
+
19
+ note "Digraphs Representing Urdu Aspirates (see Note 4): bh به; ph په; th ته; ṭh ٹه; jh جھ; ch چھ; dh ده; ḍh ڋه; ṛh ڑه; kh كه; gh گه. Each is the consonant letter followed by he; this map renders the aspirate mechanically as the letter value plus h."
20
+
21
+ note "Urdu Vowels and Diphthongs (see Note 5): fatha a; damma u; kasra i; alif with fatha اَ ā; yad with fatha یَ á, alif maqsura with superscript alif ىٰ á; waw with damma وُ ū; yad with kasra یِ ī; waw و o; yad ی, bari yad ے e; waw with sukun and fatha وَْ au; bari yad ے ai."
22
+
23
+ note "Note 1. For the use of ا (alif) to support ء (hamzah) and آ (maddah), see rules 1 and 2, respectively. For the romanization of ء by ʼ (alif), see rule 12. For other orthographic uses of ا see rules 3-4."
24
+
25
+ note "Note 2. For the distinction between ن and ں, see rule 6."
26
+
27
+ note "Note 3. For the distinction between ى and ے, see rule 11(c) and (e)."
28
+
29
+ note "Note 4. For the form of the letter ه in these digraphs, see rule 9."
30
+
31
+ note "Note 5. Vowel points are used sparingly, and for romanization must be supplied from a dictionary. Accordingly, over unvocalized text the readings of bare و (v/o/au), bare ی (y/i/e), and unwritten short vowels are lexical; this map encodes the alphabet-row consonant readings as the bare-letter defaults (bare و v, word-initial bare ی y, other bare ی e), the marked vowels mechanically, and the rules-of-application contexts below. The source's examples whose romanization requires lexically supplied vowels are carried as comments in the tests block."
32
+
33
+ note "Rule 1. ا (alif), و and ی are used to support ء (hamzah); see rule 12. When so used, these letters are not represented in romanization."
34
+
35
+ note "Rule 2. ا (alif) is used to support آ (maddah); see rule 13. When so used, it is not represented in romanization."
36
+
37
+ note "Rule 3. ا (alif) is used after a consonant to indicate the long vowel romanized ā: rāj راج; karnā کرنا. In some words of Arabic origin this alif appears as a superscript letter over ی representing the alif maqṣūrah: daʻvá دعویٰ. The alif is sometimes omitted in writing. It is always represented in romanization: ʻAbdurraḥmān عبد الرحمن, عبد الرحمان."
38
+
39
+ note "Rule 4. ا (alif) may be used as an orthographic sign without phonetic significance. In these cases it is not represented in romanization. See rule 16: ʻamlan عملاً."
40
+
41
+ note "Rule 5. ط appears as a superscript letter over ت, د, and ر when the latter represent the cerebral sounds romanized ṭ, ḍ, and ṛ, respectively. (In modern text these are the single letters ٹ, ڈ, ڑ.)"
42
+
43
+ note "Rule 6. Regardless of pronunciation, undotted forms of the letter ن are romanized n and dotted forms are romanized n: jahān جهاں."
44
+
45
+ note "Rule 7. و is used: (a) to represent the consonant sound romanized v: dev دیو, vujūd وجود, khvīsh خویش; in some words of Persian origin this consonant, though written, has ceased to be pronounced; it is retained in romanization (khvīsh); (b) to represent the long vowel romanized ū: Urdū اردو; (c) to represent the long vowel romanized o: os اوس, dost دوست; for the romanization of the conjunction و as o see rule 19; (d) to represent the diphthong romanized au: aur اور, qaumī قومی; (e) to support ء (hamzah), see rule 12; for the use of shaddah with و see rule 14."
46
+
47
+ note "Rule 8. ه is used to represent the consonantal sound romanized h: ham هم, gāh گاه. Final ه, though not pronounced, is normally retained in romanization: kih که, guldastah گلدسته. Exception is made in the case of words whose final syllable ends in an aspirated consonant; when final ه is added to the letter ه in this position, it is not represented in romanization: mukh مکهه."
48
+
49
+ note "Rule 9. ه (usually written in the form ہ) is used to represent the aspirated element of the sounds romanized bh, ph, th, ṭh, jh, ch, dh, ḍh, ṛh, kh, gh: phūl پهول, acchā اچها. For the writing and romanization of words ending in an aspirated consonant, see rule 8."
50
+
51
+ note "Rule 10. ة and ت, which are sometimes used interchangeably, are both romanized t: ḥikmat حکمة, حکمت."
52
+
53
+ note "Rule 11. ی is used: (a) to represent the consonant romanized y: siyāsat سیاست, diyā دیا; (b) to represent the long vowel romanized ī: taṣvīr تصویر; (c) to represent the long vowel romanized e: sher شیر, nevā نیوا; when ی with this value is final, the form ے generally replaces ی: se سے, laṛke لڑکے; (d) to represent the long vowel romanized á, see rule 3: daʻvá دعویٰ, ʻuqbá عقبی; (e) to represent the diphthong romanized ai: maidān میدان, bail بیل; when ی with this value is final, it is generally written ے: hai ہے; (f) to support ء (hamzah); in this position ی is usually undotted, see rule 12. For the use of shaddah with ی see rule 14; for the use of ی in a muẓāf see rule 17. The ī/e and e/ai choices of the bare yad and bari yad are lexical (note 5); this map defaults to e."
54
+
55
+ note "Rule 12. ء (hamzah): (a) in initial position ء is not represented in romanization; (b) in medial and final position, when ء represents a consonant, it is romanized ʼ (alif): muʼmin مؤمن, liʼe لئے, bhāʼī بهائی; (c) when ء represents the connective syllable joining a muẓāf to what follows, it is romanized -yi, see rule 17: malikah-yi Inglistān ملکۀ Inglistān. This map renders the heh-with-hamza ۀ as h-yi and the hamza-on-yeh-plus-bari-yad ئے as yi."
56
+
57
+ note "Rule 13. آ (maddah): (a) at the beginning of a word, or following the Arabic article ال, آ is romanized ā: āb آب; (b) at the beginning of a syllable within a word, آ is romanized ʼā: mirʼāt مرآت, Qurʼān قرآن; (c) آ is otherwise omitted in romanization."
58
+
59
+ note "Rule 14. Shaddah (tashdīd) indicates the doubling in pronunciation of the letter over which it is written. It is represented in romanization by doubling the letter or digraph concerned: caccā چچّا, khaṭṭā کهٹّا, makkhī مکّهی. When shaddah occurs over و and ی, these letters are regarded as representing consonants; they are romanized vv and yy, respectively: quvvat قوّت, sayyid سیّد, Zakariyyā زکریّا."
60
+
61
+ note "Rule 15. Sukūn (jazm) indicates the absence of a vowel following the letter over which it is written. It is not represented in romanization."
62
+
63
+ note "Rule 16. Tanvīn (written ٌ, ٍ, ً (اً)) is romanized un, in, an, respectively, when it occurs in a word or expression borrowed from Arabic; otherwise it is not represented in romanization: fauran فوراً, ʻamlan عملاً. This map encodes the tanvīn values; the borrowed-from-Arabic condition is lexical."
64
+
65
+ note "Rule 17. Iẓāfat: (a) when the muẓāf ends in a consonant, -i is added to it in the romanization: tārīkh-i Hindūstān تاریخِ ہندوستان; (b) when the muẓāf ends in a vowel or in silent ه, -yi is added: daryā-yi shor دریائے شور, zabān-i Urdū-yi muʻallá زبانِ اردو معلی, malikah-yi Inglistān ملکۂ انگلستان. For the use of ء (hamzah) to indicate the muẓāf, see rule 12(c). The iẓāfat kasra renders mechanically as the word-final i; the -yi after vowels and silent he requires the hamzah spellings."
66
+
67
+ note "Rule 18. The Arabic article ال is romanized differently depending on the letters and context with which it is associated: (a) when it is prefixed to a word beginning with a 'moon letter' (ا ب ج ح خ ع غ ف ق ك م و ه ی), it is romanized al: al-Qurʼān القران; (b) when it is prefixed to a word beginning with a 'sun letter' (ت ث د ذ ر ز س ش ص ض ط ظ ل ن), the l of the article is replaced in romanization by the same letter or digraph as that which begins the following word: as-sijill السجل; (c) when it occurs before the second element in a name, the vowel of the article is replaced by the final vowel of the preceding word: ʻAbdulʻazīz عبد العزیز, ʻAbdurrashīd عبد الرشید, Abūlfaẓl ابو الفضل, Zūlqarnain ذو القرنین, Faẓlullāhفضل الله. Rules (a) and (b) are encoded; (c) is syntactic and not implemented."
68
+
69
+ note "Rule 19. The conjunction و, when used to join two closely associated members of a phrase, is romanized o: māl o asbāb مال و اسباب. Otherwise و is romanized va. The conjunction reading is syntactic and not implemented; bare و defaults to v (the alphabet row)."
70
+
71
+ note "Rule 20. Rules for the capitalization of English are followed, except that the Arabic article al is lowercased in all positions. This map leaves case untouched; the source's proper-noun capitals are lexical."
72
+
73
+ note "Rule 21. The macron is used with both capital and lowercase letters."
74
+
75
+ note "Rule 22. The hyphen is used: (a) to connect a muẓāf with the following vowel or syllable, see rule 17; (b) to connect the Arabic article al with the following word, see rule 18. The article hyphen is encoded; the muẓāf hyphen rides on the -i/-yi spellings."
76
+
77
+ note "Rule 23. Foreign words in an Urdu context, including Arabic and Persian words, are romanized according to the rules for Urdu: Janāb-i Heḍ Māsṭar ṣāḥib-i Gavarnmanṭ Hāʼī Iskūl جناب هیڈ ماسٹر صاحب گورنمنٹ ہائی اسکول. For short vowels not indicated in the script, the Urdu vowels nearest the original pronunciation of the word concerned are supplied in romanization."
78
+
79
+ note "Rule 24. A quotation in another language using the Arabic script is romanized according to the rules for the language concerned."
80
+ }
81
+ }
82
+
83
+ tests {
84
+ # Letters of the Alphabet
85
+ "ب" -> "b"
86
+ "پ" -> "p"
87
+ "ت" -> "t"
88
+ "ٹ" -> "ṭ"
89
+ "ث" -> "s"
90
+ "ج" -> "j"
91
+ "چ" -> "c"
92
+ "ح" -> "ḥ"
93
+ "خ" -> "kh"
94
+ "د" -> "d"
95
+ "ڈ" -> "ḍ"
96
+ "ذ" -> "z"
97
+ "ر" -> "r"
98
+ "ڑ" -> "ṛ"
99
+ "ز" -> "z"
100
+ "ژ" -> "zh"
101
+ "س" -> "s"
102
+ "ش" -> "sh"
103
+ "ص" -> "ṣ"
104
+ "ض" -> "ẓ"
105
+ "ط" -> "t̤"
106
+ "ظ" -> "z̤"
107
+ "ع" -> "ʻ"
108
+ "غ" -> "gh"
109
+ "ف" -> "f"
110
+ "ق" -> "q"
111
+ "ك" -> "k"
112
+ "گ" -> "g"
113
+ "ل" -> "l"
114
+ "م" -> "m"
115
+ "ن" -> "n"
116
+ "ں" -> "n"
117
+ "و" -> "v"
118
+ "ه" -> "h"
119
+ "ہ" -> "h"
120
+ "ة" -> "t"
121
+ "ی" -> "y"
122
+ "ے" -> "e"
123
+ # Urdu Vowels and Diphthongs
124
+ "اَ" -> "ā"
125
+ "یَ" -> "á"
126
+ "ىٰ" -> "á"
127
+ "وُ" -> "ū"
128
+ "یِ" -> "ī"
129
+ "وَ" -> "o"
130
+ "وَْ" -> "au"
131
+ # Rule 3 (alif after a consonant = ā)
132
+ "راج" -> "rāj"
133
+ # - source: کرنا, expected: karnā (rule 3 final alif = ā; the a is
134
+ # unwritten; mechanical: krnā)
135
+ # Rule 17(a) (iẓāfat kasra = word-final -i)
136
+ # - source: زبانِ, expected: zabān-i (the first alif reads the lexically
137
+ # short a; mechanical per rule 3: zābāni)
138
+ # Rule 7(d) (wau after a vowel = the au nucleus)
139
+ "اور" -> "aur"
140
+ # Rule 7(a) (wau consonant v; word-final)
141
+ "دیو" -> "dev"
142
+ # Rule 8 (he = h)
143
+ # - source: هم, expected: ham (rule 8; the a is unwritten; mechanical: hm)
144
+ "گاه" -> "gāh"
145
+ # Rule 6 (both noons = n)
146
+ # - source: جهاں, expected: jahān (rule 6; the a is unwritten;
147
+ # mechanical: jhān)
148
+ # Rule 9 + 3 (aspirate he; word-initial maddah = ā)
149
+ # - source: اچها, expected: acchā (rule 9; the doc's romanization implies
150
+ # the geminate spelling اچّها whose shaddah the text layer does not
151
+ # carry; mechanical per the aspirate digraph: achā)
152
+ "آب" -> "āb"
153
+ # Examples requiring lexically supplied vowels or proper-noun capitals
154
+ # (note 5; the mechanical renderings are shown)
155
+ # - source: که, expected: kih (unwritten i; mechanical: kh)
156
+ # - source: گلدسته, expected: guldastah (unwritten vowels)
157
+ # - source: مکهه, expected: mukh (unwritten u; the final he after the
158
+ # aspirate he is silent per rule 8: mechanical: mkh)
159
+ # - source: چچّا, expected: caccā (shaddah doubling; unwritten a)
160
+ # - source: کهٹّا, expected: khaṭṭā (shaddah doubling; unwritten a)
161
+ # - source: مکّهی, expected: makkhī (shaddah doubling; unwritten a, i)
162
+ # - source: قوّت, expected: quvvat (wau shaddah = vv; unwritten u, a)
163
+ # - source: سیّد, expected: sayyid (yad shaddah = yy; unwritten a, i)
164
+ # - source: زکریّا, expected: Zakariyyā (yad shaddah = yy; capital,
165
+ # unwritten a, i)
166
+ # - source: پهول, expected: phūl (aspirate ph; unwritten ū)
167
+ # - source: مؤمن, expected: muʼmin (rule 12b medial hamzah = ʼ; unwritten u)
168
+ # - source: لئے, expected: liʼe (rule 12b; unwritten i)
169
+ # - source: بهائی, expected: bhāʼī (rule 12b; unwritten i)
170
+ # - source: مرآت, expected: mirʼāt (rule 13b medial maddah = ʼā; unwritten i)
171
+ # - source: قرآن, expected: Qurʼān (rule 13b; capital, unwritten u)
172
+ # - source: القران, expected: al-Qurʼān (rule 18a moon-letter article;
173
+ # capital, unwritten u)
174
+ # - source: السجل, expected: as-sijill (rule 18b sun-letter assimilation;
175
+ # unwritten i's; mechanical: as-sjll)
176
+ # - source: اوس, expected: os (bare wau after alif read o; mechanical: aus)
177
+ # - source: دوست, expected: dost (bare wau read o; mechanical: dvst)
178
+ # - source: اردو, expected: Urdū (word-final bare wau read ū; capital;
179
+ # mechanical: ardv)
180
+ # - source: وجود, expected: vujūd (initial wau v, medial wau ū; unwritten u)
181
+ # - source: خویش, expected: khvīsh (medial wau v; unwritten ī)
182
+ # - source: قومی, expected: qaumī (wau au after unwritten a; unwritten i)
183
+ # - source: سیاست, expected: siyāsat (rule 11a yad = y; unwritten i, a)
184
+ # - source: دیا, expected: diyā (rule 11a; unwritten i)
185
+ # - source: تصویر, expected: taṣvīr (rule 11b yad = ī; unwritten a)
186
+ # - source: شیر, expected: sher (rule 11c bare yad = e)
187
+ "شیر" -> "sher"
188
+ # - source: نیوا, expected: nevā (unwritten e)
189
+ # - source: سے, expected: se (rule 11c final bari yad = e)
190
+ "سے" -> "se"
191
+ # - source: لڑکے, expected: laṛke (rule 11c)
192
+ # - source: لڑکے, expected: laṛke (rule 11c; the a is unwritten;
193
+ # mechanical: lṛke)
194
+ # - source: دعویٰ, expected: daʻvá (rule 11d; unwritten a)
195
+ # - source: عقبی, expected: ʻuqbá (rule 11d; unwritten u, á)
196
+ # - source: میدان, expected: maidān (rule 11e ai; unwritten a)
197
+ # - source: بیل, expected: bail (rule 11e; unwritten a, i)
198
+ # - source: ہے, expected: hai (rule 11e final bari yad read ai;
199
+ # mechanical: he)
200
+ # - source: ملکۂ, expected: malikah-yi (rule 12c/17b; unwritten i)
201
+ # - source: دریائے, expected: daryā-yi (rule 17b; unwritten a)
202
+ # - source: تاریخِ, expected: tārīkh-i Hindūstān (unwritten i)
203
+ # - source: فوراً, expected: fauran (rule 16 tanvin; unwritten u)
204
+ # - source: عملاً, expected: ʻamlan (rule 16; unwritten a)
205
+ # - source: حکمة, expected: ḥikmat (rule 10; unwritten i, a)
206
+ # - source: مال و اسباب, expected: māl o asbāb (rule 19 conjunction wau = o,
207
+ # syntactic)
208
+ # - source: جناب هیڈ ماسٹر صاحب گورنمنٹ ہائی اسکول, expected: Janāb-i Heḍ
209
+ # Māsṭar ṣāḥib-i Gavarnmanṭ Hāʼī Iskūl (rule 23 foreign words; unwritten
210
+ # vowels throughout)
211
+ }
212
+
213
+ stage main {
214
+ sequence {
215
+ # Marked vowels and diphthongs (Urdu Vowels and Diphthongs table)
216
+ sub "وَْ" "au"
217
+ sub "وَ" "o"
218
+ sub "وُ" "ū"
219
+ sub "یَ" "á"
220
+ sub "یِ" "ī"
221
+ sub "اَ" "ā"
222
+ sub "ےَ" "ai"
223
+ sub "ىٰ" "á"
224
+
225
+ # Rule 12 - hamzah (a initial silent; b medial/final ʼ; c muẓāf -yi)
226
+ sub "ئے" "yi"
227
+ sub "ۀ" "h-yi"
228
+ sub {
229
+ from boundary + "ء"
230
+ to ""
231
+ }
232
+ sub {
233
+ from boundary + "أ"
234
+ to ""
235
+ }
236
+ sub "ء" "ʼ"
237
+ sub "أ" "ʼ"
238
+ sub "ؤ" "ʼ"
239
+ sub "ئ" "ʼ"
240
+
241
+ # Rule 13 - maddah (a word-initial ā; b syllable-initial ʼā)
242
+ sub {
243
+ from boundary + "آ"
244
+ to "ā"
245
+ }
246
+ sub "آ" "ʼā"
247
+
248
+ # Rule 18 - the Arabic article al (moon letters) and its assimilation
249
+ # (sun letters)
250
+ sub {
251
+ from boundary + "الت"
252
+ to "at-"
253
+ }
254
+ sub {
255
+ from boundary + "الث"
256
+ to "as-"
257
+ }
258
+ sub {
259
+ from boundary + "الد"
260
+ to "ad-"
261
+ }
262
+ sub {
263
+ from boundary + "الذ"
264
+ to "az-"
265
+ }
266
+ sub {
267
+ from boundary + "الر"
268
+ to "ar-"
269
+ }
270
+ sub {
271
+ from boundary + "الز"
272
+ to "az-"
273
+ }
274
+ sub {
275
+ from boundary + "الس"
276
+ to "as-"
277
+ }
278
+ sub {
279
+ from boundary + "الش"
280
+ to "ash-"
281
+ }
282
+ sub {
283
+ from boundary + "الص"
284
+ to "aṣ-"
285
+ }
286
+ sub {
287
+ from boundary + "الض"
288
+ to "aẓ-"
289
+ }
290
+ sub {
291
+ from boundary + "الط"
292
+ to "at̤-"
293
+ }
294
+ sub {
295
+ from boundary + "الظ"
296
+ to "az̤-"
297
+ }
298
+ sub {
299
+ from boundary + "الل"
300
+ to "al-"
301
+ }
302
+ sub {
303
+ from boundary + "الن"
304
+ to "an-"
305
+ }
306
+ sub {
307
+ from boundary + "ال"
308
+ to "al-"
309
+ }
310
+
311
+ # Rule 16 - tanvin (borrowed-from-Arabic words)
312
+ sub "اً" "an"
313
+ sub "ً" "an"
314
+ sub "ٌ" "un"
315
+ sub "ٍ" "in"
316
+
317
+ # Rule 14 - shaddah doubling (waw and yad render as consonants vv, yy)
318
+ sub "بّ" "bb"
319
+ sub "پّ" "pp"
320
+ sub "تّ" "tt"
321
+ sub "ٹّ" "ṭṭ"
322
+ sub "ثّ" "ss"
323
+ sub "جّ" "jj"
324
+ sub "چّ" "cc"
325
+ sub "حّ" "ḥḥ"
326
+ sub "خّ" "khkh"
327
+ sub "دّ" "dd"
328
+ sub "ڈّ" "ḍḍ"
329
+ sub "ذّ" "zz"
330
+ sub "رّ" "rr"
331
+ sub "ڑّ" "ṛṛ"
332
+ sub "زّ" "zz"
333
+ sub "ژّ" "zhzh"
334
+ sub "سّ" "ss"
335
+ sub "شّ" "shsh"
336
+ sub "صّ" "ṣṣ"
337
+ sub "ضّ" "ẓẓ"
338
+ sub "طّ" "t̤t̤"
339
+ sub "ظّ" "z̤z̤"
340
+ sub "عّ" "ʻʻ"
341
+ sub "غّ" "ghgh"
342
+ sub "فّ" "ff"
343
+ sub "قّ" "qq"
344
+ sub "كّ" "kk"
345
+ sub "کّ" "kk"
346
+ sub "ڪّ" "kk"
347
+ sub "گّ" "gg"
348
+ sub "لّ" "ll"
349
+ sub "مّ" "mm"
350
+ sub "نّ" "nn"
351
+ sub "ںّ" "nn"
352
+ sub "وّ" "vv"
353
+ sub "یّ" "yy"
354
+
355
+ # Letters of the Alphabet
356
+ sub "ب" "b"
357
+ sub "پ" "p"
358
+ sub "ت" "t"
359
+ sub "ٹ" "ṭ"
360
+ sub "ث" "s"
361
+ sub "ج" "j"
362
+ sub "چ" "c"
363
+ sub "ح" "ḥ"
364
+ sub "خ" "kh"
365
+ sub "د" "d"
366
+ sub "ڈ" "ḍ"
367
+ sub "ذ" "z"
368
+ sub "ر" "r"
369
+ sub "ڑ" "ṛ"
370
+ sub "ز" "z"
371
+ sub "ژ" "zh"
372
+ sub "س" "s"
373
+ sub "ش" "sh"
374
+ sub "ص" "ṣ"
375
+ sub "ض" "ẓ"
376
+ sub "ط" "t̤"
377
+ sub "ظ" "z̤"
378
+ sub "ع" "ʻ"
379
+ sub "غ" "gh"
380
+ sub "ف" "f"
381
+ sub "ق" "q"
382
+ sub "ك" "k"
383
+ sub "ک" "k"
384
+ sub "ڪ" "k"
385
+ sub "گ" "g"
386
+ sub "ل" "l"
387
+ sub "م" "m"
388
+ sub "ن" "n"
389
+ sub "ں" "n"
390
+ sub "ة" "t"
391
+ sub "ه" "h"
392
+ sub "ہ" "h"
393
+ sub "ھ" "h"
394
+
395
+ # Rule 3 - bare alif: word-initial short a, after a consonant ā
396
+ sub {
397
+ from boundary + "ا"
398
+ to "a"
399
+ }
400
+ sub "ا" "ā"
401
+
402
+ # Rule 15 and leftover marks
403
+ sub "ْ" ""
404
+ sub "ّ" ""
405
+ sub "َ" "a"
406
+ sub "ُ" "u"
407
+ sub "ِ" "i"
408
+
409
+ # Rule 11 - yad: word-initial y, other bare yad e (note 5; the i and ai
410
+ # readings are marked or lexical)
411
+ sub {
412
+ from boundary + "ی"
413
+ to "y"
414
+ }
415
+ sub {
416
+ from boundary + "ي"
417
+ to "y"
418
+ }
419
+ sub "ی" "e"
420
+ sub "ي" "e"
421
+ sub "ے" "e"
422
+ sub "ى" "e"
423
+
424
+ # Rule 7 - wau: word-finally the consonant v (dev); after a vowel it is
425
+ # the diphthong nucleus (aur); the bare alphabet-row reading is the
426
+ # consonant v (the ū/o readings are marked or lexical)
427
+ sub {
428
+ from "و"
429
+ to "v"
430
+ after boundary
431
+ }
432
+ sub {
433
+ from "و"
434
+ to "u"
435
+ before any(["a", "ā", "e", "i", "ī", "o", "u", "ū", "á"])
436
+ }
437
+ sub "و" "v"
438
+ }
439
+
440
+ }
441
+
442
+ }