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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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. ت (_ at
  130. ت (L20ّ t:
  131. _) ت (َP1 t
  132. ت (ّ t:
  133. تْ t
  134. تُ tu:
  135. تَw taw
  136. .group ث
  137. ث T
  138. .group ج
  139. ج dZ
  140. جّ dZdZ
  141. .group ح
  142. ح H
  143. .group خ
  144. خ X
  145. .group د
  146. د d
  147. د (ّ d:
  148. د (L20ّ d:
  149. .group ذ
  150. ذ D
  151. .group ر
  152. ر r
  153. .group ز
  154. ز z
  155. .group س
  156. س s
  157. س (ّ s:
  158. س (L20ّ s:
  159. .group ش
  160. ش S
  161. ش (ّ S:
  162. ش (L20ّ S:
  163. .group ص
  164. ص s[
  165. صّ s[s[
  166. .group ض
  167. ض dH
  168. .group ط
  169. ط t[
  170. .group ظ
  171. ظ Z
  172. .group ع
  173. ع A
  174. .group غ
  175. غ gH
  176. .group ف
  177. ف f
  178. ف (_ f
  179. فْ f
  180. _) فال (L10P3 fa //فالشمس
  181. _) فَال (L10P4 fa
  182. _) فَالْ (L10P4 fa
  183. _) فال (L11P3 fal //فالقمر
  184. _) فَال (L11P4 fa
  185. _) فَالْ (L11P4 fal
  186. _) فال (تP3 fat
  187. _) فال (ثP3 faT
  188. _) فال (دP3 fad
  189. _) فال (ذP3 faD
  190. _) فال (رP3 far
  191. _) فال (زP3 faz
  192. _) فال (سP3 fas
  193. _) فال (شP3 faS
  194. _) فال (صP3 fas[
  195. _) فال (ضP3 fadH
  196. _) فال (طP3 fat[
  197. _) فال (ظP3 faZ
  198. _) فال (لP3 fal
  199. _) فال (نP3 fan
  200. .group ق
  201. ق q
  202. .group ك
  203. ك k
  204. ك (_ k
  205. ك (ّ k:
  206. كْ k
  207. ك (L20ّ k:
  208. ك (_S1 ka // الضمير المتصل
  209. _) كال (L10P3 ka //كالشمس
  210. _) كَال (L10P4 ka
  211. _) كَالْ (L10P4 ka
  212. _) كال (L11P3 kal //كالقمر
  213. _) كَالْ (L11P4 kal
  214. _) كال (تP3 kat
  215. _) كال (ثP3 kaT
  216. _) كال (دP3 kad
  217. _) كال (ذP3 kaD
  218. _) كال (رP3 kar
  219. _) كال (زP3 kaz
  220. _) كال (سP3 kas
  221. _) كال (شP3 kaS
  222. _) كال (صP3 kas[
  223. _) كال (ضP3 kadH
  224. _) كال (طP3 kat[
  225. _) كال (ظP3 kaZ
  226. _) كال (لP3 kal
  227. _) كال (نP3 kan
  228. كما (_S3 kuma: //الضمير المتصل
  229. كن (_S2 kun:a //الضمير المتصل
  230. .group گ
  231. گ g
  232. .group ل
  233. ل l
  234. _ا) ل (L10 ' // Sun letters
  235. _بِا) ل (L10 ' // Sun letters
  236. _فَا) ل (L10 ' // Sun letters
  237. _كَا) ل (L10 ' // Sun letters
  238. ل (ّ l:
  239. ل (L20ّ l:
  240. _لِ) ل (L10 ' // Sun letters
  241. _وَا) ل (L10 ' // Sun letters
  242. .group م
  243. م m
  244. .group ن
  245. ن n
  246. ن (ب m
  247. نْ (ب m
  248. .group ه
  249. ه h
  250. ه (_ h
  251. هْ h
  252. ه (_S1 h // الضمير المتصل
  253. ها (_S2 ha: //الضمير المتصل
  254. هم (_S2 hum //الضمير المتصل
  255. هما (_S3 huma: //الضمير المتصل
  256. هن (_S2 hun:a //الضمير المتصل
  257. .group و
  258. و w
  259. C) و u: //واو بعد صامت دون تشكيل
  260. ا) و w //واو بعد الألف
  261. و (L01 w //واو بعدها حرف علة
  262. وْ w
  263. ْ) و w // واو بعد سكون
  264. َ) و w //واو بعد فتحة
  265. ِ) و w //واو بعد كسرة
  266. _) و w //واو في أول الكلمة
  267. وا (_S2 u
  268. وا (_S2 u: // فعل مع ضمائر الجمع المذكرة درسوا
  269. _) وال (L10P3 wa //والشمس
  270. _) وَال (L10P4 wa
  271. _) وَالْ (L10P4 wa
  272. _) وال (L11P3 wal //والقمر
  273. _) وَال (L11P4 wal
  274. _) وَالْ (L11P4 wal
  275. _) وال (تP3 wat
  276. _) وال (ثP3 waT
  277. _) وال (دP3 wad
  278. _) وال (ذP3 waD
  279. _) وال (رP3 war
  280. _) وال (زP3 waz
  281. _) وال (سP3 was
  282. _) وال (شP3 waS
  283. _) وال (صP3 was[
  284. _) وال (ضP3 wadH
  285. _) وال (طP3 wat[
  286. _) وال (ظP3 waZ
  287. _) وال (لP3 wal
  288. _) وال (نP3 wan
  289. ون (_S2 u:na //جمع مذكر سالم فلاحون
  290. .group ي
  291. C) ي i: // ياء بعد صامت دون تشكيل
  292. ا) ي j // ياء بعد ألف
  293. يِ ji:
  294. ْ) ي j //ياء بعد سكون
  295. ُ) ي j //ياء بعد ضمّة
  296. َ) ي j // ياء بعد فتحة
  297. _) ي j // ياء في أول الكلمة
  298. ي (L01 j //يا بعدها حروف علة
  299. ي (_S1 i
  300. يات (_S3 ij:a:t //يّة النسبة في جمع المؤنث جزائريات
  301. ية (_S2 ij:ah //يّة النسبة
  302. ين (_S2 i:na //جمع مذكر سالم منصوب أو مجرور
  303. يون (_S3 ij:u:n //kجمع مذكر سالم منسوب جزائريون
  304. يين (_S3 ij:i:n //kجمع مذكر سالم منسوب جزائريين
  305. .group ى //ألف مقصورة
  306. ى a
  307. C) ى (_ a:
  308. .group ء
  309. ء ?
  310. ء (ً ?an
  311. .group ئ
  312. ئ j?
  313. _) ئ ?j
  314. .group ؤ
  315. ؤ w?
  316. _) ؤ ?w
  317. .group ة
  318. ة t
  319. ةْ t
  320. ةً tan
  321. // Other diacritics
  322. .group
  323. َ %a // fatha
  324. C) ٓ ? // madda after consonant
  325. ِ i // kasra
  326. ٍ (_S1 in // kasratan at the end of word
  327. ٌ (_S1 un // dammatan at the end of word
  328. ُ u // damma
  329. ٰ a: // superscript alef
  330. َا a: // fatha+alef
  331. ًا (_S2 an // fathatan+alef at the end of word
  332. َو au // fatha+waw
  333. ُو u: // damma+waw
  334. َى a: // fatha+alef maksura
  335. َي ai // fatha+yeh
  336. ِي i: // kasra+yeh
  337. ِي i: // kasra+yeh
  338. // Following are default rules for other diacritics and they are just silence.
  339. // Diacritics should be consumed together with leading letters in rules above.
  340. ٌ // dammatan
  341. ً // fathatan
  342. ٍ // kasratan
  343. ـ // tatweel
  344. ۡ // small high dotless head of khan
  345. ْ // sukun
  346. ّ // shadda
  347. // non-ascii characters with specified pronunciations
  348. // List the accented characters in en_list with the $accent attribute