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

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