Commit Graph
109 Commits
Author SHA1 Message Date
Juho Hiltunen 537617afc5 et: fi: move stressopt from tr_languages.c to language files
This is to make sure "stressopt" language option works. Current tests
would fail if it didn't.
2021-07-27 22:15:28 +03:00
Juho Hiltunen 01f094346d nb: fix regression for language options.
182aba4cc started calling Norwegian nb instead of no. The result is that
code in tr_languages.c was never run.
2021-07-23 18:32:33 +03:00
Juho Hiltunen 863655903a code cleanup: move SetLengthMods to setlengths.c 2021-07-11 17:05:00 +03:00
Juho Hiltunen c6ef7061ca code cleanup: use #defines for stress positions.
The #defines should be renamed to better convey their meaning.
2021-06-29 15:54:45 +03:00
Juho Hiltunen b74ad1777d eu: remove duplicate stress_rule from tr_languages.c
It's already set in espeak-ng-data/lang/eu
2021-06-29 15:14:46 +03:00
agonzalezd 2fb981855b eu: Updated Basque phonetics and stress rule 2021-06-29 15:14:26 +03:00
Juho Hiltunen d91b7cf288 Rename zh (Mandarin) to cmn across the codebase.
See discussion in #933.
2021-05-11 20:14:54 +03:00
Juho Hiltunen 467f3f565f fi: change decimal number behavior
93d3c67df accidentally changes number handling for finnish.

D_FRACTION2 seems to match finnish number standards. It causes the
decimals to be read as numbers instead of individual digits: 12,12 is
read "twelve point twelve" instead of "twelve point one two".

It is undocumented so it might cause regressions as well.
2021-04-20 19:40:58 +03:00
katrihiovainandSebastien Le Maguer 93d3c67df6 smj: Support for new language Lule Saami
Co-authored-by: Sebastien Le Maguer <lemagues@tcd.ie>
2021-04-10 13:54:41 +03:00
Juho Hiltunen c4740b3053 New language option lowercaseSentence
When set in a language file, a period followed by a lower case letter is
detected as end of sentence. Normal behavior is to require a capital
letter.
2021-04-05 19:29:18 +03:00
jaacoppi 4c3fe183dd Merge pull request #888
Set number handling on by default
2021-03-12 16:35:38 +02:00
Juho Hiltunen bda8b6f76a code cleanup: remove unnecessary voice option translator
See commit message for 23a4d88f.

This commit fixes cmn and yue.
CalcPitches_Tone() now accepts cmn for translator_name.
SelectTranslator() now has a case for yue instead of zhy.
2021-03-08 18:18:14 +02:00
Juho Hiltunen d260562b7e Revert "code cleanup: remove unnecessary voice option translator"
This reverts commit 23a4d88f6b.

Breaks tests for cmn.
2021-03-07 13:34:05 +02:00
Juho Hiltunen 23a4d88f6b code cleanup: remove unnecessary voice option translator
Option "language <name>"already causes SelectTranslator(<name>) to be
called. Having two options to do almost the same thing is unnecessary
and confusing.

In the long term, all options from SelectTranslator() should have a
switch case in LoadVoice() so they are user configurable (see #218). If
needed, a new option (maybe called "LoadOptions") could be added to load
an existing voice or language file.

Changes language configuration files for: hak, cmn, yue, ltg, ms, mb-ma1.
No changes to users.
2021-03-07 12:58:23 +02:00
Juho Hiltunen 6a43f8c984 code cleanup: remove dead code for Divehi (dv)
The language is not supported and apparently never has been.
2021-03-05 17:21:08 +02:00
jaacoppi a54824c9e5 voices: Change default number pronunciation rule to enabled.
docs: add details about number flags to the documentation.

It's clearly intended to be enabled by default:
- it's defined as default behaviour translate.h (NUM_DEFAULT)
- tr_languages.c sets many default values related to number processing
  that have no meaning unless langopts.numbers == 1.

It is also a more sensible default since most languages will want to
have number processing on. This makes adding new languages easier
because  adding an entry to tr_languages.c is unnecessary.

A negative side effect is that languages with partial number defines
might experience bugs when reading undefined numbers. This is a bug and
should be fixed.

This will have the side effect of enabling number processing for
languages that currently have it disabled. However, there shouldn't be
any.

Here's a way to check affected languages:
for voice in $(ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH}
src/espeak-ng --voices | grep -v Languages | awk '{print $2}'); do
OUTPUT=$(ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH}
src/espeak-ng -qx -v $voice "1 - 2 - 3 - 12 - 123") && echo "$voice:
$OUTPUT" ; done

These voices clearly benefit from enabling numbers (they already have
number rules in *_list):
ba, cmn (zh), hak, haw, ja, kok, nb, nci

Some languages are missing some definitions (like _12) in _list files.
It causes the program to skip some numbers.
Numbering needs to be turned off explicitly for:
jbo, mi, my, piqd, py, qu, quc, th, uz

Languages with no number rules at all:
chr, cv, he, nog, tk, ug
2021-03-04 19:13:09 +02:00
Juho Hiltunen 0cf3ee564c Code cleanup: remove param2 from langopts and rename keyword option in language files.
- param2[] is only used to set a second value to LOPT_BRACKET_PAUSE. It is simpler
to have two values in param[] instead. This simplifies the codebase.

- Instead of setting "option bracket X Y" in language files, use
keywords "brackets X" and "bracketsAnnounced Y" instead to follow the
naming convention of other keywords.

- Add missing documentation to docs/voices.md.
2021-02-21 15:01:29 +02:00
Juho Hiltunen 2c93961ebe code cleanup: remove unused stress_amps_r
It is set but never used.
2021-02-07 18:54:31 +02:00
freddii 61efed30fa fixed spelling mistakes 2021-01-13 01:55:34 +01:00
Juho Hiltunen aafa55cbbc code cleanup: remove unnecessary code related to LOPT_CAPS_IN_WORD
translate.h gives two settings to LOPT_CAPS_IN_WORD, but only one of them is actually ever used.
2020-12-28 11:30:08 +02:00
Valdis Vitolins 3a9de7ae73 lv: add names for numbers up to 10^30 2020-10-15 18:57:13 +03:00
Valdis Vitolins 3030884809 Fix issue #801: Cherokee language support is broken 2020-08-21 12:51:28 +03:00
Lamashino 0f5316d6f5 Update tr_languages.c
Added initial support for Ido language (similar to Esperanto).
2020-08-19 17:13:35 +03:00
Juho Hiltunen ee944700f8 code cleanup: Check all local includes with include-what-you-use
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.

Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.

See https://github.com/include-what-you-use/include-what-you-use
2020-07-24 07:29:47 +03:00
Valdis Vitolins 1b73cebeb9 Disable secondary stress for Cherokee 2020-07-17 10:09:31 +03:00
Valdis Vitolins d17a5ecc53 Fix issue #546: add initial support for Ukrainian language 2020-04-12 15:29:16 +03:00
Reece H. Dunn 8352683e1b Add a NUM_DEFAULT define. 2020-04-12 11:33:12 +01:00
Reece H. Dunn ee1557ece2 Add defines for the numbers2 thousandplex bit flags. 2020-04-12 11:24:00 +01:00
Reece H. Dunn 1e04ce0fbf Use the NUM2_SWAP_THOUSANDS constant instead of 0x200. 2020-04-12 10:53:05 +01:00
Reece H. Dunn 919f3240cb Revert "Move handling of SetLetterVowel() to language files"
This reverts commit 6042eb8d1e.

The change causes an issue with `pt-BR` and possibly other languages
and voices.
2018-10-08 07:38:56 +01:00
Valdis Vitolins 6bdb2ee6cd ar: in MBROLA qaf is not considered 'thick' consonant 2018-09-30 17:45:25 +03:00
Valdis Vitolins 26b067a68b ar: move default stress rule from code to config file 2018-09-11 18:02:27 +03:00
Reece H. Dunn 9d901e48be shn: support numbers for 100, 1000, and 10000 2018-08-25 22:02:08 +01:00
Reece H. Dunn 61672f5e24 Use defines for the different number breaking systems to improve readability. 2018-08-25 21:51:26 +01:00
Reece H. Dunn 273b8e2a1f en: support numbers upto a hundred nonillion 2018-08-25 19:53:01 +01:00
Reece H. Dunn 1c60fb7f62 Don't use STRESSPOSN_1L for thousands_sep in the Slovak/Czech language setup. 2018-08-19 19:31:19 +01:00
Reece H. Dunn bba7069cb3 issue #520: Use .replace rules in the language rule files for Cyrillic to Latin 2018-07-21 14:09:04 +01:00
Reece H. Dunn 32ab396ea1 Don't declare the Arabic letter strings using array syntax. 2018-07-19 20:21:09 +01:00
Reece H. Dunn bfe184c641 Make PrepareLetters actually set the letter bits, and rename to SetLetterBitsUTF8. 2018-07-19 20:19:15 +01:00
Reece H. Dunn 7f42bd39b4 Move PrepareLetters next to SetLetterBitsRange. 2018-07-19 20:03:23 +01:00
Reece H. Dunn 22ee347234 Use script name prefixes in the Set[Script]Letters functions for group bit lists. 2018-07-19 20:00:47 +01:00
Reece H. Dunn 36c6727e90 issue #518: Add the 'е є ї' letters to the Y group in Translate_Russian, not SetCyrillicLetters. 2018-07-19 19:49:28 +01:00
Reece H. Dunn 17dac5ea53 Add a comment to SetCyrillicLetters describing which languages it applies to. 2018-07-19 19:19:03 +01:00
Reece H. Dunn e7e59f99d3 Fix the warnings in PrepareLetters. 2018-07-16 07:51:20 +01:00
Valdis Vitolins 6b57e97283 ar: set default stress on antepenultimate syllable 2018-07-15 18:41:50 +03:00
Valdis Vitolins c92e70183c ar: allow diacritics before normal letters as Arabic characters 2018-07-15 18:33:20 +03:00
Valdis Vitolins 1cf7549392 Prepare Arabic letters using PrepareLetters() function
PrepareLetters() function also could be used to set up letter groups A, B, C, etc. from string
and further could be loaded from configuration file
2018-07-15 18:26:28 +03:00
Valdis Vitolins 789d820ad4 shn: add support for Shan language from ronaldaug 2018-05-29 14:55:50 +03:00
Valdis Vitolins f0321bfae7 ru: add only и to Y (iotated) letter group for Russian
as all other letters are already there from Cyrillic.
2018-05-17 21:15:30 +03:00
Valdis Vitolins c53141ff12 ru: issue #491 — add е, ї and є to list of iotated vowels 2018-05-17 21:15:30 +03:00