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

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