[espeak-ng:master] reported: Capital letter indication missing nouns after prepositions in some languages #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #949 Capital letter indication missing nouns after prepositions in some languages
By jaacoppi:

My assumption so far:

word_flags is a copy of the flags of the first word: https://github.com/espeak-ng/espeak-ng/blob/40b78f5183f66958b333d8a54f0ab25a9576be5e/src/libespeak-ng/translate.c#L1338

That is checked for FLAG_FIRST_UPPER (First letter is a capital) here: https://github.com/espeak-ng/espeak-ng/blob/40b78f5183f66958b333d8a54f0ab25a9576be5e/src/libespeak-ng/translate.c#L1373

The code block starting here somehow loses FLAG_FIRST_UPPER when combining wtab[0] and wtab[1].

Keeping the FLAG_FIRST_UPPER when combining the words might cause problems elsewhere since bez in "bez Libora" obviously isn't a capital letter.


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #949 Capital letter indication missing nouns after prepositions in some languages
By jaacoppi:

This is more complicated than I thought.

This line combines the two words and loses FLAG_FIRST_UPPER: https://github.com/espeak-ng/espeak-ng/blob/1df852a1ae8cf0f218c5275b4ed1b69958a46f4e/src/libespeak-ng/translate.c#L1470 Readding the flag would cause a beep before the new combined word.

This block checks for FLAG_FIRST_UPPER and creates the beep / #X1 of -k 1: https://github.com/espeak-ng/espeak-ng/blob/1df852a1ae8cf0f218c5275b4ed1b69958a46f4e/src/libespeak-ng/translate.c#L1573

The problem is that with the example "bez Libora" the beep should be between the two words, not at the beginning of the combined word. I'm pretty sure this added hyphen is tracked somewhere: https://github.com/espeak-ng/espeak-ng/blob/1df852a1ae8cf0f218c5275b4ed1b69958a46f4e/src/libespeak-ng/translate.c#L1468

The place where that hyphen is checked might be a good place to insert the SetPlist2() command. I haven't found it yet.