forked from GitHub/gf-rgl
Latvian: parameter optimisation, code clean-up and formatting, renaming
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
concrete CatLav of Cat = CommonX - [CAdv, Voc] **
|
concrete CatLav of Cat = CommonX - [CAdv, Voc] ** open Prelude, ResLav in {
|
||||||
open
|
|
||||||
Prelude,
|
|
||||||
ResLav
|
|
||||||
in {
|
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
@@ -20,21 +16,21 @@ lincat
|
|||||||
|
|
||||||
-- Sentence
|
-- Sentence
|
||||||
|
|
||||||
Cl = { s : VerbMood => Polarity => Str } ;
|
Cl = { s : VMood => Polarity => Str } ;
|
||||||
ClSlash = { s : VerbMood => Polarity => Str ; p : ResLav.Prep } ;
|
ClSlash = { s : VMood => Polarity => Str ; p : ResLav.Prep } ;
|
||||||
Imp = { s : Polarity => Number => Str } ;
|
Imp = { s : Polarity => Number => Str } ;
|
||||||
|
|
||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
QCl = { s : VerbMood => Polarity => Str } ;
|
QCl = { s : VMood => Polarity => Str } ;
|
||||||
IP = { s : Case => Str ; n : Number } ;
|
IP = { s : Case => Str ; n : Number } ;
|
||||||
IDet = { s : Gender => Str ; n : Number } ;
|
IDet = { s : Gender => Str ; n : Number } ;
|
||||||
IQuant = { s : Gender => Number => Str } ;
|
IQuant = { s : Gender => Number => Str } ;
|
||||||
-- TODO: IComp = { s : Str ; a : ResLav.Agr } ;
|
--IComp = { s : Str ; a : ResLav.Agr } ;
|
||||||
|
|
||||||
-- Relative
|
-- Relative clause
|
||||||
|
|
||||||
RCl = { s : VerbMood => Polarity => Agr => Str } ;
|
RCl = { s : VMood => Polarity => Agr => Str } ;
|
||||||
RP = { s : Gender => Case => Str } ;
|
RP = { s : Gender => Case => Str } ;
|
||||||
|
|
||||||
-- Verb
|
-- Verb
|
||||||
@@ -45,19 +41,19 @@ lincat
|
|||||||
|
|
||||||
-- Adjective
|
-- Adjective
|
||||||
|
|
||||||
AP = { s : Definite => Gender => Number => Case => Str } ;
|
AP = { s : Definiteness => Gender => Number => Case => Str } ;
|
||||||
|
|
||||||
-- Noun
|
-- Noun
|
||||||
|
|
||||||
CN = { s : Definite => Number => Case => Str ; g : Gender } ;
|
CN = { s : Definiteness => Number => Case => Str ; g : Gender } ;
|
||||||
NP = { s : Case => Str ; a : ResLav.Agr } ;
|
NP = { s : Case => Str ; a : ResLav.Agr } ;
|
||||||
Pron = { s : Case => Str ; a : ResLav.Agr ; possessive : Gender => Number => Case => Str } ;
|
Pron = { s : Case => Str ; a : ResLav.Agr ; poss : Gender => Number => Case => Str } ;
|
||||||
Det = { s : Gender => Case => Str ; n : Number ; d : Definite ; pol : Polarity } ;
|
Det = { s : Gender => Case => Str ; n : Number ; d : Definiteness ; pol : Polarity } ;
|
||||||
Predet = { s : Gender => Str } ;
|
Predet = { s : Gender => Str } ;
|
||||||
Ord = { s : Gender => Case => Str } ;
|
Ord = { s : Gender => Case => Str } ;
|
||||||
Num = { s : Gender => Case => Str ; n : Number ; hasCard : Bool } ;
|
Num = { s : Gender => Case => Str ; n : Number ; hasCard : Bool } ;
|
||||||
Card = { s : Gender => Case => Str ; n : Number } ;
|
Card = { s : Gender => Case => Str ; n : Number } ;
|
||||||
Quant = { s : Gender => Number => Case => Str ; d : Definite ; pol : Polarity } ;
|
Quant = { s : Gender => Number => Case => Str ; d : Definiteness ; pol : Polarity } ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ lin
|
|||||||
a = toAgr (fromAgr ss.a).pers (conjNumber (fromAgr ss.a).num conj.n) (fromAgr ss.a).gend Pos
|
a = toAgr (fromAgr ss.a).pers (conjNumber (fromAgr ss.a).num conj.n) (fromAgr ss.a).gend Pos
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable4 Definite Gender Number Case conj ss ;
|
ConjAP conj ss = conjunctDistrTable4 Definiteness Gender Number Case conj ss ;
|
||||||
|
|
||||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ;
|
ConjRS conj ss = conjunctDistrTable Agr conj ss ;
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ lin
|
|||||||
BaseNP x y = twoTable Case x y ** { a = conjAgr x.a y.a } ;
|
BaseNP x y = twoTable Case x y ** { a = conjAgr x.a y.a } ;
|
||||||
ConsNP xs x = consrTable Case comma xs x ** { a = conjAgr xs.a x.a } ;
|
ConsNP xs x = consrTable Case comma xs x ** { a = conjAgr xs.a x.a } ;
|
||||||
|
|
||||||
BaseAP x y = twoTable4 Definite Gender Number Case x y ;
|
BaseAP x y = twoTable4 Definiteness Gender Number Case x y ;
|
||||||
ConsAP xs x = consrTable4 Definite Gender Number Case comma xs x ;
|
ConsAP xs x = consrTable4 Definiteness Gender Number Case comma xs x ;
|
||||||
|
|
||||||
BaseRS x y = twoTable Agr x y ;
|
BaseRS x y = twoTable Agr x y ;
|
||||||
ConsRS xs x = consrTable Agr comma xs x ;
|
ConsRS xs x = consrTable Agr comma xs x ;
|
||||||
@@ -44,7 +44,7 @@ lincat
|
|||||||
[S] = { s1, s2 : Str } ;
|
[S] = { s1, s2 : Str } ;
|
||||||
[Adv] = { s1, s2 : Str } ;
|
[Adv] = { s1, s2 : Str } ;
|
||||||
[NP] = { s1, s2 : Case => Str ; a : Agr } ;
|
[NP] = { s1, s2 : Case => Str ; a : Agr } ;
|
||||||
[AP] = { s1, s2 : Definite => Gender => Number => Case => Str } ;
|
[AP] = { s1, s2 : Definiteness => Gender => Number => Case => Str } ;
|
||||||
[RS] = { s1, s2 : Agr => Str } ;
|
[RS] = { s1, s2 : Agr => Str } ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,15 +5,13 @@ concrete ExtraLav of ExtraLavAbs = CatLav ** open
|
|||||||
ParadigmsPronounsLav,
|
ParadigmsPronounsLav,
|
||||||
VerbLav,
|
VerbLav,
|
||||||
ResLav,
|
ResLav,
|
||||||
Coordination,
|
Coordination
|
||||||
Prelude
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags
|
flags coding = utf8 ;
|
||||||
coding = utf8 ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- NP -> CN -> CN ;
|
-- NP -> CN -> CN
|
||||||
GenCN np cn = {
|
GenCN np cn = {
|
||||||
s = \\d,n,c => np.s ! Gen ++ cn.s ! d ! n ! c ;
|
s = \\d,n,c => np.s ! Gen ++ cn.s ! d ! n ! c ;
|
||||||
g = cn.g
|
g = cn.g
|
||||||
@@ -42,12 +40,14 @@ lin
|
|||||||
|
|
||||||
have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ;
|
have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ;
|
||||||
|
|
||||||
{-empty_Det num def neg = \num,def,neg -> {
|
{-
|
||||||
|
empty_Det num def pol = \num,def,pol -> {
|
||||||
s = \\_,_ => [] ;
|
s = \\_,_ => [] ;
|
||||||
n = num ;
|
n = num ;
|
||||||
d = def ;
|
d = def ;
|
||||||
isNeg = neg
|
pol = pol
|
||||||
} ;-}
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
-- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf
|
-- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ lin
|
|||||||
|
|
||||||
IAdvAdv adv = { s = "cik" ++ adv.s } ;
|
IAdvAdv adv = { s = "cik" ++ adv.s } ;
|
||||||
|
|
||||||
-- for VP conjunction
|
-- VP conjunction:
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPS = { s : Agr => Str } ;
|
VPS = { s : Agr => Str } ;
|
||||||
@@ -73,19 +73,15 @@ lin
|
|||||||
ConsVPS = consrTable Agr comma ;
|
ConsVPS = consrTable Agr comma ;
|
||||||
|
|
||||||
-- NP -> VPS -> S
|
-- NP -> VPS -> S
|
||||||
-- NP = { s : Case => Str ; a : Agr ; isNeg : Bool } ;
|
PredVPS np vps = { s = np.s ! Nom ++ vps.s ! np.a } ;
|
||||||
PredVPS np vps = {s = np.s ! Nom ++ vps.s ! np.a} ; -- TODO: vps.s ! np.a ! np.isNeg
|
|
||||||
|
|
||||||
-- Temp -> Pol -> VP -> VPS
|
-- Temp -> Pol -> VP -> VPS
|
||||||
MkVPS temp pol vp = {
|
MkVPS temp pol vp = {
|
||||||
s = \\subjAgr =>
|
s = \\subjAgr =>
|
||||||
-- VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool } ;
|
temp.s ++
|
||||||
-- Verb = { s : Polarity => VerbForm => Str } ;
|
-- TODO: verb moods other than Ind
|
||||||
-- TODO: other VerbForm-s (moods)
|
buildVerb vp.v (Ind temp.a temp.t) pol.p subjAgr (fromAgr subjAgr).pol vp.objNeg ++
|
||||||
-- TODO: subj-dependent double negation
|
vp.compl ! subjAgr
|
||||||
-- TODO: subj/obj isNeg jāpārceļ uz Agr (?)
|
|
||||||
--let verb = vp.v.s ! pol.p ! Indicative (fromAgr agr).pers (fromAgr agr).num temp.t in
|
|
||||||
temp.s ++ buildVerb vp.v (Ind temp.a temp.t) pol.p subjAgr (fromAgr subjAgr).pol vp.objNeg ++ vp.compl ! subjAgr
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Conj -> [VPS] -> VPS
|
-- Conj -> [VPS] -> VPS
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ abstract ExtraLavAbs = Extra **
|
|||||||
they8fem_Pron : Pron ;
|
they8fem_Pron : Pron ;
|
||||||
it8fem_Pron : Pron ;
|
it8fem_Pron : Pron ;
|
||||||
|
|
||||||
--empty_Det : Number -> Definite -> Bool -> Det ;
|
--empty_Det : Number -> Definiteness -> Bool -> Det ;
|
||||||
|
|
||||||
have_V3 : V3 ;
|
have_V3 : V3 ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ lin
|
|||||||
buildVerb v mood pol agr Pos Pos
|
buildVerb v mood pol agr Pos Pos
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- FIXME: needs restriction so that only VerbMood Indicative _ _ Present is allowed;
|
-- FIXME: needs restriction so that only VMood Indicative _ _ Present is allowed;
|
||||||
-- can't do that on VP level...
|
-- can't do that on VP level...
|
||||||
ProgrVP v = v ;
|
ProgrVP v = v ;
|
||||||
|
|
||||||
@@ -56,10 +56,10 @@ lin
|
|||||||
let agr = AgP1 Pl Masc
|
let agr = AgP1 Pl Masc
|
||||||
in {
|
in {
|
||||||
s =
|
s =
|
||||||
vp.v.s ! Pos ! (Indicative P1 Pl Pres) ++ -- Verb
|
vp.v.s ! Pos ! (VInd P1 Pl Pres) ++ -- Verb
|
||||||
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
||||||
}
|
}
|
||||||
| { s = vp.v.s ! Pos ! (Indicative P1 Pl Fut) ++ vp.compl ! agr } --# notpresent
|
| { s = vp.v.s ! Pos ! (VInd P1 Pl Fut) ++ vp.compl ! agr } --# notpresent
|
||||||
;
|
;
|
||||||
|
|
||||||
ImpP3 np vp = {
|
ImpP3 np vp = {
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ lin
|
|||||||
love_N = mkN "mīlestība" ;
|
love_N = mkN "mīlestība" ;
|
||||||
love_V2 = mkV2 (mkV "mīlēt" third_conjugation) acc_Prep ;
|
love_V2 = mkV2 (mkV "mīlēt" third_conjugation) acc_Prep ;
|
||||||
man_N = mkN "vīrietis" ;
|
man_N = mkN "vīrietis" ;
|
||||||
married_A2 = mkA2 (mkA (mkV "precēties" third_conjugation) IsUsi) with_Prep ;
|
married_A2 = mkA2 (mkA (mkV "precēties" third_conjugation) Act) with_Prep ;
|
||||||
meat_N = mkN "gaļa" ;
|
meat_N = mkN "gaļa" ;
|
||||||
milk_N = mkN "piens" ;
|
milk_N = mkN "piens" ;
|
||||||
moon_N = mkN "mēness" ;
|
moon_N = mkN "mēness" ;
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = p.possessive ;
|
s = p.poss ;
|
||||||
d = Def ;
|
d = Def ;
|
||||||
pol = Pos
|
pol = Pos
|
||||||
} ;
|
} ;
|
||||||
@@ -156,7 +156,7 @@ lin
|
|||||||
|
|
||||||
-- FIXME: vajag šķirot noteikto/nenoteikto galotni..?
|
-- FIXME: vajag šķirot noteikto/nenoteikto galotni..?
|
||||||
PPartNP np v2 = {
|
PPartNP np v2 = {
|
||||||
s = \\c => v2.s ! Pos ! (Participle TsTa (fromAgr np.a).gend (fromAgr np.a).num c) ++ np.s ! c ;
|
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.a).gend (fromAgr np.a).num c) ++ np.s ! c ;
|
||||||
a = np.a
|
a = np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -25,14 +25,14 @@ lin
|
|||||||
let trijs = mkNumSpec "trijs" "trešais" "trīs" "trīs" Pl
|
let trijs = mkNumSpec "trijs" "trešais" "trīs" "trīs" Pl
|
||||||
in {
|
in {
|
||||||
s = \\f,o,g,c => case <f, o, g, c> of {
|
s = \\f,o,g,c => case <f, o, g, c> of {
|
||||||
<unit, NCard, _, Nom> => "trīs" ;
|
<DUnit, NCard, _, Nom> => "trīs" ;
|
||||||
<unit, NCard, _, Dat> => "trim" ;
|
<DUnit, NCard, _, Dat> => "trim" ;
|
||||||
<unit, NCard, _, Loc> => "trīs" ;
|
<DUnit, NCard, _, Loc> => "trīs" ;
|
||||||
_ => trijs.s ! f ! o ! g ! c
|
_ => trijs.s ! f ! o ! g ! c
|
||||||
}
|
}
|
||||||
} | {
|
} | {
|
||||||
s = \\f,o,g,c => case <f, o, g, c> of {
|
s = \\f,o,g,c => case <f, o, g, c> of {
|
||||||
<unit, NCard, _, Nom> => "trīs" ;
|
<DUnit, NCard, _, Nom> => "trīs" ;
|
||||||
_ => trijs.s ! f ! o ! g ! c
|
_ => trijs.s ! f ! o ! g ! c
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -44,16 +44,16 @@ lin
|
|||||||
n8 = mkNumReg "astoņi" "astotais" Pl ;
|
n8 = mkNumReg "astoņi" "astotais" Pl ;
|
||||||
n9 = mkNumReg "deviņi" "devītais" Pl ;
|
n9 = mkNumReg "deviņi" "devītais" Pl ;
|
||||||
|
|
||||||
pot01 = { s = viens.s ! unit } ** { n = Sg } ;
|
pot01 = { s = viens.s ! DUnit } ** { n = Sg } ;
|
||||||
pot0 d = { s = d.s ! unit } ** { n = Pl } ;
|
pot0 d = { s = d.s ! DUnit } ** { n = Pl } ;
|
||||||
pot110 = { s = viens.s ! ten } ** { n = Pl } ;
|
pot110 = { s = viens.s ! DTen } ** { n = Pl } ;
|
||||||
pot111 = { s = viens.s ! teen } ** { n = Pl } ;
|
pot111 = { s = viens.s ! DTeen } ** { n = Pl } ;
|
||||||
pot1to19 d = { s = d.s ! teen } ** { n = Pl } ;
|
pot1to19 d = { s = d.s ! DTeen } ** { n = Pl } ;
|
||||||
pot0as1 n = { s = n.s ; n = n.n } ;
|
pot0as1 n = { s = n.s ; n = n.n } ;
|
||||||
pot1 d = { s = d.s ! ten } ** { n = Pl } ;
|
pot1 d = { s = d.s ! DTen } ** { n = Pl } ;
|
||||||
|
|
||||||
pot1plus d e = {
|
pot1plus d e = {
|
||||||
s = \\o,g,c => d.s ! ten ! NCard ! Masc ! Nom ++ e.s ! o ! g ! c ;
|
s = \\o,g,c => d.s ! DTen ! NCard ! Masc ! Nom ++ e.s ! o ! g ! c ;
|
||||||
n = e.n
|
n = e.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Specified type - no defaults
|
-- Specified type - no defaults
|
||||||
mkAdjectiveByType : Str -> AdjType -> Adj = \lemma,type ->
|
mkAdjectiveByType : Str -> AType -> Adj = \lemma,type ->
|
||||||
case type of {
|
case type of {
|
||||||
AdjQual => mkAdjective_Qual lemma ;
|
AQual => mkAdjective_Qual lemma ;
|
||||||
AdjRel => mkAdjective_Rel lemma ;
|
ARel => mkAdjective_Rel lemma ;
|
||||||
AdjIndecl => mkAdjective_Indecl lemma
|
AIndecl => mkAdjective_Indecl lemma
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Indeclinable adjective: theoretically, any #vowel ending
|
-- Indeclinable adjective: theoretically, any #vowel ending
|
||||||
@@ -74,16 +74,16 @@ oper
|
|||||||
-- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis.
|
-- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis.
|
||||||
-- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet
|
-- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet
|
||||||
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
||||||
mkAdjective_Participle : Verb -> PartType -> Adj = \v,p -> {
|
mkAdjective_Participle : Verb -> Voice -> Adj = \v,p -> {
|
||||||
s = table {
|
s = table {
|
||||||
AAdj Posit Indef g n c => v.s ! Pos ! (Participle p g n c) ;
|
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n c) ;
|
||||||
_ => NON_EXISTENT
|
_ => NON_EXISTENT
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
-- Positive degree: -s, -š (Indef and Def); -ais (Def only)
|
-- Positive degree: -s, -š (Indef and Def); -ais (Def only)
|
||||||
-- TODO: atsaukties uz lietvārdu locīšanas tabulām?
|
-- TODO: atsaukties uz lietvārdu locīšanas tabulām?
|
||||||
mkAdjective_Pos : Str -> Definite -> Gender => Number => Case => Str = \lemma,defin ->
|
mkAdjective_Pos : Str -> Definiteness -> Gender => Number => Case => Str = \lemma,defin ->
|
||||||
let stem : Str = case lemma of {
|
let stem : Str = case lemma of {
|
||||||
s + "ais" => s ;
|
s + "ais" => s ;
|
||||||
_ => Predef.tk 1 lemma
|
_ => Predef.tk 1 lemma
|
||||||
@@ -168,7 +168,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Comparative degree: Qual only
|
-- Comparative degree: Qual only
|
||||||
mkAdjective_Comp : Str -> Definite -> Gender => Number => Case => Str = \lemma,defin ->
|
mkAdjective_Comp : Str -> Definiteness -> Gender => Number => Case => Str = \lemma,defin ->
|
||||||
let stem : Str = Predef.tk 1 lemma
|
let stem : Str = Predef.tk 1 lemma
|
||||||
in case defin of {
|
in case defin of {
|
||||||
Indef => table {
|
Indef => table {
|
||||||
|
|||||||
@@ -11,18 +11,14 @@ resource ParadigmsLav = open
|
|||||||
CatLav
|
CatLav
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags
|
flags coding = utf8 ;
|
||||||
coding = utf8 ;
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
singular : Number = Sg ;
|
|
||||||
plural : Number = Pl ;
|
|
||||||
|
|
||||||
masculine : Gender = Masc ;
|
masculine : Gender = Masc ;
|
||||||
feminine : Gender = Fem ;
|
feminine : Gender = Fem ;
|
||||||
|
|
||||||
second_conjugation : VerbConj = C2 ;
|
singular : Number = Sg ;
|
||||||
third_conjugation : VerbConj = C3 ;
|
plural : Number = Pl ;
|
||||||
|
|
||||||
nominative : Case = Nom ;
|
nominative : Case = Nom ;
|
||||||
genitive : Case = Gen ;
|
genitive : Case = Gen ;
|
||||||
@@ -30,21 +26,24 @@ oper
|
|||||||
accusative : Case = Acc ;
|
accusative : Case = Acc ;
|
||||||
locative : Case = Loc ;
|
locative : Case = Loc ;
|
||||||
|
|
||||||
active_voice : PartType = IsUsi ;
|
second_conjugation : Conjugation = C2 ;
|
||||||
passive_voice : PartType = TsTa ;
|
third_conjugation : Conjugation = C3 ;
|
||||||
|
|
||||||
|
active_voice : Voice = Act ;
|
||||||
|
passive_voice : Voice = Pass ;
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : (lemma : Str) -> N = \l -> lin N (mkNoun l) ;
|
mkN : (lemma : Str) -> N = \l -> lin N (mkNoun l) ;
|
||||||
|
|
||||||
mkN : (lemma : Str) -> Bool -> N = \l,p -> lin N (mkNounByPal l p) ;
|
mkN : (lemma : Str) -> Bool -> N = \l,p -> lin N (mkNounByPal l p) ;
|
||||||
mkN : (lemma : Str) -> Gender -> N = \l,g -> lin N (mkNounByGend l g) ;
|
mkN : (lemma : Str) -> Gender -> N = \l,g -> lin N (mkNounByGend l g) ;
|
||||||
mkN : (lemma : Str) -> NounDecl -> N = \l,d -> lin N (mkNounByDecl l d) ;
|
mkN : (lemma : Str) -> Declension -> N = \l,d -> lin N (mkNounByDecl l d) ;
|
||||||
|
|
||||||
mkN : (lemma : Str) -> Gender -> Bool -> N = \l,g,p -> lin N (mkNounByGendPal l g p) ;
|
mkN : (lemma : Str) -> Gender -> Bool -> N = \l,g,p -> lin N (mkNounByGendPal l g p) ;
|
||||||
mkN : (lemma : Str) -> NounDecl -> Bool -> N = \l,d,p -> lin N (mkNounByDeclPal l d p) ;
|
mkN : (lemma : Str) -> Declension -> Bool -> N = \l,d,p -> lin N (mkNounByDeclPal l d p) ;
|
||||||
mkN : (lemma : Str) -> Gender -> NounDecl -> N = \l,g,d -> lin N (mkNounByGendDecl l g d) ;
|
mkN : (lemma : Str) -> Gender -> Declension -> N = \l,g,d -> lin N (mkNounByGendDecl l g d) ;
|
||||||
|
|
||||||
mkN : (lemma : Str) -> Gender -> NounDecl -> Bool -> N = \l,g,d,p ->
|
mkN : (lemma : Str) -> Gender -> Declension -> Bool -> N = \l,g,d,p ->
|
||||||
lin N (mkNounByGendDeclPal l g d p) ;
|
lin N (mkNounByGendDeclPal l g d p) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -63,13 +62,13 @@ oper
|
|||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
mkA : (lemma : Str) -> A = \s -> lin A (mkAdjective s) ;
|
mkA : (lemma : Str) -> A = \s -> lin A (mkAdjective s) ;
|
||||||
mkA : (lemma : Str) -> AdjType -> A = \s,t -> lin A (mkAdjectiveByType s t) ;
|
mkA : (lemma : Str) -> AType -> A = \s,t -> lin A (mkAdjectiveByType s t) ;
|
||||||
-- TODO: nav forši, ka jānorāda PartType, bet kā lai aptiet?
|
-- TODO: nav forši, ka jānorāda Voice, bet kā lai aptiet?
|
||||||
-- TODO: drīzāk jānorāda Str (divdabja forma) + PartType - pārējais iekšēji (auto)
|
-- TODO: drīzāk jānorāda Str (divdabja forma) + Voice - pārējais iekšēji (auto)
|
||||||
-- Turklāt Adj f-cijā iespējams būtu ok, ja pa tiešo izsauktu mkAdjective?!
|
-- Turklāt Adj f-cijā iespējams būtu ok, ja pa tiešo izsauktu mkAdjective?!
|
||||||
-- Tomēr diez vai: IsUsi...
|
-- Tomēr diez vai: IsUsi...
|
||||||
-- mkA2 gadījumā: vai PartType var noteikt pēc obj_Prep? Diez vai...
|
-- mkA2 gadījumā: vai Voice var noteikt pēc obj_Prep? Diez vai...
|
||||||
mkA : (v : Verb) -> PartType -> A = \v,p -> lin A (mkAdjective_Participle v p) ;
|
mkA : (v : Verb) -> Voice -> A = \v,p -> lin A (mkAdjective_Participle v p) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkA2 : A -> ResLav.Prep -> A2 = \a,p -> lin A2 (a ** { p = p }) ; -- precējies ar ...
|
mkA2 : A -> ResLav.Prep -> A2 = \a,p -> lin A2 (a ** { p = p }) ; -- precējies ar ...
|
||||||
@@ -83,7 +82,7 @@ oper
|
|||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : (lemma : Str) -> V = \l -> lin V (mkVerb_Irreg l) ;
|
mkV : (lemma : Str) -> V = \l -> lin V (mkVerb_Irreg l) ;
|
||||||
mkV : (lemma : Str) -> VerbConj -> V = \l,c -> lin V (mkVerb l c) ;
|
mkV : (lemma : Str) -> Conjugation -> V = \l,c -> lin V (mkVerb l c) ;
|
||||||
mkV : (lemma : Str) -> Str -> Str -> V = \l1,l2,l3 -> lin V (mkVerbC1 l1 l2 l3) ;
|
mkV : (lemma : Str) -> Str -> Str -> V = \l1,l2,l3 -> lin V (mkVerbC1 l1 l2 l3) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -166,7 +165,7 @@ oper
|
|||||||
desmit = mkAdjective_Pos (stem_ten + "desmitais") Def ;
|
desmit = mkAdjective_Pos (stem_ten + "desmitais") Def ;
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
unit => table {
|
DUnit => table {
|
||||||
NCard => table {
|
NCard => table {
|
||||||
Masc => table { c => masc.s ! n ! c } ;
|
Masc => table { c => masc.s ! n ! c } ;
|
||||||
Fem => table { c => fem.s ! n ! c }
|
Fem => table { c => fem.s ! n ! c }
|
||||||
@@ -176,11 +175,11 @@ oper
|
|||||||
g => table { c => ord ! g ! Sg ! c }
|
g => table { c => ord ! g ! Sg ! c }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
teen => table {
|
DTeen => table {
|
||||||
NCard => table { g => table { c => stem_teen + "padsmit" } } ;
|
NCard => table { g => table { c => stem_teen + "padsmit" } } ;
|
||||||
NOrd => table { g => table { c => padsmit ! g ! Sg ! c } }
|
NOrd => table { g => table { c => padsmit ! g ! Sg ! c } }
|
||||||
} ;
|
} ;
|
||||||
ten => table {
|
DTen => table {
|
||||||
NCard => table { g => table { c => stem_ten + "desmit" } } ;
|
NCard => table { g => table { c => stem_ten + "desmit" } } ;
|
||||||
NOrd => table { g => table { c => desmit ! g ! Sg ! c } }
|
NOrd => table { g => table { c => desmit ! g ! Sg ! c } }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ flags
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
Noun : Type = { s : Number => Case => Str ; g : Gender } ;
|
Noun : Type = { s : Number => Case => Str ; g : Gender } ;
|
||||||
ProperNoun : Type = { s : Case => Str ; g : Gender ; n : Number } ;
|
PNoun : Type = { s : Case => Str ; g : Gender ; n : Number } ;
|
||||||
|
|
||||||
masculine : Gender = Masc ;
|
masculine : Gender = Masc ;
|
||||||
feminine : Gender = Fem ;
|
feminine : Gender = Fem ;
|
||||||
@@ -21,7 +21,7 @@ oper
|
|||||||
mkNoun : Str -> Noun = \lemma ->
|
mkNoun : Str -> Noun = \lemma ->
|
||||||
mkNounByPal lemma True ;
|
mkNounByPal lemma True ;
|
||||||
|
|
||||||
mkProperNoun : Str -> Number -> ProperNoun = \lemma,number ->
|
mkProperNoun : Str -> Number -> PNoun = \lemma,number ->
|
||||||
let noun = mkNoun lemma
|
let noun = mkNoun lemma
|
||||||
in {
|
in {
|
||||||
s = \\c => noun.s ! number ! c ;
|
s = \\c => noun.s ! number ! c ;
|
||||||
@@ -61,7 +61,7 @@ oper
|
|||||||
|
|
||||||
-- Specified gender and palatalization; default declension
|
-- Specified gender and palatalization; default declension
|
||||||
mkNounByGendPal : Str -> Gender -> Bool -> Noun = \lemma,gend,pal ->
|
mkNounByGendPal : Str -> Gender -> Bool -> Noun = \lemma,gend,pal ->
|
||||||
let decl : NounDecl = case lemma of {
|
let decl : Declension = case lemma of {
|
||||||
#exception_D2_1 + "s" => D2 ;
|
#exception_D2_1 + "s" => D2 ;
|
||||||
#exception_D2_1_pal + "i" => D2 ;
|
#exception_D2_1_pal + "i" => D2 ;
|
||||||
#exception_D2_2 + "s" => D2 ;
|
#exception_D2_2 + "s" => D2 ;
|
||||||
@@ -82,22 +82,22 @@ oper
|
|||||||
in mkNounByGendDeclPal lemma gend decl pal ;
|
in mkNounByGendDeclPal lemma gend decl pal ;
|
||||||
|
|
||||||
-- Specified declension; default gender and palatalization
|
-- Specified declension; default gender and palatalization
|
||||||
mkNounByDecl : Str -> NounDecl -> Noun = \lemma,decl ->
|
mkNounByDecl : Str -> Declension -> Noun = \lemma,decl ->
|
||||||
mkNounByDeclPal lemma decl True ;
|
mkNounByDeclPal lemma decl True ;
|
||||||
|
|
||||||
-- Specified declension and palatalization; default gender
|
-- Specified declension and palatalization; default gender
|
||||||
mkNounByDeclPal : Str -> NounDecl -> Bool -> Noun = \lemma,decl,pal ->
|
mkNounByDeclPal : Str -> Declension -> Bool -> Noun = \lemma,decl,pal ->
|
||||||
case decl of {
|
case decl of {
|
||||||
D0|D1|D2|D3 => mkNounByGendDeclPal lemma Masc decl pal ;
|
D0|D1|D2|D3 => mkNounByGendDeclPal lemma Masc decl pal ;
|
||||||
D4|D5|D6|DR => mkNounByGendDeclPal lemma Fem decl pal
|
D4|D5|D6|DR => mkNounByGendDeclPal lemma Fem decl pal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Specified gender and declension; default palatalization
|
-- Specified gender and declension; default palatalization
|
||||||
mkNounByGendDecl : Str -> Gender -> NounDecl -> Noun = \lemma,gend,decl ->
|
mkNounByGendDecl : Str -> Gender -> Declension -> Noun = \lemma,gend,decl ->
|
||||||
mkNounByGendDeclPal lemma gend decl True ;
|
mkNounByGendDeclPal lemma gend decl True ;
|
||||||
|
|
||||||
-- Specified gender, declension and palatalization - no defaults
|
-- Specified gender, declension and palatalization - no defaults
|
||||||
mkNounByGendDeclPal : Str -> Gender -> NounDecl -> Bool -> Noun = \lemma,gend,decl,pal ->
|
mkNounByGendDeclPal : Str -> Gender -> Declension -> Bool -> Noun = \lemma,gend,decl,pal ->
|
||||||
case decl of {
|
case decl of {
|
||||||
D0 => mkNoun_D0 lemma gend ;
|
D0 => mkNoun_D0 lemma gend ;
|
||||||
D1 => mkNoun_D1 lemma ;
|
D1 => mkNoun_D1 lemma ;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ flags
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
PronGend : Type = { s : Gender => Number => Case => Str } ;
|
PronGend : Type = { s : Gender => Number => Case => Str } ;
|
||||||
Pron : Type = { s : Case => Str ; a : ResLav.Agr ; possessive : Gender => Number => Case => Str } ;
|
Pron : Type = { s : Case => Str ; a : ResLav.Agr ; poss : Gender => Number => Case => Str } ;
|
||||||
|
|
||||||
-- PRONOUNS (incl. 'determiners')
|
-- PRONOUNS (incl. 'determiners')
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ oper
|
|||||||
ResLav.Voc => NON_EXISTENT
|
ResLav.Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
a = AgP1 Sg g ;
|
a = AgP1 Sg g ;
|
||||||
possessive = table {
|
poss = table {
|
||||||
Masc => table {
|
Masc => table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Nom => "mans" ;
|
Nom => "mans" ;
|
||||||
@@ -76,7 +76,7 @@ oper
|
|||||||
ResLav.Voc => NON_EXISTENT
|
ResLav.Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
a = AgP1 Pl g ;
|
a = AgP1 Pl g ;
|
||||||
possessive = \\_,_,_ => "mūsu"
|
poss = \\_,_,_ => "mūsu"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPronoun_You_Sg : Gender -> Pron = \g -> {
|
mkPronoun_You_Sg : Gender -> Pron = \g -> {
|
||||||
@@ -89,7 +89,7 @@ oper
|
|||||||
ResLav.Voc => "tu"
|
ResLav.Voc => "tu"
|
||||||
} ;
|
} ;
|
||||||
a = AgP2 Sg g ;
|
a = AgP2 Sg g ;
|
||||||
possessive = table {
|
poss = table {
|
||||||
Masc => table {
|
Masc => table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Nom => "tavs" ;
|
Nom => "tavs" ;
|
||||||
@@ -139,7 +139,7 @@ oper
|
|||||||
ResLav.Voc => "Jūs"
|
ResLav.Voc => "Jūs"
|
||||||
} ;
|
} ;
|
||||||
a = AgP2 Pl g ; -- FIXME: in the case of a predicate nominal: copula=Pl, complement=Sg
|
a = AgP2 Pl g ; -- FIXME: in the case of a predicate nominal: copula=Pl, complement=Sg
|
||||||
possessive = \\_,_,_ => "Jūsu"
|
poss = \\_,_,_ => "Jūsu"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPronoun_You_Pl : Gender -> Pron = \g -> {
|
mkPronoun_You_Pl : Gender -> Pron = \g -> {
|
||||||
@@ -152,19 +152,19 @@ oper
|
|||||||
ResLav.Voc => "jūs"
|
ResLav.Voc => "jūs"
|
||||||
} ;
|
} ;
|
||||||
a = AgP2 Pl g ;
|
a = AgP2 Pl g ;
|
||||||
possessive = \\_,_,_ => "jūsu"
|
poss = \\_,_,_ => "jūsu"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPronoun_They : Gender -> Pron = \g -> {
|
mkPronoun_They : Gender -> Pron = \g -> {
|
||||||
s = \\c => (mkPronoun_Gend "viņš").s ! g ! Pl ! c ;
|
s = \\c => (mkPronoun_Gend "viņš").s ! g ! Pl ! c ;
|
||||||
a = AgP3 Pl g Pos ;
|
a = AgP3 Pl g Pos ;
|
||||||
possessive = \\_,_,_ => "viņu"
|
poss = \\_,_,_ => "viņu"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPronoun_It_Sg : Gender -> Pron = \g -> {
|
mkPronoun_It_Sg : Gender -> Pron = \g -> {
|
||||||
s = \\c => (mkPronoun_ThisThat That).s ! g ! Sg ! c ;
|
s = \\c => (mkPronoun_ThisThat That).s ! g ! Sg ! c ;
|
||||||
a = AgP3 Sg g Pos ;
|
a = AgP3 Sg g Pos ;
|
||||||
possessive = \\_,_,_ => case g of { Masc => "tā" ; Fem => "tās" }
|
poss = \\_,_,_ => case g of { Masc => "tā" ; Fem => "tās" }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Gender=>Number=>Case P3 pronouns
|
-- Gender=>Number=>Case P3 pronouns
|
||||||
@@ -280,14 +280,14 @@ oper
|
|||||||
Voc => NON_EXISTENT
|
Voc => NON_EXISTENT
|
||||||
} ! c ;
|
} ! c ;
|
||||||
a = AgP3 Sg Masc pol ;
|
a = AgP3 Sg Masc pol ;
|
||||||
possessive = \\_,_,_ => case stem of { "kaut" => stem ++ "kā" ; _ => stem + "kā" }
|
poss = \\_,_,_ => case stem of { "kaut" => stem ++ "kā" ; _ => stem + "kā" }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Everybody, somebody, nobody
|
-- Everybody, somebody, nobody
|
||||||
mkPronoun_Body : Str -> Polarity -> Pron = \lemma,pol -> {
|
mkPronoun_Body : Str -> Polarity -> Pron = \lemma,pol -> {
|
||||||
s = \\c => (mkPronoun_Gend lemma).s ! Masc ! Sg ! c ;
|
s = \\c => (mkPronoun_Gend lemma).s ! Masc ! Sg ! c ;
|
||||||
a = AgP3 Sg Masc pol ;
|
a = AgP3 Sg Masc pol ;
|
||||||
possessive = \\_,_,_ => (mkPronoun_Gend lemma).s ! Masc ! Sg ! Gen ;
|
poss = \\_,_,_ => (mkPronoun_Gend lemma).s ! Masc ! Sg ! Gen ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ flags
|
|||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Verb_TMP : Type = {s : VerbForm => Str} ;
|
Verb_TMP : Type = {s : VForm => Str} ;
|
||||||
|
|
||||||
-- Second and third conjugations
|
-- Second and third conjugations
|
||||||
mkVerb : Str -> VerbConj -> Verb = \lemma,conj -> {
|
mkVerb : Str -> Conjugation -> Verb = \lemma,conj -> {
|
||||||
s = table {
|
s = table {
|
||||||
Pos => (mkVerb_Pos lemma conj).s ;
|
Pos => (mkVerb_Pos lemma conj).s ;
|
||||||
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
||||||
@@ -29,7 +29,7 @@ oper
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_Pos : Str -> VerbConj -> Verb_TMP = \lemma,conj ->
|
mkVerb_Pos : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||||
case lemma of {
|
case lemma of {
|
||||||
-- TODO: "ir" =>
|
-- TODO: "ir" =>
|
||||||
s + ("t") => mkRegVerb lemma conj ;
|
s + ("t") => mkRegVerb lemma conj ;
|
||||||
@@ -43,13 +43,13 @@ oper
|
|||||||
s + ("ties") => mkVerb_C1_Refl lemma lemma2 lemma3
|
s + ("ties") => mkVerb_C1_Refl lemma lemma2 lemma3
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkRegVerb : Str -> VerbConj -> Verb_TMP = \lemma,conj ->
|
mkRegVerb : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||||
case conj of {
|
case conj of {
|
||||||
C2 => mkVerb_C2 lemma ;
|
C2 => mkVerb_C2 lemma ;
|
||||||
C3 => mkVerb_C3 lemma
|
C3 => mkVerb_C3 lemma
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkReflVerb : Str -> VerbConj -> Verb_TMP = \lemma,conj ->
|
mkReflVerb : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||||
case conj of {
|
case conj of {
|
||||||
C2 => mkVerb_C2_Refl lemma ;
|
C2 => mkVerb_C2_Refl lemma ;
|
||||||
C3 => mkVerb_C3_Refl lemma
|
C3 => mkVerb_C3_Refl lemma
|
||||||
@@ -57,17 +57,17 @@ oper
|
|||||||
|
|
||||||
filter_Neg : Verb_TMP -> Verb_TMP = \full -> {
|
filter_Neg : Verb_TMP -> Verb_TMP = \full -> {
|
||||||
s = table {
|
s = table {
|
||||||
Debitive => NON_EXISTENT ;
|
VDeb => NON_EXISTENT ;
|
||||||
DebitiveRelative => NON_EXISTENT ;
|
VDebRel => NON_EXISTENT ;
|
||||||
x => full.s ! x
|
x => full.s ! x
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- First conjugation
|
-- First conjugation
|
||||||
-- Ref. to lexicon.xml (revision 719): 15th paradigm
|
-- Ref. to lexicon.xml (revision 719): 15th paradigm
|
||||||
-- lemma1: Infinitive
|
-- lemma1: VInf
|
||||||
-- lemma2: Indicative P1 Sg Pres
|
-- lemma2: VInd P1 Sg Pres
|
||||||
-- lemma3: Indicative P1 Sg Past
|
-- lemma3: VInd P1 Sg Past
|
||||||
mkVerb_C1 : Str -> Str -> Str -> Verb_TMP = \lemma1,lemma2,lemma3 ->
|
mkVerb_C1 : Str -> Str -> Str -> Verb_TMP = \lemma1,lemma2,lemma3 ->
|
||||||
let
|
let
|
||||||
stem1 : Str = Predef.tk 1 lemma1 ;
|
stem1 : Str = Predef.tk 1 lemma1 ;
|
||||||
@@ -75,147 +75,141 @@ oper
|
|||||||
stem3 : Str = Predef.tk 1 lemma3
|
stem3 : Str = Predef.tk 1 lemma3
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma1 ; -- stem1 + "t"
|
VInf => lemma1 ; -- stem1 + "t"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => lemma2 ; -- stem2 + "u"
|
VInd P1 Sg Pres => lemma2 ; -- stem2 + "u"
|
||||||
Indicative P1 Sg Fut => pal_C1_1 stem3 stem1 + "šu" ;
|
VInd P1 Sg Fut => pal_C1_1 stem3 stem1 + "šu" ;
|
||||||
Indicative P1 Sg Past => lemma3 ; -- stem3 + "u"
|
VInd P1 Sg Past => lemma3 ; -- stem3 + "u"
|
||||||
Indicative P1 Pl Pres => stem2 + "am" ;
|
VInd P1 Pl Pres => stem2 + "am" ;
|
||||||
Indicative P1 Pl Fut => pal_C1_1 stem3 stem1 + "sim" ;
|
VInd P1 Pl Fut => pal_C1_1 stem3 stem1 + "sim" ;
|
||||||
Indicative P1 Pl Past => stem3 + "ām" ;
|
VInd P1 Pl Past => stem3 + "ām" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => pal_C1_4 stem2 ;
|
VInd P2 Sg Pres => pal_C1_4 stem2 ;
|
||||||
Indicative P2 Sg Fut => pal_C1_1 stem3 stem1 + "si" ;
|
VInd P2 Sg Fut => pal_C1_1 stem3 stem1 + "si" ;
|
||||||
Indicative P2 Sg Past => stem3 + "i" ;
|
VInd P2 Sg Past => stem3 + "i" ;
|
||||||
Indicative P2 Pl Pres => stem2 + "at" ;
|
VInd P2 Pl Pres => stem2 + "at" ;
|
||||||
--Indicative P2 Pl Fut => pal_C1_1 stem3 stem1 + ("siet"|"sit") ;
|
VInd P2 Pl Fut => pal_C1_1 stem3 stem1 + "siet" ; -- ("siet"|"sit")
|
||||||
Indicative P2 Pl Fut => pal_C1_1 stem3 stem1 + "siet" ;
|
VInd P2 Pl Past => stem3 + "āt" ;
|
||||||
Indicative P2 Pl Past => stem3 + "āt" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => stem2 ;
|
VInd P3 _ Pres => stem2 ;
|
||||||
Indicative P3 _ Fut => pal_C1_1 stem3 stem1 + "s" ;
|
VInd P3 _ Fut => pal_C1_1 stem3 stem1 + "s" ;
|
||||||
Indicative P3 _ Past => stem3 + "a" ;
|
VInd P3 _ Past => stem3 + "a" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem1 + "tu" ;
|
VInd _ _ Cond => stem1 + "tu" ;
|
||||||
|
|
||||||
Relative Pres => stem2 + "ot" ;
|
VRel Pres => stem2 + "ot" ;
|
||||||
Relative Fut => pal_C1_1 stem3 stem1 + "šot" ;
|
VRel Fut => pal_C1_1 stem3 stem1 + "šot" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => "jā" + stem2 ;
|
VDeb => "jā" + stem2 ;
|
||||||
|
VDebRel => "jā" + stem2 + "ot" ;
|
||||||
|
|
||||||
DebitiveRelative => "jā" + stem2 + "ot" ;
|
VImp Sg => pal_C1_4 stem2 ;
|
||||||
|
VImp Pl => pal_C1_4 stem2 + "iet" ;
|
||||||
|
|
||||||
Imperative Sg => pal_C1_4 stem2 ;
|
VPart Act g n c => mkParticiple_IsUsi g n c (pal_C1_3 stem3) ;
|
||||||
Imperative Pl => pal_C1_4 stem2 + "iet" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem1
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IsUsi g n c (pal_C1_3 stem3) ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem1
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Second conjugation
|
-- Second conjugation
|
||||||
-- Ref. to lexicon.xml (revision 719): 16th paradigm
|
-- Ref. to lexicon.xml (revision 719): 16th paradigm
|
||||||
-- lemma: Infinitive
|
-- lemma: VInf
|
||||||
mkVerb_C2 : Str -> Verb_TMP = \lemma ->
|
mkVerb_C2 : Str -> Verb_TMP = \lemma ->
|
||||||
let
|
let
|
||||||
stem : Str = Predef.tk 1 lemma
|
stem : Str = Predef.tk 1 lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma ; -- stem + "t"
|
VInf => lemma ; -- stem + "t"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => stem + "ju" ;
|
VInd P1 Sg Pres => stem + "ju" ;
|
||||||
Indicative P1 Sg Fut => stem + "šu" ;
|
VInd P1 Sg Fut => stem + "šu" ;
|
||||||
Indicative P1 Sg Past => stem + "ju" ;
|
VInd P1 Sg Past => stem + "ju" ;
|
||||||
Indicative P1 Pl Pres => stem + "jam" ;
|
VInd P1 Pl Pres => stem + "jam" ;
|
||||||
Indicative P1 Pl Fut => stem + "sim" ;
|
VInd P1 Pl Fut => stem + "sim" ;
|
||||||
Indicative P1 Pl Past => stem + "jām" ;
|
VInd P1 Pl Past => stem + "jām" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => stem ;
|
VInd P2 Sg Pres => stem ;
|
||||||
Indicative P2 Sg Fut => stem + "si" ;
|
VInd P2 Sg Fut => stem + "si" ;
|
||||||
Indicative P2 Sg Past => stem + "ji" ;
|
VInd P2 Sg Past => stem + "ji" ;
|
||||||
Indicative P2 Pl Pres => stem + "jat" ;
|
VInd P2 Pl Pres => stem + "jat" ;
|
||||||
--Indicative P2 Pl Fut => stem + ("siet"|"sit") ;
|
VInd P2 Pl Fut => stem + "siet" ; -- ("siet"|"sit")
|
||||||
Indicative P2 Pl Fut => stem + "siet" ;
|
VInd P2 Pl Past => stem + "jāt" ;
|
||||||
Indicative P2 Pl Past => stem + "jāt" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => stem ;
|
VInd P3 _ Pres => stem ;
|
||||||
Indicative P3 _ Fut => stem + "s" ;
|
VInd P3 _ Fut => stem + "s" ;
|
||||||
Indicative P3 _ Past => stem + "ja" ;
|
VInd P3 _ Past => stem + "ja" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem + "tu" ;
|
VInd _ _ Cond => stem + "tu" ;
|
||||||
|
|
||||||
Relative Pres => stem + "jot" ;
|
VRel Pres => stem + "jot" ;
|
||||||
Relative Fut => stem + "šot" ;
|
VRel Fut => stem + "šot" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => "jā" + stem ;
|
VDeb => "jā" + stem ;
|
||||||
|
VDebRel => "jā" + stem + "jot" ;
|
||||||
|
|
||||||
DebitiveRelative => "jā" + stem + "jot" ;
|
VImp Sg => stem ;
|
||||||
|
VImp Pl => stem + "jiet" ;
|
||||||
|
|
||||||
Imperative Sg => stem ;
|
VPart Act g n c => mkParticiple_IsUsi g n c (stem + "j") ;
|
||||||
Imperative Pl => stem + "jiet" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IsUsi g n c (stem + "j") ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Third conjugation
|
-- Third conjugation
|
||||||
-- Ref. to lexicon.xml (revision 719): 17th paradigm
|
-- Ref. to lexicon.xml (revision 719): 17th paradigm
|
||||||
-- lemma: Infinitive
|
-- lemma: VInf
|
||||||
mkVerb_C3 : Str -> Verb_TMP = \lemma ->
|
mkVerb_C3 : Str -> Verb_TMP = \lemma ->
|
||||||
let
|
let
|
||||||
stem : Str = Predef.tk 1 lemma
|
stem : Str = Predef.tk 1 lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma ; -- stem + "t"
|
VInf => lemma ; -- stem + "t"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => pal_C3_1 stem + "u" ;
|
VInd P1 Sg Pres => pal_C3_1 stem + "u" ;
|
||||||
Indicative P1 Sg Fut => stem + "šu" ;
|
VInd P1 Sg Fut => stem + "šu" ;
|
||||||
Indicative P1 Sg Past => stem + "ju" ;
|
VInd P1 Sg Past => stem + "ju" ;
|
||||||
Indicative P1 Pl Pres => pal_C3_1 stem + pal_C3_2 stem "am" ;
|
VInd P1 Pl Pres => pal_C3_1 stem + pal_C3_2 stem "am" ;
|
||||||
Indicative P1 Pl Fut => stem + "sim" ;
|
VInd P1 Pl Fut => stem + "sim" ;
|
||||||
Indicative P1 Pl Past => stem + "jām" ;
|
VInd P1 Pl Past => stem + "jām" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => pal_C3_1 stem + "i" ;
|
VInd P2 Sg Pres => pal_C3_1 stem + "i" ;
|
||||||
Indicative P2 Sg Fut => stem + "si" ;
|
VInd P2 Sg Fut => stem + "si" ;
|
||||||
Indicative P2 Sg Past => stem + "ji" ;
|
VInd P2 Sg Past => stem + "ji" ;
|
||||||
Indicative P2 Pl Pres => pal_C3_1 stem + pal_C3_2 stem "at" ;
|
VInd P2 Pl Pres => pal_C3_1 stem + pal_C3_2 stem "at" ;
|
||||||
--Indicative P2 Pl Fut => stem + ("siet"|"sit") ;
|
VInd P2 Pl Fut => stem + "siet" ; -- ("siet"|"sit")
|
||||||
Indicative P2 Pl Fut => stem + "siet" ;
|
VInd P2 Pl Past => stem + "jāt" ;
|
||||||
Indicative P2 Pl Past => stem + "jāt" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => pal_C3_5 stem ;
|
VInd P3 _ Pres => pal_C3_5 stem ;
|
||||||
Indicative P3 _ Fut => stem + "s" ;
|
VInd P3 _ Fut => stem + "s" ;
|
||||||
Indicative P3 _ Past => stem + "ja" ;
|
VInd P3 _ Past => stem + "ja" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem + "tu" ;
|
VInd _ _ Cond => stem + "tu" ;
|
||||||
|
|
||||||
Relative Pres => pal_C3_1 stem + "ot" ;
|
VRel Pres => pal_C3_1 stem + "ot" ;
|
||||||
Relative Fut => stem + "šot" ;
|
VRel Fut => stem + "šot" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => pal_C3_3 stem ;
|
VDeb => pal_C3_3 stem ;
|
||||||
|
VDebRel => pal_C3_3 stem + "ot" ;
|
||||||
|
|
||||||
DebitiveRelative => pal_C3_3 stem + "ot" ;
|
VImp Sg => pal_C3_1 stem + "i" ;
|
||||||
|
VImp Pl => pal_C3_1 stem + "iet" ;
|
||||||
|
|
||||||
Imperative Sg => pal_C3_1 stem + "i" ;
|
VPart Act g n c => mkParticiple_IsUsi g n c (stem + "j") ;
|
||||||
Imperative Pl => pal_C3_1 stem + "iet" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IsUsi g n c (stem + "j") ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- First conjugation: reflexive
|
-- First conjugation: reflexive
|
||||||
-- Ref. to lexicon.xml (revision 719): 18th paradigm
|
-- Ref. to lexicon.xml (revision 719): 18th paradigm
|
||||||
-- lemma1: Infinitive
|
-- lemma1: VInf
|
||||||
-- lemma2: Indicative P1 Sg Pres
|
-- lemma2: VInd P1 Sg Pres
|
||||||
-- lemma3: Indicative P1 Sg Past
|
-- lemma3: VInd P1 Sg Past
|
||||||
mkVerb_C1_Refl : Str -> Str -> Str -> Verb_TMP = \lemma1,lemma2,lemma3 ->
|
mkVerb_C1_Refl : Str -> Str -> Str -> Verb_TMP = \lemma1,lemma2,lemma3 ->
|
||||||
let
|
let
|
||||||
stem1 : Str = Predef.tk 4 lemma1 ;
|
stem1 : Str = Predef.tk 4 lemma1 ;
|
||||||
@@ -223,139 +217,133 @@ oper
|
|||||||
stem3 : Str = Predef.tk 2 lemma3
|
stem3 : Str = Predef.tk 2 lemma3
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma1 ; -- stem + "ties"
|
VInf => lemma1 ; -- stem + "ties"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => lemma2 ; -- stem2 + "os"
|
VInd P1 Sg Pres => lemma2 ; -- stem2 + "os"
|
||||||
Indicative P1 Sg Fut => pal_C1_1 stem3 stem1 + "šos" ;
|
VInd P1 Sg Fut => pal_C1_1 stem3 stem1 + "šos" ;
|
||||||
Indicative P1 Sg Past => lemma3 ; -- stem3 + "os"
|
VInd P1 Sg Past => lemma3 ; -- stem3 + "os"
|
||||||
Indicative P1 Pl Pres => stem2 + "amies" ;
|
VInd P1 Pl Pres => stem2 + "amies" ;
|
||||||
Indicative P1 Pl Fut => pal_C1_1 stem3 stem1 + "simies" ;
|
VInd P1 Pl Fut => pal_C1_1 stem3 stem1 + "simies" ;
|
||||||
Indicative P1 Pl Past => stem3 + "āmies" ;
|
VInd P1 Pl Past => stem3 + "āmies" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => pal_C1_2 stem3 stem2 + "ies" ;
|
VInd P2 Sg Pres => pal_C1_2 stem3 stem2 + "ies" ;
|
||||||
Indicative P2 Sg Fut => pal_C1_1 stem3 stem1 + "sies" ;
|
VInd P2 Sg Fut => pal_C1_1 stem3 stem1 + "sies" ;
|
||||||
Indicative P2 Sg Past => stem3 + "ies" ;
|
VInd P2 Sg Past => stem3 + "ies" ;
|
||||||
Indicative P2 Pl Pres => stem2 + "aties" ;
|
VInd P2 Pl Pres => stem2 + "aties" ;
|
||||||
--Indicative P2 Pl Fut => pal_C1_1 stem3 stem1 + ("sieties"|"sities") ;
|
VInd P2 Pl Fut => pal_C1_1 stem3 stem1 + "sieties" ; -- ("sieties"|"sities")
|
||||||
Indicative P2 Pl Fut => pal_C1_1 stem3 stem1 + "sieties" ;
|
VInd P2 Pl Past => stem3 + "āties" ;
|
||||||
Indicative P2 Pl Past => stem3 + "āties" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => stem2 + "as" ;
|
VInd P3 _ Pres => stem2 + "as" ;
|
||||||
Indicative P3 _ Fut => pal_C1_1 stem3 stem1 + "sies" ;
|
VInd P3 _ Fut => pal_C1_1 stem3 stem1 + "sies" ;
|
||||||
Indicative P3 _ Past => stem3 + "ās" ;
|
VInd P3 _ Past => stem3 + "ās" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem1 + "tos" ;
|
VInd _ _ Cond => stem1 + "tos" ;
|
||||||
|
|
||||||
Relative Pres => stem2 + "oties" ;
|
VRel Pres => stem2 + "oties" ;
|
||||||
Relative Fut => pal_C1_1 stem3 stem1 + "šoties" ;
|
VRel Fut => pal_C1_1 stem3 stem1 + "šoties" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => "jā" + stem2 + "as" ;
|
VDeb => "jā" + stem2 + "as" ;
|
||||||
|
VDebRel => "jā" + stem2 + "oties" ;
|
||||||
|
|
||||||
DebitiveRelative => "jā" + stem2 + "oties" ;
|
VImp Sg => pal_C1_2 stem3 stem2 + "ies" ;
|
||||||
|
VImp Pl => pal_C1_2 stem3 stem2 + "ieties" ;
|
||||||
|
|
||||||
Imperative Sg => pal_C1_2 stem3 stem2 + "ies" ;
|
VPart Act g n c => mkParticiple_IesUsies g n c (pal_C1_3 stem3) ;
|
||||||
Imperative Pl => pal_C1_2 stem3 stem2 + "ieties" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem1
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IesUsies g n c (pal_C1_3 stem3) ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem1
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Second conjugation: reflexive
|
-- Second conjugation: reflexive
|
||||||
-- Ref. to lexicon.xml (revision 719): 19th paradigm
|
-- Ref. to lexicon.xml (revision 719): 19th paradigm
|
||||||
-- lemma: Infinitive
|
-- lemma: VInf
|
||||||
mkVerb_C2_Refl : Str -> Verb_TMP = \lemma ->
|
mkVerb_C2_Refl : Str -> Verb_TMP = \lemma ->
|
||||||
let
|
let
|
||||||
stem : Str = Predef.tk 4 lemma
|
stem : Str = Predef.tk 4 lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma ; -- stem + "ties"
|
VInf => lemma ; -- stem + "ties"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => stem + "jos" ;
|
VInd P1 Sg Pres => stem + "jos" ;
|
||||||
Indicative P1 Sg Fut => stem + "šos" ;
|
VInd P1 Sg Fut => stem + "šos" ;
|
||||||
Indicative P1 Sg Past => stem + "jos" ;
|
VInd P1 Sg Past => stem + "jos" ;
|
||||||
Indicative P1 Pl Pres => stem + "jamies" ;
|
VInd P1 Pl Pres => stem + "jamies" ;
|
||||||
Indicative P1 Pl Fut => stem + "simies" ;
|
VInd P1 Pl Fut => stem + "simies" ;
|
||||||
Indicative P1 Pl Past => stem + "jāmies" ;
|
VInd P1 Pl Past => stem + "jāmies" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => stem + "jies" ;
|
VInd P2 Sg Pres => stem + "jies" ;
|
||||||
Indicative P2 Sg Fut => stem + "sies" ;
|
VInd P2 Sg Fut => stem + "sies" ;
|
||||||
Indicative P2 Sg Past => stem + "jies" ;
|
VInd P2 Sg Past => stem + "jies" ;
|
||||||
Indicative P2 Pl Pres => stem + "jaties" ;
|
VInd P2 Pl Pres => stem + "jaties" ;
|
||||||
--Indicative P2 Pl Fut => stem + ("sieties"|"sities") ;
|
VInd P2 Pl Fut => stem + "sieties" ; -- ("sieties"|"sities")
|
||||||
Indicative P2 Pl Fut => stem + "sieties" ;
|
VInd P2 Pl Past => stem + "jāties" ;
|
||||||
Indicative P2 Pl Past => stem + "jāties" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => stem + "jas" ;
|
VInd P3 _ Pres => stem + "jas" ;
|
||||||
Indicative P3 _ Fut => stem + "sies" ;
|
VInd P3 _ Fut => stem + "sies" ;
|
||||||
Indicative P3 _ Past => stem + "jās" ;
|
VInd P3 _ Past => stem + "jās" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem + "tos" ;
|
VInd _ _ Cond => stem + "tos" ;
|
||||||
|
|
||||||
Relative Pres => stem + "joties" ;
|
VRel Pres => stem + "joties" ;
|
||||||
Relative Fut => stem + "šoties" ;
|
VRel Fut => stem + "šoties" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => "jā" + stem + "jas" ;
|
VDeb => "jā" + stem + "jas" ;
|
||||||
|
VDebRel => "jā" + stem + "joties" ;
|
||||||
|
|
||||||
DebitiveRelative => "jā" + stem + "joties" ;
|
VImp Sg => stem + "jies" ;
|
||||||
|
VImp Pl => stem + "jieties" ;
|
||||||
|
|
||||||
Imperative Sg => stem + "jies" ;
|
VPart Act g n c => mkParticiple_IesUsies g n c (stem + "j") ;
|
||||||
Imperative Pl => stem + "jieties" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IesUsies g n c (stem + "j") ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Third conjugation: reflexive
|
-- Third conjugation: reflexive
|
||||||
-- Ref. to lexicon.xml (revision 719): 20th paradigm
|
-- Ref. to lexicon.xml (revision 719): 20th paradigm
|
||||||
-- lemma: Infinitive
|
-- lemma: VInf
|
||||||
mkVerb_C3_Refl : Str -> Verb_TMP = \lemma ->
|
mkVerb_C3_Refl : Str -> Verb_TMP = \lemma ->
|
||||||
let
|
let
|
||||||
stem : Str = Predef.tk 4 lemma
|
stem : Str = Predef.tk 4 lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Infinitive => lemma ; -- stem + "ties"
|
VInf => lemma ; -- stem + "ties"
|
||||||
|
|
||||||
Indicative P1 Sg Pres => pal_C3_1 stem + "os" ;
|
VInd P1 Sg Pres => pal_C3_1 stem + "os" ;
|
||||||
Indicative P1 Sg Fut => stem + "šos" ;
|
VInd P1 Sg Fut => stem + "šos" ;
|
||||||
Indicative P1 Sg Past => stem + "jos" ;
|
VInd P1 Sg Past => stem + "jos" ;
|
||||||
Indicative P1 Pl Pres => pal_C3_4 stem + "mies" ;
|
VInd P1 Pl Pres => pal_C3_4 stem + "mies" ;
|
||||||
Indicative P1 Pl Fut => stem + "simies" ;
|
VInd P1 Pl Fut => stem + "simies" ;
|
||||||
Indicative P1 Pl Past => stem + "jāmies" ;
|
VInd P1 Pl Past => stem + "jāmies" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => pal_C3_1 stem + "ies" ;
|
VInd P2 Sg Pres => pal_C3_1 stem + "ies" ;
|
||||||
Indicative P2 Sg Fut => stem + "sies" ;
|
VInd P2 Sg Fut => stem + "sies" ;
|
||||||
Indicative P2 Sg Past => stem + "jies" ;
|
VInd P2 Sg Past => stem + "jies" ;
|
||||||
Indicative P2 Pl Pres => pal_C3_4 stem + "ties" ;
|
VInd P2 Pl Pres => pal_C3_4 stem + "ties" ;
|
||||||
--Indicative P2 Pl Fut => stem + ("sieties"|"sities") ;
|
VInd P2 Pl Fut => stem + "sieties" ; -- ("sieties"|"sities")
|
||||||
Indicative P2 Pl Fut => stem + "sieties" ;
|
VInd P2 Pl Past => stem + "jāties" ;
|
||||||
Indicative P2 Pl Past => stem + "jāties" ;
|
|
||||||
|
|
||||||
Indicative P3 _ Pres => pal_C3_4 stem + "s" ;
|
VInd P3 _ Pres => pal_C3_4 stem + "s" ;
|
||||||
Indicative P3 _ Fut => stem + "sies" ;
|
VInd P3 _ Fut => stem + "sies" ;
|
||||||
Indicative P3 _ Past => stem + "jās" ;
|
VInd P3 _ Past => stem + "jās" ;
|
||||||
|
|
||||||
Indicative _ _ Cond => stem + "tos" ;
|
VInd _ _ Cond => stem + "tos" ;
|
||||||
|
|
||||||
Relative Pres => pal_C3_1 stem + "oties" ;
|
VRel Pres => pal_C3_1 stem + "oties" ;
|
||||||
Relative Fut => stem + "šoties" ;
|
VRel Fut => stem + "šoties" ;
|
||||||
Relative Past => NON_EXISTENT ;
|
VRel Past => NON_EXISTENT ;
|
||||||
Relative Cond => NON_EXISTENT ;
|
VRel Cond => NON_EXISTENT ;
|
||||||
|
|
||||||
Debitive => pal_C3_6 stem + "s" ;
|
VDeb => pal_C3_6 stem + "s" ;
|
||||||
|
VDebRel => pal_C3_6 stem + "oties" ;
|
||||||
|
|
||||||
DebitiveRelative => pal_C3_6 stem + "oties" ;
|
VImp Sg => pal_C3_1 stem + "ies" ;
|
||||||
|
VImp Pl => pal_C3_1 stem + "ieties" ;
|
||||||
|
|
||||||
Imperative Sg => pal_C3_1 stem + "ies" ;
|
VPart Act g n c => mkParticiple_IesUsies g n c (stem + "j") ;
|
||||||
Imperative Pl => pal_C3_1 stem + "ieties" ;
|
VPart Pass g n c => mkParticiple_TsTa g n c stem
|
||||||
|
|
||||||
Participle IsUsi g n c => mkParticiple_IesUsies g n c (stem + "j") ;
|
|
||||||
Participle TsTa g n c => mkParticiple_TsTa g n c stem
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -373,22 +361,22 @@ oper
|
|||||||
mkVerb_Irreg_Be : Verb = {
|
mkVerb_Irreg_Be : Verb = {
|
||||||
s = table {
|
s = table {
|
||||||
Pos => table {
|
Pos => table {
|
||||||
Indicative P1 Sg Pres => "esmu" ;
|
VInd P1 Sg Pres => "esmu" ;
|
||||||
Indicative P2 Sg Pres => "esi" ;
|
VInd P2 Sg Pres => "esi" ;
|
||||||
Indicative P3 _ Pres => "ir" ;
|
VInd P3 _ Pres => "ir" ;
|
||||||
|
|
||||||
Debitive => "jābūt" ;
|
VDeb => "jābūt" ;
|
||||||
|
|
||||||
x => (mkVerb_C1 "būt" "esu" "biju").s ! x -- the incorrect 'esu' will be overriden
|
x => (mkVerb_C1 "būt" "esu" "biju").s ! x -- the incorrect 'esu' will be overriden
|
||||||
} ;
|
} ;
|
||||||
Neg => table {
|
Neg => table {
|
||||||
Indicative P1 Sg Pres => "neesmu" ;
|
VInd P1 Sg Pres => "neesmu" ;
|
||||||
Indicative P2 Sg Pres => "neesi" ;
|
VInd P2 Sg Pres => "neesi" ;
|
||||||
Indicative P3 _ Pres => "nav" ;
|
VInd P3 _ Pres => "nav" ;
|
||||||
|
|
||||||
Debitive => NON_EXISTENT ;
|
VDeb => NON_EXISTENT ;
|
||||||
|
|
||||||
DebitiveRelative => NON_EXISTENT ;
|
VDebRel => NON_EXISTENT ;
|
||||||
|
|
||||||
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
||||||
}
|
}
|
||||||
@@ -400,14 +388,14 @@ oper
|
|||||||
mkVerb_Irreg_Go_Prefix : Str -> Verb = \pref -> {
|
mkVerb_Irreg_Go_Prefix : Str -> Verb = \pref -> {
|
||||||
s = table {
|
s = table {
|
||||||
Pos => table {
|
Pos => table {
|
||||||
Indicative P3 _ Pres => pref + "iet" ;
|
VInd P3 _ Pres => pref + "iet" ;
|
||||||
Debitive => "jā" + pref + "iet" ;
|
VDeb => "jā" + pref + "iet" ;
|
||||||
x => (mkVerb_C1 (pref + "iet") (pref + "eju") (pref + "gāju")).s ! x
|
x => (mkVerb_C1 (pref + "iet") (pref + "eju") (pref + "gāju")).s ! x
|
||||||
} ;
|
} ;
|
||||||
Neg => table {
|
Neg => table {
|
||||||
Indicative P3 _ Pres => "ne" + pref + "iet" ;
|
VInd P3 _ Pres => "ne" + pref + "iet" ;
|
||||||
Debitive => NON_EXISTENT ;
|
VDeb => NON_EXISTENT ;
|
||||||
DebitiveRelative => NON_EXISTENT ;
|
VDebRel => NON_EXISTENT ;
|
||||||
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -416,28 +404,28 @@ oper
|
|||||||
mkVerb_Irreg_Sleep : Verb = {
|
mkVerb_Irreg_Sleep : Verb = {
|
||||||
s = table {
|
s = table {
|
||||||
Pos => table {
|
Pos => table {
|
||||||
Indicative P2 Sg Pres => (mkVerb_C3 "gulēt").s ! Indicative P2 Sg Pres ;
|
VInd P2 Sg Pres => (mkVerb_C3 "gulēt").s ! VInd P2 Sg Pres ;
|
||||||
Indicative p n Pres => (mkVerb_C3 "guļēt").s ! Indicative p n Pres ;
|
VInd p n Pres => (mkVerb_C3 "guļēt").s ! VInd p n Pres ;
|
||||||
|
|
||||||
-- FIXME: Here and there, the incorrect 'guļēt' contains intentional palatalization
|
-- FIXME: Here and there, the incorrect 'guļēt' contains intentional palatalization
|
||||||
|
|
||||||
Relative Pres => (mkVerb_C3 "guļēt").s ! Relative Pres ;
|
VRel Pres => (mkVerb_C3 "guļēt").s ! VRel Pres ;
|
||||||
|
|
||||||
Debitive => (mkVerb_C3 "guļēt").s ! Debitive ;
|
VDeb => (mkVerb_C3 "guļēt").s ! VDeb ;
|
||||||
|
|
||||||
DebitiveRelative => (mkVerb_C3 "guļēt").s ! DebitiveRelative ;
|
VDebRel => (mkVerb_C3 "guļēt").s ! VDebRel ;
|
||||||
|
|
||||||
x => (mkVerb_C3 "gulēt").s ! x
|
x => (mkVerb_C3 "gulēt").s ! x
|
||||||
} ;
|
} ;
|
||||||
Neg => table {
|
Neg => table {
|
||||||
Indicative P2 Sg Pres => (mkVerb_C3 "negulēt").s ! Indicative P2 Sg Pres ;
|
VInd P2 Sg Pres => (mkVerb_C3 "negulēt").s ! VInd P2 Sg Pres ;
|
||||||
Indicative p n Pres => (mkVerb_C3 "neguļēt").s ! Indicative p n Pres ;
|
VInd p n Pres => (mkVerb_C3 "neguļēt").s ! VInd p n Pres ;
|
||||||
|
|
||||||
Relative Pres => (mkVerb_C3 "neguļēt").s ! Relative Pres ;
|
VRel Pres => (mkVerb_C3 "neguļēt").s ! VRel Pres ;
|
||||||
|
|
||||||
Debitive => NON_EXISTENT ;
|
VDeb => NON_EXISTENT ;
|
||||||
|
|
||||||
DebitiveRelative => NON_EXISTENT ;
|
VDebRel => NON_EXISTENT ;
|
||||||
|
|
||||||
x => (mkVerb_C3 "negulēt").s ! x
|
x => (mkVerb_C3 "negulēt").s ! x
|
||||||
}
|
}
|
||||||
@@ -447,8 +435,8 @@ oper
|
|||||||
-- Auxiliaries: palatalization rules
|
-- Auxiliaries: palatalization rules
|
||||||
|
|
||||||
-- Ref. to the Java implementation: mija6
|
-- Ref. to the Java implementation: mija6
|
||||||
-- stem3: Indicative P1 Sg Past
|
-- stem3: VInd P1 Sg Past
|
||||||
-- stem1: Infinitive
|
-- stem1: VInf
|
||||||
pal_C1_1 : Str -> Str -> Str = \stem3,stem1 ->
|
pal_C1_1 : Str -> Str -> Str = \stem3,stem1 ->
|
||||||
case stem1 of {
|
case stem1 of {
|
||||||
s + "s" => case stem3 of {
|
s + "s" => case stem3 of {
|
||||||
@@ -462,8 +450,8 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Ref. to the Java implementation: mija7
|
-- Ref. to the Java implementation: mija7
|
||||||
-- stem3: Indicative P1 Sg Past
|
-- stem3: VInd P1 Sg Past
|
||||||
-- stem2: Indicative P1 Sg Pres
|
-- stem2: VInd P1 Sg Pres
|
||||||
pal_C1_2 : Str -> Str -> Str = \stem3,stem2 ->
|
pal_C1_2 : Str -> Str -> Str = \stem3,stem2 ->
|
||||||
case stem2 of {
|
case stem2 of {
|
||||||
s + "š" => case stem3 of {
|
s + "š" => case stem3 of {
|
||||||
@@ -486,7 +474,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Ref. to the Java implementation: mija11
|
-- Ref. to the Java implementation: mija11
|
||||||
-- stem3: Indicative P1 Sg Past
|
-- stem3: VInd P1 Sg Past
|
||||||
pal_C1_3 : Str -> Str = \stem3 ->
|
pal_C1_3 : Str -> Str = \stem3 ->
|
||||||
case stem3 of {
|
case stem3 of {
|
||||||
s + "c" => s + "k" ;
|
s + "c" => s + "k" ;
|
||||||
@@ -495,7 +483,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Ref. to the Java implementation: mija14
|
-- Ref. to the Java implementation: mija14
|
||||||
-- stem: Indicative P1 Sg Pres | Indicative P1 Sg Past
|
-- stem: VInd P1 Sg Pres | VInd P1 Sg Past
|
||||||
pal_C1_4 : Str -> Str = \stem ->
|
pal_C1_4 : Str -> Str = \stem ->
|
||||||
case stem of {
|
case stem of {
|
||||||
s + "k" => s + "c" ;
|
s + "k" => s + "c" ;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ lin
|
|||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
|
|
||||||
-- FIXME: neesmu līdz galam drošs vai agreement ir tieši (AgPr Pl)
|
-- FIXME: neesmu līdz galam drošs vai agreement ir tieši (AgPr Pl)
|
||||||
UttVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc Pos) } ;
|
UttVP vp = { s = build_VP vp Pos VInf (AgP3 Pl Masc Pos) } ;
|
||||||
|
|
||||||
UttIP ip = { s = ip.s ! Nom } ;
|
UttIP ip = { s = ip.s ! Nom } ;
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|||||||
@@ -19,18 +19,18 @@ lin
|
|||||||
oper
|
oper
|
||||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||||
let subj : Case = case vp.agr.voice of {
|
let subj : Case = case vp.voice of {
|
||||||
Act => vp.agr.c_topic ;
|
Act => vp.val.subj ;
|
||||||
Pass => vp.agr.c_focus
|
Pass => vp.val.obj
|
||||||
} in lin RCl {
|
} in lin RCl {
|
||||||
s = \\mood,pol,agr =>
|
s = \\mood,pol,agr =>
|
||||||
case mood of { -- Subject
|
case mood of { -- Subject
|
||||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||||
_ => rp.s ! Masc ! vp.agr.c_topic
|
_ => rp.s ! Masc ! vp.val.subj
|
||||||
} ++
|
} ++
|
||||||
case subj of { -- Verb
|
case subj of { -- Verb
|
||||||
Nom => buildVerb vp.v mood pol (AgP3 (fromAgr agr).num (fromAgr agr).gend Pos) Pos vp.objNeg ; -- TODO: kāpēc P3 nevis agr, kāds tas ir?
|
Nom => buildVerb vp.v mood pol (AgP3 (fromAgr agr).num (fromAgr agr).gend Pos) Pos vp.objNeg ; -- TODO: kāpēc P3 nevis agr, kāds tas ir?
|
||||||
_ => buildVerb vp.v mood pol vp.agr.agr Pos vp.objNeg -- TODO: test me
|
_ => buildVerb vp.v mood pol vp.val.agr Pos vp.objNeg -- TODO: test me
|
||||||
} ++
|
} ++
|
||||||
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -3,102 +3,87 @@
|
|||||||
resource ResLav = ParamX ** open Prelude in {
|
resource ResLav = ParamX ** open Prelude in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
|
|
||||||
optimize = all ;
|
optimize = all ;
|
||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
param
|
param
|
||||||
|
|
||||||
-- Nouns
|
-- Nouns
|
||||||
|
|
||||||
Case = Nom | Gen | Dat | Acc | Loc | Voc ;
|
Case = Nom | Gen | Dat | Acc | Loc | Voc ;
|
||||||
Gender = Masc | Fem ;
|
Gender = Masc | Fem ;
|
||||||
NounDecl = D0 | D1 | D2 | D3 | D4 | D5 | D6 | DR ;
|
Declension = D0 | D1 | D2 | D3 | D4 | D5 | D6 | DR ;
|
||||||
|
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
Definite = Indef | Def ;
|
|
||||||
AdjType = AdjQual | AdjRel | AdjIndecl ;
|
|
||||||
|
|
||||||
-- TODO: pārveidot uz šādu formu lai ir arī apstākļa vārdi kas atvasināti no īpašības vārdiem
|
Definiteness = Indef | Def ;
|
||||||
AForm = AAdj Degree Definite Gender Number Case | AAdv Degree ;
|
AType = AQual | ARel | AIndecl ;
|
||||||
|
|
||||||
-- Participles
|
AForm =
|
||||||
PartType = IsUsi | TsTa ; -- TODO: šo jāmet ārā - pārklājas ar Voice, kas attiecas ne tikai uz divdabjiem
|
AAdj Degree Definiteness Gender Number Case
|
||||||
Voice = Act | Pass ;
|
| AAdv Degree ;
|
||||||
|
|
||||||
-- Verbs
|
-- Verbs
|
||||||
-- Ind = Indicative
|
|
||||||
-- Rel = Relative (Latvian specific: http://www.isocat.org/rest/dc/3836)
|
|
||||||
-- Deb = Debitive (Latvian specific: http://www.isocat.org/rest/dc/3835)
|
|
||||||
-- Condit = Conditional
|
|
||||||
-- DebitiveRelative = the relative subtype of debitive
|
|
||||||
VerbForm =
|
|
||||||
Infinitive
|
|
||||||
| Indicative Person Number Tense
|
|
||||||
| Relative Tense
|
|
||||||
| Debitive
|
|
||||||
| Imperative Number
|
|
||||||
| DebitiveRelative
|
|
||||||
| Participle PartType Gender Number Case
|
|
||||||
;
|
|
||||||
-- TODO: divdabim noteiktā forma un arī pārākā / vispārākā pakāpe
|
|
||||||
|
|
||||||
VerbMood =
|
Voice = Act | Pass ;
|
||||||
|
Conjugation = C2 | C3 ; -- C1 - "irregular" verbs
|
||||||
|
|
||||||
|
-- Verb mood:
|
||||||
|
-- Ind - indicative
|
||||||
|
-- Rel - relative (http://www.isocat.org/rest/dc/3836)
|
||||||
|
-- Deb - debitive (http://www.isocat.org/rest/dc/3835)
|
||||||
|
-- Condit - conditional
|
||||||
|
VMood =
|
||||||
Ind Anteriority Tense
|
Ind Anteriority Tense
|
||||||
| Rel Anteriority Tense --# notpresent
|
| Rel Anteriority Tense --# notpresent
|
||||||
| Deb Anteriority Tense --# notpresent
|
| Deb Anteriority Tense --# notpresent
|
||||||
| Condit Anteriority --# notpresent
|
| Condit Anteriority --# notpresent
|
||||||
;
|
;
|
||||||
|
|
||||||
VerbConj = C2 | C3 ;
|
VForm =
|
||||||
|
VInf
|
||||||
|
| VInd Person Number Tense
|
||||||
|
| VRel Tense
|
||||||
|
| VDeb
|
||||||
|
| VImp Number
|
||||||
|
| VDebRel -- the relative subtype of debitive
|
||||||
|
| VPart Voice Gender Number Case ;
|
||||||
|
|
||||||
-- Verb agreement
|
-- Verb agreement:
|
||||||
-- Number depends on the person
|
-- Number depends on Subject.Person
|
||||||
-- Gender has to be taken into accunt because of predicative nominals and participles
|
-- Subject.Gender has to be agreed in predicative nominal clauses, and in participle forms
|
||||||
-- Polarity may depend on the subject/object NP (double negation, if subject/object has a negated determiner)
|
-- Polarity - double negation, if the subject/object NP has a negated determiner
|
||||||
Agr = AgP1 Number Gender | AgP2 Number Gender | AgP3 Number Gender Polarity ;
|
Agr =
|
||||||
|
AgP1 Number Gender
|
||||||
|
| AgP2 Number Gender
|
||||||
|
| AgP3 Number Gender Polarity ;
|
||||||
|
|
||||||
-- Clause agreement
|
-- Other
|
||||||
-- TODO: jāpāriet uz vienotu TopicFocus (=> ieraksta tips)
|
|
||||||
--ClAgr = Topic Case Voice | TopicFocus Case Case Agr Voice ;
|
|
||||||
--ClAgr = NomAcc Agr Voice | DatNom Agr Voice | DatGen Agr Voice ;
|
|
||||||
|
|
||||||
ThisOrThat = This | That ;
|
ThisOrThat = This | That ;
|
||||||
|
|
||||||
CardOrd = NCard | NOrd ;
|
CardOrd = NCard | NOrd ;
|
||||||
DForm = unit | teen | ten ;
|
DForm = DUnit | DTeen | DTen ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
vowel : pattern Str = #("a"|"ā"|"e"|"ē"|"i"|"ī"|"o"|"u"|"ū") ;
|
|
||||||
|
|
||||||
simpleCons : pattern Str = #("c"|"d"|"l"|"n"|"s"|"t"|"z") ;
|
Verb : Type = { s : Polarity => VForm => Str } ;
|
||||||
labialCons : pattern Str = #("b"|"m"|"p"|"v") ;
|
|
||||||
sonantCons : pattern Str = #("l"|"m"|"n"|"r"|"ļ"|"ņ") ;
|
|
||||||
doubleCons : pattern Str = #("ll"|"ln"|"nn"|"sl"|"sn"|"st"|"zl"|"zn") ;
|
|
||||||
|
|
||||||
prefix : pattern Str = #("aiz"|"ap"|"at"|"ie"|"iz"|"no"|"pa"|"pār"|"pie"|"sa"|"uz") ;
|
Valence : Type = { subj : Case ; obj : Case ; agr : Agr } ;
|
||||||
|
-- TODO: jāpāriet uz vienotu TopicFocus parametru
|
||||||
NON_EXISTENT : Str = "NON_EXISTENT" ;
|
-- TODO: ieraksta tips (c:CaseCase, p:Prep; kam ir agr?) vai algebr. param.?
|
||||||
|
|
||||||
Verb : Type = { s : Polarity => VerbForm => Str } ;
|
|
||||||
|
|
||||||
-- TODO: voice ir jāliek pa tiešo zem VP (?)
|
|
||||||
ClAgr : Type = { c_topic : Case ; c_focus : Case ; agr : Agr ; voice : Voice } ;
|
|
||||||
|
|
||||||
-- TODO: topic un focus jāapvieno vienā (jaunā) agr parametrā (?), jo
|
|
||||||
-- ne vienmēr ir abi un ne visas kombinācijas ir vajadzīgas
|
|
||||||
--
|
|
||||||
-- TODO: lai varētu spēlēties ar vārdu secību, compl vēlāk būs jāskalda pa daļām
|
|
||||||
VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Polarity } ;
|
|
||||||
-- compl: objects, complements, adverbial modifiers
|
|
||||||
-- topic: typically - subject
|
|
||||||
-- focus: typically - objects, complements, adverbial modifiers
|
|
||||||
|
|
||||||
VPSlash = VP ** { p : Prep } ; -- TODO: p pārklājas ar agr
|
|
||||||
-- principā rekur ir objekts kuram jau kaut kas ir bet ir vēl viena brīva valence...
|
|
||||||
|
|
||||||
Prep : Type = { s : Str ; c : Number => Case } ;
|
Prep : Type = { s : Str ; c : Number => Case } ;
|
||||||
-- In the case of case-based valences, the preposition is empty ([])
|
-- For simple case-based valences, the preposition is empty ([])
|
||||||
-- TODO: position of prepositions (pre or post)
|
-- TODO: position of prepositions (pre or post)
|
||||||
|
|
||||||
--Valence : Type = { p : Prep ; c : Number => Case } ;
|
VP = { v : Verb ; compl : Agr => Str ; val : Valence ; objNeg : Polarity ; voice : Voice } ;
|
||||||
-- e.g. 'ar' + Sg-Acc or Pl-Dat; Preposition may be skipped for simple case-baced valences
|
-- compl: objects, complements, adverbial modifiers
|
||||||
|
-- TODO: lai varētu spēlēties ar vārdu secību, compl vēlāk būs jāskalda pa daļām
|
||||||
|
|
||||||
|
VPSlash = VP ** { p : Prep } ;
|
||||||
|
-- TODO: p pārklājas ar val.obj un val.agr / vai vp.p = v.p?
|
||||||
|
|
||||||
toAgr : Person -> Number -> Gender -> Polarity -> Agr = \pers,num,gend,pol ->
|
toAgr : Person -> Number -> Gender -> Polarity -> Agr = \pers,num,gend,pol ->
|
||||||
case pers of {
|
case pers of {
|
||||||
@@ -107,15 +92,6 @@ oper
|
|||||||
P3 => AgP3 num gend pol
|
P3 => AgP3 num gend pol
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
toClAgr : Case -> Case -> Agr -> Voice -> ClAgr = \c_topic,c_focus,agr,voice -> {
|
|
||||||
c_topic = c_topic ;
|
|
||||||
c_focus = c_focus ;
|
|
||||||
agr = agr ;
|
|
||||||
voice = voice
|
|
||||||
} ;
|
|
||||||
|
|
||||||
toClAgr_Reg : Case -> ClAgr = \c_topic -> toClAgr c_topic Nom (AgP3 Sg Masc Pos) Act ;
|
|
||||||
|
|
||||||
fromAgr : Agr -> { pers : Person ; num : Number ; gend : Gender ; pol : Polarity } = \agr ->
|
fromAgr : Agr -> { pers : Person ; num : Number ; gend : Gender ; pol : Polarity } = \agr ->
|
||||||
case agr of {
|
case agr of {
|
||||||
AgP1 num gend => { pers = P1 ; num = num ; gend = gend ; pol = Pos } ;
|
AgP1 num gend => { pers = P1 ; num = num ; gend = gend ; pol = Pos } ;
|
||||||
@@ -146,6 +122,23 @@ oper
|
|||||||
_ => pol2
|
_ => pol2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--agrP3 : Number -> Gender -> Polarity -> Agr = \num,gend,pol -> toAgr P3 num gend pol ;
|
toVal : Case -> Case -> Agr -> Valence = \subj,obj,agr -> {
|
||||||
|
subj = subj ;
|
||||||
|
obj = obj ;
|
||||||
|
agr = agr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
toVal_Reg : Case -> Valence = \subj -> toVal subj Nom (AgP3 Sg Masc Pos) ;
|
||||||
|
|
||||||
|
vowel : pattern Str = #("a"|"ā"|"e"|"ē"|"i"|"ī"|"o"|"u"|"ū") ;
|
||||||
|
|
||||||
|
simpleCons : pattern Str = #("c"|"d"|"l"|"n"|"s"|"t"|"z") ;
|
||||||
|
labialCons : pattern Str = #("b"|"m"|"p"|"v") ;
|
||||||
|
sonantCons : pattern Str = #("l"|"m"|"n"|"r"|"ļ"|"ņ") ;
|
||||||
|
doubleCons : pattern Str = #("ll"|"ln"|"nn"|"sl"|"sn"|"st"|"zl"|"zn") ;
|
||||||
|
|
||||||
|
prefix : pattern Str = #("aiz"|"ap"|"at"|"ie"|"iz"|"no"|"pa"|"pār"|"pie"|"sa"|"uz") ;
|
||||||
|
|
||||||
|
NON_EXISTENT : Str = "NON_EXISTENT" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ lin
|
|||||||
|
|
||||||
PredSCVP sc vp = mkClauseSC sc vp ;
|
PredSCVP sc vp = mkClauseSC sc vp ;
|
||||||
|
|
||||||
ImpVP vp = { s = \\pol,n => vp.v.s ! pol ! (Imperative n) ++ vp.compl ! (AgP2 n Masc) } ;
|
ImpVP vp = { s = \\pol,n => vp.v.s ! pol ! (VImp n) ++ vp.compl ! (AgP2 n Masc) } ;
|
||||||
|
|
||||||
SlashVP np vp = mkClause np vp ** { p = vp.p } ;
|
SlashVP np vp = mkClause np vp ** { p = vp.p } ;
|
||||||
|
|
||||||
@@ -31,8 +31,9 @@ lin
|
|||||||
mkClause np (lin VP {
|
mkClause np (lin VP {
|
||||||
v = vs ;
|
v = vs ;
|
||||||
compl = \\_ => "," ++ vs.subj.s ++ sslash.s ;
|
compl = \\_ => "," ++ vs.subj.s ++ sslash.s ;
|
||||||
agr = toClAgr_Reg vs.topic ;
|
val = toVal_Reg vs.topic ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
}) ** { p = sslash.p } ;
|
}) ** { p = sslash.p } ;
|
||||||
|
|
||||||
ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
||||||
@@ -43,7 +44,7 @@ lin
|
|||||||
EmbedQS qs = { s = qs.s } ;
|
EmbedQS qs = { s = qs.s } ;
|
||||||
|
|
||||||
-- FIXME: vai agr ir Pl?
|
-- FIXME: vai agr ir Pl?
|
||||||
EmbedVP vp = { s = build_VP vp Pos Infinitive (AgP3 Pl Masc Pos) } ;
|
EmbedVP vp = { s = build_VP vp Pos VInf (AgP3 Pl Masc Pos) } ;
|
||||||
|
|
||||||
UseCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
UseCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
||||||
UseQCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
UseQCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
||||||
@@ -61,19 +62,19 @@ lin
|
|||||||
oper
|
oper
|
||||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||||
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
||||||
let subj : Case = case vp.agr.voice of {
|
let subj : Case = case vp.voice of {
|
||||||
Act => vp.agr.c_topic ;
|
Act => vp.val.subj ;
|
||||||
Pass => vp.agr.c_focus
|
Pass => vp.val.obj
|
||||||
} in lin Cl {
|
} in lin Cl {
|
||||||
s = \\mood,pol =>
|
s = \\mood,pol =>
|
||||||
case mood of { -- Subject
|
case mood of { -- Subject
|
||||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||||
_ => np.s ! vp.agr.c_topic
|
_ => np.s ! vp.val.subj
|
||||||
} ++
|
} ++
|
||||||
case subj of { -- Verb
|
case subj of { -- Verb
|
||||||
-- TODO: vai np.a un np.a.pol argumentus nevar apvienot?
|
-- TODO: vai np.a un np.a.pol argumentus nevar apvienot?
|
||||||
Nom => buildVerb vp.v mood pol np.a (fromAgr np.a).pol vp.objNeg ;
|
Nom => buildVerb vp.v mood pol np.a (fromAgr np.a).pol vp.objNeg ;
|
||||||
_ => buildVerb vp.v mood pol vp.agr.agr (fromAgr np.a).pol vp.objNeg -- TESTME
|
_ => buildVerb vp.v mood pol vp.val.agr (fromAgr np.a).pol vp.objNeg -- TESTME
|
||||||
} ++
|
} ++
|
||||||
vp.compl ! np.a -- Object(s), complements, adverbial modifiers
|
vp.compl ! np.a -- Object(s), complements, adverbial modifiers
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ lin
|
|||||||
he_Pron = {
|
he_Pron = {
|
||||||
s = \\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c ;
|
s = \\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c ;
|
||||||
a = AgP3 Sg Masc Pos ;
|
a = AgP3 Sg Masc Pos ;
|
||||||
possessive = \\_,_,_ => "viņa"
|
poss = \\_,_,_ => "viņa"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
she_Pron = {
|
she_Pron = {
|
||||||
s = \\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c ;
|
s = \\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c ;
|
||||||
a = AgP3 Sg Fem Pos ;
|
a = AgP3 Sg Fem Pos ;
|
||||||
possessive = \\_,_,_ => "viņas"
|
poss = \\_,_,_ => "viņas"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
they_Pron = mkPronoun_They Masc ; -- See also: ExtraLav.they8fem_Pron
|
they_Pron = mkPronoun_They Masc ; -- See also: ExtraLav.they8fem_Pron
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
-- FIXME: module relations.
|
-- TODO: module relations.
|
||||||
-- VerbLav is included in many places because of buildVerb (SentenceLav, QuestionLav, RelativeLav, IdiomLav),
|
-- VerbLav is included in many places because of buildVerb (SentenceLav, QuestionLav, RelativeLav, IdiomLav),
|
||||||
-- and includes ParadigmsVerbsLav because of mkVerb_Irreg_Be -
|
-- and includes ParadigmsVerbsLav because of mkVerb_Irreg_Be.
|
||||||
-- they need to be reallocated somehow to ResLav or something similar ('be' - IrregLav).
|
-- They need to be reallocated somehow to ResLav.or something similar (e.g. 'be' => IrregLav).
|
||||||
-- Not so simple since morphology itself needs ResLav & friends.
|
-- Not so simple since morphology itself needs ResLav & friends.
|
||||||
|
|
||||||
concrete VerbLav of Verb = CatLav ** open
|
concrete VerbLav of Verb = CatLav ** open
|
||||||
StructuralLav,
|
StructuralLav,
|
||||||
ParadigmsVerbsLav,
|
ParadigmsVerbsLav,
|
||||||
ResLav, -- TODO: get rid of ResLav - include parameters (Pos etc.) in ParadigmsVerbsLav
|
ResLav,
|
||||||
ParamX,
|
ParamX,
|
||||||
Prelude
|
Prelude
|
||||||
in {
|
in {
|
||||||
@@ -21,225 +21,243 @@ flags
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
|
-- V -> VP
|
||||||
UseV v = {
|
UseV v = {
|
||||||
v = v ;
|
v = v ;
|
||||||
compl = \\_ => [] ;
|
compl = \\_ => [] ;
|
||||||
agr = toClAgr_Reg Nom ;
|
val = toVal_Reg Nom ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- VV -> VP -> VP
|
||||||
ComplVV vv vp = {
|
ComplVV vv vp = {
|
||||||
v = vv ;
|
v = vv ;
|
||||||
compl = \\agr => build_VP vp Pos Infinitive agr ;
|
compl = \\agr => build_VP vp Pos VInf agr ;
|
||||||
agr = toClAgr_Reg vv.topic ;
|
val = toVal_Reg vv.topic ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- VS -> S -> VP
|
||||||
ComplVS vs s = {
|
ComplVS vs s = {
|
||||||
v = vs ;
|
v = vs ;
|
||||||
compl = \\_ => "," ++ vs.subj.s ++ s.s ;
|
compl = \\_ => "," ++ vs.subj.s ++ s.s ;
|
||||||
agr = toClAgr_Reg vs.topic ;
|
val = toVal_Reg vs.topic ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- VQ -> QS -> VP
|
||||||
ComplVQ vq qs = {
|
ComplVQ vq qs = {
|
||||||
v = vq ;
|
v = vq ;
|
||||||
compl = \\_ => "," ++ qs.s ;
|
compl = \\_ => "," ++ qs.s ;
|
||||||
agr = toClAgr_Reg vq.topic ;
|
val = toVal_Reg vq.topic ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- VA -> AP -> VP
|
||||||
ComplVA va ap = {
|
ComplVA va ap = {
|
||||||
v = va ;
|
v = va ;
|
||||||
compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ;
|
compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
val = toVal_Reg Nom ;
|
||||||
objNeg = Pos
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- V2 -> VPSlash
|
-- V2 -> VPSlash
|
||||||
-- The (direct) object is added by ComplSlash
|
-- e.g. 'love (it)'
|
||||||
SlashV2a v2 = {
|
SlashV2a v2 = {
|
||||||
v = v2 ;
|
v = v2 ;
|
||||||
compl = \\_ => [] ;
|
compl = \\_ => [] ; -- overriden in ComplSlash
|
||||||
|
val = toVal v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc Pos) ;
|
||||||
|
objNeg = Pos ; -- overriden in ComplSlash
|
||||||
|
voice = Act ;
|
||||||
p = v2.p ;
|
p = v2.p ;
|
||||||
agr = toClAgr v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc Pos) Act ; -- overriden in ComplSlash
|
|
||||||
objNeg = Pos -- overriden in ComplSlash
|
|
||||||
} ;
|
} ;
|
||||||
|
-- TODO: val other than P3 Sg Masc
|
||||||
|
|
||||||
-- VPSlash -> NP -> VP
|
-- V3 -> NP -> VPSlash
|
||||||
ComplSlash vp np =
|
-- e.g. 'give it (to her)'
|
||||||
let agr : Agr = np.a
|
|
||||||
in insertObjPre_Spec
|
|
||||||
{-
|
|
||||||
(\\agr => case (fromClAgr vp.agr).voice of {
|
|
||||||
Act => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr agr).num) ;
|
|
||||||
Pass => np.s ! (fromClAgr vp.agr).c_topic
|
|
||||||
})
|
|
||||||
-}
|
|
||||||
(\\agr => case vp.agr.voice of {
|
|
||||||
Act => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr agr).num) ;
|
|
||||||
Pass => case vp.p.c ! (fromAgr agr).num of {
|
|
||||||
--Nom => np.s ! vp.agr.c_topic ;
|
|
||||||
Nom => np.s ! vp.agr.c_focus ;
|
|
||||||
_ => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr agr).num)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
vp
|
|
||||||
np ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
insertObjPre_Spec : (Agr => Str) -> ResLav.VP -> NP -> ResLav.VP = \obj,vp,obj_np -> {
|
|
||||||
v = vp.v ;
|
|
||||||
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
|
||||||
agr = vp.agr ;
|
|
||||||
{-
|
|
||||||
agr = case vp.agr.voice of {
|
|
||||||
Topic c_topic voice => Topic c_topic voice ;
|
|
||||||
TopicFocus c_topic c_focus _ voice => TopicFocus c_topic c_focus obj_np.a voice
|
|
||||||
-- _ => Topic Nom -- kāpēc ne 'Topic topic_case'? -- TODO: remove
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
objNeg = (fromAgr obj_np.a).pol
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
-- V3 -> NP -> VPSlash ; -- give it (to her)
|
|
||||||
-- FIXME: "vīrietis runā par ābolus ar sievieti" ("a man talks to a woman about apples")
|
|
||||||
Slash2V3 v3 np = insertObjC
|
Slash2V3 v3 np = insertObjC
|
||||||
(\\_ => v3.p1.s ++ np.s ! (v3.p1.c ! (fromAgr np.a).num))
|
(\\_ => v3.p1.s ++ np.s ! (v3.p1.c ! (fromAgr np.a).num))
|
||||||
{
|
{
|
||||||
v = v3 ;
|
v = v3 ;
|
||||||
compl = \\_ => [] ;
|
compl = \\_ => [] ;
|
||||||
p = v3.p2 ;
|
val = toVal v3.topic (v3.p1.c ! Sg) np.a ;
|
||||||
agr = toClAgr v3.topic (v3.p1.c ! Sg) np.a Act ; -- TESTME: P1, P2 (in the focus)
|
objNeg = (fromAgr np.a).pol ;
|
||||||
objNeg = (fromAgr np.a).pol -- TESTME
|
voice = Act ;
|
||||||
|
p = v3.p2
|
||||||
} ;
|
} ;
|
||||||
|
-- FIXME: "vīrietis runā par ābolus ar sievieti" ("a man talks to a woman about apples")
|
||||||
|
-- FIXME: the order of objects (?)
|
||||||
|
-- TODO: test val (P1 un P2) un objNeg
|
||||||
|
|
||||||
-- V3 -> NP -> VPSlash ; -- give (it) to her
|
-- V3 -> NP -> VPSlash
|
||||||
|
-- e.g. 'give (it) to her'
|
||||||
Slash3V3 v3 np = insertObjC
|
Slash3V3 v3 np = insertObjC
|
||||||
(\\_ => v3.p2.s ++ np.s ! (v3.p2.c ! (fromAgr np.a).num))
|
(\\_ => v3.p2.s ++ np.s ! (v3.p2.c ! (fromAgr np.a).num))
|
||||||
{
|
{
|
||||||
v = v3 ;
|
v = v3 ;
|
||||||
compl = \\_ => [] ;
|
compl = \\_ => [] ;
|
||||||
p = v3.p1 ;
|
val = toVal v3.topic (v3.p2.c ! Sg) (AgP3 Sg Masc Pos) ;
|
||||||
agr = toClAgr v3.topic (v3.p2.c ! Sg) (AgP3 Sg Masc Pos) Act ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
|
objNeg = (fromAgr np.a).pol ;
|
||||||
objNeg = (fromAgr np.a).pol -- TESTME
|
voice = Act ;
|
||||||
|
p = v3.p1
|
||||||
} ;
|
} ;
|
||||||
|
-- TODO: val other than P3 Sg Masc
|
||||||
|
-- TODO: test objNeg
|
||||||
|
|
||||||
|
-- V2V -> VP -> VPSlash
|
||||||
SlashV2V v2v vp = {
|
SlashV2V v2v vp = {
|
||||||
v = v2v ;
|
v = v2v ;
|
||||||
compl = \\agr => build_VP vp Pos Infinitive agr ;
|
compl = \\agr => build_VP vp Pos VInf agr ;
|
||||||
p = v2v.p ;
|
val = toVal_Reg Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
|
p = v2v.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- V2S -> S -> VPSlash
|
||||||
SlashV2S v2s s = {
|
SlashV2S v2s s = {
|
||||||
v = v2s ;
|
v = v2s ;
|
||||||
compl = \\_ => "," ++ v2s.subj.s ++ s.s ;
|
compl = \\_ => "," ++ v2s.subj.s ++ s.s ;
|
||||||
p = v2s.p ;
|
val = toVal_Reg Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
|
p = v2s.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- V2Q -> QS -> VPSlash
|
||||||
SlashV2Q v2q qs = {
|
SlashV2Q v2q qs = {
|
||||||
v = v2q ;
|
v = v2q ;
|
||||||
compl = \\_ => "," ++ qs.s ;
|
compl = \\_ => "," ++ qs.s ;
|
||||||
p = v2q.p ;
|
val = toVal_Reg Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
|
p = v2q.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- V2A -> AP -> VPSlash
|
||||||
SlashV2A v2a ap = {
|
SlashV2A v2a ap = {
|
||||||
v = v2a ;
|
v = v2a ;
|
||||||
compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ;
|
compl = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom ;
|
||||||
p = v2a.p ;
|
val = toVal_Reg Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
|
p = v2a.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVV vv vpslash = {
|
-- VV -> VPSlash -> VPSlash
|
||||||
|
SlashVV vv vp = {
|
||||||
v = vv ;
|
v = vv ;
|
||||||
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
|
compl = \\agr => build_VP vp Pos VInf agr ;
|
||||||
p = vpslash.p ;
|
val = toVal_Reg vv.topic ;
|
||||||
agr = toClAgr_Reg vv.topic ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
|
p = vp.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashV2VNP v2v np vpslash = insertObjC
|
-- V2V -> NP -> VPSlash -> VPSlash
|
||||||
|
SlashV2VNP v2v np vp = insertObjC
|
||||||
(\\_ => v2v.p.s ++ np.s ! (v2v.p.c ! (fromAgr np.a).num))
|
(\\_ => v2v.p.s ++ np.s ! (v2v.p.c ! (fromAgr np.a).num))
|
||||||
{
|
{
|
||||||
v = v2v ;
|
v = v2v ;
|
||||||
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
|
compl = \\agr => build_VP vp Pos VInf agr ;
|
||||||
p = vpslash.p ;
|
val = toVal_Reg Nom ;
|
||||||
agr = toClAgr_Reg Nom ;
|
objNeg = Pos ;
|
||||||
objNeg = Pos
|
voice = Act ;
|
||||||
} ;
|
p = vp.p
|
||||||
|
|
||||||
ReflVP vpslash = insertObjPre
|
|
||||||
(\\agr => vpslash.p.s ++ reflPron ! (vpslash.p.c ! (fromAgr agr).num))
|
|
||||||
vpslash ;
|
|
||||||
|
|
||||||
UseComp comp = {
|
|
||||||
v = lin V mkVerb_Irreg_Be ;
|
|
||||||
compl = \\agr => comp.s ! agr ;
|
|
||||||
agr = toClAgr_Reg Nom ;
|
|
||||||
objNeg = Pos
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- V2 -> VP
|
|
||||||
-- TODO: vai VP nevajag papildlauku isPass? Izskatās, ka vajag - jau/tikai ComplSlash (objekta locījumam)
|
|
||||||
PassV2 v2 = {
|
|
||||||
v = v2 ;
|
|
||||||
compl = \\_ => [] ;
|
|
||||||
--agr = toClAgr v2.topic (v2.p.c ! Sg) (AgP3 Sg Masc) Pass ; -- FIXME(?): should not be overriden in ComplSlash; P3 restriction - never used?
|
|
||||||
agr = toClAgr (v2.p.c ! Sg) v2.topic (AgP3 Sg Masc Pos) Pass ; -- FIXME(?): should not be overriden in ComplSlash; P3 restriction - never used?
|
|
||||||
objNeg = Pos -- overriden in ComplSlash
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VP -> Prep -> VPSlash
|
-- VP -> Prep -> VPSlash
|
||||||
-- TODO: šajā brīdī ir jāignorē prep (by8agent_Prep); tas jāaizstāj ar v2.topic
|
|
||||||
-- Tad varēs dzēst ārā komentāru pie StructuralLav.by8agent_Prep
|
|
||||||
VPSlashPrep vp prep = vp ** {p = prep} ;
|
VPSlashPrep vp prep = vp ** {p = prep} ;
|
||||||
|
-- TODO: šajā brīdī ir jāignorē prep (by8agent_Prep); tas jāaizstāj ar v2.topic (?)
|
||||||
|
-- Tad varēs dzēst ārā komentāru pie StructuralLav.by8agent_Prep (?)
|
||||||
|
|
||||||
|
-- VPSlash -> NP -> VP
|
||||||
|
ComplSlash vp np = let agr : Agr = np.a in {
|
||||||
|
v = vp.v ;
|
||||||
|
compl = \\agr => case vp.voice of {
|
||||||
|
Act => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr agr).num) ;
|
||||||
|
Pass => case vp.p.c ! (fromAgr agr).num of {
|
||||||
|
Nom => np.s ! vp.val.obj ;
|
||||||
|
_ => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr agr).num)
|
||||||
|
}
|
||||||
|
} ++ vp.compl ! agr ;
|
||||||
|
val = vp.val ;
|
||||||
|
objNeg = (fromAgr np.a).pol ;
|
||||||
|
voice = vp.voice
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- V2 -> VP
|
||||||
|
PassV2 v2 = {
|
||||||
|
v = v2 ;
|
||||||
|
compl = \\_ => [] ;
|
||||||
|
val = toVal (v2.p.c ! Sg) v2.topic (AgP3 Sg Masc Pos) ;
|
||||||
|
objNeg = Pos ;
|
||||||
|
voice = Pass
|
||||||
|
} ;
|
||||||
|
-- TODO: val - should not be overriden in ComplSlash etc.?
|
||||||
|
-- TODO: val - P3 Sg Masc restriction - never used?
|
||||||
|
-- TODO: notestēt objNeg (kur tas tiek pārrakstīts - ComplSlash, AdvVP u.c.?)
|
||||||
|
|
||||||
|
-- VP -> Adv -> VP
|
||||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||||
|
|
||||||
|
-- AdV -> VP -> VP
|
||||||
AdVVP adv vp = insertObjPre (\\_ => adv.s) vp ;
|
AdVVP adv vp = insertObjPre (\\_ => adv.s) vp ;
|
||||||
|
|
||||||
|
-- VPSlash -> VP
|
||||||
|
ReflVP vp = insertObjPre (\\agr => vp.p.s ++ reflPron ! (vp.p.c ! (fromAgr agr).num)) vp ;
|
||||||
|
|
||||||
|
-- Comp -> VP
|
||||||
|
UseComp comp = {
|
||||||
|
v = lin V mkVerb_Irreg_Be ;
|
||||||
|
compl = \\agr => comp.s ! agr ;
|
||||||
|
val = toVal_Reg Nom ;
|
||||||
|
objNeg = Pos ;
|
||||||
|
voice = Act
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- AP -> Comp
|
||||||
CompAP ap = { s = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom } ;
|
CompAP ap = { s = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom } ;
|
||||||
|
|
||||||
|
-- NP -> Comp
|
||||||
CompNP np = { s = \\_ => np.s ! Nom } ;
|
CompNP np = { s = \\_ => np.s ! Nom } ;
|
||||||
|
|
||||||
|
-- Adv -> Comp
|
||||||
CompAdv a = { s = \\_ => a.s } ;
|
CompAdv a = { s = \\_ => a.s } ;
|
||||||
|
|
||||||
|
-- CN -> Comp
|
||||||
CompCN cn = { s = \\agr => cn.s ! Indef ! (fromAgr agr).num ! Nom } ;
|
CompCN cn = { s = \\agr => cn.s ! Indef ! (fromAgr agr).num ! Nom } ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
build_VP : ResLav.VP -> Polarity -> VerbForm -> Agr -> Str = \vp,pol,vf,agr ->
|
build_VP : ResLav.VP -> Polarity -> VForm -> Agr -> Str = \vp,pol,vf,agr ->
|
||||||
vp.v.s ! pol ! vf ++ vp.compl ! agr ;
|
vp.v.s ! pol ! vf ++ vp.compl ! agr ;
|
||||||
|
|
||||||
-- VPSlash = { v : Verb ; topic : Case ; compl : Agr => Str ; p : Prep }
|
|
||||||
insertObjC : (Agr => Str) -> ResLav.VPSlash -> ResLav.VPSlash = \obj,vp ->
|
insertObjC : (Agr => Str) -> ResLav.VPSlash -> ResLav.VPSlash = \obj,vp ->
|
||||||
insertObj obj vp ** { p = vp.p } ;
|
insertObj obj vp ** { p = vp.p } ;
|
||||||
|
|
||||||
-- VP = { v : Verb ; topic : Case ; compl : Agr => Str }
|
|
||||||
insertObj : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
|
insertObj : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
|
||||||
v = vp.v ;
|
v = vp.v ;
|
||||||
compl = \\agr => vp.compl ! agr ++ obj ! agr ;
|
compl = \\agr => vp.compl ! agr ++ obj ! agr ;
|
||||||
agr = vp.agr ;
|
val = vp.val ;
|
||||||
objNeg = vp.objNeg
|
objNeg = vp.objNeg ;
|
||||||
|
voice = vp.voice
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VP = { v : Verb ; topic : Case ; compl : Agr => Str }
|
|
||||||
insertObjPre : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
|
insertObjPre : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
|
||||||
v = vp.v ;
|
v = vp.v ;
|
||||||
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
||||||
agr = vp.agr ;
|
val = vp.val ;
|
||||||
objNeg = vp.objNeg
|
objNeg = vp.objNeg ;
|
||||||
|
voice = vp.voice
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- FIXME: the type of the participle form - depending on what?! (currently fixed)
|
-- FIXME: the type of the participle form - depending on what?! (currently fixed)
|
||||||
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Polarity -> Polarity -> Str =
|
buildVerb : Verb -> VMood -> Polarity -> Agr -> Polarity -> Polarity -> Str =
|
||||||
\v,mood,pol,subjAgr,subjNeg,objNeg ->
|
\v,mood,pol,subjAgr,subjNeg,objNeg ->
|
||||||
let
|
let
|
||||||
pol_prim : Polarity = case <subjNeg, objNeg> of {
|
pol_prim : Polarity = case <subjNeg, objNeg> of {
|
||||||
@@ -249,24 +267,24 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
agr = fromAgr subjAgr
|
agr = fromAgr subjAgr
|
||||||
; --# notpresent
|
; --# notpresent
|
||||||
part = v.s ! ResLav.Pos ! (Participle TsTa agr.gend agr.num Nom) --# notpresent
|
part = v.s ! ResLav.Pos ! (VPart Pass agr.gend agr.num Nom) --# notpresent
|
||||||
in case mood of {
|
in case mood of {
|
||||||
Ind Simul tense => v.s ! pol_prim ! (Indicative agr.pers agr.num tense)
|
Ind Simul tense => v.s ! pol_prim ! (VInd agr.pers agr.num tense)
|
||||||
; --# notpresent
|
; --# notpresent
|
||||||
Ind Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative agr.pers agr.num tense) ++ part ; --# notpresent
|
Ind Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (VInd agr.pers agr.num tense) ++ part ; --# notpresent
|
||||||
|
|
||||||
-- FIXME(?): Rel _ Past => ...
|
-- FIXME(?): Rel _ Past => ...
|
||||||
Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent
|
Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent
|
||||||
Rel Simul tense => v.s ! pol_prim ! (Relative tense) ; --# notpresent
|
Rel Simul tense => v.s ! pol_prim ! (VRel tense) ; --# notpresent
|
||||||
Rel Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Relative tense) ++ part ; --# notpresent
|
Rel Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (VRel tense) ++ part ; --# notpresent
|
||||||
|
|
||||||
Deb Simul tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative P3 Sg tense) ++ --# notpresent
|
Deb Simul tense => mkVerb_Irreg_Be.s ! pol_prim ! (VInd P3 Sg tense) ++ --# notpresent
|
||||||
v.s ! ResLav.Pos ! Debitive ; --# notpresent
|
v.s ! ResLav.Pos ! VDeb ; --# notpresent
|
||||||
Deb Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative P3 Sg tense) ++ --# notpresent
|
Deb Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (VInd P3 Sg tense) ++ --# notpresent
|
||||||
mkVerb_Irreg_Be.s ! ResLav.Pos ! (Participle TsTa Masc Sg Nom) ++ --# notpresent
|
mkVerb_Irreg_Be.s ! ResLav.Pos ! (VPart Pass Masc Sg Nom) ++ --# notpresent
|
||||||
v.s ! ResLav.Pos ! Debitive ; --# notpresent
|
v.s ! ResLav.Pos ! VDeb ; --# notpresent
|
||||||
|
|
||||||
Condit Simul => v.s ! pol_prim ! (Indicative agr.pers agr.num ParamX.Cond) ; --# notpresent
|
Condit Simul => v.s ! pol_prim ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent
|
||||||
Condit Anter => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative agr.pers agr.num ParamX.Cond) ++ part --# notpresent
|
Condit Anter => mkVerb_Irreg_Be.s ! pol_prim ! (VInd agr.pers agr.num ParamX.Cond) ++ part --# notpresent
|
||||||
} ;
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user