From 869878ec3e73735796eff54dad21e41a3195965d Mon Sep 17 00:00:00 2001 From: jonsd Date: Mon, 5 Oct 2009 12:20:07 +0000 Subject: [PATCH] [1.41.09] Ignore characters U+200c, U+200d (zero width non-joiner, zero width joiner). git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@224 d46cf337-b52f-0410-862d-fd96e6ae7743 --- dictsource/hu_list | 32 ++++++++++++++++---------------- dictsource/hu_rules | 13 ++++++++++--- phsource/j2/j2e | Bin 26051 -> 26051 bytes src/readclause.cpp | 12 ++++++++++++ 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/dictsource/hu_list b/dictsource/hu_list index 43193a8a..242bf630 100755 --- a/dictsource/hu_list +++ b/dictsource/hu_list @@ -43,7 +43,7 @@ _2M3 ke:tmillia:R2d _0M4 billio: _1M4 billio: _2M4 ke:tbillio: -_dpt ||_!'Ege:s +_dpt ||Ege:s //Not need the pause before this word _0Z1 tizEd // tenths _0Z2 sa:zAd // hundredths @@ -415,11 +415,11 @@ ny En^ / pER2 $max3 = EJEnlY: $max3 # kEt:Y:SkER2Est $max3 -@ kukAts -& e:S +@ kukAts $max3 +& e:S $max3 € EuR2o ¶ bEkEzde:S -§ pAR2AgR2AfuS +§ s'AkAs ~ tildE ° fokjEl Ft foR2int @@ -429,21 +429,21 @@ Ft foR2int _, vEss2Y: _; pontoSvEss2Y: _: kEt:Y:Spont -_! fElkia:lto: -_? ke:R2dY: -_- kYtY:jEl $max3 -__ Ala:hu:za:S +_! fElkia:lto:jEl +_? ke:R2dY:jEl +_- m'inus $max3 +__ Ala:hu:za:S $max3 _' ApostR2o:f _– nAJkYtY: _— kviR2tmi:nus -_" ide:zY: -_( za:R2o: -_) za:R2o: -_[ s'YglEtES||z'a:R2o: -_] s'YglEtES||z'a:R2o: -_{ k'AptSoS||z'a:R2o: -_} k'AptSoS||z'a:R2o: -_… ha:R2_mASpont +_" ide:zY:jEl $max3 +_( b'Alza:R2o:jEl $max3 +_) j'obbza:R2o:jEl $max3 +_[ n^'ito:sYglEtES $max3 +_] z'a:R2o:sYglEtES $max3 +_{ k'EzdY:kAptSoS $max3 +_} v'e:gkAptSoS $max3 +_… pontpontpont $max3 _• di:spont diff --git a/dictsource/hu_rules b/dictsource/hu_rules index 157c4511..7e5f0eb9 100644 --- a/dictsource/hu_rules +++ b/dictsource/hu_rules @@ -165,7 +165,10 @@ _) javítsd jAvi:tSd k k kk k: kk (C kk - _) köz kYz +_) köztársaság k'Ysta:R2SASa:g +_) központ k'Yspont + +_) köz kYz _) község kYSSe:g _) készség ke:SSe:g _) kétség ke:tS:e:g @@ -340,7 +343,9 @@ szöve) ts (ég tS: romlo) tts tS: á) t (sor t á) t (sé t +ne) t (c t ne) t (se t +ne) t (szo t lehe) ts (ég tS: tehe) ts (ég tS: @@ -395,9 +400,11 @@ bi) z (tons s bi) z (tos s bron) z (sz z e) z (t s +ho) z (ta s +ho) z (tá s +inté) z (ked s költö) z (köd s -kö) z (pont s -kö) z (társaság s + lefeje) z (te s lefeje) z (ték s pén) z (tár s diff --git a/phsource/j2/j2e b/phsource/j2/j2e index ac5edc56f08f065cbbb599f08706edef1dbfc844..b079fa608500043fee13f8bc573d851180c25760 100644 GIT binary patch delta 107 zcmX?nn(^>y#trehj7*yobT^BIUgU^iKE`yPQH0?(Bcos~6BDxmM-Kx72LtaRCNbtJ zE?LG7E(YH9Olz2ncrP*J@G@{sVJcvL$p4wqjGuwsnQ0Fb0}$xTG&8~2e`H-YXShTw F0stki8jt`0 delta 107 zcmX?nn(^>y#trehjLe%8bT^BI9^i;zKE`yPQH0?(BZFWK6BDxmM-Kx72LtaRCNbtJ zE?LG7E(YFpOzW76crP*J@G@{sVVc79kpDBI89xKN6O$7Y0}$xTG%z_c?E$m@$U1D! IaEVp~02kmI9{>OV diff --git a/src/readclause.cpp b/src/readclause.cpp index 8765d724..b8bd7df7 100644 --- a/src/readclause.cpp +++ b/src/readclause.cpp @@ -70,6 +70,12 @@ static const char *punct_close = ")]}>;'\""; // always pitch fall unless follow static const char *tone_punct_on = "\0016T"; // add reverberation, lower pitch static const char *tone_punct_off = "\001T"; +// ignore these characters +static const unsigned short chars_ignore[] = { + 0x200c, // zero width non-joiner + 0x200d, // zero width joiner + 0 }; + // punctuations symbols that can end a clause static const unsigned short punct_chars[] = {',','.','?','!',':',';', 0x2013, // en-dash @@ -2190,6 +2196,12 @@ f_input = f_in; // for GetC etc c2 = ' '; } + if(lookupwchar(chars_ignore,c1)) + { + // ignore this character (eg. zero-width-non-joiner U+200C) + continue; + } + if(iswspace(c1)) { char *p_word;