Fixes for ordinal numbers (lang=hu). Change phoneme names in Indian languages , [t.h] and [d.h] to [th.] [dh.] git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@226 d46cf337-b52f-0410-862d-fd96e6ae7743master
_) ne (g ne: | _) ne (g ne: | ||||
neglig ne:gli:Z | neglig ne:gli:Z | ||||
neglige ne:gli:Z | neglige ne:gli:Z | ||||
&in) nen (_S3 @n | |||||
&) ness _^_EN | &) ness _^_EN | ||||
news _^_EN | news _^_EN | ||||
nieder ni:d3 | nieder ni:d3 | ||||
_) voll (z f%Ol | _) voll (z f%Ol | ||||
_) vorder fO*d@* | _) vorder fO*d@* | ||||
-) vorha (nd fo:*h'a | -) vorha (nd fo:*h'a | ||||
_) vor (ne 'fO* | |||||
_) vor (ne 'fo:* | |||||
_) vor (n fO* | |||||
_) vor (@P3 'fo:* | _) vor (@P3 'fo:* | ||||
_) voraus (@P6 fo:*'aUs | _) voraus (@P6 fo:*'aUs |
uei uo y y& y@ yE yi yu | uei uo y y& y@ yE yi yu | ||||
; C f h j k kh l | ; C f h j k kh l | ||||
L m n N p ph r R | |||||
s s. S; t th ts ts. ts. | |||||
tS; tS; tsh v w x X z. | |||||
L m n N p ph q r | |||||
R s s. S; t th ts ts. | |||||
ts. tS; tS; tsh v w x X | |||||
z. | |||||
Dictionary ca_dict | Dictionary ca_dict | ||||
U u: u~ V | U u: u~ V | ||||
- : b bh c ch d d. | - : b bh c ch d d. | ||||
d.h dh f g gh h H j | |||||
dh dh. f g gh h H j | |||||
J Jh k kh l l. m n | J Jh k kh l l. m n | ||||
N n. n^ p ph Q q r | N n. n^ p ph Q q r | ||||
r. s S s. t T t. t.h | |||||
th v w x z | |||||
r. s S s. t T t. th | |||||
th. v w x z | |||||
Dictionary ta_dict | Dictionary ta_dict | ||||
V | V | ||||
* b B bh c C ch d | * b B bh c C ch d | ||||
d. d.h dh g gh h j J | |||||
d. dh dh. g gh h j J | |||||
Jh k kh l m n N n. | Jh k kh l m n N n. | ||||
n^ p ph Q r r. s S | n^ p ph Q r r. s S | ||||
s. t t. t.h th tS x z | |||||
s. t t. th th. tS x z | |||||
Dictionary eu_dict | Dictionary eu_dict | ||||
I i: o o: r- u u: V | I i: o o: r- u u: V | ||||
y | y | ||||
: b bh c ch d d. d.h | |||||
dh dZ f g gh h j J | |||||
: b bh c ch d d. dh | |||||
dh. dZ f g gh h j J | |||||
Jh k kh l l. m n N | Jh k kh l l. m n N | ||||
n. n^ p ph R R2 s S | n. n^ p ph R R2 s S | ||||
s. S; t t. t.h th tS v | |||||
s. S; t t. th th. tS v | |||||
w z | w z | ||||
I i: o o: r- u u: V | I i: o o: r- u u: V | ||||
y | y | ||||
: b bh c ch d d. d.h | |||||
dh dZ f g gh h j J | |||||
: b bh c ch d d. dh | |||||
dh. dZ f g gh h j J | |||||
Jh k kh l l. m n N | Jh k kh l l. m n N | ||||
n. n^ p ph R R2 s s. | n. n^ p ph R R2 s s. | ||||
S; t t. t.h th tS v w | |||||
S; t t. th th. tS v w | |||||
z z. | z z. | ||||
V~ | V~ | ||||
- : b bh c ch d d. | - : b bh c ch d d. | ||||
d.h dh f g gh h H j | |||||
J Jh k kh l l. m n | |||||
N n. n^ p ph Q q r | |||||
r. s S s. t T t. t.h | |||||
th v w x z z. | |||||
dh f g gh h H j J | |||||
Jh k kh l l. m n N | |||||
n. n^ p ph Q q r r. | |||||
s S s. t T t. th v | |||||
w x z z. | |||||
Dictionary pap_dict | Dictionary pap_dict | ||||
Dictionary pa_dict | Dictionary pa_dict | ||||
a a~ e E e~ E~ i I | |||||
i: i~ I~ o O o: O~ o~ | |||||
r- U u u~ U~ V V~ | |||||
@ a a~ e E e~ E~ i | |||||
I i: i~ I~ o O o: O~ | |||||
o~ r- U u u~ U~ V V~ | |||||
: b bh c ch d d. d.h | |||||
dh f g gh H j J Jh | |||||
k kh l l. m n N n. | |||||
n^ p ph Q R s S t | |||||
t. t.h th v x z | |||||
: ; b bh c ch d d. | |||||
dh dh. f g gh H j J | |||||
Jh k kh l l. m n N | |||||
n. n^ p ph Q R s S | |||||
t t. th th. v x z |
_5 p'a:nc | _5 p'a:nc | ||||
_6 ch'@2 | _6 ch'@2 | ||||
_7 s'a:t | _7 s'a:t | ||||
_8 'a:t.h | |||||
_8 'a:th. | |||||
_9 n'O: | _9 n'O: | ||||
?3 _9 n'aU | ?3 _9 n'aU | ||||
_15 p'Vndr@2 | _15 p'Vndr@2 | ||||
_16 s'o:l@2 | _16 s'o:l@2 | ||||
_17 s'Vt:r@2 | _17 s'Vt:r@2 | ||||
_18 Vt.h:'a:r@2 | |||||
_18 Vth.:'a:r@2 | |||||
_19 Unn'Is | _19 Unn'Is | ||||
_20 b'i:s | _20 b'i:s | ||||
_58 ath:'a:w@n | _58 ath:'a:w@n | ||||
_59 Uns'Vth | _59 Uns'Vth | ||||
_60 s'a:t.h | |||||
_61 'Iks@t.h | |||||
_62 b'a:s@t.h | |||||
_63 t'Irs@t.h | |||||
_64 c'O~s@t.h | |||||
_65 paIns@t.h | |||||
_66 ch'Ija:s@t.h | |||||
_67 s'Vrs@t.h | |||||
_68 ars@t.h | |||||
_60 s'a:th. | |||||
_61 'Iks@th. | |||||
_62 b'a:s@th. | |||||
_63 t'Irs@th. | |||||
_64 c'O~s@th. | |||||
_65 paIns@th. | |||||
_66 ch'Ija:s@th. | |||||
_67 s'Vrs@th. | |||||
_68 ars@th. | |||||
_69 Un@h,at:'Vr: | _69 Un@h,at:'Vr: | ||||
_70 sat:'Vr: | _70 sat:'Vr: | ||||
झ Jh@ | झ Jh@ | ||||
ञ n^@ | ञ n^@ | ||||
ट t.@ | ट t.@ | ||||
ठ t.h@ | |||||
ठ th.@ | |||||
ड d.@ | ड d.@ | ||||
ड़ r.@ | ड़ r.@ | ||||
ढ d.h@ | |||||
ढ dh.@ | |||||
ण n.@ // retroflex n.@ | ण n.@ // retroflex n.@ | ||||
त t@ | त t@ | ||||
थ th@ | थ th@ |
?1 ट (_ t. | ?1 ट (_ t. | ||||
.group ठ | .group ठ | ||||
ठ t.hV | |||||
ठ (B t.h | |||||
?1 ठ (_ t.h | |||||
ठ th.V | |||||
ठ (B th. | |||||
?1 ठ (_ th. | |||||
.group ड | .group ड | ||||
ड d.V | ड d.V | ||||
?1 ड़ (_ r. | ?1 ड़ (_ r. | ||||
.group ढ | .group ढ | ||||
ढ d.hV | |||||
ढ (B d.h | |||||
?1 ढ (_ d.h | |||||
ढ dh.V | |||||
ढ (B dh. | |||||
?1 ढ (_ dh. | |||||
ढ़ r.hV // nukta (should retroflex flap) | ढ़ r.hV // nukta (should retroflex flap) | ||||
ढ़ (B r.h // nukta | ढ़ (B r.h // nukta | ||||
?1 ढ़ (_ r.h // nukta | ?1 ढ़ (_ r.h // nukta |
nyol) c (sz ts | nyol) c (sz ts | ||||
har) c (sz ts | har) c (sz ts | ||||
lán) c (sz ts | lán) c (sz ts | ||||
pá) c ts | |||||
pá) c (só ts | |||||
per) c (sz ts | per) c (sz ts | ||||
pol) c (so ts | pol) c (so ts | ||||
por) c (sé ts | por) c (sé ts | ||||
tsé tSe: | tsé tSe: | ||||
t (cs t | t (cs t | ||||
ttsé tS:e: | ttsé tS:e: | ||||
tsu tSu | |||||
j) ts tS | |||||
C) tj c | C) tj c | ||||
A) tj (A c: | A) tj (A c: | ||||
C) tyj c | C) tyj c |
U+bf9 ru:ba:j | U+bf9 ru:ba:j | ||||
// abbreviations | // abbreviations | ||||
ரூ ru:ba:j $dot | |||||
Rs ru:pi:z $dot | |||||
ரூ ru:ba:j $dot $only | |||||
Rs ru:pi:z $dot $only | |||||
// numbers | // numbers | ||||
_0 suz.ijVm // சுழியம் | _0 suz.ijVm // சுழியம் |
61 phoneme tables | 61 phoneme tables | ||||
new total | new total | ||||
base 103 103 | |||||
base2 26 124 | |||||
en 50 149 | |||||
en_n 32 149 | |||||
en_us 37 150 | |||||
en_sc 39 151 | |||||
en_rp 34 149 | |||||
en_wm 31 149 | |||||
en_wi 30 149 | |||||
af 39 135 | |||||
cy 29 129 | |||||
de 33 130 | |||||
eo 13 115 | |||||
jbo 4 116 | |||||
fi 40 134 | |||||
fr 55 141 | |||||
fr_ca 11 141 | |||||
hi 62 151 | |||||
ta 20 154 | |||||
hu 23 119 | |||||
lv 29 126 | |||||
nl 28 126 | |||||
pl 20 117 | |||||
sk 28 135 | |||||
cs 6 135 | |||||
hr 26 140 | |||||
mk 3 141 | |||||
sr 14 140 | |||||
ru 39 134 | |||||
it 17 127 | |||||
la 21 121 | |||||
base 104 104 | |||||
base2 26 125 | |||||
en 50 150 | |||||
en_n 32 150 | |||||
en_us 37 151 | |||||
en_sc 39 152 | |||||
en_rp 34 150 | |||||
en_wm 31 150 | |||||
en_wi 30 150 | |||||
af 39 136 | |||||
cy 29 130 | |||||
de 33 131 | |||||
eo 13 116 | |||||
jbo 4 117 | |||||
fi 40 135 | |||||
fr 55 142 | |||||
fr_ca 11 142 | |||||
hi 62 152 | |||||
ta 20 155 | |||||
hu 23 120 | |||||
lv 29 127 | |||||
nl 28 127 | |||||
pl 20 118 | |||||
sk 28 136 | |||||
cs 6 136 | |||||
hr 26 141 | |||||
mk 3 142 | |||||
sr 14 141 | |||||
ru 39 135 | |||||
it 17 128 | |||||
la 21 122 | |||||
es 9 125 | es 9 125 | ||||
es_la 1 125 | es_la 1 125 | ||||
ca 11 127 | ca 11 127 | ||||
pt 28 140 | |||||
pt_pt 20 140 | |||||
ro 36 146 | |||||
el 8 124 | |||||
grc 12 128 | |||||
sv 25 125 | |||||
no 28 129 | |||||
is 33 129 | |||||
vi 41 140 | |||||
zhy 41 137 | |||||
zh 66 154 | |||||
sw 14 112 | |||||
tr 18 127 | |||||
ku 18 128 | |||||
id 15 126 | |||||
sq 35 127 | |||||
hy 24 119 | |||||
da 21 118 | |||||
rw 15 131 | |||||
ml 13 153 | |||||
kn 15 153 | |||||
bn 59 157 | |||||
ne 18 159 | |||||
mr 12 151 | |||||
eu 6 125 | |||||
mn 15 114 | |||||
pa 12 152 | |||||
pt 28 141 | |||||
pt_pt 20 141 | |||||
ro 36 147 | |||||
el 8 125 | |||||
grc 12 129 | |||||
sv 25 126 | |||||
no 28 130 | |||||
is 33 130 | |||||
vi 41 141 | |||||
zhy 41 138 | |||||
zh 66 155 | |||||
sw 14 113 | |||||
tr 18 128 | |||||
ku 18 129 | |||||
id 15 127 | |||||
sq 35 128 | |||||
hy 24 120 | |||||
da 21 119 | |||||
rw 15 132 | |||||
ml 13 154 | |||||
kn 15 154 | |||||
bn 59 159 | |||||
ne 18 160 | |||||
mr 12 152 | |||||
eu 6 126 | |||||
mn 15 115 | |||||
pa 13 153 | |||||
Data file Used by | Data file Used by | ||||
b/b [b] base | b/b [b] base | ||||
[d] hi | [d] hi | ||||
[d.] hi | [d.] hi | ||||
[dh] hi | [dh] hi | ||||
[d.h] hi | |||||
[dh.] hi | |||||
[d] hu | [d] hu | ||||
[d] pl | [d] pl | ||||
[dz] pl | [dz] pl | ||||
ustop/q_u [q] base | ustop/q_u [q] base | ||||
ustop/t [t] base | ustop/t [t] base | ||||
[t2] en | [t2] en | ||||
[d.h] hi | |||||
[t.h] hi | |||||
[dh.] hi | |||||
[th.] hi | |||||
[t] zhy | [t] zhy | ||||
[t.h] bn | [t.h] bn | ||||
ustop/t_ [t] base | ustop/t_ [t] base | ||||
[v] is | [v] is | ||||
[v] da | [v] da | ||||
[v] bn | [v] bn | ||||
[v] pa | |||||
voc/v_ [B] base | voc/v_ [B] base | ||||
[v] base | [v] base | ||||
[v] fi | [v] fi | ||||
[v] is | [v] is | ||||
[v] da | [v] da | ||||
[v] bn | [v] bn | ||||
voc/v# [v] hi | |||||
voc/v#_ [v] hi | |||||
[v] pa | |||||
voc/v# [v#] base | |||||
[v] hi | |||||
voc/v#_ [v#] base | |||||
[v] hi | |||||
voc/v2 [v#] es | voc/v2 [v#] es | ||||
voc/vj [v] base | voc/vj [v] base | ||||
[v] fr | [v] fr | ||||
[v] pa | |||||
vocw/dh [D] base | vocw/dh [D] base | ||||
[D] es | [D] es | ||||
vocw/Q [Q] base | vocw/Q [Q] base | ||||
[v] ta | [v] ta | ||||
[v#] es | [v#] es | ||||
[v;] ro | [v;] ro | ||||
[v] pa | |||||
vocw/zh [Z] base | vocw/zh [Z] base | ||||
[Z;] ro | [Z;] ro | ||||
vocw/zh_rfx [z.] base | vocw/zh_rfx [z.] base | ||||
[t#] en_us | [t#] en_us | ||||
[d] fr | [d] fr | ||||
[d.] hi | [d.] hi | ||||
[d.h] hi | |||||
[dh.] hi | |||||
[d] hr | [d] hr | ||||
[d] el | [d] el | ||||
[d] is | [d] is |
switchvoicing d. | switchvoicing d. | ||||
endphoneme | endphoneme | ||||
phoneme t.h | |||||
phoneme th. | |||||
vls rfx stop | vls rfx stop | ||||
vowelin f1=0 f2=1800 -300 300 f3=-400 80 | vowelin f1=0 f2=1800 -300 300 f3=-400 80 | ||||
vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2 | vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2 | ||||
lengthmod 2 | lengthmod 2 | ||||
wave ustop/t | wave ustop/t | ||||
// wave ustop/th_rfx | // wave ustop/th_rfx | ||||
switchvoicing d.h | |||||
switchvoicing dh. | |||||
endphoneme | endphoneme | ||||
phoneme d. | phoneme d. | ||||
switchvoicing t. | switchvoicing t. | ||||
endphoneme | endphoneme | ||||
phoneme d.h | |||||
phoneme dh. | |||||
vcd rfx stop | vcd rfx stop | ||||
vowelin f1=1 f2=1800 -300 300 f3=-400 80 | vowelin f1=1 f2=1800 -300 300 f3=-400 80 | ||||
vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2 | vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2 | ||||
// formants d/xd+x/d+ustop/th_rfx | // formants d/xd+x/d+ustop/th_rfx | ||||
after @ d/xd | after @ d/xd | ||||
lengthmod 5 | lengthmod 5 | ||||
switchvoicing t.h | |||||
switchvoicing th. | |||||
endphoneme | endphoneme | ||||
endphoneme | endphoneme | ||||
phoneme v# // approximant, not fricative | |||||
vcd lbd frc | |||||
vowelin f1=1 f2=900 -300 -300 f3=-100 100 | |||||
vowelout f1=1 f2=900 -500 -300 f3=-100 60 len=50 | |||||
lengthmod 6 | |||||
formants voc/v# | |||||
before _ voc/v#_ | |||||
switchvoicing f | |||||
endphoneme | |||||
phoneme D | phoneme D | ||||
vcd dnt frc | vcd dnt frc | ||||
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 | vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 |
int value; | int value; | ||||
int subtract; | int subtract; | ||||
int repeat = 0; | int repeat = 0; | ||||
int wflags = 0; | |||||
WORD_TAB wtab[2]; | |||||
unsigned int flags; | unsigned int flags; | ||||
char ph_roman[30]; | char ph_roman[30]; | ||||
char number_chars[N_WORD_BYTES]; | char number_chars[N_WORD_BYTES]; | ||||
acc = 0; | acc = 0; | ||||
prev = 0; | prev = 0; | ||||
subtract = 0x7fff; | subtract = 0x7fff; | ||||
memset(wtab, 0, sizeof(wtab)); | |||||
while((c = *word++) != ' ') | while((c = *word++) != ' ') | ||||
{ | { | ||||
sprintf(number_chars," %d ",acc); | sprintf(number_chars," %d ",acc); | ||||
if(tr->langopts.numbers & NUM_ROMAN_ORDINAL) | if(tr->langopts.numbers & NUM_ROMAN_ORDINAL) | ||||
wflags |= FLAG_ORDINAL; | |||||
TranslateNumber(tr, &number_chars[1], p, &flags, wflags); | |||||
wtab[0].flags |= FLAG_ORDINAL; | |||||
TranslateNumber(tr, &number_chars[1], p, &flags, wtab); | |||||
if(tr->langopts.numbers & NUM_ROMAN_AFTER) | if(tr->langopts.numbers & NUM_ROMAN_AFTER) | ||||
strcat(ph_out,ph_roman); | strcat(ph_out,ph_roman); | ||||
} // end of LookupNum3 | } // end of LookupNum3 | ||||
static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned int *flags, int wflags) | |||||
{//==================================================================================================== | |||||
static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned int *flags, WORD_TAB *wtab) | |||||
{//======================================================================================================== | |||||
// Number translation with various options | // Number translation with various options | ||||
// the "word" may be up to 4 digits | // the "word" may be up to 4 digits | ||||
// "words" of 3 digits may be preceded by another number "word" for thousands or millions | // "words" of 3 digits may be preceded by another number "word" for thousands or millions | ||||
value = this_value = atoi(word); | value = this_value = atoi(word); | ||||
ph_ordinal2[0] = 0; | ph_ordinal2[0] = 0; | ||||
if((tr->langopts.numbers & NUM_ORDINAL_DOT) && (word[ix] == '.') && !isdigit(word[ix+2])) | |||||
if((tr->langopts.numbers & NUM_ORDINAL_DOT) && (word[ix] == '.') && IsAlpha(word[ix+2]) && !(wtab[1].flags & FLAG_FIRST_UPPER)) | |||||
{ | { | ||||
// ordinal number is indicated by dot after the number | // ordinal number is indicated by dot after the number | ||||
// but not if the next word starts with an upper-case letter | |||||
ordinal = 2; | ordinal = 2; | ||||
word[ix] = ' '; | word[ix] = ' '; | ||||
} | } | ||||
} | } | ||||
if(wflags & FLAG_ORDINAL) | |||||
if(wtab[0].flags & FLAG_ORDINAL) | |||||
ordinal = 2; | ordinal = 2; | ||||
ph_append[0] = 0; | ph_append[0] = 0; | ||||
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, int wflags) | |||||
{//============================================================================================ | |||||
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, WORD_TAB *wtab) | |||||
{//================================================================================================ | |||||
if(option_sayas == SAYAS_DIGITS1) | if(option_sayas == SAYAS_DIGITS1) | ||||
return(0); // speak digits individually | return(0); // speak digits individually | ||||
if(tr->langopts.numbers != 0) | if(tr->langopts.numbers != 0) | ||||
return(TranslateNumber_1(tr, word1, ph_out, flags, wflags)); | |||||
return(TranslateNumber_1(tr, word1, ph_out, flags, wtab)); | |||||
return(0); | return(0); | ||||
} // end of TranslateNumber | } // end of TranslateNumber |
#include "translate.h" | #include "translate.h" | ||||
#include "wave.h" | #include "wave.h" | ||||
const char *version_string = "1.41.11 09.Oct.09"; | |||||
const char *version_string = "1.41.13 10.Oct.09"; | |||||
const int version_phdata = 0x014100; | const int version_phdata = 0x014100; | ||||
int option_device_number = -1; | int option_device_number = -1; |
if(name2 == L('p','a')) | if(name2 == L('p','a')) | ||||
{ | { | ||||
tr->langopts.numbers = 0; // no number rules yet | |||||
tr->letter_bits_offset = OFFSET_GURMUKHI; | tr->letter_bits_offset = OFFSET_GURMUKHI; | ||||
} | } | ||||
SetIndicLetters(tr); | SetIndicLetters(tr); |
if(word_phonemes[0] == phonSWITCH) | if(word_phonemes[0] == phonSWITCH) | ||||
return(0); | return(0); | ||||
found = TranslateNumber(tr,word1,phonemes,dictionary_flags,wflags); | |||||
found = TranslateNumber(tr,word1,phonemes,dictionary_flags,wtab); | |||||
} | } | ||||
if(!found & ((wflags & FLAG_UPPERS) != FLAG_FIRST_UPPER)) | if(!found & ((wflags & FLAG_UPPERS) != FLAG_FIRST_UPPER)) | ||||
int prev_out2; | int prev_out2; | ||||
int prev_in2=0; | int prev_in2=0; | ||||
int next_in; | int next_in; | ||||
int next_in_nbytes; | |||||
int char_inserted=0; | int char_inserted=0; | ||||
int clause_pause; | int clause_pause; | ||||
int pre_pause_add=0; | int pre_pause_add=0; | ||||
source_index += utf8_in(&cc,&source[source_index]); // cc = source[source_index++]; | source_index += utf8_in(&cc,&source[source_index]); // cc = source[source_index++]; | ||||
c = cc; | c = cc; | ||||
} | } | ||||
utf8_in(&next_in,&source[source_index]); | |||||
next_in_nbytes = utf8_in(&next_in,&source[source_index]); | |||||
if((c == CTRL_EMBEDDED) || (c == ctrl_embedded)) | if((c == CTRL_EMBEDDED) || (c == ctrl_embedded)) | ||||
{ | { | ||||
prev_in2 = c; | prev_in2 = c; | ||||
} | } | ||||
else | else | ||||
if((c != ' ') && iswupper(prev_in) && iswlower(next_in) && | |||||
(memcmp(&source[source_index],"s ",2) != 0)) // ENGLISH specific plural | |||||
if((c != ' ') && iswupper(prev_in) && iswlower(next_in)) | |||||
{ | { | ||||
c = ' '; // change from upper to lower case, start new word at the last uppercase | |||||
space_inserted = 1; | |||||
prev_in2 = c; | |||||
next_word_flags |= FLAG_NOSPACE; | |||||
int next2_in; | |||||
utf8_in(&next2_in,&source[source_index + next_in_nbytes]); | |||||
if(IsAlpha(next2_in)) | |||||
{ | |||||
// changing from upper to lower case, start new word at the last uppercase, if 3 or more letters | |||||
c = ' '; | |||||
space_inserted = 1; | |||||
prev_in2 = c; | |||||
next_word_flags |= FLAG_NOSPACE; | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |
void DeleteTranslator(Translator *tr); | void DeleteTranslator(Translator *tr); | ||||
int Lookup(Translator *tr, const char *word, char *ph_out); | int Lookup(Translator *tr, const char *word, char *ph_out); | ||||
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, int wflags); | |||||
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, WORD_TAB *wtab); | |||||
int TranslateRoman(Translator *tr, char *word, char *ph_out); | int TranslateRoman(Translator *tr, char *word, char *ph_out); | ||||
void ChangeWordStress(Translator *tr, char *word, int new_stress); | void ChangeWordStress(Translator *tr, char *word, int new_stress); |