eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ar_rules 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. // * Arabic Language ar ar_rules
  2. // * This file writen by Taha Zerrouki 2012
  3. // ***************************************************************************
  4. // * This program is free software; you can redistribute it and/or modify *
  5. // * it under the terms of the GNU General Public License as published by *
  6. // * the Free Software Foundation; either version 3 of the License, or *
  7. // * (at your option) any later version. *
  8. // * *
  9. // * This program is distributed in the hope that it will be useful, *
  10. // * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  11. // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  12. // * GNU General Public License for more details. *
  13. // * *
  14. // * You should have received a copy of the GNU General Public License *
  15. // * along with this program; if not, see: *
  16. // * <http://www.gnu.org/licenses/>. *
  17. // ***************************************************************************/
  18. //
  19. // This file is UTF-8 encoded
  20. // all words must be LOWER CASE (although the initial letter will be automatically
  21. // converted if it's a 7bit ascii character)
  22. // Text to phoneme rules for Arabic
  23. //
  24. // replace Arabic eastern character numbers with Arabic western character numbers
  25. .replace
  26. ٠ 0
  27. ۰ 0
  28. ۱ 1
  29. ١ 1
  30. ٢ 2
  31. ۲ 2
  32. ٣ 3
  33. ۳ 3
  34. ٤ 4
  35. ۴ 4
  36. ٥ 5
  37. ۵ 5
  38. ٦ 6
  39. ۶ 6
  40. ٧ 7
  41. ۷ 7
  42. ٨ 8
  43. ۸ 8
  44. ٩ 9
  45. ۹ 9
  46. ، ,
  47. ؛ ;
  48. // Reorder diacritics in "canonical order"
  49. َّ َّ // Fatha Shadda > Shadda Fatha
  50. ِّ ِّ // Kasra Shadda > Shadda Kasra
  51. ّْ ّْ // Sukun Shadda > Shadda Sukun
  52. // Named letter groups:
  53. // list of short vowels
  54. // A: َ ُ ِ
  55. // list of consonants
  56. // C: ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه
  57. // Consonant/vowel letters
  58. // B: ا و ي
  59. // "Thick" letters
  60. // F: ص ض ط ظ ق
  61. // Shadda
  62. // G: ّ
  63. // Hamza
  64. // H: ء
  65. // Sukun
  66. // Y: ْ
  67. // all vowels/diphthongs in vocalized text
  68. // (fatha, damma, kasra, fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  69. .L01 َ ُ ِ َا َى ُو ِي يَ وَ ٰ
  70. // Long vowels and diphthongs in vocalized text
  71. // (fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  72. .L03 َا َى ُو ِي يَ وَ ٰ
  73. // Implicit long vowels in UNvocalized text (alef, alef maksura, waw, yeh)
  74. .L04 ا ى و ي
  75. // all Arabic characters without short vowels and A
  76. .L05 ض ص ث ق ف غ ع ه خ ح ج ش س ي ب ل ت ن م ك ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ
  77. // group of digits
  78. .L06 0 1 2 3 4 5 6 7 8 9
  79. // all Arabic characters
  80. .L09 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ا ت ن م ك َ ُ ِ ّ آ ـ « » ظ ط ز ر ذ د ئ و ة ي ژ ؤ إ أ ء ؟ پ گ
  81. // Arabic Sun characters
  82. .L10 ض ص ث ش س ل ت ن ظ ط ز ر ذ د
  83. // Arabic Moon characters
  84. .L11 ق ف غ ع ه خ ح ج ي ب م ك و إ أ ء
  85. // Arabic diacritics
  86. .L20 ۡ ـ ً ٌ ٍ َ ُ ِ ّ ْ
  87. .group آ
  88. آ ?a:
  89. .group ا
  90. C) ا a: // if a consonant is before it, make the fatha long
  91. C) ا (C a:
  92. ا (َ ?
  93. ا (ُ ?
  94. ا (ِ ?
  95. اء ? // Carried Hamza
  96. _) ا a // make the previous fatha long
  97. _) ال (L10P2 ?a //الشمس
  98. _) ال (L11P2 ?al //القمر
  99. _) ال (تP2 ?at
  100. _) ال (ثP2 ?aT
  101. _) ال (دP2 ?ad
  102. _) ال (ذP2 ?aD
  103. _) ال (رP2 ?ar
  104. _) ال (زP2 ?az
  105. _) ال (سP2 ?as
  106. _) ال (شّP2 ?a
  107. _) ال (شP2 ?aS
  108. _) ال (صP2 ?as[
  109. _) ال (ضP2 ?adH
  110. _) ال (ظP2 ?aZ
  111. _) ال (لP2 ?al
  112. _) ال (نP2 ?an
  113. _ب) ا (ل i
  114. .group أ
  115. أ ? // Carried Hamza
  116. .group إ
  117. إ ? // Carried Hamza
  118. .group ب
  119. ب b
  120. ب (_ b
  121. بّ b:
  122. بْ b
  123. _) بال (L10P3 bi //بالشمس
  124. _) بال (L11P3 bil //بالقمر
  125. _) بال (تP3 bit
  126. _) بال (ثP3 biT
  127. _) بال (دP3 bid
  128. _) بال (ذP3 biD
  129. _) بال (رP3 bir
  130. _) بال (زP3 biz
  131. _) بال (سP3 bis
  132. _) بال (شP3 biS
  133. _) بال (صP3 bis[
  134. _) بال (ضP3 bidH
  135. _) بال (طP3 bit[
  136. _) بال (ظP3 biZ
  137. _) بال (لP3 bil
  138. _) بال (نP3 bin
  139. .group پ
  140. پ p
  141. .group ت
  142. ت t
  143. ت (_ t
  144. تّ t:
  145. _) ت (َP1 t
  146. .group ث
  147. ث T
  148. .group ج
  149. ج dZ
  150. جّ dZ:
  151. .group ح
  152. ح H
  153. .group خ
  154. خ X
  155. .group د
  156. د d
  157. دّ d:
  158. .group ذ
  159. ذ D
  160. .group ر
  161. ر r
  162. .group ز
  163. ز z
  164. .group س
  165. س s
  166. سّ s:
  167. .group ش
  168. ش S
  169. شّ S:
  170. .group ص
  171. ص s[
  172. صّ s[:
  173. .group ض
  174. ض dH
  175. .group ط
  176. ط t[
  177. .group ظ
  178. ظ Z
  179. .group ع
  180. ع A
  181. .group غ
  182. غ gH
  183. .group ف
  184. ف f
  185. ف (_ f
  186. فْ f
  187. _) فال (L10P3 fa //فالشمس
  188. _) فَال (L10P4 fa
  189. _) فَالْ (L10P4 fa
  190. _) فال (L11P3 fal //فالقمر
  191. _) فَال (L11P4 fa
  192. _) فَالْ (L11P4 fal
  193. _) فال (تP3 fat
  194. _) فال (ثP3 faT
  195. _) فال (دP3 fad
  196. _) فال (ذP3 faD
  197. _) فال (رP3 far
  198. _) فال (زP3 faz
  199. _) فال (سP3 fas
  200. _) فال (شP3 faS
  201. _) فال (صP3 fas[
  202. _) فال (ضP3 fadH
  203. _) فال (طP3 fat[
  204. _) فال (ظP3 faZ
  205. _) فال (لP3 fal
  206. _) فال (نP3 fan
  207. .group ق
  208. ق q
  209. .group ك
  210. ك k
  211. ك (_ k
  212. كّ k:
  213. كْ k
  214. ك (_S1 ka // الضمير المتصل
  215. _) كال (L10P3 ka //كالشمس
  216. _) كَال (L10P4 ka
  217. _) كَالْ (L10P4 ka
  218. _) كال (L11P3 kal //كالقمر
  219. _) كَالْ (L11P4 kal
  220. _) كال (تP3 kat
  221. _) كال (ثP3 kaT
  222. _) كال (دP3 kad
  223. _) كال (ذP3 kaD
  224. _) كال (رP3 kar
  225. _) كال (زP3 kaz
  226. _) كال (سP3 kas
  227. _) كال (شP3 kaS
  228. _) كال (صP3 kas[
  229. _) كال (ضP3 kadH
  230. _) كال (طP3 kat[
  231. _) كال (ظP3 kaZ
  232. _) كال (لP3 kal
  233. _) كال (نP3 kan
  234. كما (_S3 kuma: //الضمير المتصل
  235. كن (_S2 kun:a //الضمير المتصل
  236. .group گ
  237. گ g
  238. .group ل
  239. ل l
  240. _ا) ل (L10 ' // Sun letters
  241. _بِا) ل (L10 ' // Sun letters
  242. _فَا) ل (L10 ' // Sun letters
  243. _كَا) ل (L10 ' // Sun letters
  244. لّ l:
  245. _لِ) ل (L10 ' // Sun letters
  246. _وَا) ل (L10 ' // Sun letters
  247. .group م
  248. م m
  249. .group ن
  250. ن n
  251. ن (ب m
  252. نْ (ب m
  253. .group ه
  254. ه h
  255. هْ h
  256. ه (_S1 h // الضمير المتصل
  257. ها (_S2 ha: //الضمير المتصل
  258. هم (_S2 hum //الضمير المتصل
  259. هما (_S3 huma: //الضمير المتصل
  260. هن (_S2 hun:a //الضمير المتصل
  261. .group و
  262. و w
  263. C) و u: //واو بعد صامت دون تشكيل
  264. ا) و w //واو بعد الألف
  265. و (L01 w //واو بعدها حرف علة
  266. وْ w
  267. ْ) و w // واو بعد سكون
  268. َ) و w //واو بعد فتحة
  269. ِ) و w //واو بعد كسرة
  270. _) و w //واو في أول الكلمة
  271. وا (_S2 u
  272. وا (_S2 u: // فعل مع ضمائر الجمع المذكرة درسوا
  273. وء ? // Carried Hamza
  274. _) وال (L10P3 wa //والشمس
  275. _) وَال (L10P4 wa
  276. _) وَالْ (L10P4 wa
  277. _) وال (L11P3 wal //والقمر
  278. _) وَال (L11P4 wal
  279. _) وَالْ (L11P4 wal
  280. _) وال (تP3 wat
  281. _) وال (ثP3 waT
  282. _) وال (دP3 wad
  283. _) وال (ذP3 waD
  284. _) وال (رP3 war
  285. _) وال (زP3 waz
  286. _) وال (سP3 was
  287. _) وال (شP3 waS
  288. _) وال (صP3 was[
  289. _) وال (ضP3 wadH
  290. _) وال (طP3 wat[
  291. _) وال (ظP3 waZ
  292. _) وال (لP3 wal
  293. _) وال (نP3 wan
  294. ون (_S2 u:na //جمع مذكر سالم فلاحون
  295. .group ي
  296. C) ي i: // ياء بعد صامت دون تشكيل
  297. ا) ي j // ياء بعد ألف
  298. يِ ji:
  299. يء ? // Carried Hamza
  300. يء (_ // Carried Hamza at the end of word
  301. ْ) ي j //ياء بعد سكون
  302. ُ) ي j //ياء بعد ضمّة
  303. َ) ي j // ياء بعد فتحة
  304. _) ي j // ياء في أول الكلمة
  305. ي (L01 j //يا بعدها حروف علة
  306. ي (_S1 i
  307. يات (_S3 ij:a:t //يّة النسبة في جمع المؤنث جزائريات
  308. ية (_S2 ij:ah //يّة النسبة
  309. ين (_S2 i:na //جمع مذكر سالم منصوب أو مجرور
  310. يون (_S3 ij:u:n //kجمع مذكر سالم منسوب جزائريون
  311. يين (_S3 ij:i:n //kجمع مذكر سالم منسوب جزائريين
  312. .group ى //ألف مقصورة
  313. ى a
  314. C) ى (_ a:
  315. .group ء
  316. ء ?
  317. ء (ً ?an
  318. .group ئ
  319. ئ ? // Carried Hamza
  320. .group ؤ
  321. ؤ ? // Carried Hamza
  322. .group ة
  323. ة t
  324. ةْ t
  325. ةً tan
  326. // Other diacritics
  327. .group
  328. َ %a // fatha
  329. C) ٓ ? // madda after consonant
  330. ِ i // kasra
  331. ٍ (_S1 in // kasratan at the end of word
  332. ٌ (_S1 un // dammatan at the end of word
  333. ُ u // damma
  334. ٰ a: // superscript alef
  335. َا a: // fatha+alef
  336. ًا (_S2 an // fathatan+alef at the end of word
  337. َو au // fatha+waw
  338. ُو u: // damma+waw
  339. َى a: // fatha+alef maksura
  340. َي ai // fatha+yeh
  341. ِي i: // kasra+yeh
  342. ّ : // shadda
  343. // Following are default rules for other diacritics and they are just silence.
  344. // Diacritics should be consumed together with leading letters in rules above.
  345. ٱ // alef wasla
  346. ٌ // dammatan
  347. ً // fathatan
  348. ٍ // kasratan
  349. ـ // tatweel
  350. ۡ // small high dotless head of khan
  351. ْ // sukun
  352. // non-ascii characters with specified pronunciations
  353. // List the accented characters in en_list with the $accent attribute