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 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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. // Multicharacters into single characters
  49. ٰٔ أ // Superscript alef with Hamza above > Alef with hamza above
  50. // Reorder diacritics in "canonical order"
  51. َّ َّ // Fatha Shadda > Shadda Fatha
  52. ِّ ِّ // Kasra Shadda > Shadda Kasra
  53. ّْ ّْ // Sukun Shadda > Shadda Sukun
  54. // Specific glyphs into standard symbols
  55. ٔ ء // Hamza above > Hamza
  56. ٕ ء // Hamza below > Hamza
  57. // Named letter groups:
  58. // list of short vowels
  59. // A: َ ُ ِ
  60. // list of consonants
  61. // C: ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه
  62. // Consonant/vowel letters
  63. // B: ا و ي
  64. // "Thick" letters
  65. // F: ص ض ط ظ ق
  66. // Shadda
  67. // G: ّ
  68. // Hamza
  69. // H: ء
  70. // Sukun
  71. // Y: ْ
  72. // all vowels/diphthongs in vocalized text
  73. // (fatha, damma, kasra, fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  74. .L01 َ ُ ِ َا َى ُو ِي يَ وَ ٰ
  75. // Long vowels and diphthongs in vocalized text
  76. // (fatha+alef, fatha+alef_maksura, damma+waw, kasra+yeh, yeh+fatha, waw+fatha, superscript alef)
  77. .L03 َا َى ُو ِي يَ وَ ٰ
  78. // Implicit long vowels in UNvocalized text (alef, alef maksura, waw, yeh)
  79. .L04 ا ى و ي
  80. // all Arabic characters without short vowels and A
  81. .L05 ض ص ث ق ف غ ع ه خ ح ج ش س ي ب ل ت ن م ك ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ
  82. // group of digits
  83. .L06 0 1 2 3 4 5 6 7 8 9
  84. // all Arabic characters
  85. .L09 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ا ت ن م ك َ ُ ِ ّ آ ـ « » ظ ط ز ر ذ د ئ و ة ي ژ ؤ إ أ ء ؟ پ گ
  86. // Arabic Sun characters
  87. .L10 ض ص ث ش س ل ت ن ظ ط ز ر ذ د
  88. // Arabic Moon characters
  89. .L11 ق ف غ ع ه خ ح ج ي ب م ك و إ أ ء
  90. // Arabic diacritics
  91. .L20 ۡ ـ ً ٌ ٍ َ ُ ِ ّ ْ
  92. // Non-thick consonants
  93. .L30 ب پ ت ة ث ج ح خ د ذ ر ز س ش ع غ ف ك ل م ن ئ ؤ ء أ آ إ ه
  94. .group آ
  95. آ ?a:
  96. .group ا
  97. ا a:
  98. L30) ا a:
  99. F) ا a.:
  100. L30) ا (C a:
  101. F) ا (C a.:
  102. ا (َ ?
  103. ا (ُ ?
  104. ا (ِ ?
  105. _) ا a // make the previous fatha long
  106. اء ? // Carried Hamza
  107. _) ال (L10P2 ?a //الشمس
  108. _) ال (L11P2 ?al //القمر
  109. _) ال (تP2 ?at
  110. _) ال (ثP2 ?aT
  111. _) ال (دP2 ?ad
  112. _) ال (ذP2 ?aD
  113. _) ال (رP2 ?ar
  114. _) ال (زP2 ?az
  115. _) ال (سP2 ?as
  116. _) ال (شّP2 ?a
  117. _) ال (شP2 ?aS
  118. _) ال (صP2 ?as[
  119. _) ال (ضP2 ?adH
  120. _) ال (ظP2 ?aZ
  121. _) ال (لP2 ?al
  122. _) ال (نP2 ?an
  123. _ب) ا (ل i
  124. .group أ
  125. أ ? // Carried Hamza
  126. .group إ
  127. إ ? // Carried Hamza
  128. .group ب
  129. ب b
  130. ب (_ b
  131. بّ b:
  132. بّْ b:
  133. بْ b
  134. _) بال (L10P3 bi //بالشمس
  135. _) بال (L11P3 bil //بالقمر
  136. _) بال (تP3 bit
  137. _) بال (ثP3 biT
  138. _) بال (دP3 bid
  139. _) بال (ذP3 biD
  140. _) بال (رP3 bir
  141. _) بال (زP3 biz
  142. _) بال (سP3 bis
  143. _) بال (شP3 biS
  144. _) بال (صP3 bis[
  145. _) بال (ضP3 bidH
  146. _) بال (طP3 bit[
  147. _) بال (ظP3 biZ
  148. _) بال (لP3 bil
  149. _) بال (نP3 bin
  150. .group پ
  151. پ p
  152. پ (_ p
  153. پّْ p:
  154. پْ p
  155. .group ت
  156. ت t
  157. _) ت (َP1 t
  158. ت (_ t
  159. تّ t:
  160. تّْ t:
  161. تْ t
  162. .group ث
  163. ث T
  164. ث (_ T
  165. ثّ T:
  166. ثّْ T:
  167. ثْ T
  168. .group ج
  169. ج dZ
  170. ج (_ dZ
  171. جّ dZ:
  172. جّْ dZ:
  173. جْ dZ
  174. .group ح
  175. ح H
  176. ح (_ H
  177. حّ H:
  178. حّْ H:
  179. حْ H
  180. .group خ
  181. خ X
  182. خ (_ X
  183. خّ X:
  184. خّْ X:
  185. خْ X
  186. .group د
  187. د d
  188. د (_ d
  189. دّ d:
  190. دّْ d:
  191. دْ d
  192. .group ذ
  193. ذ D
  194. ذ (_ D
  195. ذّ D:
  196. ذّْ D:
  197. ذْ D
  198. .group ر
  199. ر r
  200. ر (_ r
  201. رّ r:
  202. رّْ r:
  203. رْ r
  204. .group ز
  205. ز z
  206. ز (_ z
  207. زّ z:
  208. زّْ z:
  209. زْ z
  210. .group س
  211. س s
  212. س (_ s
  213. سّ s:
  214. سّْ s:
  215. سْ s
  216. .group ش
  217. ش S
  218. ش (_ S
  219. شّ S:
  220. شّْ S:
  221. شْ S
  222. .group ص
  223. ص s[
  224. ص (_ s[
  225. صّ s[:
  226. صّْ s[:
  227. صْ s[
  228. .group ض
  229. ض dH
  230. ض (_ dH
  231. ضّ dH:
  232. ضّْ dH:
  233. ضْ dH
  234. .group ط
  235. ط t[
  236. ط (_ t[
  237. طّ t[:
  238. طّْ t[:
  239. طْ t[
  240. .group ظ
  241. ظ Z
  242. ظ (_ Z
  243. ظّ Z:
  244. ظّْ Z:
  245. ظْ Z
  246. .group ع
  247. ع A
  248. ع (_ A
  249. عّ A:
  250. عّْ A:
  251. عْ A
  252. .group غ
  253. غ gH
  254. غ (_ gH
  255. غّ gH:
  256. غّْ gH:
  257. غْ gH
  258. .group ف
  259. ف f
  260. ف (_ f
  261. فّ f:
  262. فّْ f:
  263. فْ f
  264. _) فال (L10P3 fa //فالشمس
  265. _) فَال (L10P4 fa
  266. _) فَالْ (L10P4 fa
  267. _) فال (L11P3 fal //فالقمر
  268. _) فَال (L11P4 fa
  269. _) فَالْ (L11P4 fal
  270. _) فال (تP3 fat
  271. _) فال (ثP3 faT
  272. _) فال (دP3 fad
  273. _) فال (ذP3 faD
  274. _) فال (رP3 far
  275. _) فال (زP3 faz
  276. _) فال (سP3 fas
  277. _) فال (شP3 faS
  278. _) فال (صP3 fas[
  279. _) فال (ضP3 fadH
  280. _) فال (طP3 fat[
  281. _) فال (ظP3 faZ
  282. _) فال (لP3 fal
  283. _) فال (نP3 fan
  284. .group ق
  285. ق q
  286. ق (_ q
  287. قّ q:
  288. قّْ q:
  289. قْ q
  290. .group ك
  291. ك k
  292. ك (_ k
  293. كّ k:
  294. كّْ k:
  295. كْ k
  296. ك (_S1 ka // الضمير المتصل
  297. _) كال (L10P3 ka //كالشمس
  298. _) كَال (L10P4 ka
  299. _) كَالْ (L10P4 ka
  300. _) كال (L11P3 kal //كالقمر
  301. _) كَالْ (L11P4 kal
  302. _) كال (تP3 kat
  303. _) كال (ثP3 kaT
  304. _) كال (دP3 kad
  305. _) كال (ذP3 kaD
  306. _) كال (رP3 kar
  307. _) كال (زP3 kaz
  308. _) كال (سP3 kas
  309. _) كال (شP3 kaS
  310. _) كال (صP3 kas[
  311. _) كال (ضP3 kadH
  312. _) كال (طP3 kat[
  313. _) كال (ظP3 kaZ
  314. _) كال (لP3 kal
  315. _) كال (نP3 kan
  316. كما (_S3 k'uma: //الضمير المتصل
  317. كن (_S2 k'un:a //الضمير المتصل
  318. .group گ
  319. گ g
  320. گ (_ g
  321. گّ g:
  322. گّْ g:
  323. گْ g
  324. .group ل
  325. ل l
  326. _ا) ل (L10 ' // Sun letters
  327. _بِا) ل (L10 ' // Sun letters
  328. _فَا) ل (L10 ' // Sun letters
  329. _كَا) ل (L10 ' // Sun letters
  330. ل (_ l
  331. لّ l:
  332. لّْ l:
  333. لْ l
  334. _لِ) ل (L10 ' // Sun letters
  335. _وَا) ل (L10 ' // Sun letters
  336. .group م
  337. م m
  338. م (_ m
  339. مّ m:
  340. مّْ m:
  341. مْ m
  342. .group ن
  343. ن n
  344. ن (_ n
  345. نّ n:
  346. نّْ n:
  347. نْ n
  348. ن (ب m
  349. نْ (ب m
  350. .group ه
  351. ه h
  352. ه (_ h
  353. هّ h:
  354. هّْ h:
  355. هْ h
  356. ه (_S1 h // الضمير المتصل
  357. ها (_S2 ha: //الضمير المتصل
  358. هم (_S2 hum //الضمير المتصل
  359. هما (_S3 h'uma: //الضمير المتصل
  360. هن (_S2 h'un:a //الضمير المتصل
  361. .group و
  362. و w
  363. L30) و u:
  364. F) و u.:
  365. ا) و w //واو بعد الألف
  366. و (A w //واو بعدها حرف علة
  367. و (_ w
  368. وّ w:
  369. وّْ w
  370. وْ w
  371. ْ) و w // واو بعد سكون
  372. َ) و w //واو بعد فتحة
  373. _) و w //واو في أول الكلمة
  374. وء ? // Carried Hamza
  375. وا (_S2 u
  376. وا (_S2 u: // فعل مع ضمائر الجمع المذكرة درسوا
  377. _) وال (L10P3 wa //والشمس
  378. _) وَال (L10P4 wa
  379. _) وَالْ (L10P4 wa
  380. _) وال (L11P3 wal //والقمر
  381. _) وَال (L11P4 wal
  382. _) وَالْ (L11P4 wal
  383. _) وال (تP3 wat
  384. _) وال (ثP3 waT
  385. _) وال (دP3 wad
  386. _) وال (ذP3 waD
  387. _) وال (رP3 war
  388. _) وال (زP3 waz
  389. _) وال (سP3 was
  390. _) وال (شP3 waS
  391. _) وال (صP3 was[
  392. _) وال (ضP3 wadH
  393. _) وال (طP3 wat[
  394. _) وال (ظP3 waZ
  395. _) وال (لP3 wal
  396. _) وال (نP3 wan
  397. ون (_S2 'u:na //جمع مذكر سالم فلاحون
  398. .group ي
  399. ي i
  400. L30) ي i:
  401. F) ي i.:
  402. ا) ي j // ياء بعد ألف
  403. يّ i:
  404. يْ j
  405. يِ ji:
  406. ْ) ي j //ياء بعد سكون
  407. َ) ي j // ياء بعد فتحة
  408. _) ي j // ياء في أول الكلمة
  409. ي (L01 j //يا بعدها حروف علة
  410. ي (_S1 i
  411. يء ? // Carried Hamza
  412. يات (_S3 'ij:a:t //يّة النسبة في جمع المؤنث جزائريات
  413. ية (_S2 'ij:ah //يّة النسبة
  414. ين (_S2 'i:na //جمع مذكر سالم منصوب أو مجرور
  415. يون (_S3 'ij:u:n //kجمع مذكر سالم منسوب جزائريون
  416. يين (_S3 'ij:i:n //kجمع مذكر سالم منسوب جزائريين
  417. .group ى //ألف مقصورة
  418. ى a
  419. L30) ى (_ a:
  420. F) ى (_ a.:
  421. ىّ a:
  422. ىْ a
  423. .group ء
  424. ء ?
  425. ء (ً ?an
  426. .group ئ
  427. ئ ? // Carried Hamza
  428. .group ؤ
  429. ؤ ? // Carried Hamza
  430. .group ة
  431. ة t
  432. ة (_ t
  433. ةّ t:
  434. ةْ t
  435. ةً tan
  436. // Other diacritics
  437. .group
  438. َ a // fatha
  439. F) َ a. // fatha after thick consonant
  440. َ (C_ =a // fatha in closed syllable
  441. F) َ (C_ =a.
  442. َ (CC_ =a
  443. F) َ (CC_ =a.
  444. C) ٓ ? // madda after consonant
  445. ِ i // kasra
  446. F) ِ i. // kasra after thick consonant
  447. ِ (C_ =i // kasra in closed syllable
  448. F) ِ (C_ =i.
  449. ِ (CC_ =i
  450. F) ِ (CC_ =i.
  451. ٍ (_S1 in // kasratan at the end of word
  452. ٌ (_S1 un // dammatan at the end of word
  453. ُ u // damma
  454. F) ُ u. // damma after thick consonant
  455. ُ (C_ =u // damma in closed syllable
  456. F) ُ (C_ =u.
  457. ُ (CC_ =u
  458. F) ُ (CC_ =u.
  459. ٰ a: // superscript alef
  460. F) ٰ a.: // superscript alef after thick consonant
  461. َا a: // fatha+alef
  462. F) َا a.: // fatha+alef after thick consonant
  463. ًا (_S2 an // fathatan+alef at the end of word
  464. F) ًا (_S2 a.n // fathatan+alef at the end of word after thick consonant
  465. َو au // fatha+waw
  466. F) َو a.u // fatha+waw after thick consonant
  467. ِو iw // kasra+waw
  468. F) ِو i.w // kasra+waw after thick consonant
  469. ُو u: // damma+waw
  470. F) ُو u.: // damma+waw after thick consonant
  471. َى a: // fatha+alef maksura
  472. F) َى a.: // fatha+alef maksura after thick consonant
  473. َي ai // fatha+yeh
  474. F) َي a.i // fatha+yeh after thick consonant
  475. ِي i: // kasra+yeh
  476. F) ِي i.: // kasra+yeh after thick consonant
  477. ُي ui // damma+yeh
  478. F) ُي u.i // damma+yeh after thick consonant
  479. ّ : // shadda
  480. // Following are default rules for other diacritics and they are just silence.
  481. // Diacritics should be consumed together with leading letters in rules above.
  482. ٱ // alef wasla
  483. ٌ // dammatan
  484. ً // fathatan
  485. ٍ // kasratan
  486. ـ // tatweel
  487. ۡ // small high dotless head of khan
  488. ْ // sukun
  489. // non-ascii characters with specified pronunciations
  490. // List the accented characters in en_list with the $accent attribute