From 16c21d67fc22ef641883fcf90e49eb33181367af Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 15:39:50 +0300 Subject: [PATCH 01/18] ar: patch arabic ZAH phoneme --- phsource/ph_arabic | 4 +--- tests/language-phonemes.test | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/phsource/ph_arabic b/phsource/ph_arabic index c643d3af..e68cc851 100644 --- a/phsource/ph_arabic +++ b/phsource/ph_arabic @@ -15,9 +15,7 @@ phoneme Z // arabic ZAH .Todo ipa ðˤ lengthmod 5 voicingswitch z - Vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70 - Vowelout f1=1 f2=2700 400 600 f3=200 70 rate - WAV(vwl_ar/zah) + ChangePhoneme (D) // FIXME: vwl_ar/zah wav file is wrong, therefore English D is used endphoneme phoneme A // arabic Ain diff --git a/tests/language-phonemes.test b/tests/language-phonemes.test index 49350b69..436a28f3 100755 --- a/tests/language-phonemes.test +++ b/tests/language-phonemes.test @@ -36,7 +36,7 @@ test_lang() { test_lang af c71ab424d045d9fa82d2a23b9be4542aee3ed15e "ma na Na pa ta ka tSa ba da ga dZa fa sa x2a Sa va za Za ca la ja ra r/a _:_ m@ ma mE mI mO mW mu m& m&: m@L mA: me@ mi mo@ my miu m@U maI mAI meI mOI moI muI mYy mY@ maU me: mO: m3: mA~ me~ mo~" test_lang am 4fcdb9bb68b72c06e4cadf91b2c1e244ea14ac21 "ma na Na pa ta ka ?a ba da ga p\`a t\`a k\`a tSa dZa tS\`a Ba sa za Sa Za xa ha la ja wa ra _:_ mi me my ma m@ mo mu" test_lang an 33304ad847d920652c74e1c51d12bbe6de9a182d "ma na Na pa ta tSa ka ba da ga fa Ta sa Sa ja wa la l^a ra Ra _:_ ma ma/ me me/ mi mo mo/ mu" -test_lang ar a67110f62981c0668bdbeb44feec7b3268a38353 "ma na pa ta ka qa ?a ba da dHa fa va Ta Da s[a sa za Sa Za xa Xa gHa Ha Aa dZa ra la l/2a ja wa _:_ ma mi mu ma: mi: mu: maw maj" +test_lang ar 2c4b5b792f755d18667b7891505dc2e264703c05 "ma na pa ta ka qa ?a ba da dHa fa va Ta Da s[a sa za Sa Za xa Xa gHa Ha Aa dZa ra la l/2a ja wa _:_ ma mi mu ma: mi: mu: maw maj" test_lang as 05d4cca91fc3447ae8b6acd7892790dd364e8e23 "ma na Na pa ta ka p#a t#a k#a ba da ga b#a d#a g#a sa xa Xa ha tSa tS#a za wa ra ja la _:_ ma mi mu me m& mo mO mV ma~ mi~ mu~ me~ m&~ mo~ mO~ moj mo~j mow mo~w mew maV m@" test_lang az 7bdb78c37433a47fb3b15808071b1a916202400c "ma na pa ba ta da tSa dZa tsa dza ca Ja Ca ka ga fa va sa za Sa Za xa Qa ha la ja wa Ra *a _:_ mi me m& my mW mu mo ma m@" test_lang bg 3020acb23ac0f93d5479de3b305b71fc07b5e738 "ma na n^a Na m;a pa ba ta da ka ga p;a b;a t;a d;a ca Ja tsa dza tSa dZa ts;a dz;a fa va sa za Sa Za xa Qa f;a v;a s;a z;a x;a Ra R;a wa ja l/2a la l^a _:_ mi me m@ ma mo mu" From 98fe60d72cff8442b2d7b3f63b5673939885c97f Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 15:43:04 +0300 Subject: [PATCH 02/18] ar: remove custom voice settings as they are not better than default --- espeak-ng-data/lang/sem/ar | 18 ------------------ tests/language-phonemes.test | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/espeak-ng-data/lang/sem/ar b/espeak-ng-data/lang/sem/ar index d30b3360..7b07e30e 100644 --- a/espeak-ng-data/lang/sem/ar +++ b/espeak-ng-data/lang/sem/ar @@ -1,21 +1,3 @@ name Arabic language ar phonemes ar -pitch 160 120 -roughness 0 -speed 70 - -formant 0 105 80 150 -formant 1 110 80 160 -formant 2 110 70 150 -formant 3 110 70 150 -formant 4 115 80 200 -formant 5 115 80 100 -formant 6 110 70 150 -formant 7 110 70 100 -formant 8 110 70 150 - -stressAdd 0 0 -10 -10 0 0 10 40 -echo 20 10 -voicing 75 -consonants 150 150 diff --git a/tests/language-phonemes.test b/tests/language-phonemes.test index 436a28f3..d76ae54d 100755 --- a/tests/language-phonemes.test +++ b/tests/language-phonemes.test @@ -36,7 +36,7 @@ test_lang() { test_lang af c71ab424d045d9fa82d2a23b9be4542aee3ed15e "ma na Na pa ta ka tSa ba da ga dZa fa sa x2a Sa va za Za ca la ja ra r/a _:_ m@ ma mE mI mO mW mu m& m&: m@L mA: me@ mi mo@ my miu m@U maI mAI meI mOI moI muI mYy mY@ maU me: mO: m3: mA~ me~ mo~" test_lang am 4fcdb9bb68b72c06e4cadf91b2c1e244ea14ac21 "ma na Na pa ta ka ?a ba da ga p\`a t\`a k\`a tSa dZa tS\`a Ba sa za Sa Za xa ha la ja wa ra _:_ mi me my ma m@ mo mu" test_lang an 33304ad847d920652c74e1c51d12bbe6de9a182d "ma na Na pa ta tSa ka ba da ga fa Ta sa Sa ja wa la l^a ra Ra _:_ ma ma/ me me/ mi mo mo/ mu" -test_lang ar 2c4b5b792f755d18667b7891505dc2e264703c05 "ma na pa ta ka qa ?a ba da dHa fa va Ta Da s[a sa za Sa Za xa Xa gHa Ha Aa dZa ra la l/2a ja wa _:_ ma mi mu ma: mi: mu: maw maj" +test_lang ar 0f289933c1898c03151c3b2546116399a642f4c7 "ma na pa ta ka qa ?a ba da dHa fa va Ta Da s[a sa za Sa Za xa Xa gHa Ha Aa dZa ra la l/2a ja wa _:_ ma mi mu ma: mi: mu: maw maj" test_lang as 05d4cca91fc3447ae8b6acd7892790dd364e8e23 "ma na Na pa ta ka p#a t#a k#a ba da ga b#a d#a g#a sa xa Xa ha tSa tS#a za wa ra ja la _:_ ma mi mu me m& mo mO mV ma~ mi~ mu~ me~ m&~ mo~ mO~ moj mo~j mow mo~w mew maV m@" test_lang az 7bdb78c37433a47fb3b15808071b1a916202400c "ma na pa ba ta da tSa dZa tsa dza ca Ja Ca ka ga fa va sa za Sa Za xa Qa ha la ja wa Ra *a _:_ mi me m& my mW mu mo ma m@" test_lang bg 3020acb23ac0f93d5479de3b305b71fc07b5e738 "ma na n^a Na m;a pa ba ta da ka ga p;a b;a t;a d;a ca Ja tsa dza tSa dZa ts;a dz;a fa va sa za Sa Za xa Qa f;a v;a s;a z;a x;a Ra R;a wa ja l/2a la l^a _:_ mi me m@ ma mo mu" From bae4b8c1c17d9c7837ebd8d09a3ffbf216367898 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 16:05:20 +0300 Subject: [PATCH 03/18] ar: format and sort rules --- dictsource/ar_rules | 876 +++++++++++++++++++------------------------- 1 file changed, 383 insertions(+), 493 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index 397c3ec5..58f68b86 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -1,493 +1,383 @@ -// * Arabic Language ar ar_rules -// * This file writen by Taha Zerrouki 2012 -//********* -// * This program is free software; you can redistribute it and/or modify * -// * it under the terms of the GNU General Public License as published by * -// * the Free Software Foundation; either version 3 of the License, or * -// * (at your option) any later version. * -// * * -// * This program is distributed in the hope that it will be useful, * -// * but WITHOUT ANY WARRANTY; without even the implied warranty of * -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -// * GNU General Public License for more details. * -// * * -// * You should have received a copy of the GNU General Public License * -// * along with this program; if not, see: * -// * . * -// ***************************************************************************/ - -// This file is UTF-8 encoded -// all words must be LOWER CASE (although the initial letter will be automatically -// converted if it's a 7bit ascii character) -// Text to phoneme rules for Arabic - -// replace Arabic eastern character numbers with Arabic western character numbers -.replace - ٠ 0 - ۰ 0 - ۱ 1 - ١ 1 - ٢ 2 - ۲ 2 - ٣ 3 - ۳ 3 - ٤ 4 - ۴ 4 - ٥ 5 - ۵ 5 - ٦ 6 - ۶ 6 - ٧ 7 - ۷ 7 - ٨ 8 - ۸ 8 - ٩ 9 - ۹ 9 - ئ ء //توحيد شكل الهمزة - ؤ ء - إ ءِ - أ ء - ـ //حذف التطويل - -//all vowels -.A ا ي و َ ُ ِ ً ٌ ٍ ّ ى - -//list of consonants -.C ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه - -//all vowels -.L01 ا ي و َ ُ ِ ً ٌ ٍ ّ ى - -//short vowels (commonly unwritten ) -.L02 َ ُ ِ ً ٌ ٍ - -//list of consonants -.L03 ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه - -// all Arabic characters without ا آ -.L04 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ت ن م ك َ ُ ِ ّ ـ « » ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ - -// all Arabic characters without short vowels and A -.L05 ض ص ث ق ف غ ع ه خ ح ج ش س ي ب ل ت ن م ك ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ - -// group of digits -.L06 0 1 2 3 4 5 6 7 8 9 - -// all Arabic characters -.L09 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ا ت ن م ك َ ُ ِ ّ آ ـ « » ظ ط ز ر ذ د ئ و ة ي ژ ؤ إ أ ء ؟ پ گ - - -// Arabic Sun characters -.L10 ض ص ث ش س ل ت ن ظ ط ز ر ذ د - -// Arabic Moon characters -.L11 ق ف غ ع ه خ ح ج ي ب م ك و إ أ ء - - -//.group - - - -.group آ - آ ?aa - -.group ا - _) ا a // make the previous fatha long - //ا aa - L03) ا aa // if a consonant is before it, make the fatha long -// ا (_ aa - ا (ُ ? - ا (ِ ? - ا (َ ? -// اً ' //ألف بعده تنوين نصب - -// ا (ًS2 //a ألف بعده تنوين نصب -// السوابق قبل ال - _ب) ا (ل i - //_و) ا (ل a - //_ف) ا (ل a - //_ك) ا (ل a - L03) ا (L03 aa - _) ال (L10ّP2 ?a //الشمس - _) ال (L11P2 ?al //القمر - // ات (_S2 aat //جمع مؤنث سالم -//الحروف الشمسية - // ال التعريف مع حرف شمسي -//25/05 - _) ال (لP2 ?al - _) ال (نP2 ?an - _) ال (ثP2 ?aT - _) ال (تP2 ?at - _) ال (دP2 ?ad - _) ال (رP2 ?ar - _) ال (ذP2 ?aD - _) ال (سP2 ?as - _) ال (زP2 ?az - _) ال (صP2 ?as[ - _) ال (شP2 ?aS - _) ال (شّP2 ?a - //_) ال (طP2 ?at[ - _) ال (ضP2 ?adH - _) ال (ظP2 ?aZ - - -.group ب - ب b - ب (ّ Bb - // _) ب (P1 bi //بشمس - //_) ب (ال bi //حرف الجر باء قبل ال التعريف - _) بال (L10P3 bi //بالشمس - _) بال (L11P3 bil //بالقمر -//الحروف الشمسية - // ال التعريف مع حرف شمسي - _) بال (لP3 bil - _) بال (نP3 bin - _) بال (ثP3 biT - _) بال (تP3 bit - _) بال (دP3 bid - _) بال (رP3 bir - _) بال (ذP3 biD - _) بال (سP3 bis - _) بال (زP3 biz - _) بال (صP3 bis[ - _) بال (شP3 biS - _) بال (طP3 bit[ - _) بال (ضP3 bidH - _) بال (ظP3 biZ - -.group پ - پ p - -.group ت - ت t - ت (ّ tt - _) ت (َP1 t - _) ت (P1 ta //تسأل - _َ) ت (P2 t - ت (_S1 at //سألت - -.group ث - ث T - -.group ج - ج dZ - ج (ّ dZdZ - -.group ح - ح H - - -.group خ - خ X - -.group د - د d - د (ّ dd - -.group ذ - ذ D - -.group ر - ر r - -.group ز - ز z - - - -.group س - س s - س (ّ ss - -.group ش - ش S - ش (ّ SS - - -.group ص - ص s[ - ص (ّ s[s[ - - -.group ض - ض dH - // ض (ّ dHdH - -.group ط - ط t[ - - -.group ظ - ظ Z - -.group ع - ع A - - - -.group غ -// غ R2 - غ gH - - - -.group ف - ف f - _) فال (L10P3 fa //فالشمس - _) فَالْ (L10P4 fa - _) فَال (L10P4 fa - _) فال (L11P3 fal //فالقمر - _) فَال (L11P4 fa - _) فَالْ (L11P4 fal -//الحروف الشمسية - // ال التعريف مع حرف شمسي - _) فال (لP3 fal - _) فال (نP3 fan - _) فال (ثP3 faT - _) فال (تP3 fat - _) فال (دP3 fad - _) فال (رP3 far - _) فال (ذP3 faD - _) فال (سP3 fas - _) فال (زP3 faz - _) فال (صP3 fas[ - _) فال (شP3 faS - _) فال (طP3 fat[ - _) فال (ضP3 fadH - _) فال (ظP3 faZ - - -.group ق - ق q - //ق (ّ qq - - -.group ك - ك k - //ك (ّ kk - _) كال (L10P3 ka //كالشمس - _) كَالْ (L10P4 ka - _) كَال (L10P4 ka - _) كال (L11P3 kal //كالقمر - _) كَالْ (L11P4 kal - ك (_S1 ka // الضمير المتصل - كم (_S2 kum //الضمير المتصل - كما (_S3 kumaa //الضمير المتصل - كن (_S2 kunna //الضمير المتصل -//الحروف الشمسية - // ال التعريف مع حرف شمسي - _) كال (لP3 kal - _) كال (نP3 kan - _) كال (ثP3 kaT - _) كال (تP3 kat - _) كال (دP3 kad - _) كال (رP3 kar - _) كال (ذP3 kaD - _) كال (سP3 kas - _) كال (زP3 kaz - _) كال (صP3 kas[ - _) كال (شP3 kaS - _) كال (طP3 kat[ - _) كال (ضP3 kadH - _) كال (ظP3 kaZ - - - -.group گ - گ g - - -.group ل - ل l - ل (ّ ll - _ا) ل (L10 ' // Sun letters - _بِا) ل (L10 ' // Sun letters - _وَا) ل (L10 ' // Sun letters - _فَا) ل (L10 ' // Sun letters - _كَا) ل (L10 ' // Sun letters - _لِ) ل (L10 ' // Sun letters - // _) لل (L10P2 li //للشمس - // _) لل (L11P2 lil //للقمر - -//الحروف الشمسية - // ال التعريف مع حرف شمسي - // _) لل (لP2 lil - // _) لل (نP2 lin - // _) لل (ثP2 liT - // _) لل (تP2 lit - // _) لل (دP2 lid - // _) لل (رP2 lir - // _) لل (ذP2 liD - // _) لل (سP2 lis - // _) لل (زP2 liz - // _) لل (صP2 lis[ - // _) لل (شP2 liS - // _) لل (طP2 lit[ - // _) لل (ضP2 lidH - // _) لل (ظP2 liZ - -.group م - م m - - - -.group ن - ن n - ن (ب m - ن (ْب m - -.group ه - ه h - ه (_S1 h // الضمير المتصل - ها (_S2 haa //الضمير المتصل - هم (_S2 hum //الضمير المتصل - هما (_S3 humaa //الضمير المتصل - هن (_S2 hunna //الضمير المتصل - - - -.group و - _) و w //واو في أول الكلمة - ا) و w //واو بعد الألف - ْ) و w // واو بعد سكون - َ) و w //واو بعد فتحة - ِ) و w //واو بعد كسرة - و (L01 w //واو بعدها حرف علة - // ُ) و : // make the prevuous damma long - L03) و uu //واو بعد صامت دون تشكيل - _) وال (L10P3 wa //والشمس - _) وَالْ (L10P4 wa - _) وَال (L10P4 wa - _) وال (L11P3 wal //والقمر - _) وَالْ (L11P4 wal - _) وَال (L11P4 wal - ون (_S2 uuna //جمع مذكر سالم فلاحون - وا (_S2 uu // فعل مع ضمائر الجمع المذكرة درسوا - ُ) وا (_S2 u -//الحروف الشمسية - // ال التعريف مع حرف شمسي - _) وال (لP3 wal - _) وال (نP3 wan - _) وال (ثP3 waT - _) وال (تP3 wat - _) وال (دP3 wad - _) وال (رP3 war - _) وال (ذP3 waD - _) وال (سP3 was - _) وال (زP3 waz - _) وال (صP3 was[ - _) وال (شP3 waS - _) وال (طP3 wat[ - _) وال (ضP3 wadH - _) وال (ظP3 waZ - - - -.group ي - _) ي j ياء في أول الكلمة - ا) ي j // ياء بعد ألف - ْ) ي j //ياء بعد سكون - َ) ي j // ياء بعد فتحة - ُ) ي j //ياء بعد ضمّة - ي (L01 j //يا بعدها حروف علة - // ِ) ي %: // make the previous kasra long - L03) ي ii // ياء بعد صامت دون تشكيل - ية (_S2 ijjah //يّة النسبة - يون (_S3 ijjuun //kجمع مذكر سالم منسوب جزائريون - يين (_S3 ijjiin //kجمع مذكر سالم منسوب جزائريين - يات (_S3 ijjaat //يّة النسبة في جمع المؤنث جزائريات - ين (_S2 iina //جمع مذكر سالم منصوب أو مجرور - ي (_S1 ii //ياء النسبة - ِ)ي (_S1 i - - - -.group ى //ألف مقصورة - L03) ى (_ aa - ى a - // َ) ى aa - -.group ء - ء ? - ء (ً ?an -.group ّ - ّ - // L03) ّ %% // - //b) ّ bb -.group ئ - ئ ? - -.group ؤ - ؤ ? - -.group ة - ة t - ةً tan -// ة (L02 t // التاء المربوطة مشكولة -// ة (_S1 h //التاء المربوطة غير مشكولة -// L05) ة (_S1 ah //بوطة ما قبلها صامت، يضاف إليه فتحة -// L05) ة (L02 at //تاء بعدها حركة وقبلها صامت -// L02) ة (_S1 h // التاء المربوطة غير مشكولة وماقبلها مشكول -// ة (L02 t // التاء المربوطة مشكولة -// ة t // التاء المربوطة مشكولة -//vowels that are not usually written: - - -.group ْ - ْ - -.group َ - َ %a - َ(ا aa // make the previous fatha long - - -.group ِ - ِ i - ِ(ي ii // make the previous kassra long - // ِ (_S1 i // e - - -.group ُ - ُ u - ُ(و uu // make the previous kassra long - // ُ (_S1 u // o - -.group ٌ // dammatan - ٌ (_S1 un - ٌ ' - -.group ً // fatahatan - - ًا (S1 an - - -.group ٍ // kasratan - ٍ (_S1 in - ٍ ' - -.group أ -// أ ? - -.group إ - //إ (ِ ?i - إ ?i - - -.group ـ - ـ ' - -.group ، -، || - -.group ؛ -؛ - -//characters and numbers and words with English alphabet is translated by English phonemes - - -// default group for "non of the above" - -.group - -// non-ascii characters with specified pronunciations -// List the accented characters in en_list with the $accent attribute +// * Arabic Language ar ar_rules +// * This file writen by Taha Zerrouki 2012 +// *************************************************************************** +// * This program is free software; you can redistribute it and/or modify * +// * it under the terms of the GNU General Public License as published by * +// * the Free Software Foundation; either version 3 of the License, or * +// * (at your option) any later version. * +// * * +// * This program is distributed in the hope that it will be useful, * +// * but WITHOUT ANY WARRANTY; without even the implied warranty of * +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +// * GNU General Public License for more details. * +// * * +// * You should have received a copy of the GNU General Public License * +// * along with this program; if not, see: * +// * . * +// ***************************************************************************/ +// +// This file is UTF-8 encoded +// all words must be LOWER CASE (although the initial letter will be automatically +// converted if it's a 7bit ascii character) +// Text to phoneme rules for Arabic +// +// replace Arabic eastern character numbers with Arabic western character numbers +.replace + ٠ 0 + ۰ 0 + ۱ 1 + ١ 1 + ٢ 2 + ۲ 2 + ٣ 3 + ۳ 3 + ٤ 4 + ۴ 4 + ٥ 5 + ۵ 5 + ٦ 6 + ۶ 6 + ٧ 7 + ۷ 7 + ٨ 8 + ۸ 8 + ٩ 9 + ۹ 9 + ئ يء // توحيد شكل الهمزة + ؤ ۄء + إ اءِ + أ اء + ـ // حذف التطويل + +//all vowels +.A ا ي و َ ُ ِ ً ٌ ٍ ّ ى + +//list of consonants +.C ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه + +//all vowels +.L01 ا ي و َ ُ ِ ً ٌ ٍ ّ ى + +//short vowels (commonly unwritten ) +.L02 + +//list of consonants +.L03 ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه + +// all Arabic characters without ا آ +.L04 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ت ن م ك َ ُ ِ ّ ـ « » ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ + +// all Arabic characters without short vowels and A +.L05 ض ص ث ق ف غ ع ه خ ح ج ش س ي ب ل ت ن م ك ظ ط ز ر ذ د ئ و ة ي ؤ إ أ ء پ گ + +// group of digits +.L06 0 1 2 3 4 5 6 7 8 9 + +// all Arabic characters +.L09 ض ص ث ق ف غ ع ه خ ح ج ً ٌ ٍ ، ؛ ش س ي ب ل ا ت ن م ك َ ُ ِ ّ آ ـ « » ظ ط ز ر ذ د ئ و ة ي ژ ؤ إ أ ء ؟ پ گ + +// Arabic Sun characters +.L10 ض ص ث ش س ل ت ن ظ ط ز ر ذ د + +// Arabic Moon characters +.L11 ق ف غ ع ه خ ح ج ي ب م ك و إ أ ء + +.group آ + آ ?aa + +.group ا + L03) ا aa // if a consonant is before it, make the fatha long + L03) ا (L03 aa + ا (َ ? + ا (ُ ? + ا (ِ ? + _) ا a // make the previous fatha long + _) ال (L10ّP2 ?a //الشمس + _) ال (L11P2 ?al //القمر + _) ال (تP2 ?at + _) ال (ثP2 ?aT + _) ال (دP2 ?ad + _) ال (ذP2 ?aD + _) ال (رP2 ?ar + _) ال (زP2 ?az + _) ال (سP2 ?as + _) ال (شّP2 ?a + _) ال (شP2 ?aS + _) ال (صP2 ?as[ + _) ال (ضP2 ?adH + _) ال (ظP2 ?aZ + _) ال (لP2 ?al + _) ال (نP2 ?an + _ب) ا (ل i + +.group ب + ب b + ب (ّ Bb + _) بال (L10P3 bi //بالشمس + _) بال (L11P3 bil //بالقمر + _) بال (تP3 bit + _) بال (ثP3 biT + _) بال (دP3 bid + _) بال (ذP3 biD + _) بال (رP3 bir + _) بال (زP3 biz + _) بال (سP3 bis + _) بال (شP3 biS + _) بال (صP3 bis[ + _) بال (ضP3 bidH + _) بال (طP3 bit[ + _) بال (ظP3 biZ + _) بال (لP3 bil + _) بال (نP3 bin + +.group پ + پ p + +.group ت + ت t + _) ت (َP1 t + _) ت (P1 ta //تسأل + _َ) ت (P2 t + ت (_S1 at //سألت + ت (ّ tt + +.group ث + ث T + +.group ج + ج dZ + ج (ّ dZdZ + +.group ح + ح H + +.group خ + خ X + +.group د + د d + د (ّ dd + +.group ذ + ذ D + +.group ر + ر r + +.group ز + ز z + +.group س + س s + س (ّ ss + +.group ش + ش S + ش (ّ SS + +.group ص + ص s[ + ص (ّ s[s[ + +.group ض + ض dH + +.group ط + ط t[ + +.group ظ + ظ Z + +.group ع + ع A + +.group غ + غ gH + +.group ف + ف f + _) فال (L10P3 fa //فالشمس + _) فَال (L10P4 fa + _) فَالْ (L10P4 fa + _) فال (L11P3 fal //فالقمر + _) فَال (L11P4 fa + _) فَالْ (L11P4 fal + _) فال (تP3 fat + _) فال (ثP3 faT + _) فال (دP3 fad + _) فال (ذP3 faD + _) فال (رP3 far + _) فال (زP3 faz + _) فال (سP3 fas + _) فال (شP3 faS + _) فال (صP3 fas[ + _) فال (ضP3 fadH + _) فال (طP3 fat[ + _) فال (ظP3 faZ + _) فال (لP3 fal + _) فال (نP3 fan + +.group ق + ق q + +.group ك + ك k + ك (_S1 ka // الضمير المتصل + _) كال (L10P3 ka //كالشمس + _) كَال (L10P4 ka + _) كَالْ (L10P4 ka + _) كال (L11P3 kal //كالقمر + _) كَالْ (L11P4 kal + _) كال (تP3 kat + _) كال (ثP3 kaT + _) كال (دP3 kad + _) كال (ذP3 kaD + _) كال (رP3 kar + _) كال (زP3 kaz + _) كال (سP3 kas + _) كال (شP3 kaS + _) كال (صP3 kas[ + _) كال (ضP3 kadH + _) كال (طP3 kat[ + _) كال (ظP3 kaZ + _) كال (لP3 kal + _) كال (نP3 kan + كم (_S2 kum //الضمير المتصل + كما (_S3 kumaa //الضمير المتصل + كن (_S2 kunna //الضمير المتصل + +.group گ + گ g + +.group ل + ل l + _ا) ل (L10 ' // Sun letters + _بِا) ل (L10 ' // Sun letters + _فَا) ل (L10 ' // Sun letters + _كَا) ل (L10 ' // Sun letters + ل (ّ ll + _لِ) ل (L10 ' // Sun letters + _وَا) ل (L10 ' // Sun letters + +.group م + م m + +.group ن + ن n + ن (ب m + ن (ْب m + +.group ه + ه h + ه (_S1 h // الضمير المتصل + ها (_S2 haa //الضمير المتصل + هم (_S2 hum //الضمير المتصل + هما (_S3 humaa //الضمير المتصل + هن (_S2 hunna //الضمير المتصل + +.group و + L03) و uu //واو بعد صامت دون تشكيل + ا) و w //واو بعد الألف + و (L01 w //واو بعدها حرف علة + ْ) و w // واو بعد سكون + َ) و w //واو بعد فتحة + ِ) و w //واو بعد كسرة + _) و w //واو في أول الكلمة + وا (_S2 u + وا (_S2 uu // فعل مع ضمائر الجمع المذكرة درسوا + _) وال (L10P3 wa //والشمس + _) وَال (L10P4 wa + _) وَالْ (L10P4 wa + _) وال (L11P3 wal //والقمر + _) وَال (L11P4 wal + _) وَالْ (L11P4 wal + _) وال (تP3 wat + _) وال (ثP3 waT + _) وال (دP3 wad + _) وال (ذP3 waD + _) وال (رP3 war + _) وال (زP3 waz + _) وال (سP3 was + _) وال (شP3 waS + _) وال (صP3 was[ + _) وال (ضP3 wadH + _) وال (طP3 wat[ + _) وال (ظP3 waZ + _) وال (لP3 wal + _) وال (نP3 wan + ون (_S2 uuna //جمع مذكر سالم فلاحون + +.group ي + L03) ي ii // ياء بعد صامت دون تشكيل + ا) ي j // ياء بعد ألف + ْ) ي j //ياء بعد سكون + ُ) ي j //ياء بعد ضمّة + َ) ي j // ياء بعد فتحة + _) ي j // ياء في أول الكلمة + ي (L01 j //يا بعدها حروف علة + ي (_S1 i + ي (_S1 ii //ياء النسبة + يات (_S3 ijjaat //يّة النسبة في جمع المؤنث جزائريات + ية (_S2 ijjah //يّة النسبة + ين (_S2 iina //جمع مذكر سالم منصوب أو مجرور + يون (_S3 ijjuun //kجمع مذكر سالم منسوب جزائريون + يين (_S3 ijjiin //kجمع مذكر سالم منسوب جزائريين + +.group ى //ألف مقصورة + ى a + L03) ى (_ aa + +.group ء + ء ? + ء (ً ?an + +.group ئ + ئ ? + +.group ؤ + ؤ ? + +.group ة + ة t + ةً tan + +.group + َ %a +// (ا aa // make the previous fatha long + +.group + ِ i +// (ي ii // make the previous kassra long + +.group + ُ u +// (و uu // make the previous kassra long + +.group ٌ // dammatan + ٌ (_S1 un + ٌ ' + +.group ً // fatahatan + ًا (S1 an + +.group ٍ // kasratan + ٍ (_S1 in + ٍ ' +.group أ + أ a +.group إ + إ ?i + +.group ـ + ـ ' + +.group ، + ، || + +.group ؛ + ؛ + +.group + +// non-ascii characters with specified pronunciations +// List the accented characters in en_list with the $accent attribute From 7e5299e63abee3cf2f477fca814a37b84a746223 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 17:13:59 +0300 Subject: [PATCH 04/18] ar: remove replacement rules for Hamza, because then words in ar_list file should be written in replaced form --- dictsource/ar_rules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index 58f68b86..18427b0f 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -43,11 +43,6 @@ ۸ 8 ٩ 9 ۹ 9 - ئ يء // توحيد شكل الهمزة - ؤ ۄء - إ اءِ - أ اء - ـ // حذف التطويل //all vowels .A ا ي و َ ُ ِ ً ٌ ٍ ّ ى From e571f8eb2de006c46e0613f03d0fe1c98c657b31 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 17:24:52 +0300 Subject: [PATCH 05/18] ar: format list file --- dictsource/ar_list | 449 ++++++++++++++++++++++----------------------- 1 file changed, 218 insertions(+), 231 deletions(-) diff --git a/dictsource/ar_list b/dictsource/ar_list index 76a8b8c1..137fd537 100644 --- a/dictsource/ar_list +++ b/dictsource/ar_list @@ -1,6 +1,6 @@ // * arabic Language ar ar_list // * This file writen by TAHA Zerrouki 2012 -//********* +// *************************************************************************** // * This program is free software; you can redistribute it and/or modify * // * it under the terms of the GNU General Public License as published by * // * the Free Software Foundation; either version 3 of the License, or * @@ -14,264 +14,251 @@ // * You should have received a copy of the GNU General Public License * // * along with this program; if not, see: * // * . * -// ***************************************************************************/ -//********* +// *************************************************************************** +// // You can use the en_extra file, rather than this one // to add your own pronunciation definitions. -// ***************************************************************************/ - +// // This file is UTF-8 encoded // all words must be LOWER CASE (although the initial letter will be automatically -// converted if it's a 7bit ascii character) - +// converted if it's a 7bit ascii character) +// //stress symbols ' primary , secondary % unstressed - // letter names, as they are spoken as a single character in text // precede by _ to distinguish from pronunciation as a language word //arabic alphabet -_آ alif mamduudah -_ا alif -ب baa? -پ pi -ت taa? -ث Taa? -ج dZim -ح Haa? -خ Xaa? -د daal -ذ Daal -ر raa? -ز zaaj -س siin -ش Siin -ص s[aad -ض dHaad -ط t[aa? -ظ Zaa? -ع Aajn -غ gHajn -ف faa? -ق qaaf -ك kaaf -گ gaaf -ل laam -م miim -ن nuun -و waaw -ه haa? -ي jaa? -َ fatHah -ُ dhammah -ِ kasrah -ّ Saddah -ْ sukuun -ً fatHataan -ٌ dhammataan -ٍ kasrataan -، faas[ilah -؛ nuqt[atah||faas[lah -ـ tat[wiil -ئ hamzah||Ala||?aljaa? -ؤ hamzah||Ala||?alwaa? -إ hamzah||taHta||?alwaa? -أ ?alif -ء hamzah -ة taa?||marbuut[ah -ى ?alif||maqs[uurah -ةً tan - +_آ alif mamduudah +_ا alif +ب baa? +پ pi +ت taa? +ث Taa? +ج dZim +ح Haa? +خ Xaa? +د daal +ذ Daal +ر raa? +ز zaaj +س siin +ش Siin +ص s[aad +ض dHaad +ط t[aa? +ظ Zaa? +ع Aajn +غ gHajn +ف faa? +ق qaaf +ك kaaf +گ gaaf +ل laam +م miim +ن nuun +و waaw +ه haa? +ي jaa? +َ fatHah +ُ dhammah +ِ kasrah +ّ Saddah +ْ sukuun +ً fatHataan +ٌ dhammataan +ٍ kasrataan +، faas[ilah +؛ nuqt[atah||faas[lah +ـ tat[wiil +ئ hamzah||Ala||?aljaa? +ؤ hamzah||Ala||?alwaa? +إ hamzah||taHta||?alwaa? +أ ?alif +ء hamzah +ة taa?||marbuut[ah +ى ?alif||maqs[uurah +ةً tan // numeric -//_0 zero $text // TEST -_0 s[ifr -_1 waaHid -_2 ?iTnaan -_3 TalaaTah -_4 ?arbaAah -_5 Xamsah -_6 sittah -_7 sabAah -_8 Tamanijah -_9 tisAah -_10 AaSarah -_11 ?aHada||AaSarah -_12 ?iTnaa||AaSarah -_13 TalaaTata||AaSarah -_14 ?arbaAata||AaSarah -_15 Xamsata||AaSarah -_16 sittata||AaSarah -_17 sabAata||AaSarah -_18 Tamaanijata||AaSarah -_19 tisAata||AaSarah -_2X AiSruun -_3X TalaTuun -_4X ?arbaAuun -_5X Xamsuun -_6X sittuun -_7X sabA:n -_8X Tamaanuun -_9X tisAuun +_0 s[ifr +_1 waaHid +_2 ?iTnaan +_3 TalaaTah +_4 ?arbaAah +_5 Xamsah +_6 sittah +_7 sabAah +_8 Tamanijah +_9 tisAah +_10 AaSarah +_11 ?aHada||AaSarah +_12 ?iTnaa||AaSarah +_13 TalaaTata||AaSarah +_14 ?arbaAata||AaSarah +_15 Xamsata||AaSarah +_16 sittata||AaSarah +_17 sabAata||AaSarah +_18 Tamaanijata||AaSarah +_19 tisAata||AaSarah +_2X AiSruun +_3X TalaTuun +_4X ?arbaAuun +_5X Xamsuun +_6X sittuun +_7X sabA:n +_8X Tamaanuun +_9X tisAuun -_0C mi?ah -_1C mi?ah -_2C mi?ataan -_3C TalaaTumi?ah -_4C ?arbaAumi?ah -_5C Xamsumi?ah -_6C sittumi?ah -_7C sabAumi?ah -_8C Tamaanumi?ah -_9C tisAumi?ah +_0C mi?ah +_1C mi?ah +_2C mi?ataan +_3C TalaaTumi?ah +_4C ?arbaAumi?ah +_5C Xamsumi?ah +_6C sittumi?ah +_7C sabAumi?ah +_8C Tamaanumi?ah +_9C tisAumi?ah -_0M1 ?alf -_1M1 ?alf -_2M1 ?alfaan -_3M1 TalaaTat||?aalaaf -_4M1 ?arbaAat||?aalaaf -_5M1 Xamsat||?aalaaf -_6M1 sittat||?aalaaf -_7M1 sabAat||?aalaaf -_8M1 Tamaanijat||?aalaaf -_9M1 tisAat||?aalaaf -_10M1 AaSarat||?aalaaf +_0M1 ?alf +_1M1 ?alf +_2M1 ?alfaan +_3M1 TalaaTat||?aalaaf +_4M1 ?arbaAat||?aalaaf +_5M1 Xamsat||?aalaaf +_6M1 sittat||?aalaaf +_7M1 sabAat||?aalaaf +_8M1 Tamaanijat||?aalaaf +_9M1 tisAat||?aalaaf +_10M1 AaSarat||?aalaaf + +_0M2 m%ilj%uun +_1M2 m%iljuun +_2M2 miljuunaan +_3M2 TalaaTat||malaajiin +_4M2 ?arbaAat||malaajiin +_5M2 Xamsat||malaajiin +_6M2 sittat||malaajiin +_7M2 sabAat||malaajiin +_8M2 Tamaanijat||malaajiin +_9M2 tisAat||malaajiin +_10M2 AaSarat||malaajiin + +_0M3 miljaar +_1M3 miljaar +_2M3 miljaaraan +_3M3 TalaaTat||miljaaraat +_4M3 ?arbaAat||miljaaraat +_5M3 Xamsat||miljaaraat +_6M3 sittat||miljaaraat +_7M3 sabAat||miljaaraat +_8M3 Tamaanijat||miljaaraat +_9M3 tisAat||miljaaraat +_10M3 AaSarat||miljaaraat +_0and wa +_dpt faas[il +_roman rumaanii -_0M2 m%ilj%uun -_1M2 m%iljuun -_2M2 miljuunaan -_3M2 TalaaTat||malaajiin -_4M2 ?arbaAat||malaajiin -_5M2 Xamsat||malaajiin -_6M2 sittat||malaajiin -_7M2 sabAat||malaajiin -_8M2 Tamaanijat||malaajiin -_9M2 tisAat||malaajiin -_10M2 AaSarat||malaajiin - -_0M3 miljaar -_1M3 miljaar -_2M3 miljaaraan -_3M3 TalaaTat||miljaaraat -_4M3 ?arbaAat||miljaaraat -_5M3 Xamsat||miljaaraat -_6M3 sittat||miljaaraat -_7M3 sabAat||miljaaraat -_8M3 Tamaanijat||miljaaraat -_9M3 tisAat||miljaaraat -_10M3 AaSarat||miljaaraat - - -_0and wa -_dpt faas[il -_roman rumaanii - -_#st om -_#nd va -_#rd om -_#th om +_#st om +_#nd va +_#rd om +_#th om // character names -÷ taqsiim -× fii -؟ Aalaaamat||?istifhaam -! Aalaaamat||taAadZdZub -$ duulaar -% bilmi?ah -[ AaaridHah||maftuuHah -] AaaridHah||mugHlaqah -( qaws||maftuuH -) qaws||mugHlaq -* nedZmah -- naaqis[ -/. nuqt[ah -/: nuqt[ataan -< ?as[gHar||min -= tusaawii -> ?akbar||min -{ HaadHinah||maftuuHah -} HaadHinah||mugHlaqah -... TalaaT||niqaat[ +÷ taqsiim +× fii +؟ Aalaaamat||?istifhaam +! Aalaaamat||taAadZdZub +$ duulaar +% bilmi?ah +[ AaaridHah||maftuuHah +] AaaridHah||mugHlaqah +( qaws||maftuuH +) qaws||mugHlaq +* nedZmah +- naaqis[ +/. nuqt[ah +/: nuqt[ataan +< ?as[gHar||min += tusaawii +> ?akbar||min +{ HaadHinah||maftuuHah +} HaadHinah||mugHlaqah +... TalaaT||niqaat[ //characters and numbers and words with English alphabet is translated by English phonemes - th _^_en - - - - - +th _^_en // MAIN WORD DICTIONARY //********************* -// exceptional words with flags -ای ?aj $only - -// exceptional words, (out of rules) -// propoer nouns -طه t[aahaa -عمرو Aamr -//abbriviation -د ?ad'duktuur $hasdot -أنا ?nba?anaa $hasdot -اه ?intahaa $hasdot -ثنا Had'daTanaa $hasdot -الخ ?ila||?aa_Xirih $hasdot -إلخ ?ila||?aaXirih $hasdot -رحه raHimahullah $hasdot -رضه radHijallahu||Anhu $hasdot -و wa $pause -//الألف اللينة -إله ?ilaah -أولئك ?ulaa?ika -أولو ?uluu -أولي ?ulii -داود daawuud -ذلك Daalika -التي ?allatii -الذي ?allaDii -الذين ?allaDiina -اللذين ?allaDajn -اللذان ?allaDaani -صلعم s[allaa|?allahu|Alajhi||wa||sallam -الرحمن ?arraHmaan -لكن laakin -الله ?allaah -اللهم ?allahumma -هؤلاء haa?ulaa?i -هذا haaDaa -هذان haaDaani -هذه haaDihi +//abbreviations +د ?ad'duktuur $hasdot +أنا ?nba?anaa $hasdot +اه ?intahaa $hasdot +ثنا Had'daTanaa $hasdot +الخ ?ila||?aa_Xirih $hasdot +إلخ ?ila||?aaXirih $hasdot +رحه raHimahullah $hasdot +رضه radHijallahu||Anhu $hasdot +و wa $pause +إله ?ilaah +أولئك ?ulaa?ika +أولو ?uluu +أولي ?ulii +داود daawuud +ذلك Daalika +التي ?allatii +الذي ?allaDii +الذين ?allaDiina +اللذين ?allaDajn +اللذان ?allaDaani +صلعم s[allaa|?allahu|Alajhi||wa||sallam +الرحمن ?arraHmaan +لكن laakin +الله ?allaah +اللهم ?allahumma +هؤلاء haa?ulaa?i +هذا haaDaa +هذان haaDaani +هذه haaDihi //الوحدات -كغ kiluu||gHraam -كجم kiluu||gHraam -كغم kiluu||gHraam -طن t[un -كم kiiluu||mitar -سا saaAa -// Units below conflict with single letter name -// م mitar -// س su?aal -// ج dZawaab -// ص s[afHah -// العملات +كغ kiluu||gHraam +كجم kiluu||gHraam +كغم kiluu||gHraam +طن t[un +كم kiiluu||mitar +سا saaAa +// Units below conflict with single letter word +// م mitar +// س su?aal +// ج dZawaab +// ص s[afHah د.ج diinaar||dZazaa?irij -$ duulaar -€ ?uurruu -£ dZunajh -¥ juwaan -ج.م juwaan||mis[ri -ر.س rijaal||saAuudii -// مركب الاسم -ابن ?ibn -بن ban +$ duulaar +€ ?uurruu +£ dZunajh +¥ juwaan +ج.م juwaan||mis[ri +ر.س rijaal||saAuudii +ابن ?ibn +بن ban //foreign language -إنجليزية ?ingliizijah // probelm -جوجل guugal -غوغل guugal -(بسم الله) bismillaah +إنجليزية ?ingliizijah // probelm +جوجل guugal +غوغل guugal +(بسم الله) bismillaah + +// exceptional words with flags +ای ?aj $only + +// exceptional words, (out of rules) +// proper nouns +طه t[aahaa +عمرو Aamr From a7f84cb53d63d8ba850f6676d6d6010d3a690588 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Wed, 16 May 2018 17:27:08 +0300 Subject: [PATCH 06/18] ar: fix most common words --- dictsource/ar_list | 1 + 1 file changed, 1 insertion(+) diff --git a/dictsource/ar_list b/dictsource/ar_list index 137fd537..8a64a0aa 100644 --- a/dictsource/ar_list +++ b/dictsource/ar_list @@ -261,4 +261,5 @@ $ duulaar // proper nouns طه t[aahaa عمرو Aamr +أنا 'ana From c4d9d7b57a97904e2f3e800c8c31e3b3e61440c5 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 12:02:16 +0300 Subject: [PATCH 07/18] docs: clarify order for replaced characters --- docs/dictionary.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dictionary.md b/docs/dictionary.md index aea17008..00567eea 100644 --- a/docs/dictionary.md +++ b/docs/dictionary.md @@ -511,9 +511,9 @@ each language. The number fragments are given in the `*_list` file. Character substitutions can be specified by using a `.replace` section at the start of the `*_rules` file. Each line specified either one or two alphabetic characters to be replaced by another one or two -alphabetic characters. This substitution is done to a word before it is -translated using the spelling-to-phoneme rules. Only the lower-case -version of the characters needs to be specified. e.g. +alphabetic characters. This substitution is done to a word before word is searched +in `*_list` or `*_listx` file and translated using the spelling-to-phoneme rules. +Only the lower-case version of the characters needs to be specified. e.g. .replace ô   ő   // (Hungarian) allow the use of o-circumflex instead of o-double-accute From 6e554c97d3dde0f6adf399ec0b568ac98d3d9044 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 13:23:38 +0300 Subject: [PATCH 08/18] ar: fix typo for letter group --- dictsource/ar_rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index 18427b0f..cb63e382 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -87,7 +87,7 @@ ا (ُ ? ا (ِ ? _) ا a // make the previous fatha long - _) ال (L10ّP2 ?a //الشمس + _) ال (L10P2 ?a //الشمس _) ال (L11P2 ?al //القمر _) ال (تP2 ?at _) ال (ثP2 ?aT From a7ea333d37e83ab266264fb17452f9cd6a7bdf35 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 13:25:55 +0300 Subject: [PATCH 09/18] ar: move Shadda form post rule to consumed letter. As Shadda is diacritic mark, it doesn't have meaning as separate letter, therefore it should be consumed together with diacritized letter. --- dictsource/ar_rules | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index cb63e382..ba93cb1d 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -107,7 +107,7 @@ .group ب ب b - ب (ّ Bb + بّ Bb _) بال (L10P3 bi //بالشمس _) بال (L11P3 bil //بالقمر _) بال (تP3 bit @@ -134,14 +134,14 @@ _) ت (P1 ta //تسأل _َ) ت (P2 t ت (_S1 at //سألت - ت (ّ tt + تّ tt .group ث ث T .group ج ج dZ - ج (ّ dZdZ + جّ dZdZ .group ح ح H @@ -151,7 +151,7 @@ .group د د d - د (ّ dd + دّ dd .group ذ ذ D @@ -164,15 +164,15 @@ .group س س s - س (ّ ss + سّ ss .group ش ش S - ش (ّ SS + شّ SS .group ص ص s[ - ص (ّ s[s[ + صّ s[s[ .group ض ض dH @@ -250,7 +250,7 @@ _بِا) ل (L10 ' // Sun letters _فَا) ل (L10 ' // Sun letters _كَا) ل (L10 ' // Sun letters - ل (ّ ll + لّ ll _لِ) ل (L10 ' // Sun letters _وَا) ل (L10 ' // Sun letters From 86768ba5e46e610843b6019b94d7186f4d125076 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 13:41:16 +0300 Subject: [PATCH 10/18] ar: remove wrongly declared letter groups Letter groups A, B, C, E etc. should be redefined in C code t https://github.com/espeak-ng/espeak-ng/blob/master/docs/dictionary.md#redefinition-of-charater-groups --- dictsource/ar_rules | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index ba93cb1d..60d45185 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -44,12 +44,6 @@ ٩ 9 ۹ 9 -//all vowels -.A ا ي و َ ُ ِ ً ٌ ٍ ّ ى - -//list of consonants -.C ب پ ت ة ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ئ ؤ ء أ آ إ ه - //all vowels .L01 ا ي و َ ُ ِ ً ٌ ٍ ّ ى From 46f2f99ed13ffa22fdd5b1cb2d55c05149837e10 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 14:37:23 +0300 Subject: [PATCH 11/18] ar: move alef with hamzas together alef groups --- dictsource/ar_rules | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index 60d45185..a14a086f 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -99,6 +99,12 @@ _) ال (نP2 ?an _ب) ا (ل i +.group أ + أ a + +.group إ + إ ?i + .group ب ب b بّ Bb @@ -352,10 +358,6 @@ .group ٍ // kasratan ٍ (_S1 in ٍ ' -.group أ - أ a -.group إ - إ ?i .group ـ ـ ' From 84b1d8d133de9f2c7fac81186c9484e33a2bd8c3 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 14:44:11 +0300 Subject: [PATCH 12/18] ar: move Arabic comma and semicolon to .replace group --- dictsource/ar_rules | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index a14a086f..ca8162cd 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -43,6 +43,8 @@ ۸ 8 ٩ 9 ۹ 9 + ، , + ؛ ; //all vowels .L01 ا ي و َ ُ ِ ً ٌ ٍ ّ ى @@ -362,12 +364,6 @@ .group ـ ـ ' -.group ، - ، || - -.group ؛ - ؛ - .group // non-ascii characters with specified pronunciations From 2193ecf19bd3e39dabc0c4cca5e055829b12b378 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 14:47:50 +0300 Subject: [PATCH 13/18] ar: reorganize rules for diacritics --- dictsource/ar_rules | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index ca8162cd..826f0d6c 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -307,6 +307,7 @@ .group ي L03) ي ii // ياء بعد صامت دون تشكيل ا) ي j // ياء بعد ألف + يِ jii ْ) ي j //ياء بعد سكون ُ) ي j //ياء بعد ضمّة َ) ي j // ياء بعد فتحة @@ -338,33 +339,26 @@ ة t ةً tan +// Other diacritics .group - َ %a -// (ا aa // make the previous fatha long + ٍ (_S1 in // kasratan at the end of word + ٌ (_S1 un // dammatan at the end of word + ُ u // damma + ُو uu + َا aa + َى aa + ٰ aa // superscript alef + ِ i // kasra + َ %a // fatha -.group - ِ i -// (ي ii // make the previous kassra long +// Following are default rules for other diacritics and they are just silence. +// Diacritics should be consumed together with leading letters in rules above. -.group - ُ u -// (و uu // make the previous kassra long - -.group ٌ // dammatan - ٌ (_S1 un - ٌ ' - -.group ً // fatahatan - ًا (S1 an - -.group ٍ // kasratan - ٍ (_S1 in - ٍ ' - -.group ـ - ـ ' - -.group + ٌ // dammatan + ً // fathatan + ٍ // kasratan + ـ // tatweel + ۡ // small high dotless head of khan // non-ascii characters with specified pronunciations // List the accented characters in en_list with the $accent attribute From 39d662de10a5fd2c77aa5b82cea535bba09385fd Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 16:47:05 +0300 Subject: [PATCH 14/18] ar: update list when letters are spelled by name: 1. only in separate words, 2. at the end of entered text. --- dictsource/ar_list | 155 ++++++++++++++++++++++++++++++--------------- 1 file changed, 104 insertions(+), 51 deletions(-) diff --git a/dictsource/ar_list b/dictsource/ar_list index 8a64a0aa..99f2ce8f 100644 --- a/dictsource/ar_list +++ b/dictsource/ar_list @@ -27,57 +27,110 @@ // letter names, as they are spoken as a single character in text // precede by _ to distinguish from pronunciation as a language word -//arabic alphabet -_آ alif mamduudah -_ا alif -ب baa? -پ pi -ت taa? -ث Taa? -ج dZim -ح Haa? -خ Xaa? -د daal -ذ Daal -ر raa? -ز zaaj -س siin -ش Siin -ص s[aad -ض dHaad -ط t[aa? -ظ Zaa? -ع Aajn -غ gHajn -ف faa? -ق qaaf -ك kaaf -گ gaaf -ل laam -م miim -ن nuun -و waaw -ه haa? -ي jaa? -َ fatHah -ُ dhammah -ِ kasrah -ّ Saddah -ْ sukuun -ً fatHataan -ٌ dhammataan -ٍ kasrataan -، faas[ilah -؛ nuqt[atah||faas[lah -ـ tat[wiil -ئ hamzah||Ala||?aljaa? -ؤ hamzah||Ala||?alwaa? -إ hamzah||taHta||?alwaa? -أ ?alif -ء hamzah -ة taa?||marbuut[ah -ى ?alif||maqs[uurah -ةً tan +// Arabic alphabet +_آ alif mamduudah +_ا alif +_ب baa? +_پ pi +_ت taa? +_ث Taa? +_ج dZim +_ح Haa? +_خ Xaa? +_د daal +_ذ Daal +_ر raa? +_ز zaaj +_س siin +_ش Siin +_ص s[aad +_ض dHaad +_ط t[aa? +_ظ Zaa? +_ع Aajn +_غ gHajn +_ف faa? +_ق qaaf +_ك kaaf +_گ gaaf +_ل laam +_م miim +_ن nuun +_و waaw +_ه haa? +_ي jaa? +_َ fatHah +_ُ dhammah +_ِ kasrah +_ّ Saddah +_ْ sukuun +_ً fatHataan +_ٌ dhammataan +_ٍ kasrataan +_، faas[ilah +_؛ nuqt[atah||faas[lah +_ـ tat[wiil +_ئ hamzah||Ala||?aljaa? +_ؤ hamzah||Ala||?alwaa? +_إ hamzah||taHta||?alwaa? +_أ ?alif +_ء hamzah +_ة taa?||marbuut[ah +_ى ?alif||maqs[uurah +_ةً tan +_ + +// When letters entered one by one +آ alif mamduudah $atend +ا alif $atend +ب baa? $atend +پ pi $atend +ت taa? $atend +ث Taa? $atend +ج dZim $atend +ح Haa? $atend +خ Xaa? $atend +د daal $atend +ذ Daal $atend +ر raa? $atend +ز zaaj $atend +س siin $atend +ش Siin $atend +ص s[aad $atend +ض dHaad $atend +ط t[aa? $atend +ظ Zaa? $atend +ع Aajn $atend +غ gHajn $atend +ف faa? $atend +ق qaaf $atend +ك kaaf $atend +گ gaaf $atend +ل laam $atend +م miim $atend +ن nuun $atend +و waaw $atend +ه haa? $atend +ي jaa? $atend +َ fatHah $atend +ُ dhammah $atend +ِ kasrah $atend +ّ Saddah $atend +ْ sukuun $atend +ً fatHataan $atend +ٌ dhammataan $atend +ٍ kasrataan $atend +، faas[ilah $atend +؛ nuqt[atah||faas[lah $atend +ـ tat[wiil $atend +ئ hamzah||Ala||?aljaa? $atend +ؤ hamzah||Ala||?alwaa? $atend +إ hamzah||taHta||?alwaa? $atend +أ ?alif $atend +ء hamzah $atend +ة taa?||marbuut[ah $atend +ى ?alif||maqs[uurah $atend +ةً tan $atend // numeric _0 s[ifr From 86e27775a2d3a5e4fda82639183d45d7d39f843f Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 17:11:42 +0300 Subject: [PATCH 15/18] ar: add missing sukun character --- dictsource/ar_rules | 1 + 1 file changed, 1 insertion(+) diff --git a/dictsource/ar_rules b/dictsource/ar_rules index 826f0d6c..a7524353 100644 --- a/dictsource/ar_rules +++ b/dictsource/ar_rules @@ -359,6 +359,7 @@ ٍ // kasratan ـ // tatweel ۡ // small high dotless head of khan + ْ // sukun // non-ascii characters with specified pronunciations // List the accented characters in en_list with the $accent attribute From d5384677a4e40da513185f917ec35e2f55998043 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 21:15:21 +0300 Subject: [PATCH 16/18] ru: add test for iotated vowels --- tests/language-pronunciation.test | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/language-pronunciation.test b/tests/language-pronunciation.test index 7d72e623..b29be26b 100755 --- a/tests/language-pronunciation.test +++ b/tests/language-pronunciation.test @@ -43,6 +43,10 @@ test_phonemes lv \ " nev'ie:na nuo\`_ 'eiRo:pas v'al>sti:m nek,ad nav p'a:Rga:jusi nuo\`_ 'univERsa:la:s_:_: nuo\` v'ispa:Re:jiem n'uoduok}l^iem f'inanse:tas_:_: s'iste:mas uz 'obliga:ta:s 'apdRuoSina:Sanas s'iste:mu b'eigas" \ "Neviena no Eiropas valstīm nekad nav pārgājusi no universālās (no vispārējiem nodokļiem finansētas) sistēmas uz obligātās apdrošināšanas sistēmu Beigas." +test_phonemes ru \ + " 'Ab;i ab;'8 'AbjE 'Ab;I 'Abji 'Ap; 'Ab;u\" 'Ab;V" \ + "абе абё абє аби абї абь абю абя" + # Languages with non-Latin characters fall back to en when speaking Latin characters. # TODO: Include words in their native script and move to the main tests above. From c53141ff1218d1a948304f3b8369684f3b361fce Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 20:38:10 +0300 Subject: [PATCH 17/18] =?UTF-8?q?ru:=20issue=20#491=20=E2=80=94=20add=20?= =?UTF-8?q?=20=D0=B5,=20=D1=97=20and=20=D1=94=20to=20list=20of=20iotated?= =?UTF-8?q?=20vowels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libespeak-ng/tr_languages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/tr_languages.c b/src/libespeak-ng/tr_languages.c index 712578ec..243ff8a4 100644 --- a/src/libespeak-ng/tr_languages.c +++ b/src/libespeak-ng/tr_languages.c @@ -398,7 +398,7 @@ static void SetCyrillicLetters(Translator *tr) static const char ru_hard[] = { 0x2a, 0x16, 0x26, 0x28, 0 }; // letter group H [S Z ts] -- ъ ж ц ш static const char ru_nothard[] = { 0x11, 0x12, 0x13, 0x14, 0x17, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1f, 0x20, 0x21, 0x22, 0x24, 0x25, 0x27, 0x29, 0x2c, 0 }; // б в г д з й к л м н п р с т ф х ч щ ь static const char ru_voiced[] = { 0x11, 0x12, 0x13, 0x14, 0x16, 0x17, 0 }; // letter group G (voiced obstruents) -- б в г д ж з - static const char ru_ivowels[] = { 0x2c, 0x2e, 0x2f, 0x31, 0 }; // letter group Y (iotated vowels & soft-sign) -- ь ю я ё + static const char ru_ivowels[] = { 0x15, 0x2c, 0x2e, 0x2f, 0x31, 0x34, 0x37, 0 }; // letter group Y (iotated vowels & soft-sign) -- е ь ю я ё є ї tr->encoding = ESPEAKNG_ENCODING_KOI8_R; tr->transpose_min = 0x430; // convert cyrillic from unicode into range 0x01 to 0x22 tr->transpose_max = 0x451; From f0321bfae7f99ffdcdc40595c07e8afa1965e5d9 Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Thu, 17 May 2018 20:48:01 +0300 Subject: [PATCH 18/18] =?UTF-8?q?ru:=20add=20only=20=D0=B8=20to=20Y=20(iot?= =?UTF-8?q?ated)=20letter=20group=20for=20Russian=20as=20all=20other=20let?= =?UTF-8?q?ters=20are=20already=20there=20from=20Cyrillic.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libespeak-ng/tr_languages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libespeak-ng/tr_languages.c b/src/libespeak-ng/tr_languages.c index 243ff8a4..2023ab31 100644 --- a/src/libespeak-ng/tr_languages.c +++ b/src/libespeak-ng/tr_languages.c @@ -1565,11 +1565,11 @@ static void Translator_Russian(Translator *tr) { static const unsigned char stress_amps_ru[] = { 16, 16, 18, 18, 20, 24, 24, 22 }; static const short stress_lengths_ru[8] = { 150, 140, 220, 220, 0, 0, 260, 280 }; - static const char ru_ivowels2[] = { 0x2c, 0x15, 0x18, 0x2e, 0x2f, 0 }; // add more vowels to letter group Y (iotated vowels & soft-sign) + static const char ru_ivowels2[] = { 0x18, 0 }; // add и to Y lettergroup (iotated vowels & soft-sign) SetupTranslator(tr, stress_lengths_ru, stress_amps_ru); SetCyrillicLetters(tr); - SetLetterBits(tr, 6, ru_ivowels2); + SetLetterBits(tr, LETTERGP_Y, ru_ivowels2); tr->langopts.param[LOPT_UNPRONOUNCABLE] = 0x432; // [v] don't count this character at start of word tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 1;