Browse Source

code cleanup: remove dead code for Divehi (dv)

The language is not supported and apparently never has been.
master
Juho Hiltunen 4 years ago
parent
commit
6a43f8c984
5 changed files with 0 additions and 117 deletions
  1. 0
    1
      Makefile.am
  2. 0
    95
      phsource/ph_divehi
  3. 0
    3
      phsource/phonemes
  4. 0
    15
      src/libespeak-ng/tr_languages.c
  5. 0
    3
      src/libespeak-ng/translate.c

+ 0
- 1
Makefile.am View File

phsource/ph_czech \ phsource/ph_czech \
phsource/ph_danish \ phsource/ph_danish \
phsource/ph_dari \ phsource/ph_dari \
phsource/ph_divehi \
phsource/ph_dutch \ phsource/ph_dutch \
phsource/ph_english \ phsource/ph_english \
phsource/ph_english_n \ phsource/ph_english_n \

+ 0
- 95
phsource/ph_divehi View File


// Phonemes for Divehi
// This inherits from ph_hindi



phoneme a
vwl starttype #a endtype #a
length 130
ChangeIfDiminished(V) // ?? final syllable of word
FMT(vowel/a#)
endphoneme


phoneme a:
vwl starttype #a endtype #a
length 300
FMT(vowel/a#)
endphoneme


phoneme e
vwl starttype #e endtype #e
length 130
FMT(vowel/e)
endphoneme


phoneme e:
vwl starttype #e endtype #e
length 250
FMT(vowel/e)
endphoneme


phoneme i
vwl starttype #i endtype #i
length 130
FMT(vowel/i_6)
endphoneme


phoneme i:
vwl starttype #i endtype #i
length 270
FMT(vowel/i)
endphoneme



phoneme o
vwl starttype #o endtype #o
length 130
FMT(vowel/o_mid)
endphoneme


phoneme o:
vwl starttype #o endtype #o
length 300
FMT(vowel/o_mid)
endphoneme


phoneme u
vwl starttype #u endtype #u
length 110
FMT(vowel/u_6)
endphoneme


phoneme u:
vwl starttype #u endtype #u
length 290
FMT(vowel/u_6)
endphoneme


phoneme aI
vwl starttype #a endtype #i
length 280
FMT(vdiph/ai_8)
endphoneme



phoneme t
import_phoneme base2/t // dental
endphoneme

// ?? This is standard [v]. Should be it [v] without the fricative noise?
phoneme v
import_phoneme base1/v
endphoneme


+ 0
- 3
phsource/phonemes View File

phonemetable kok hi_base phonemetable kok hi_base
include ph_konkani include ph_konkani


phonemetable dv hi_base
include ph_divehi

phonemetable te hi_base phonemetable te hi_base
include ph_telugu include ph_telugu



+ 0
- 15
src/libespeak-ng/tr_languages.c View File

#define OFFSET_HEBREW 0x590 #define OFFSET_HEBREW 0x590
#define OFFSET_ARABIC 0x600 #define OFFSET_ARABIC 0x600
#define OFFSET_SYRIAC 0x700 #define OFFSET_SYRIAC 0x700
#define OFFSET_THAANA 0x780 // Divehi/Maldives
#define OFFSET_DEVANAGARI 0x900 #define OFFSET_DEVANAGARI 0x900
#define OFFSET_BENGALI 0x980 #define OFFSET_BENGALI 0x980
#define OFFSET_GURMUKHI 0xa00 #define OFFSET_GURMUKHI 0xa00
{ "_he", OFFSET_HEBREW, 0x590, 0x5ff, 0, 0 }, { "_he", OFFSET_HEBREW, 0x590, 0x5ff, 0, 0 },
{ "_ar", OFFSET_ARABIC, 0x600, 0x6ff, 0, 0 }, { "_ar", OFFSET_ARABIC, 0x600, 0x6ff, 0, 0 },
{ "_syc", OFFSET_SYRIAC, 0x700, 0x74f, 0, 0 }, { "_syc", OFFSET_SYRIAC, 0x700, 0x74f, 0, 0 },
{ "_dv", OFFSET_THAANA, 0x780, 0x7bf, 0, 0 },
{ "_hi", OFFSET_DEVANAGARI, 0x900, 0x97f, L('h', 'i'), AL_WORDS }, { "_hi", OFFSET_DEVANAGARI, 0x900, 0x97f, L('h', 'i'), AL_WORDS },
{ "_bn", OFFSET_BENGALI, 0x0980, 0x9ff, L('b', 'n'), AL_WORDS }, { "_bn", OFFSET_BENGALI, 0x0980, 0x9ff, L('b', 'n'), AL_WORDS },
{ "_gur", OFFSET_GURMUKHI, 0xa00, 0xa7f, L('p', 'a'), AL_WORDS }, { "_gur", OFFSET_GURMUKHI, 0xa00, 0xa7f, L('p', 'a'), AL_WORDS },
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 2; // use de_rules for unpronouncable rules tr->langopts.param[LOPT_UNPRONOUNCABLE] = 2; // use de_rules for unpronouncable rules
} }
break; break;
case L('d', 'v'): // Divehi (Maldives) FIXME: this language code is actually never used
{
SetupTranslator(tr, stress_lengths_ta, stress_amps_ta);
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable
tr->letter_bits_offset = OFFSET_THAANA;
tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = S_MID_DIM | S_FINAL_DIM; // use 'diminished' for unstressed final syllable
SetLetterBitsRange(tr, LETTERGP_B, 0x26, 0x30); // vowel signs, and virama
tr->langopts.break_numbers = BREAK_LAKH_DV;
tr->langopts.numbers = NUM_DEFAULT;
}
break;
case L('e', 'n'): case L('e', 'n'):
{ {
static const short stress_lengths_en[8] = { 182, 140, 220, 220, 0, 0, 248, 275 }; static const short stress_lengths_en[8] = { 182, 140, 220, 220, 0, 0, 248, 275 };

+ 0
- 3
src/libespeak-ng/translate.c View File

if ((c >= 0x300) && (c <= 0x36f)) if ((c >= 0x300) && (c <= 0x36f))
return 1; // combining accents return 1; // combining accents


if ((c >= 0x780) && (c <= 0x7b1))
return 1; // taani/divehi (maldives)

if ((c >= 0xf40) && (c <= 0xfbc)) if ((c >= 0xf40) && (c <= 0xfbc))
return 1; // tibetan return 1; // tibetan



Loading…
Cancel
Save