Browse Source

Latvian language improvements

master
Valdis Vitolins 7 years ago
parent
commit
154c9f5089
4 changed files with 112 additions and 44 deletions
  1. 6
    5
      dictsource/lv_list
  2. 47
    22
      dictsource/lv_rules
  3. 6
    6
      espeak-ng-data/lang/bat/lv
  4. 53
    11
      phsource/ph_latvian

+ 6
- 5
dictsource/lv_list View File

@@ -422,6 +422,7 @@ tikpat $2
tikvien $u2+
turpat $u2+
turpretī $u2
uzreiz $2
vienalga $2
vismaz $2

@@ -465,7 +466,7 @@ vismaz $2
// Abbreviations //
///////////////////
as $abbrev
asv ,a:_:,ess_!v'e:_:
asv ,a:_:,ess_!v'e:_: $allcaps
ano 'ano:
ba $abbrev
bba $abbrev
@@ -475,7 +476,7 @@ dz $abbrev
eest $abbrev
est $abbrev
eur 'euR
lnnk 'ell_,en_,en_k'a: $pause
lnnk $abbrev $pause
lp $abbrev
ls $abbrev
lu $abbrev
@@ -483,7 +484,7 @@ lvu $abbrev
na $abbrev
nra $abbrev
nr $abbrev
pctvl p'e:_ts,e:_t,e:_v,e:_'ell_ $pause
pctvl $abbrev $pause
prks $abbrev
psrs $abbrev
rpi $abbrev
@@ -493,11 +494,11 @@ sv $abbrev
šķ $abbrev
tjpr $abbrev $u $pause
tml $abbrev $u $pause
tp t,e:_p'e: $pause
tp $abbrev $pause
utjpr $abbrev $u $pause
utml $abbrev $u $pause
utt $abbrev $u $pause
zzs z'e:_z,e:_'ess $pause
zzs $abbrev $pause

///////////////////////////
// other exception words //

+ 47
- 22
dictsource/lv_rules View File

@@ -38,6 +38,7 @@
.L17 ai ais am ā ām ās ie iem o os // suffixes of certain adjectives finishing with ..ējais
.L18 am āk i u ot ēt os // suffixes of adverbs (apstākļa vārdi)

.L10 ~ at ie iz jā jā jāat jāie jāiz jāno jāsa ne no no pa pār pie pie sa vis // optional verb prefixes
.L20 ~ ne // optional negation prefix

// +---------------------------+
@@ -62,7 +63,6 @@
// +---------------------------+
// | Pronunciation of o |
// +---------------------------+
.L30 ō ȯ // uo pre/post fixes. If facultative writing is used, o is spelled as uo

// Default rules for o with succeeding consonants
.L40 č ģ ķ ļ ņ ŗ š ž // uo indicators — o is spelled as uo in words with Latvian soft consonants
@@ -164,7 +164,7 @@
.group e
e e // Default as narrow e
ee e_|e // internationalisms, prefix: ne-e...
ei (+ ei
ei (++ ei

// narrow e ---------------------------------------------------------------------- //
a) e (ro e // internationalisms
@@ -204,7 +204,7 @@

// wide e ------------------------------------------------------------------------ //
// widening consonants follow
e (L25 E
e (L25< E
e (L25L25 E
// widening vowels follow
e (L25L24+ E
@@ -216,7 +216,7 @@
e (L25L01_ E
e (L25L25L01_ E
e (Jam E
L25) e (L18_+ E // vareni etc.
L25) e (CJL18_ E // vareni etc.

// specific words ----------------------------------------------------------------- //
b) e (dL82L05_ e // bedre
@@ -253,6 +253,7 @@
_L20) e (sat_+ _!e // esat
_L20) e (si_ _!e // esi
_L20) e (smu_ _!e // esmu
_L20) e (sot_ _!e // esot
_m) e (dūzL04_ e
_m) e (kL04_ e // Meka
m) e (lL88 E
@@ -261,6 +262,7 @@
_n) ere (tL04_ ERE // Nereta
n) e (rv E
p) e (rs e
pr) e (cL52z e
pr) e (L71L05_ e // prece
_pr) e (t e
pr) etē (@ ete:
@@ -287,12 +289,13 @@
t) ermo eRmo
t) e (st e
_t) e (v_ e // tev
_t) e (vi_ e // tevi
_v) e (lgL04_ e // Velga
_v) e (ltL04_ e // Velta
_v) e (ntL04_ E // Venta
_v) e (ntsp E // Ventspils
_z) e (lmL04_ e // Zelma
_z) e (m e
z) e (m+ e

.group ē
ē e: // Default as narrow ē
@@ -337,7 +340,7 @@

// wide ē --------------------------------------------------------------------------- //
// widening consonants follow
ē (L25 E:
ē (L25< E:
ē (L25L25 E:
// widening vowels follow
ē (L25L24+ E:
@@ -346,7 +349,7 @@
ē (L25L25L25L25L24 E:
// widening endings
ē (L01_ E:
ē (L25L01_ E:
ē (L25L01_+ E:
ē (L25L25L01_ E:
// 5. dec. words
ē (CL05_ e:
@@ -369,8 +372,10 @@
ē (rkšķ e:
ē (tā_ E:
ē (tL55_ E:
gr) ē (kL01_ E:
izp) ē (t e:
_kāp) ē (c_ e: // kāpēc
_l) ē (L83+ e: // lēst
m) ēne (L83 e:ne
m) ē (rķ e:
_m) ē (s_ e: // mēs
@@ -393,6 +398,7 @@
t) ē (L90 e:
t) ē (mL04_ e: // ..tēma
t) ērē e:Re:
t) ē (zL05_ e: // ..tēze
_v) ē (l_ e: // vēl
_v) ē (lL01_ E: // vēls
_v) ē (rā_ e: // vērā
@@ -414,14 +420,15 @@
i i
i (A i_!
ie ie
ikv) ie (n 'ie // stress on 2nd syllable
_) i (kkat %i // ikkatrs
_) i (kkuL82 %i // ikkurš
_) i (kvien %i // ikviens
iu iu

.group ī
ī i:

.group j
A) j (@ :j
j j
_) jebk j%ebk // stress on 2nd syllable

@@ -455,6 +462,7 @@
C) n (C n- // more voiced variant between consonants
L59) n (@ :n
n (d N
ne (vienl+ n'e // nevienlīdzība
_) ne (vien n%e // stress on 2nd syllable
n (g N
n (k N
@@ -477,11 +485,6 @@
o (L41+ o // o indicators after
o (JL41+ o

L30J) o uo // uo indicators before (facultative writing)
L30) o (+ uo
o (JL30 uo // uo indicators after (facultative writing)
o (L30+ uo

o uo // words with Latvian roots are more common
o (_++ uo // common ending for Latvian words
o (L40 uo // usually uo before soft (Latvian) consonants
@@ -535,6 +538,7 @@ L46L45L45) o (<< uo
arist) o o
ater) o o:
_aut) o (< o
bals) o uo
bandr) o o:
_bar) o (L12_ uo
bar) o (L65 uo // barot
@@ -569,12 +573,12 @@ L46L45L45) o (<< uo
dinam) o o:
disp) o o
eg) o o>
eir) o o
_ek) o o
eks) o o
ekspl) o o
ekvin) o o
elektr) o o:
ez) o o>
energ) o o:
enL87) o o
ent) o (@ o
@@ -582,6 +586,7 @@ L46L45L45) o (<< uo
epr) o o
ept) o (@ o
eur) o o
ez) o o>
gen) o o
get) o o
glik) o o
@@ -686,6 +691,7 @@ L46L45L45) o (<< uo
pomp) o o:
por) o o
pr) o (L90 o
_pr) o o
prop) o o
pseid) o o
raps) o o:
@@ -714,6 +720,7 @@ L46L45L45) o (<< uo
sol) o o:
son) o o
spid) o o
sp) o (L77++ uo
sport) o uo
sten) o (L65 uo
_sten) o o
@@ -757,6 +764,8 @@ L46L45L45) o (<< uo
gl) ob ob
g) ob (e ob
k) ob ob
l) ob (ē ob
l) oboto (m oboto
m) ob ob
_) ob (amL01_ ob // Obama
ob (je ob
@@ -800,6 +809,7 @@ L46L45L45) o (<< uo
m) od (u od
m) od (uš uod
n) od (L05_ o:d // ..node
n) od uod
_) od (ek od
od (erL51 uod
_) od (esL04_ od // Odesa
@@ -872,6 +882,7 @@ L46L45L45) o (<< uo
_d) ok (L01_ ok // doks
d) ok (u ok
fil) okok okok
gl) ok (sīn ok
g) ok ok
_k) okako (lL04_ okako: // kokakola
k) ok (L01 uok // koks
@@ -1057,6 +1068,7 @@ L46L45L45) o (<< uo
pr) om om
_pr) om (_ uom // prom
pt) om (L01_ o:m // ..ptoms
pt) om o>m
rd) om (L01_ o:m
r) om (b om
_r) om (L04_ uom // Roma
@@ -1211,6 +1223,7 @@ L46L45L45) o (<< uo
m) op op
net) op (_ uop
n) op (er+++ uop
n) opo (st uopuo
op (c op
op (en op
_) op (erL04_++++ o:p // opera
@@ -1313,6 +1326,7 @@ L46L45L45) o (<< uo
or (ien oR
_) origo (_ oRigo: // Origo
or (iģ oR
or (kā oR
or (ķest oR
or (L01_+ o:R // ..ors
_) or (L02_+ uoR // ore
@@ -1353,8 +1367,8 @@ L46L45L45) o (<< uo
.group os
ap) ostrof ostRo:f
atm) os os
b) os (L01_ os // boss
_blont) os (_ uos // Blontos
b) os (L01_ os // boss
_cit) os (_ uos // citos
_dat) os (_ uos
_d) osto (jevskL02_ osto // Dostojevskis
@@ -1362,6 +1376,7 @@ L46L45L45) o (<< uo
f) osfo osfo:
_gr) osto (nL04_ osto: // Grostona
iz) os uos
kāp) os (t uos
k) os (in os
k) os (m os
_k) osmo (sL01_ osmo // kosmoss
@@ -1376,14 +1391,14 @@ L46L45L45) o (<< uo
osto (L65 uostuo
os (t_ uos
p) os (m uos
p) os (tC@ os
p) os (te os
p) os (ter os
p) os (tind os
p) os (tī uos
p) os (tL56m os
p) os (tm os
p) os (tk os
p) os (tL01 uos
p) os (tL55m os
p) os (to uos
p) os (tso os
p) os (tul os
pr) os (p os
pr) os (t os
@@ -1395,17 +1410,22 @@ L46L45L45) o (<< uo
š) os (ej os
_t) os (te os
_t) os (tL01_ os // tosts
v) osto (k osto
_z) os (L06_ uos // zoss

.group ot

an) ot ot
ast) ot uot
av) ot uot
_bal) ot (ē ot
bankr) ot ot
b) ot (ān ot
d) ot (āc ot
d) ot (ē ot
er) ot (iL67 o:t
er) ot (is o:t
_er) ot (L01_ ot // Erots
_ez) ot ot
f) oto (_ oto:
g) ot (ik o:t
@@ -1416,6 +1436,7 @@ L46L45L45) o (<< uo
k) ot (an ot
k) ot (L51 ot
k) ot (l ot
_L10pr) ot (L13_ uot // (ne|sa..)prot(i|u)
lin) ot (ip ot
_l) ot (iņL04 ot // Lotiņa
l) ot (L05_ ot // ..lote
@@ -1426,28 +1447,31 @@ L46L45L45) o (<< uo
nepr) ot uot
_n) ot (L04_ ot // nota
n) ot (L50r ot
ot (āj uot
ot (k ot
m) otō oto:
_) oto (C< oto
pil) ot ot
_p) ot (ašL04 ot // potaša
p) ot (eL68 ot
pr) ot (am uot
pr) ot (e ot
pr) ot (o ot
pr) oto (š uotuo // protoš..
pr) otot (ip otot
pr) oto (t uotuo // ..protot
pr) ot (u_ uot
publisk) ot uot
r) ot (āc ot
r) ot (b ot
r) ot (er ot
r) ot (ē ot
r) ot (kaL77 o`t
sab) ot ot
sk) ot (L01_ ot
sl) ot (L04_ uot // slota
sp) ot (+ ot
t) ot (ēm ot
t) ot (L50l ot
tr) ot ot
_v) ot (_++++++ ot // vot
zig) ot (L01_ ot // ..zigots
zig) ot (L04_ ot // ..zigota
@@ -1559,6 +1583,7 @@ L46L45L45) o (<< uo
v v
// unstressed if starts as vis.. prefix
// except for words where vis.. is part of root
vecvec vetsvets
_) vi (sād v'i // visād
_) vi (sēd v'i // visēd
_) vi (skijL01_ v'i // viskijs

+ 6
- 6
espeak-ng-data/lang/bat/lv View File

@@ -4,10 +4,10 @@ maintainer Valdis Vitolins <[email protected]>
status mature
words 0 2
pitch 64 118
breath 5 2 0 0 0 1
breathw 20 40 500 1200
formant 1 95 100 100 -5
breath 10 2 1 0 0 0
breathw 20 42 85 200 500 1200
formant 0 95 100 100 -5
//tunes s5 c5 q5 e5
tone 150 220 450 255 850 10 3500 255
stressAmp 12 10 10 8 0 0 18 15
stressLength 180 180 180 160 0 0 240 180
tone 150 220 450 255 750 20 3500 255
stressAmp 12 10 10 8 0 0 20 15
stressLength 180 180 180 160 0 0 250 180

+ 53
- 11
phsource/ph_latvian View File

@@ -52,7 +52,7 @@ endphoneme
phoneme i:
vwl starttype #i endtype #i
length 300
FMT(vwl_lv/ii, 100) // was i_7
FMT(vwl_lv/ii, 90) // was i_7
endphoneme


@@ -171,7 +171,7 @@ phoneme tS
WAV(ustop/tsh,40)
endphoneme

phoneme n-
phoneme n- // more voiced variant of n
vwl starttype #a endtype #a
ipa nU+0329
lengthmod 4
@@ -179,6 +179,25 @@ phoneme n-
FMT(n/n-syl)
endphoneme

phoneme h // more quiet version of standard h
vls glt apr
lengthmod 3
ipa h

IF nextPh(#a) THEN
WAV(h/ha, 20)
ELIF nextPh(#e) THEN
WAV(h/he, 20)
ELIF nextPh(#i) THEN
WAV(h/hi, 20)
ELIF nextPh(#o) THEN
WAV(h/ho, 20)
ELIF nextPh(#u) THEN
WAV(h/hu, 20)
ENDIF
WAV(h/h_, 20) // no vowel following
endphoneme

phoneme R // Latvian hard r
liquid trl
lengthmod 6
@@ -317,15 +336,6 @@ phoneme } // Tiny, 5ms non-linked pause (used between phonemes in word)
length 5
endphoneme

// TODO should use this with correct lengthening
//phoneme l
// liquid
// unstressed
// dnt
// length 150
// FMT(vwl_hi/l-voc)
//endphoneme

phoneme s
vls alv frc sib
voicingswitch z
@@ -335,3 +345,35 @@ phoneme s
WAV(ufric/s,60)
endphoneme

phoneme j // **y**es
liquid pal starttype #i

IF nextPhW(isVowel) THEN
NextVowelStarts
VowelStart(j/j@)
VowelStart(j/ja)
VowelStart(j/je)
VowelStart(j/ji)
VowelStart(j/jo)
VowelStart(j/ju)
EndSwitch
VowelEnding(j/xj, 70) // In difference with English, vowel is lengthened, not shortened
ELSE
Vowelout len=127 // no vowel follows
FMT(j/xj)
ENDIF

IF prevPh(isPause) THEN
FMT(j/_j)
ENDIF
endphoneme

// TODO should use this with correct lengthening
//phoneme l
// liquid
// unstressed
// dnt
// length 150
// FMT(vwl_hi/l-voc)
//endphoneme


Loading…
Cancel
Save