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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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. // Letter groups
  49. // list of short vowels
  50. //A: َ ُ ِ
  51. //list of consonants
  52. //C: ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه
  53. // Consonant/vowel letters
  54. //B: ا و ي
  55. // "Thick" letters
  56. //F: ص ض ط ظ ق
  57. // Shadda
  58. //G: ّ
  59. // Hamza
  60. //H: ء
  61. // Sukun
  62. //Y: ْ
  63. // all vowels/diphthongs in vocalized text
  64. // (fatha, damma, kasra, fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  65. .L01 َ ُ ِ َا َى ُو ِي يَ وَ ٰ
  66. // Short vowels in vocalized text
  67. // (fatha, damma, kasra)
  68. .L02 َ ُ ِ
  69. // Long vowels and diphthongs in vocalized text
  70. // (fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  71. .L03 َا َى ُو ِي يَ وَ ٰ
  72. // Implicit long vowels in UNvocalized text (alef, alef maksura, waw, yeh)
  73. .L04 ا ى و ي
  74. // all Arabic characters without short vowels and A
  75. .L05 ض ص ث ق ف غ ع ه خ ح ج ش س ي ب ل ت ن م ك ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ
  76. // group of digits
  77. .L06 0 1 2 3 4 5 6 7 8 9
  78. // all Arabic characters
  79. .L09 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ا ت ن م ك َ ُ ِ ّ آ ـ « » ظ ط ز ر ذ د ئ و ة ي ژ ؤ إ أ ء ؟ پ گ
  80. // Arabic Sun characters
  81. .L10 ض ص ث ش س ل ت ن ظ ط ز ر ذ د
  82. // Arabic Moon characters
  83. .L11 ق ف غ ع ه خ ح ج ي ب م ك و إ أ ء
  84. // Arabic diacritics
  85. .L20 ۡ ـ ً ٌ ٍ َ ُ ِ ّ ْ
  86. .group آ
  87. آ ?a:
  88. .group ا
  89. C) ا a: // if a consonant is before it, make the fatha long
  90. C) ا (C a:
  91. ا (َ ?
  92. ا (ُ ?
  93. ا (ِ ?
  94. _) ا a // make the previous fatha long
  95. _) ال (L10P2 ?a //الشمس
  96. _) ال (L11P2 ?al //القمر
  97. _) ال (تP2 ?at
  98. _) ال (ثP2 ?aT
  99. _) ال (دP2 ?ad
  100. _) ال (ذP2 ?aD
  101. _) ال (رP2 ?ar
  102. _) ال (زP2 ?az
  103. _) ال (سP2 ?as
  104. _) ال (شّP2 ?a
  105. _) ال (شP2 ?aS
  106. _) ال (صP2 ?as[
  107. _) ال (ضP2 ?adH
  108. _) ال (ظP2 ?aZ
  109. _) ال (لP2 ?al
  110. _) ال (نP2 ?an
  111. _ب) ا (ل i
  112. .group أ
  113. أ a
  114. .group إ
  115. إ ?i
  116. .group ب
  117. ب b
  118. ب (_ b
  119. بّ b:
  120. بْ b
  121. _) بال (L10P3 bi //بالشمس
  122. _) بال (L11P3 bil //بالقمر
  123. _) بال (تP3 bit
  124. _) بال (ثP3 biT
  125. _) بال (دP3 bid
  126. _) بال (ذP3 biD
  127. _) بال (رP3 bir
  128. _) بال (زP3 biz
  129. _) بال (سP3 bis
  130. _) بال (شP3 biS
  131. _) بال (صP3 bis[
  132. _) بال (ضP3 bidH
  133. _) بال (طP3 bit[
  134. _) بال (ظP3 biZ
  135. _) بال (لP3 bil
  136. _) بال (نP3 bin
  137. .group پ
  138. پ p
  139. .group ت
  140. ت t
  141. ت (_ t
  142. ت (L20ّ t:
  143. _) ت (َP1 t
  144. ت (ّ t:
  145. .group ث
  146. ث T
  147. .group ج
  148. ج dZ
  149. جّ dZ:
  150. .group ح
  151. ح H
  152. .group خ
  153. خ X
  154. .group د
  155. د d
  156. د (ّ d:
  157. د (L20ّ d:
  158. .group ذ
  159. ذ D
  160. .group ر
  161. ر r
  162. .group ز
  163. ز z
  164. .group س
  165. س s
  166. س (ّ s:
  167. س (L20ّ s:
  168. .group ش
  169. ش S
  170. ش (ّ S:
  171. ش (L20ّ S:
  172. .group ص
  173. ص s[
  174. صّ s[:
  175. .group ض
  176. ض dH
  177. .group ط
  178. ط t[
  179. .group ظ
  180. ظ Z
  181. .group ع
  182. ع A
  183. .group غ
  184. غ gH
  185. .group ف
  186. ف f
  187. ف (_ f
  188. فْ f
  189. _) فال (L10P3 fa //فالشمس
  190. _) فَال (L10P4 fa
  191. _) فَالْ (L10P4 fa
  192. _) فال (L11P3 fal //فالقمر
  193. _) فَال (L11P4 fa
  194. _) فَالْ (L11P4 fal
  195. _) فال (تP3 fat
  196. _) فال (ثP3 faT
  197. _) فال (دP3 fad
  198. _) فال (ذP3 faD
  199. _) فال (رP3 far
  200. _) فال (زP3 faz
  201. _) فال (سP3 fas
  202. _) فال (شP3 faS
  203. _) فال (صP3 fas[
  204. _) فال (ضP3 fadH
  205. _) فال (طP3 fat[
  206. _) فال (ظP3 faZ
  207. _) فال (لP3 fal
  208. _) فال (نP3 fan
  209. .group ق
  210. ق q
  211. .group ك
  212. ك k
  213. ك (_ k
  214. ك (ّ k:
  215. كْ k
  216. ك (L20ّ k:
  217. ك (_S1 ka // الضمير المتصل
  218. _) كال (L10P3 ka //كالشمس
  219. _) كَال (L10P4 ka
  220. _) كَالْ (L10P4 ka
  221. _) كال (L11P3 kal //كالقمر
  222. _) كَالْ (L11P4 kal
  223. _) كال (تP3 kat
  224. _) كال (ثP3 kaT
  225. _) كال (دP3 kad
  226. _) كال (ذP3 kaD
  227. _) كال (رP3 kar
  228. _) كال (زP3 kaz
  229. _) كال (سP3 kas
  230. _) كال (شP3 kaS
  231. _) كال (صP3 kas[
  232. _) كال (ضP3 kadH
  233. _) كال (طP3 kat[
  234. _) كال (ظP3 kaZ
  235. _) كال (لP3 kal
  236. _) كال (نP3 kan
  237. كما (_S3 kuma: //الضمير المتصل
  238. كن (_S2 kun:a //الضمير المتصل
  239. .group گ
  240. گ g
  241. .group ل
  242. ل l
  243. _ا) ل (L10 ' // Sun letters
  244. _بِا) ل (L10 ' // Sun letters
  245. _فَا) ل (L10 ' // Sun letters
  246. _كَا) ل (L10 ' // Sun letters
  247. ل (ّ l:
  248. ل (L20ّ l:
  249. _لِ) ل (L10 ' // Sun letters
  250. _وَا) ل (L10 ' // Sun letters
  251. .group م
  252. م m
  253. .group ن
  254. ن n
  255. ن (ب m
  256. نْ (ب m
  257. .group ه
  258. ه h
  259. هْ h
  260. ه (_S1 h // الضمير المتصل
  261. ها (_S2 ha: //الضمير المتصل
  262. هم (_S2 hum //الضمير المتصل
  263. هما (_S3 huma: //الضمير المتصل
  264. هن (_S2 hun:a //الضمير المتصل
  265. .group و
  266. و w
  267. C) و u: //واو بعد صامت دون تشكيل
  268. ا) و w //واو بعد الألف
  269. و (L01 w //واو بعدها حرف علة
  270. وْ w
  271. ْ) و w // واو بعد سكون
  272. َ) و w //واو بعد فتحة
  273. ِ) و w //واو بعد كسرة
  274. _) و w //واو في أول الكلمة
  275. وا (_S2 u
  276. وا (_S2 u: // فعل مع ضمائر الجمع المذكرة درسوا
  277. _) وال (L10P3 wa //والشمس
  278. _) وَال (L10P4 wa
  279. _) وَالْ (L10P4 wa
  280. _) وال (L11P3 wal //والقمر
  281. _) وَال (L11P4 wal
  282. _) وَالْ (L11P4 wal
  283. _) وال (تP3 wat
  284. _) وال (ثP3 waT
  285. _) وال (دP3 wad
  286. _) وال (ذP3 waD
  287. _) وال (رP3 war
  288. _) وال (زP3 waz
  289. _) وال (سP3 was
  290. _) وال (شP3 waS
  291. _) وال (صP3 was[
  292. _) وال (ضP3 wadH
  293. _) وال (طP3 wat[
  294. _) وال (ظP3 waZ
  295. _) وال (لP3 wal
  296. _) وال (نP3 wan
  297. ون (_S2 u:na //جمع مذكر سالم فلاحون
  298. .group ي
  299. C) ي i: // ياء بعد صامت دون تشكيل
  300. ا) ي j // ياء بعد ألف
  301. يِ ji:
  302. ْ) ي j //ياء بعد سكون
  303. ُ) ي j //ياء بعد ضمّة
  304. َ) ي j // ياء بعد فتحة
  305. _) ي j // ياء في أول الكلمة
  306. ي (L01 j //يا بعدها حروف علة
  307. ي (_S1 i
  308. يات (_S3 ij:a:t //يّة النسبة في جمع المؤنث جزائريات
  309. ية (_S2 ij:ah //يّة النسبة
  310. ين (_S2 i:na //جمع مذكر سالم منصوب أو مجرور
  311. يون (_S3 ij:u:n //kجمع مذكر سالم منسوب جزائريون
  312. يين (_S3 ij:i:n //kجمع مذكر سالم منسوب جزائريين
  313. .group ى //ألف مقصورة
  314. ى a
  315. C) ى (_ a:
  316. .group ء
  317. ء ?
  318. ء (ً ?an
  319. .group ئ
  320. ئ j?
  321. _) ئ ?j
  322. .group ؤ
  323. ؤ w?
  324. _) ؤ ?w
  325. .group ة
  326. ة t
  327. ةْ t
  328. ةً tan
  329. // Other diacritics
  330. .group
  331. َ %a // fatha
  332. C) ٓ ? // madda after consonant
  333. ِ i // kasra
  334. ٍ (_S1 in // kasratan at the end of word
  335. ٌ (_S1 un // dammatan at the end of word
  336. ُ u // damma
  337. ٰ a: // superscript alef
  338. َا a: // fatha+alef
  339. ًا (_S2 an // fathatan+alef at the end of word
  340. َو au // fatha+waw
  341. ُو u: // damma+waw
  342. َى a: // fatha+alef maksura
  343. َي ai // fatha+yeh
  344. ِي i: // kasra+yeh
  345. // Following are default rules for other diacritics and they are just silence.
  346. // Diacritics should be consumed together with leading letters in rules above.
  347. ٱ // alef wasla
  348. ٌ // dammatan
  349. ً // fathatan
  350. ٍ // kasratan
  351. ـ // tatweel
  352. ۡ // small high dotless head of khan
  353. ْ // sukun
  354. ّ // shadda
  355. // non-ascii characters with specified pronunciations
  356. // List the accented characters in en_list with the $accent attribute