mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Fixing handling of sequence .' in english (potential acronym+genitive vs simple quote usage of apostrophe)
This commit is contained in:
@@ -1071,8 +1071,15 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_
|
||||
is_end_clause = false; // Roman number followed by dot
|
||||
else if (iswlower(c_next) || (c_next == '-')) // hyphen is needed for lang-hu (eg. 2.-kal)
|
||||
is_end_clause = false; // only if followed by lower-case, (or if there is a XML tag)
|
||||
} else if (c_next == '\'')
|
||||
is_end_clause = false; // eg. u.s.a.'s
|
||||
} else if (c_next == '\'') {
|
||||
// A special case to handle english acronym + genitive
|
||||
// eg. u.s.a.'s
|
||||
// But avoid breaking clause handling if anything else follows the apostrophe.
|
||||
c_next = GetC();
|
||||
if(c_next == 's')
|
||||
is_end_clause = false;
|
||||
UngetC(c_next);
|
||||
}
|
||||
if (iswlower(c_next)) {
|
||||
// next word has no capital letter, this dot is probably from an abbreviation
|
||||
is_end_clause = 0;
|
||||
|
||||
@@ -55,6 +55,15 @@ d'i:
|
||||
'i:
|
||||
'Ef" "A. B C, D. E: F."
|
||||
|
||||
# Handling of english acronym + genitive without breaking simple quote
|
||||
test_phonemes en "hi: s'Ed
|
||||
aI w0z b'O@n InD@ j,u:,Es'eI z_:_: and l'Eft" "He said : I was born in the u.s.a.'s and left."
|
||||
|
||||
test_phonemes en "hi: s'Ed
|
||||
h@l'oU
|
||||
aIa#m b'ak
|
||||
and l'Eft" "He said : 'Hello, I am back.' and left."
|
||||
|
||||
#----- Emoji [http://www.unicode.org/reports/tr51/tr51-12.html] -----
|
||||
|
||||
# ED-3 - emoji_character
|
||||
|
||||
Reference in New Issue
Block a user