|
|
|
|
|
|
|
|
int clause_start_word; |
|
|
int clause_start_word; |
|
|
int new_sentence; |
|
|
int new_sentence; |
|
|
static int word_emphasis = 0; // set if emphasis level 3 or 4 |
|
|
static int word_emphasis = 0; // set if emphasis level 3 or 4 |
|
|
|
|
|
static int embedded_flag = 0; // there are embedded commands to be applied to the next phoneme, used in TranslateWord2() |
|
|
|
|
|
|
|
|
static int prev_clause_pause=0; |
|
|
static int prev_clause_pause=0; |
|
|
static int max_clause_pause = 0; |
|
|
static int max_clause_pause = 0; |
|
|
|
|
|
|
|
|
p->phcode = phcode; |
|
|
p->phcode = phcode; |
|
|
p->stress = 0; |
|
|
p->stress = 0; |
|
|
p->tone_number = 0; |
|
|
p->tone_number = 0; |
|
|
p->synthflags = 0; |
|
|
|
|
|
|
|
|
p->synthflags = embedded_flag; |
|
|
p->sourceix = 0; |
|
|
p->sourceix = 0; |
|
|
|
|
|
embedded_flag = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int CountSyllables(unsigned char *phonemes) |
|
|
static int CountSyllables(unsigned char *phonemes) |
|
|
|
|
|
|
|
|
int next_tone=0; |
|
|
int next_tone=0; |
|
|
unsigned char *p; |
|
|
unsigned char *p; |
|
|
int srcix; |
|
|
int srcix; |
|
|
int embedded_flag=0; |
|
|
|
|
|
int embedded_cmd; |
|
|
int embedded_cmd; |
|
|
int value; |
|
|
int value; |
|
|
int found_dict_flag; |
|
|
int found_dict_flag; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
if(ph_code == phonPAUSE_CLAUSE) |
|
|
|
|
|
{ |
|
|
|
|
|
int j; |
|
|
|
|
|
for(j = n_ph_list2-1; j > 0; j--) |
|
|
|
|
|
{ |
|
|
|
|
|
if(ph_list2[j].synthflags & SFLAG_PROMOTE_STRESS) |
|
|
|
|
|
{ |
|
|
|
|
|
// lang=fr: stress monosyllables before conjunctions 'et' 'qui' etc |
|
|
|
|
|
ph_list2[j].stress = 4; |
|
|
|
|
|
} |
|
|
|
|
|
if(ph_list2[j].sourceix != 0) |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING]) |
|
|
if(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING]) |
|
|
{ |
|
|
{ |
|
|
if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) || |
|
|
if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) || |
|
|
|
|
|
|
|
|
char *p; |
|
|
char *p; |
|
|
int j, k; |
|
|
int j, k; |
|
|
int n_digits; |
|
|
int n_digits; |
|
|
int charix_top; |
|
|
|
|
|
|
|
|
int charix_top=0; |
|
|
|
|
|
|
|
|
short charix[N_TR_SOURCE+4]; |
|
|
short charix[N_TR_SOURCE+4]; |
|
|
WORD_TAB words[N_CLAUSE_WORDS]; |
|
|
WORD_TAB words[N_CLAUSE_WORDS]; |
|
|
|
|
|
|
|
|
p2 = &ph_list2[n_ph_list2 + ix]; |
|
|
p2 = &ph_list2[n_ph_list2 + ix]; |
|
|
p2->phcode = phonPAUSE; |
|
|
p2->phcode = phonPAUSE; |
|
|
p2->stress = 0; |
|
|
p2->stress = 0; |
|
|
p2->sourceix = 0; |
|
|
|
|
|
|
|
|
p2->sourceix = source_index; |
|
|
p2->synthflags = 0; |
|
|
p2->synthflags = 0; |
|
|
} |
|
|
} |
|
|
n_ph_list2 += 2; |
|
|
n_ph_list2 += 2; |
|
|
|
|
|
|
|
|
option_sayas2 = 0; |
|
|
option_sayas2 = 0; |
|
|
option_emphasis = 0; |
|
|
option_emphasis = 0; |
|
|
word_emphasis = 0; |
|
|
word_emphasis = 0; |
|
|
|
|
|
embedded_flag = 0; |
|
|
|
|
|
|
|
|
InitText2(); |
|
|
InitText2(); |
|
|
|
|
|
|