Latvian: added support for double negation, fixed some structural words

Double negation: sebject-dependent - works, object-dependent - still has to be fixed (in VerbsLav).
Structural words: everybody, somebody, nobody.
Both motivated by AttemptoLav.
This commit is contained in:
Normunds Gruzitis
2012-10-16 13:54:52 +00:00
parent eff4d46fba
commit 21e61f4516
13 changed files with 174 additions and 94 deletions

View File

@@ -50,14 +50,14 @@ lincat
-- Noun
CN = { s : Definite => Number => Case => Str ; g : Gender } ;
NP = { s : Case => Str ; a : ResLav.Agr } ;
NP = { s : Case => Str ; a : ResLav.Agr ; isNeg : Bool } ;
Pron = { s : Case => Str ; a : ResLav.Agr ; possessive : Gender => Number => Case => Str } ;
Det = { s : Gender => Case => Str ; n : Number ; d : Definite } ;
Det = { s : Gender => Case => Str ; n : Number ; d : Definite ; isNeg : Bool } ;
Predet = { s : Gender => Str } ;
Ord = { s : Gender => Case => Str } ;
Num = { s : Gender => Case => Str ; n : Number ; hasCard : Bool } ;
Card = { s : Gender => Case => Str ; n : Number } ;
Quant = { s : Gender => Number => Case => Str ; d : Definite } ;
Quant = { s : Gender => Number => Case => Str ; d : Definite ; isNeg : Bool } ;
-- Numeral

View File

@@ -2,7 +2,8 @@
concrete ConjunctionLav of Conjunction = CatLav ** open
Coordination,
ResLav
ResLav,
Prelude
in {
flags
@@ -10,12 +11,14 @@ flags
coding = utf8 ;
lin
ConjS = conjunctDistrSS ;
ConjAdv = conjunctDistrSS ;
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
a = toAgr (conjNumber (fromAgr ss.a).n conj.n) (fromAgr ss.a).p (fromAgr ss.a).g
a = toAgr (conjNumber (fromAgr ss.a).n conj.n) (fromAgr ss.a).p (fromAgr ss.a).g ;
isNeg = False
} ;
ConjAP conj ss = conjunctDistrTable4 Definite Gender Number Case conj ss ;
@@ -38,6 +41,7 @@ lin
ConsRS xs x = consrTable Agr comma xs x ;
lincat
[S] = { s1, s2 : Str } ;
[Adv] = { s1, s2 : Str } ;
[NP] = { s1, s2 : Case => Str ; a : Agr } ;

View File

@@ -22,9 +22,9 @@ lin
they8fem_Pron = mkPronoun_They Fem ;
it8fem_Pron = mkPronoun_It_Sg Fem ;
-- FIXME: zemāk esošās f-cijas nav ExtraLavAbs - kāpēc tās ir te?!
-- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf
GenNP np = {s = \\_,_,_ => np.s ! Gen ; d = Def} ;
GenNP np = {s = \\_,_,_ => np.s ! Gen ; d = Def ; isNeg = np.isNeg} ;
--ICompAP ap = {s = \\g,n => "cik" ++ ap.s ! Indef ! g ! n ! Nom } ;

View File

@@ -5,7 +5,7 @@ concrete IdiomLav of Idiom = CatLav ** open
ResLav,
VerbLav,
ParadigmsVerbsLav
in {
in {
flags
coding = utf8 ;
@@ -16,7 +16,7 @@ lin
let agr = AgP3 Sg Masc
in {
s = \\mood,pol =>
buildVerb vp.v mood pol agr ++ -- Verb
buildVerb vp.v mood pol agr False vp.objNeg ++ -- Verb
vp.compl ! agr -- Object(s), complements, adverbial modifiers
} ;
@@ -24,7 +24,7 @@ lin
let agr = AgP3 Sg Masc
in {
s = \\mood,pol =>
buildVerb vp.v mood pol agr ++
buildVerb vp.v mood pol agr False vp.objNeg ++
vp.compl ! agr
} ;
@@ -34,7 +34,7 @@ lin
agr = np.a
in {
s = \\mood,pol =>
buildVerb v mood pol agr ++
buildVerb v mood pol agr np.isNeg False ++
np.s ! Nom
} ;
@@ -45,7 +45,7 @@ lin
in {
s = \\mood,pol =>
ip.s ! Nom ++
buildVerb v mood pol agr
buildVerb v mood pol agr False False
} ;
-- FIXME: needs restriction so that only VerbMood Indicative _ _ Present is allowed;
@@ -63,7 +63,7 @@ lin
;
ImpP3 np vp = {
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a ++ vp.compl ! np.a ;
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a np.isNeg vp.objNeg ++ vp.compl ! np.a ;
} ;
-- FIXME: placeholder

View File

@@ -4,23 +4,28 @@ concrete NounLav of Noun = CatLav ** open
MorphoLav,
ResLav,
Prelude
in {
in {
flags
coding = utf8 ;
optimize = all_subs ;
lin
UseN n = { s = \\_ => n.s ; g = n.g } ;
UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g } ;
UsePron p = p ;
UsePN pn = { s = pn.s ; a = agrgP3 pn.n pn.g ; isNeg = False } ;
UsePron p = p ** { isNeg = False };
PredetNP pred np = {
s = \\c => pred.s ! (fromAgr np.a).g ++ np.s ! c ;
a = np.a
a = np.a ;
isNeg = False
} ;
UseN2 n = { s = \\_ => n.s ; g = n.g } ;
--UseN3 n = n ;
ComplN2 f x = {
@@ -36,41 +41,49 @@ lin
} ;
Use2N3 n = { s = n.s ; g = n.g ; p = n.p1 ; isPre = n.isPre1 } ;
Use3N3 n = { s = n.s ; g = n.g ; p = n.p2 ; isPre = n.isPre2 } ;
AdvNP np adv = {
s = \\c => np.s ! c ++ adv.s ;
a = np.a
a = np.a ;
isNeg = np.isNeg
} ;
RelNP np rs = {
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
a = np.a
a = np.a ;
isNeg = np.isNeg
} ;
DetCN det cn = {
s = \\c => det.s ! cn.g ! c ++ cn.s ! det.d ! det.n ! c ;
a = AgP3 det.n cn.g ;
isNeg = det.isNeg
} ;
DetQuant quant num = {
s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ;
n = num.n ;
d = quant.d -- FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt
d = quant.d ; -- FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt
isNeg = quant.isNeg
} ;
DetQuantOrd quant num ord = {
s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ++ ord.s ! g ! c ;
n = num.n ;
d = quant.d --FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt
d = quant.d ; --FIXME: ja ir kārtas skaitļa vārds, tad tikai noteiktās formas drīkst būt
isNeg = quant.isNeg
} ;
DetNP det = {
s = \\c => det.s ! Masc ! c ;
a = AgP3 det.n Masc
a = AgP3 det.n Masc ;
isNeg = det.isNeg
} | {
s = \\c => det.s ! Fem ! c ;
a = AgP3 det.n Fem
a = AgP3 det.n Fem ;
isNeg = det.isNeg
} ;
AdjCN ap cn = {
@@ -80,33 +93,40 @@ lin
DefArt = {
s = \\_,_,_ => [] ;
d = Def
d = Def ;
isNeg = False
} ;
IndefArt = {
s = \\_,_,_ => [] ;
d = Indef
d = Indef ;
isNeg = False
} ;
PossPron p = {
s = p.possessive ;
d = Def ;
isNeg = False
} ;
MassNP cn = {
s = cn.s ! Indef ! Sg ; -- FIXME: a 'šis alus'? der tak gan 'zaļš alus' gan 'zaļais alus'
a = AgP3 Sg cn.g
a = AgP3 Sg cn.g ;
isNeg = False
} ;
NumSg = { s = \\_,_ => [] ; n = Sg ; hasCard = False } ;
NumPl = { s = \\_,_ => [] ; n = Pl ; hasCard = False } ;
NumCard n = n ** { hasCard = True } ;
NumDigits n = { s = \\g,c => n.s ! NCard ; n = n.n } ;
OrdDigits n = { s = \\g,c => n.s ! NOrd } ;
NumNumeral numeral = { s = numeral.s ! NCard ; n = numeral.n } ;
OrdNumeral numeral = { s = numeral.s ! NOrd } ;
OrdSuperl a = { s = \\g,c => a.s ! (AAdj Superl Def g Sg c) } ;
@@ -126,7 +146,7 @@ lin
ApposCN cn np = {
s = \\d,n,c => case (fromAgr np.a).n of {
n => cn.s ! d ! n ! c ++ np.s ! c ; -- FIXME: comparison not working
_ => NON_EXISTENT
_ => NON_EXISTENT -- FIXME: pattern never reached
} ;
g = cn.g
} ;
@@ -144,7 +164,8 @@ lin
-- FIXME: vajag -ts / -ta divdabja formu, + šķirot noteikto/nenoteikto galotni
PPartNP np v2 = {
s = \\c => v2.s ! Pos ! (Participle (fromAgr np.a).g (fromAgr np.a).n c) ++ np.s ! c ;
a = np.a
a = np.a ;
isNeg = np.isNeg
} ;
-- TODO: šim vajag -ts -ta divdabjus (+ noteiktās formas tiem)

View File

@@ -281,7 +281,13 @@ oper
Voc => NON_EXISTENT
} ! c ;
a = AgP3 Sg Masc ;
possessive = \\_,_,_ => NON_EXISTENT
possessive = \\_,_,_ => case stem of { "kaut" => stem ++ "kā" ; _ => stem + "kā" }
} ;
mkPronoun_Body : Str -> Pron = \lemma -> {
s = \\c => (mkPronoun_Gend lemma).s ! Masc ! Sg ! c ;
a = AgP3 Sg Masc ;
possessive = \\_,_,_ => (mkPronoun_Gend lemma).s ! Masc ! Sg ! Gen ;
} ;
} ;

View File

@@ -5,7 +5,7 @@ concrete QuestionLav of Question = CatLav ** open
VerbLav,
Prelude,
ParadigmsVerbsLav
in {
in {
flags
optimize = all_subs ;
@@ -14,13 +14,13 @@ flags
lin
QuestCl cl = { s = \\m,p => "vai" ++ cl.s ! m ! p } ;
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgP3 ip.n Masc) } ;
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgP3 ip.n Masc) False vp.objNeg } ;
QuestSlash ip slash = { s = \\m,p => slash.p.s ++ ip.s ! (slash.p.c ! ip.n) ++ slash.s ! m ! p } ;
QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ;
QuestIComp icomp np = { s = \\m,p => icomp.s ++ buildVerb mkVerb_Irreg_Be m p np.a ++ np.s ! Nom } ;
QuestIComp icomp np = { s = \\m,p => icomp.s ++ buildVerb mkVerb_Irreg_Be m p np.a np.isNeg False ++ np.s ! Nom } ;
IdetQuant idet num = {
s = \\g => idet.s ! g ! num.n ++ num.s ! g ! Nom ;

View File

@@ -2,8 +2,9 @@
concrete RelativeLav of Relative = CatLav ** open
ResLav,
VerbLav
in {
VerbLav,
Prelude
in {
flags
optimize = all_subs ;
@@ -15,7 +16,7 @@ lin
RelVP rp vp = {
s = \\m,p,ag =>
rp.s ! Masc ! Nom ++
buildVerb vp.v m p (toAgr (fromAgr ag).n P3 (fromAgr ag).g) ++
buildVerb vp.v m p (toAgr (fromAgr ag).n P3 (fromAgr ag).g) False vp.objNeg ++
vp.compl ! ag
} ;

View File

@@ -75,7 +75,7 @@ oper
-- 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 } ;
VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool } ;
-- compl: objects, complements, adverbial modifiers
-- topic: typically - subject
-- focus: typically - objects, complements, adverbial modifiers

View File

@@ -2,8 +2,9 @@
concrete SentenceLav of Sentence = CatLav ** open
ResLav,
VerbLav
in {
VerbLav,
Prelude
in {
flags
optimize = all_subs ;
@@ -30,6 +31,7 @@ lin
v = vs ;
compl = \\_ => "," ++ vs.subj.s ++ sslash.s ;
agr = Topic vs.topic ;
objNeg = False
}) ** { p = sslash.p } ;
ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
@@ -56,6 +58,7 @@ lin
AdvS a s = { s = NON_EXISTENT } ;
oper
mkClause : NP -> CatLav.VP -> Cl = \np,vp -> lin Cl {
s = \\mood,pol =>
case mood of { -- Subject
@@ -66,10 +69,10 @@ oper
}
} ++
case vp.agr of { -- Verb
Topic Nom => buildVerb vp.v mood pol np.a ;
Topic _ => buildVerb vp.v mood pol (AgP3 Sg Masc) ; -- TODO: test me
TopicFocus Nom _ => buildVerb vp.v mood pol np.a ;
TopicFocus _ agr => buildVerb vp.v mood pol agr
Topic Nom => buildVerb vp.v mood pol np.a np.isNeg vp.objNeg ;
Topic _ => buildVerb vp.v mood pol (AgP3 Sg Masc) np.isNeg vp.objNeg ; -- TODO: test me
TopicFocus Nom _ => buildVerb vp.v mood pol np.a np.isNeg vp.objNeg ;
TopicFocus _ agr => buildVerb vp.v mood pol agr np.isNeg vp.objNeg
} ++
vp.compl ! np.a -- Object(s), complements, adverbial modifiers
} ;
@@ -78,7 +81,7 @@ oper
-- Eng: PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp
-- Ar SC nav iespējams neko saskaņot (sk. Cat.gf un Common.gf)
mkClauseSC : SC -> CatLav.VP -> Cl = \sc,vp -> lin Cl {
s = \\mood,pol => sc.s ++ buildVerb vp.v mood pol (AgP3 Sg Masc) ++ vp.compl ! (AgP3 Sg Masc)
s = \\mood,pol => sc.s ++ buildVerb vp.v mood pol (AgP3 Sg Masc) False vp.objNeg ++ vp.compl ! (AgP3 Sg Masc)
} ;
}

View File

@@ -19,52 +19,61 @@ lin
every_Det = {
s = (\\g,c => (mkPronoun_Gend "ikviens").s ! g ! Sg ! c) ;
n = Sg ;
d = Indef
d = Indef ;
isNeg = False
} ;
someSg_Det = {
s = (\\g,c => (mkPronoun_Gend "kāds").s ! g ! Sg ! c) ; -- lai atļautu arī tukšo, jāliek (\\_,_ => []) | klāt
n = Sg ;
d = Indef
d = Indef ;
isNeg = False
} ;
somePl_Det = {
s = (\\g,c => (mkPronoun_Gend "kāds").s ! g ! Pl ! c) ; -- lai atļautu arī tukšo, jāliek (\\_,_ => []) | klāt
n = Pl ;
d = Indef
d = Indef ;
isNeg = False
} ;
few_Det = {
s = (\\g,c => (mkPronoun_Gend "dažs").s ! g ! Pl ! c) ;
n = Pl ;
d = Indef
d = Indef ;
isNeg = False
} ;
many_Det = {
s = (\\g,c => (mkPronoun_Gend "daudzs").s ! g ! Pl ! c) ; -- 'daudzs' izlocīsies korekti uz daudzskaitļa 'daudzi'
n = Pl ;
d = Indef
d = Indef ;
isNeg = False
} ;
much_Det = {
s = (\\g,c => "daudz") ; -- FIXME - ņem saistību ar ģenitīvu; kā to realizēt?
n = Sg ;
d = Indef
d = Indef ;
isNeg = False
} ;
this_Quant = {
s = (mkPronoun_ThisThat This).s ;
d = Def
d = Def ;
isNeg = False
} ;
that_Quant = {
s = (mkPronoun_ThisThat That).s ;
d = Def
d = Def ;
isNeg = False
} ;
no_Quant = {
s = (mkPronoun_Gend "neviens").s ;
d = Indef
d = Indef ;
isNeg = True
} ;
-- P1
@@ -241,11 +250,11 @@ lin
n = Pl
} ;
somebody_NP = DetCN emptySg_Det (UseN (mkN "kāds")) ; -- FIXME: UsePron
somebody_NP = UsePron (mkPronoun_Body "kāds") ;
something_NP = UsePron (mkPronoun_Thing "kaut kas") ;
everybody_NP = DetCN emptySg_Det (UseN (mkN "ikviens")) ; -- FIXME: UsePron
everybody_NP = UsePron (mkPronoun_Body "ikviens") ;
everything_NP = UsePron (mkPronoun_Thing "jebkas") ;
nobody_NP = DetCN emptySg_Det (UseN (mkN "neviens")) ; -- FIXME: UsePron
nobody_NP = UsePron (mkPronoun_Body "neviens") ;
nothing_NP = UsePron (mkPronoun_Thing "nekas") ;
have_V2 = mkV2 (mkV "būt") nom_Prep Dat ;

View File

@@ -9,6 +9,7 @@ flags
coding = utf8 ;
lin
SymbPN i = {s = \\_ => i.s ; g = Masc ; n = Sg} ;
IntPN i = {s = \\_ => i.s ; g = Masc ; n = Pl} ;
FloatPN i = {s = \\_ => i.s ; g = Masc ; n = Pl} ;
@@ -16,16 +17,21 @@ lin
CNIntNP cn i = {
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ;
a = agrgP3 Sg cn.g
} ;
a = agrgP3 Sg cn.g ;
isNeg = False
} ;
CNSymbNP det cn xs = {
s = \\_ => det.s ! cn.g ! Nom ++ cn.s ! det.d ! det.n ! Nom ++ xs.s ;
a = agrgP3 det.n cn.g
} ;
a = agrgP3 det.n cn.g ;
isNeg = False
} ;
CNNumNP cn i = {
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ;
a = agrgP3 Sg cn.g
} ;
a = agrgP3 Sg cn.g ;
isNeg = False
} ;
SymbS sy = sy ;
@@ -37,6 +43,7 @@ lincat
Symb, [Symb] = SS ;
lin
MkSymb s = s ;
BaseSymb = infixSS "un" ;

View File

@@ -1,13 +1,18 @@
--# -path=.:../abstract:../common:../prelude
-- FIXME: module relations.
-- VerbLav is included in many places because of buildVerb,
-- VerbLav is included in many places because of buildVerb (SentenceLav, QuestionLav, RelativeLav, IdiomLav),
-- and includes ParadigmsVerbsLav because of mkVerb_Irreg_Be -
-- they need to be reallocated somehow to ResLav or something similar.
-- they need to be reallocated somehow to ResLav or something similar ('be' - IrregLav).
-- Not so simple since morphology itself needs ResLav & friends.
concrete VerbLav of Verb = CatLav **
open StructuralLav, ParadigmsVerbsLav, ResLav, ParamX in {
concrete VerbLav of Verb = CatLav ** open
StructuralLav,
ParadigmsVerbsLav,
ResLav,
ParamX,
Prelude
in {
flags
@@ -19,31 +24,36 @@ lin
UseV v = {
v = v ;
compl = \\_ => [] ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
ComplVV vv vp = {
v = vv ;
compl = \\agr => build_VP vp Pos Infinitive agr ;
agr = Topic vv.topic
agr = Topic vv.topic ;
objNeg = False
} ;
ComplVS vs s = {
v = vs ;
compl = \\_ => "," ++ vs.subj.s ++ s.s ;
agr = Topic vs.topic
agr = Topic vs.topic ;
objNeg = False
} ;
ComplVQ vq qs = {
v = vq ;
compl = \\_ => "," ++ qs.s ;
agr = Topic vq.topic
agr = Topic vq.topic ;
objNeg = False
} ;
ComplVA va ap = {
v = va ;
compl = \\agr => ap.s ! Indef ! (fromAgr agr).g ! (fromAgr agr).n ! Nom ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
-- SlashV2a : V2 -> VPSlash ; -- love (it)
@@ -52,7 +62,8 @@ lin
v = v2 ;
compl = \\_ => [] ;
p = v2.p ;
agr = TopicFocus v2.topic (AgP3 Sg Masc) -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
agr = TopicFocus v2.topic (AgP3 Sg Masc) ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
objNeg = False -- FIXME: inherit from the object
} ;
-- Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
@@ -63,7 +74,8 @@ lin
v = v3 ;
compl = \\_ => [] ;
p = v3.p2 ;
agr = TopicFocus v3.topic np.a -- TESTME: P1, P2 (in the focus)
agr = TopicFocus v3.topic np.a ; -- TESTME: P1, P2 (in the focus)
objNeg = np.isNeg -- TESTME
} ;
-- Slash3V3 : V3 -> NP -> VPSlash ; -- give (it) to her
@@ -74,35 +86,40 @@ lin
v = v3 ;
compl = \\_ => [] ;
p = v3.p1 ;
agr = TopicFocus v3.topic (AgP3 Sg Masc) -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
agr = TopicFocus v3.topic (AgP3 Sg Masc) ; -- FIXME: works only if the focus is P3 (Sg/Pl); TODO: P1, P2 (Sg, Pl)
objNeg = np.isNeg -- TESTME
} ;
SlashV2V v2v vp = {
v = v2v ;
compl = \\agr => build_VP vp Pos Infinitive agr ;
p = v2v.p ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
SlashV2S v2s s = {
v = v2s ;
compl = \\_ => "," ++ v2s.subj.s ++ s.s ;
p = v2s.p ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
SlashV2Q v2q qs = {
v = v2q ;
compl = \\_ => "," ++ qs.s ;
p = v2q.p ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
SlashV2A v2a ap = {
v = v2a ;
compl = \\agr => ap.s ! Indef ! (fromAgr agr).g ! (fromAgr agr).n ! Nom ;
p = v2a.p ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
ComplSlash vpslash np = insertObjPre
@@ -113,7 +130,8 @@ lin
v = vv ;
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
p = vpslash.p ;
agr = Topic vv.topic
agr = Topic vv.topic ;
objNeg = False
} ;
SlashV2VNP v2v np vpslash = insertObjC
@@ -122,7 +140,8 @@ lin
v = v2v ;
compl = \\agr => build_VP vpslash Pos Infinitive agr ;
p = vpslash.p ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
ReflVP vpslash = insertObjPre
@@ -132,13 +151,15 @@ lin
UseComp comp = {
v = lin V mkVerb_Irreg_Be ;
compl = \\agr => comp.s ! agr ;
agr = Topic Nom
agr = Topic Nom ;
objNeg = False
} ;
PassV2 v2 = {
v = v2 ;
compl = \\_ => [] ;
agr = Topic v2.topic
agr = Topic v2.topic ;
objNeg = False -- FIXME: inherit from the object
} ;
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
@@ -165,7 +186,8 @@ oper
insertObj : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
v = vp.v ;
compl = \\agr => vp.compl ! agr ++ obj ! agr ;
agr = vp.agr
agr = vp.agr ;
objNeg = vp.objNeg
} ;
-- VP = { v : Verb ; topic : Case ; compl : Agr => Str }
@@ -174,31 +196,38 @@ oper
insertObjPre : (Agr => Str) -> ResLav.VP -> ResLav.VP = \obj,vp -> {
v = vp.v ;
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
agr = vp.agr
agr = vp.agr ;
objNeg = False
} ;
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Str = \v,mood,pol,ag ->
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Bool -> Bool -> Str =
\v,mood,pol,agr,subjNeg,objNeg ->
let
ag = fromAgr ag
pol_prim : Polarity = case <subjNeg, objNeg> of {
<True, _> => Neg ;
<_, True> => Neg ;
_ => pol
} ;
agr = fromAgr agr
; --# notpresent
part = v.s ! ResLav.Pos ! (Participle ag.g ag.n Nom) --# notpresent
part = v.s ! ResLav.Pos ! (Participle agr.g agr.n Nom) --# notpresent
in case mood of {
Ind Simul tense => v.s ! pol ! (Indicative ag.p ag.n tense)
Ind Simul tense => v.s ! pol_prim ! (Indicative agr.p agr.n tense)
; --# notpresent
Ind Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n tense) ++ part ; --# notpresent
Ind Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative agr.p agr.n tense) ++ part ; --# notpresent
-- FIXME(?): Rel _ Past => ...
Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent
Rel Simul tense => v.s ! pol ! (Relative tense) ; --# notpresent
Rel Anter tense => mkVerb_Irreg_Be.s ! pol ! (Relative tense) ++ part ; --# notpresent
Rel Simul tense => v.s ! pol_prim ! (Relative tense) ; --# notpresent
Rel Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Relative tense) ++ part ; --# notpresent
Deb Simul tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent
Deb Simul tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative P3 Sg tense) ++ --# notpresent
v.s ! ResLav.Pos ! Debitive ; --# notpresent
Deb Anter tense => mkVerb_Irreg_Be.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent
Deb Anter tense => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative P3 Sg tense) ++ --# notpresent
mkVerb_Irreg_Be.s ! ResLav.Pos ! (Participle Masc Sg Nom) ++ --# notpresent
v.s ! ResLav.Pos ! Debitive ; --# notpresent
Condit Simul => v.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ; --# notpresent
Condit Anter => mkVerb_Irreg_Be.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ++ part --# notpresent
Condit Simul => v.s ! pol_prim ! (Indicative agr.p agr.n ParamX.Cond) ; --# notpresent
Condit Anter => mkVerb_Irreg_Be.s ! pol_prim ! (Indicative agr.p agr.n ParamX.Cond) ++ part --# notpresent
} ;
}