BenTalagan
0d37ecbf94
Added additional tests in translate.c
5 years ago
Reece H. Dunn
4aaef4c3e0
Fix additional warnings with addPluralSuffixes.
5 years ago
Valdis Vitolins
f514bbcc8d
Fix 'implicit declaration of function ‘addPluralSuffixes’' C99/clang error
5 years ago
Valdis Vitolins
cf4809a1e5
Fix bug #706: pronunciation error with abbreviations followed by 's
5 years ago
BenTalagan
9fd480afbf
Fixing typos and naming
5 years ago
BenTalagan
94677f4af8
Rule alignment fixes for non compliant platforms / Fix for emscripten demo
5 years ago
Reece H. Dunn
86bbc257b0
Support matching any length strings in the replacement rules.
7 years ago
Reece H. Dunn
98e9122dfc
FindReplacementChars: Pass in the source buffer (next characters) instead of next_in.
7 years ago
Reece H. Dunn
4fbcda9c2a
FindReplacementChars: Use an nc (next character) variable.
7 years ago
Reece H. Dunn
cacc212d4b
FindReplacementChars: Rename uc to fc.
7 years ago
Reece H. Dunn
a9d4bdd7f7
Make ignore_next into ignore_next_n to support ignoring multiple next characters.
7 years ago
Reece H. Dunn
252f5772ae
Simplify printing the replace message.
7 years ago
Reece H. Dunn
55c64036e0
Use UTF-8 strings in replace rules, instead of a packed UTF-16 pair.
7 years ago
Reece H. Dunn
424f705525
Revert the new (broken) replacement rule logic.
The replacement tests for bs, hr, and sr are no longer marked as
broken as they work using the old code. The mk tests keep the
broken annotation, as they don't work in the old code either.
This reverts commit 801a8d197c
.
This reverts commit 64d5701e5e
.
This reverts commit 3b51ebf617
.
This reverts commit 1fd235d2c0
.
This reverts commit 9f0667de86
.
7 years ago
Reece H. Dunn
801a8d197c
TranslateChars: Supress an unsigned to signed cast
7 years ago
Valdis Vitolins
64d5701e5e
Remove unused word_flags parameter
7 years ago
Valdis Vitolins
3b51ebf617
Remove previous implementation of .replace rule
7 years ago
Valdis Vitolins
9f0667de86
Part of issue #199 — extend .replace rule to allow using groups of characters
7 years ago
Reece H. Dunn
91744ac171
Fix gcc 7.3.0 warnings in translate.c.
7 years ago
Juho Hiltunen
bafc8e0f24
Emoji: skip multi-word replacements.
Fixes #511 .
7 years ago
Valdis Vitolins
18eeefca19
Improve comments for character translation
7 years ago
Valdis Vitolins
dc0165821f
Fix comments about conversion
7 years ago
Valdis Vitolins
bf3bb39fb0
Implementation for feature #489
When .replace rule is used and -X switch is passed in runtime,
replaced characters should be shown in trace output.
7 years ago
Reece H. Dunn
eb8ced46e3
Don't treat words without alpha characters (e.g. emoji) as upper case.
7 years ago
Juho Hiltunen
8904700ad3
remove unused wmark and all related code
7 years ago
Juho Hiltunen
cd35a6fd07
refactor setting tone_out in TranslateClause
7 years ago
Juho Hiltunen
b7c2ad604b
refactor and remove redundant call to towlower2()
7 years ago
Juho Hiltunen
f0c345eb6a
maintainability: pass n_ph_list2 and ph_list2 to MakePhonemeList() and SubstitutePhonemes() instead of using globals
7 years ago
Juho Hiltunen
b23e8a7269
maintainability: pass Translator as to towlower2() instead of using a global
7 years ago
Juho Hiltunen
f73ebfd126
maintainability: pass current_alphabet as argument to TranslateLetter() instead of using global
7 years ago
Juho Hiltunen
1bad240de8
maintainability: remove some unused variables and unnecessary extern declarations
7 years ago
Juho Hiltunen
c4ec7bfe34
remove option_phoneme_variants that is never set and always evaluates true
7 years ago
Juho Hiltunen
7ee0d7905c
remove unused int option_tone2
It is set in voices.c but never used. docs/voices.md indicates that the keyword intonation only takes one parameter, confirming that option_tone2 is unused.
7 years ago
Reece H. Dunn
2d7f3e9d54
Don't skip blanks past charix_top in TranslateClause.
7 years ago
Reece H. Dunn
879cb9c08a
Don't free 'tr' if null in DeleteTranslator.
7 years ago
Reece H. Dunn
07e155a150
TranslateWord2: Don't process invalid phonemes.
If ph_code is not located in the phoneme_tab, the resulting ph
value will be NULL. This does not normally happen, but it can
happen if word_phonemes contains garbage data, such as with the
1.49.2 multi-word logic when processing words like 'riposted'.
7 years ago
Reece H. Dunn
eaa08a2bc3
translate: Don't crash translating root words that map to another list entry.
If the list file contains a text replacement to another
entry in the list file, e.g.:
ripost riposte $text
riposte rI#p0st
calling it from a prefix or suffix rule such as 'riposted'
causes word_out[0] to be NULL, as TranslateWord3 has the
information needed to perform the mapping. In this case,
no phonemes have been written in this loop and the phonemes
have been calculated, so don't override them.
7 years ago
Juho Hiltunen
9012f3f0bf
headers: continue with synthdata.h
7 years ago
Juho Hiltunen
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.c
7 years ago
Juho Hiltunen
cd991bd2c9
headers: add new file numbers.h with declarations of functions in numbers.c
7 years ago
Juho Hiltunen
d395efa481
headers: add new file phonemelist.h with declarations of functions in phonemelist.c
7 years ago
Juho Hiltunen
706df97b20
headers: add new file readclause.h with declarations of functions in readclause.c
7 years ago
Reece H. Dunn
c5f88c51dd
translate.c: Don't loop to the end of sbuf, as sbuf gets null terminated, so needs a byte for the null character. [msvc /analyze].
7 years ago
Juho Hiltunen
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
7 years ago
Juho Hiltunen
4f56345fb5
Use stdbool instead of int (Issue #8)
See issue #8, https://github.com/espeak-ng/espeak-ng/issues/8
There might still be some ints that could be changed to boolean.
Possible regressions in fifo.c:
int fifo_is_busy() and int fifo_is_command_enabled() used to return an int. Now they return a boolean. This might cause problems on systems where stdbool true/false is something else than 1/0.
7 years ago
Reece H. Dunn
7a33e60234
Reapply the emoji fix from commit 119c200e, only changing the code causing the issue.
7 years ago
Reece H. Dunn
50a2d8e291
Revert "Use strcpy instead of memcpy+strlen."
This reverts commit 119c200e00
.
7 years ago
Reece H. Dunn
70d492c8dc
Move utf8_out back to translate.c as it is no longer used in tests.
8 years ago
Reece H. Dunn
54e87adbb8
Move isspace2 from compiledict.c to translate.c.
8 years ago
Reece H. Dunn
8d8170ea0d
translate.c: Fix -Wmissing-prototypes warnings.
8 years ago