diff --git a/dictsource/de_list b/dictsource/de_list index 5579f957..fc51bfdc 100644 --- a/dictsource/de_list +++ b/dictsource/de_list @@ -475,8 +475,10 @@ kastanie $alt kid kId kommend kOm'End komödie $alt +konkret k%ONk@-*e:t kurie $alt +lakaienhaft l%akaInhaft lappalie $alt lilie $alt linie $alt diff --git a/dictsource/de_rules b/dictsource/de_rules index b8bb0cbc..98048a25 100644 --- a/dictsource/de_rules +++ b/dictsource/de_rules @@ -18,8 +18,8 @@ ay aI au aU - _) ab (C@P2 'ap - _) ab (arP2 'ap + _) ab (C@P2 _!'ap + _) ab (arP2 _!'ap _) abb (a %ab _) abb (rev ab _) abend A:b@nt @@ -27,15 +27,16 @@ _) abge (@ 'abg@ _) ab (i ab _) abzu 'abtsu: - _) an (@P2 'an + _) an (@P2 _!'an + _) an (aly %an _) an (der an _) anti (@P4 ,antI _) an (tw an - _) auf (@P3 'aUf - _) aus (@P3 'aUs + _) auf (@P3 _!'aUf + _) aus (@P3 _!'aUs _) air _^_EN - aktie aktI@ + akqu %akv @A) al (_ 'al @) an (_ 'an @) ant (_ 'ant @@ -119,6 +120,8 @@ bre) ch (en x nä) chs (t Cs + c (ie s + pla) c (ie ts coat (_ _^_EN _) code ko:t _) cow _^_EN @@ -167,8 +170,14 @@ &) eln (_S1 n &) em (_S2 @m @) en (_S2 @n + &) end (_N @nt + &) end (_ @nd + @) ent (_ 'Ent + @m) ent (_ 'Ent + @m) ente (_ 'Ent@ @) er (C 3 @) er (r E* + @) er (ti E* @) er (nC E* @) er (_S2 3 &) ere (_S3 @*@ @@ -182,19 +191,24 @@ w) er (k_ E* @) es (_S2 @s &) et (_ @t - @) ent (_ 'Ent - @m) ent (_ 'Ent - @m) ente (_ 'Ent@ - &) est (_ @st + ig) et (_S2 @t + &t) et (_S2 @t + &) est (_S3 @st + &) este (_S4 @st@ + &) estem (_S5 @st@m + &) esten (_S5 @st@n + &) ester (_S5 @st3 + &) estes (_S5 @st@s &) en (@ E2n // [E2] can reduce to [@] // &) er (C@ E2* &) el (@ E2l @) ei (_ 'aI + @@) erisch @*IS &) erung (_ =@*UN - _) ein (@P3 'aIn + _) ein (@P3 _!'aIn ein (and _|%aIn _) einig aInIg _) emp (@P3 _|%Emp @@ -209,6 +223,7 @@ _) er (ste@@P2 _|%E* _) entert _^_EN + er (dig e:* _) erob (er %E*o:b @) eur (_ 'Y:* @@ -226,16 +241,17 @@ .group g _) g (_ ge: g g - g) g + g (g g (_N k g (h k gd (_N kt gt (_N kt + gtet (_ kt@t + gtest kt@st _) g (eHC g // hC, lC, mC, nC, rC _) ge (@P2 g@ - C) ge (C@ g@ - g (ei+ g + g (ei+ g _) gn (A g@-n B) gn (A g@-n @@ -257,6 +273,7 @@ _) h (_ hA: h h h) h + ch) h h _) herauf (P6 hE*'aUf _) herab (P5 hE*'ab @@ -304,7 +321,11 @@ &) iens (_ =I;@ns &) ient (_ =I;@nt sch) ie (n i: - ieren 'i:*@n + @) ieren 'i:*@n + @) iere (_ 'i:*@ + @) ieret (_ 'i:*@t + @) ierest (_ 'i:*@st + @) ierst (_ 'i:*st @) iert (_ 'i:*t ierungs 'i:*UNs ierung 'i:*UN @@ -314,9 +335,20 @@ ig (n Ig ig (l Ig ig (r Ig - ig (_N IC + ig (end_ Ig + igtet Ikt@t + igtest Ikt@st + &) ig (_N IC &) ig (_ Ig // -ig + inflexions + @) igst (_ ICst + @) igste (_ ICst@ + @) igstem (_ ICst@m + @) igsten (_ ICst@n + @) igster (_ ICst3 + @) igstes (_ ICst@s @) ik (_ 'i:k + @t) ik (_ =i:k + polit) ik 'i:k @) ik (el_ 'i:k @) ie (_ 'i: @@ -359,7 +391,12 @@ l l l) l lin (_ l'i:n + l) lin (_ 'i:n + _) land (C@P4 l'ant + _) landes (@P6 l'and@s + _) lang (C@P4 l'aN + langsam l'aNzA:m _) leit (@P4 l'aIt @) lich (_$4 lIC lady _^_EN @@ -371,11 +408,19 @@ m) m marine mA:*'i:n@ - A) meter (_ me:t3 + _) meß (@P3 m'Es + _) met (all m%e:t + _) meth m%e:t + meter m'e:t3 + _) metro (@P5 m,e:t@-*o: _) micro _^_EN + _) miet (C@P4 m'i:t + _) mikro (@P5 m,i:k@-*o: _) mit (P3 m'It mitt (eC mIt mitt (l mIt + _) mo (rb m%O + _) motor mo:to:* _) ms _^_EN musik m%u:zi:k @@ -401,6 +446,7 @@ oh (+ o: oo o: oe Y: + ou u: o (C% O o (CC O @@ -413,6 +459,8 @@ @A) on (_ 'o:n @) oo (_ u: + &t) or (_ =o:* + .group p @@ -431,6 +479,10 @@ partei p%a*taI pool _^_EN power _^_EN + _) preß (@P4 p@-*'Es + _) prinzipien (@P9 p@-*Ints'i:pI@ + _) psycho (@P6 ps,y:Co: + _) psycho (ti psy:C'o: _) pu (e p%u: .group q @@ -456,11 +508,13 @@ ss s sst (@ sSt - p) s (a s sch S sch (en_ sC _) sh S sh (K S + + sou (nd saU + p) s (a s p) s (i s t) s (i s k) s (i s @@ -469,6 +523,12 @@ _ge) sp Sp _ver) sp Sp &C) st (_$2 st + &C) ste (_S3 st@ + &C) stem (_S4 st@m + &C) sten (_S4 st@n + &C) ster (_S4 st3 + &C) stes (_S4 st@s + _) st St _be) st St _ge) st St @@ -496,7 +556,7 @@ K) th t tz ts - &B) te (_$2 t@ +// &B) te (_$2 t@ &t) te (_ @ // &B) ten (_$3 t@n // &t) ten (_ @n diff --git a/dictsource/en_list b/dictsource/en_list index 33584b06..25dc9676 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -1660,6 +1660,7 @@ stagnate $2 stampede $2 strychnine str'Ikni:n slavish sleIvIS +?3 status stat@s sterile stEraIl stomata stoUm@t@ stonily stoUnIlI2 diff --git a/phsource/vdiph/8u b/phsource/vdiph/8u index 10ec939d..2e922607 100644 Binary files a/phsource/vdiph/8u and b/phsource/vdiph/8u differ diff --git a/phsource/vwl_en_us/a b/phsource/vwl_en_us/a index 7ec066d3..a86427a5 100644 Binary files a/phsource/vwl_en_us/a and b/phsource/vwl_en_us/a differ diff --git a/phsource/vwl_en_us/ir b/phsource/vwl_en_us/ir index 6dc08a66..edd9963a 100644 Binary files a/phsource/vwl_en_us/ir and b/phsource/vwl_en_us/ir differ diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 59f02aa2..3104e1d0 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -1938,6 +1938,8 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec case RULE_NO_SUFFIX: if(word_flags & FLAG_SUFFIX_REMOVED) failed = 1; // a suffix has been removed + else + match.points++; break; default: diff --git a/src/extras.cpp b/src/extras.cpp index 50e9045c..31516ffa 100644 --- a/src/extras.cpp +++ b/src/extras.cpp @@ -39,7 +39,6 @@ //****************************************************************************************************** - FILE *f_wavtest = NULL; FILE *f_events = NULL; @@ -215,8 +214,8 @@ void DecodePhonemes2(const char *inptr, char *outptr) int start; static const char *stress_chars = "==,,'* "; - unsigned int replace_ph[] = {',',PH('@','-'),'W','3','y',PH('A',':'),'*',PH('_','!'),PH('_','|'),PH('O','I'),PH('Y',':'),PH('p','F'),0}; - const char *replace_ph2[] = {NULL,NULL, "9","@r","Y", "a:", "r", "?", "?", "OY", "2:", "pf" ,NULL}; + unsigned int replace_ph[] = {',',PH('@','-'),'W','3','y',PH('A',':'),'*',PH('_','!'),PH('_','|'),PH('O','I'),PH('Y',':'),PH('p','F'),PH('E','2'),0}; + const char *replace_ph2[] = {NULL,NULL, "9","@r","Y", "a:", "r", "?", "?", "OY", "2:", "pf" ,"E",NULL}; start = 1; @@ -229,7 +228,7 @@ void DecodePhonemes2(const char *inptr, char *outptr) if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->spect == 0)) { - if(ph->std_length > 3) + if(ph->std_length > 2) *outptr++ = stress_chars[ph->std_length]; } else @@ -302,12 +301,12 @@ void Lexicon_De() char pronounce[80]; char pronounce2[80]; char phonemes[80]; + char phonemes2[80]; WORD_TAB winfo; - static char *vowels = "aeiouyAEIOU29@"; + static char *vowels = "aeiouyAEIOUY29@"; - wxString fname = wxFileSelector(_T("German Lexicon"),wxString(path_home,wxConvLocal), - _T(""),_T(""),_T("*"),wxOPEN); + wxString fname = wxFileSelector(_T("German Lexicon"),path_dir1,_T(""),_T(""),_T("*"),wxOPEN); strcpy(buf,fname.mb_str(wxConvLocal)); if((f_in = fopen(buf,"r")) == NULL) @@ -315,6 +314,7 @@ void Lexicon_De() wxLogError(_T("Can't read file ")+fname); return; } + path_dir1 = wxFileName(fname).GetPath(); if((f_out = fopen("compare_de","w")) == NULL) { @@ -331,7 +331,7 @@ void Lexicon_De() if(fgets(buf,sizeof(buf),f_in) == NULL) break; - sscanf(buf,"%s\t%s\t%s",word,type,pronounce); + sscanf(buf,"%s %s %s",word,type,pronounce); // convert word to lower-case for(ix=0, p=&word2[1];;) @@ -397,9 +397,27 @@ void Lexicon_De() } else { - if(strlen(word) < 8) - strcat(word,"\t"); - fprintf(f_out,"%s\t%s\t%s\n",word,phonemes,pronounce2); + // remove secondary stress + strcpy(phonemes2,phonemes); + p = phonemes; + for(ix=0; ;ix++) + { + if((c = phonemes2[ix]) != ',') + *p++ = c; + if(c == 0) + break; + } + + if(strcmp(phonemes,pronounce2) == 0) + { + matched++; + } + else + { + if(strlen(word) < 8) + strcat(word,"\t"); + fprintf(f_out,"%s\t%s\t%s\n",word,phonemes,pronounce2); + } } } diff --git a/src/options.cpp b/src/options.cpp index 06bdf680..99d732ac 100755 --- a/src/options.cpp +++ b/src/options.cpp @@ -49,6 +49,7 @@ wxString path_voices; wxString path_phsource; wxString path_dictsource; wxString path_speaktext; +wxString path_dir1; int option_speed=160; char path_dsource[120]; @@ -166,6 +167,7 @@ void ConfigInit() pConfig->Read(_T("/phsource"),&path_phsource,basedir+_T("/phsource")); pConfig->Read(_T("/dictsource"),&path_dictsource,basedir+_T("/dictsource")); pConfig->Read(_T("/speaktext"),&path_speaktext,wxEmptyString); + pConfig->Read(_T("/dir1"),&path_dir1,basedir); option_speed = pConfig->Read(_T("/speed"),160); ConfigSetPaths(); } // end of ConfigInit @@ -191,6 +193,7 @@ void ConfigSave(int exit) pConfig->Write(_T("/dictsource"),path_dictsource); pConfig->Write(_T("/speaktext"),path_speaktext); pConfig->Write(_T("/speed"),option_speed); + pConfig->Write(_T("/dir1"),path_dir1); if(exit) delete wxFileConfig::Set((wxFileConfig *)NULL); diff --git a/src/options.h b/src/options.h index 55dd3586..b6e2f598 100755 --- a/src/options.h +++ b/src/options.h @@ -35,6 +35,7 @@ extern wxString path_pitches; extern wxString path_voices; extern wxString path_phsource; extern wxString path_dictsource; +extern wxString path_dir1; extern char path_source[80]; extern char path_dsource[120];