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

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