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

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