mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 22:53:38 +00:00
[1.46.21]
For languages with non-Latin alphabets (eg. Cyrillic), don't allow a mixture of native and Latin characters in a word. Instead break it into separate words. Dictionary changes for: ta, hu, pt, ne,. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@286 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -2797,6 +2797,20 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
|
||||
|
||||
letter_count++;
|
||||
|
||||
if(tr->letter_bits_offset > 0)
|
||||
{
|
||||
if(((c < 0x250) && (prev_out >= tr->letter_bits_offset)) ||
|
||||
((c >= tr->letter_bits_offset) && (letter_count > 1) && (prev_out < 0x250)))
|
||||
{
|
||||
// Don't mix native and Latin characters in the same word
|
||||
// Break into separate words
|
||||
c = ' ';
|
||||
space_inserted = 1;
|
||||
word_flags |= FLAG_HYPHEN_AFTER;
|
||||
next_word_flags |= FLAG_HYPHEN;
|
||||
}
|
||||
}
|
||||
|
||||
if(iswupper(c))
|
||||
{
|
||||
c = towlower2(c);
|
||||
|
||||
Reference in New Issue
Block a user