[1.26.05] Fix count of upper-case letters in a word to consider multibyte characters.

Mbrola translations, option to not match across a word boundary.
Mbrola translations, allow check of lengthen indicator [:].
espeakedit, add operation to apply a voice's formants modifications to a keyframe.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@47 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-06-14 18:41:52 +00:00
parent 2dbbff737b
commit 188b0d7c11
20 changed files with 220 additions and 131 deletions
+6 -1
View File
@@ -1601,6 +1601,7 @@ void *Translator::TranslateClause(FILE *f_text, const void *vp_input, int *tone_
int dict_flags; // returned from dictionary lookup
int word_flags; // set here
int embedded_count = 0;
int letter_count = 0;
char *word;
char *p;
int j, k;
@@ -1854,6 +1855,8 @@ if((c == '/') && (langopts.testing & 2) && isdigit(next_in) && IsAlpha(prev_out)
{
if(!IsAlpha(prev_out) || (langopts.ideographs && (c >= 0x3000)))
{
letter_count = 0;
if((prev_out != ' ') && (prev_out != '\''))
{
// start of word, insert space if not one there already
@@ -1875,6 +1878,8 @@ if((c == '/') && (langopts.testing & 2) && isdigit(next_in) && IsAlpha(prev_out)
}
}
letter_count++;
if(iswupper(c))
{
c = towlower(c);
@@ -1909,7 +1914,7 @@ if((c == '/') && (langopts.testing & 2) && isdigit(next_in) && IsAlpha(prev_out)
source_index = prev_source_index; // unget
}
#endif
if((all_upper_case) && ((ix - words[word_count].start) > 1))
if((all_upper_case) && (letter_count > 2))
{
if((c == 's') && (next_in==' '))
{