mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
Compare commits
1 Commits
20260401
...
optimise-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d40fdf79f |
@@ -21,12 +21,12 @@ lin
|
||||
-- e.g. "married to her"
|
||||
ComplA2 a np = {
|
||||
s = \\d,g,n,c => case np.isPron of {
|
||||
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ;
|
||||
True => a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ;
|
||||
True => a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||
}
|
||||
} ;
|
||||
|
||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! partcase2case (a.prep.c ! n) } ;
|
||||
|
||||
AdAP ada ap = { s = \\d,g,n,c => ada.s ++ ap.s ! d ! g ! n ! c } ;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ lin
|
||||
-- Prep -> NP -> Adv
|
||||
-- e.g. "in the house"
|
||||
-- FIXME: postpozīcijas prievārdi
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! partcase2case (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||
|
||||
-- CAdv -> A -> NP -> Adv
|
||||
-- e.g. "more warmly than John"
|
||||
|
||||
@@ -54,7 +54,7 @@ lin
|
||||
-- NP -> V2 -> NP
|
||||
-- e.g. 'the man seen'
|
||||
PPartNP np v2 = {
|
||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num (case2partcase c)) ++ np.s ! c ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = np.isRel ;
|
||||
@@ -181,7 +181,7 @@ lin
|
||||
-- e.g. 'mother of the king'
|
||||
ComplN2 n2 np = {
|
||||
s = \\_,num,c => preOrPost n2.isPre
|
||||
(n2.prep.s ++ np.s ! (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n2.prep.s ++ np.s ! partcase2case (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n2.s ! num ! c) ;
|
||||
gend = n2.gend ;
|
||||
isRel = False
|
||||
@@ -191,7 +191,7 @@ lin
|
||||
-- e.g. 'distance from this city (to Paris)'
|
||||
ComplN3 n3 np = {
|
||||
s = \\num,c => preOrPost n3.isPre1
|
||||
(n3.prep1.s ++ np.s ! (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n3.prep1.s ++ np.s ! partcase2case (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n3.s ! num ! c) ;
|
||||
gend = n3.gend ;
|
||||
prep = n3.prep2 ;
|
||||
|
||||
@@ -68,7 +68,7 @@ oper
|
||||
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
||||
mkAdjective_Participle : Verb -> Voice -> Adjective = \v,p -> {
|
||||
s = table {
|
||||
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n c) ;
|
||||
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n (case2partcase c)) ;
|
||||
_ => NON_EXISTENT
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,18 +101,18 @@ oper
|
||||
} ;
|
||||
|
||||
mkVS = overload {
|
||||
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = Nom ; conj = c} ;
|
||||
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = s ; conj = c} ;
|
||||
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = PartNom ; conj = c} ;
|
||||
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = case2partcase s ; conj = c} ;
|
||||
} ;
|
||||
|
||||
mkVQ = overload {
|
||||
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = Nom} ;
|
||||
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = c} ;
|
||||
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = PartNom} ;
|
||||
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = case2partcase c} ;
|
||||
} ;
|
||||
|
||||
mkVV = overload {
|
||||
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = Nom} ;
|
||||
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = c} ;
|
||||
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = PartNom} ;
|
||||
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = case2partcase c} ;
|
||||
} ;
|
||||
|
||||
mkV3 = overload {
|
||||
@@ -131,8 +131,8 @@ oper
|
||||
-- Prepositions
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => sg ; Pl => pl}} ;
|
||||
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => c} ;
|
||||
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => case2partcase sg ; Pl => case2partcase pl}} ;
|
||||
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => case2partcase c} ;
|
||||
} ;
|
||||
|
||||
nom_Prep : Prep = mkPrep Nom ;
|
||||
|
||||
@@ -14,7 +14,7 @@ oper
|
||||
Pos => (mkVerb_Pos lemma conj).s ;
|
||||
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
-- First conjugation
|
||||
@@ -23,7 +23,7 @@ oper
|
||||
Pos => (mkVerbC1_Pos lemma lemma2 lemma3).s ;
|
||||
Neg => (filter_Neg (mkVerbC1_Pos ("ne"+lemma) ("ne"+lemma2) ("ne"+lemma3))).s
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Pos : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||
@@ -378,7 +378,7 @@ oper
|
||||
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Irreg_Go : Case -> Verb = \leftVal -> mkVerb_Irreg_Go_Prefix "" leftVal ;
|
||||
@@ -397,7 +397,7 @@ oper
|
||||
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Irreg_Sleep : Case -> Verb = \leftVal -> {
|
||||
@@ -429,7 +429,7 @@ oper
|
||||
x => (mkVerb_C3 "negulēt").s ! x
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
-- Auxiliaries: palatalization rules
|
||||
@@ -548,122 +548,110 @@ oper
|
||||
-- TODO: -ot, -am, -ām; -dams/dama, -damies/damās; -ams/ama, -āms/āma
|
||||
-- -ošs/oša ir tikai adjektīvi! Divdabji - tikai verbālās formas! (sk. Baibas sarakstu)
|
||||
|
||||
mkParticiple_IsUsi : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_IsUsi : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "is" ;
|
||||
Gen => stem + "uša" ;
|
||||
Dat => stem + "ušam" ;
|
||||
Acc => stem + "ušu" ;
|
||||
Loc => stem + "ušā" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "is" ;
|
||||
PartGen => stem + "uša" ;
|
||||
PartDat => stem + "ušam" ;
|
||||
PartAcc => stem + "ušu" ;
|
||||
PartLoc => stem + "ušā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "uši" ;
|
||||
Gen => stem + "ušu" ;
|
||||
Dat => stem + "ušiem" ;
|
||||
Acc => stem + "ušus" ;
|
||||
Loc => stem + "ušos" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "uši" ;
|
||||
PartGen => stem + "ušu" ;
|
||||
PartDat => stem + "ušiem" ;
|
||||
PartAcc => stem + "ušus" ;
|
||||
PartLoc => stem + "ušos"
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "usi" ;
|
||||
Gen => stem + "ušas" ;
|
||||
Dat => stem + "ušai" ;
|
||||
Acc => stem + "ušu" ;
|
||||
Loc => stem + "ušā" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "usi" ;
|
||||
PartGen => stem + "ušas" ;
|
||||
PartDat => stem + "ušai" ;
|
||||
PartAcc => stem + "ušu" ;
|
||||
PartLoc => stem + "ušā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušas" ;
|
||||
Gen => stem + "ušu" ;
|
||||
Dat => stem + "ušām" ;
|
||||
Acc => stem + "ušas" ;
|
||||
Loc => stem + "ušās" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušas" ;
|
||||
PartGen => stem + "ušu" ;
|
||||
PartDat => stem + "ušām" ;
|
||||
PartAcc => stem + "ušas" ;
|
||||
PartLoc => stem + "ušās"
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
mkParticiple_TsTa : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_TsTa : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ts" ;
|
||||
Gen => stem + "ta" ;
|
||||
Dat => stem + "tam" ;
|
||||
Acc => stem + "tu" ;
|
||||
Loc => stem + "tā" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tais ?
|
||||
PartNom => stem + "ts" ;
|
||||
PartGen => stem + "ta" ;
|
||||
PartDat => stem + "tam" ;
|
||||
PartAcc => stem + "tu" ;
|
||||
PartLoc => stem + "tā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ti" ;
|
||||
Gen => stem + "tu" ;
|
||||
Dat => stem + "tiem" ;
|
||||
Acc => stem + "tus" ;
|
||||
Loc => stem + "tos" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tie ?
|
||||
PartNom => stem + "ti" ;
|
||||
PartGen => stem + "tu" ;
|
||||
PartDat => stem + "tiem" ;
|
||||
PartAcc => stem + "tus" ;
|
||||
PartLoc => stem + "tos"
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ta" ;
|
||||
Gen => stem + "tas" ;
|
||||
Dat => stem + "tai" ;
|
||||
Acc => stem + "tu" ;
|
||||
Loc => stem + "tā" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tā ?
|
||||
PartNom => stem + "ta" ;
|
||||
PartGen => stem + "tas" ;
|
||||
PartDat => stem + "tai" ;
|
||||
PartAcc => stem + "tu" ;
|
||||
PartLoc => stem + "tā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "tas" ;
|
||||
Gen => stem + "tu" ;
|
||||
Dat => stem + "tām" ;
|
||||
Acc => stem + "tas" ;
|
||||
Loc => stem + "tās" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tās ?
|
||||
PartNom => stem + "tas" ;
|
||||
PartGen => stem + "tu" ;
|
||||
PartDat => stem + "tām" ;
|
||||
PartAcc => stem + "tas" ;
|
||||
PartLoc => stem + "tās"
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
mkParticiple_IesUsies : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_IesUsies : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ies" ;
|
||||
Gen => NON_EXISTENT ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ies" ;
|
||||
PartGen => NON_EXISTENT ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušies" ;
|
||||
Gen => stem + "ušos" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušies" ;
|
||||
PartGen => stem + "ušos" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "usies" ;
|
||||
Gen => stem + "ušās" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "usies" ;
|
||||
PartGen => stem + "ušās" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušās" ;
|
||||
Gen => stem + "ušos" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušās" ;
|
||||
PartGen => stem + "ušos" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -17,7 +17,7 @@ lin
|
||||
|
||||
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgrP3 ip.num Masc) Pos vp.rightPol } ;
|
||||
|
||||
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
||||
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! partcase2case (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
||||
|
||||
QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ;
|
||||
|
||||
@@ -38,7 +38,7 @@ lin
|
||||
num = ip.num
|
||||
} ;
|
||||
|
||||
PrepIP p ip = { s = p.s ++ ip.s ! (p.c ! ip.num) } ;
|
||||
PrepIP p ip = { s = p.s ++ ip.s ! partcase2case (p.c ! ip.num) } ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ! cn.gend ++ cn.s ! Def ! idet.num ! c ;
|
||||
|
||||
@@ -20,7 +20,7 @@ oper
|
||||
|
||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc) - done?
|
||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||
let subjInTopic : Bool = case <vp.voice, vp.leftVal> of {
|
||||
let subjInTopic : Bool = case <vp.voice, partcase2case vp.leftVal> of {
|
||||
<Act, Nom> => True ;
|
||||
<Act, _ > => False ;
|
||||
<Pass, Acc> => False ;
|
||||
@@ -34,7 +34,7 @@ oper
|
||||
} in
|
||||
case mood of { -- subject
|
||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||
_ => rp.s ! Masc ! vp.leftVal
|
||||
_ => rp.s ! Masc ! partcase2case vp.leftVal
|
||||
} ++
|
||||
case vp.objPron of {
|
||||
False => verb ++ vp.compl ! agr ;
|
||||
@@ -47,13 +47,13 @@ lin
|
||||
-- FIXME: vārdu secība - nevis 'kas mīl viņu' bet 'kas viņu mīl' (?)
|
||||
-- FIXME: Masc varētu nebūt labi
|
||||
RelSlash rp slash = {
|
||||
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
||||
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! partcase2case (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
||||
} ;
|
||||
|
||||
-- FIXME: placeholder
|
||||
-- TODO: jātestē, kautkas nav labi ar testpiemēru
|
||||
FunRP p np rp = {
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! (p.c ! (fromAgr np.agr).num)
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! partcase2case (p.c ! (fromAgr np.agr).num)
|
||||
} ;
|
||||
|
||||
IdRP = {
|
||||
|
||||
@@ -48,8 +48,30 @@ param
|
||||
| VDeb
|
||||
| VImp Number
|
||||
| VDebRel -- the relative subtype of debitive
|
||||
| VPart Voice Gender Number Case ;
|
||||
| VPart Voice Gender Number PartCase ;
|
||||
|
||||
PartCase = PartNom | PartGen | PartDat | PartAcc | PartLoc ;
|
||||
|
||||
oper
|
||||
|
||||
partcase2case : PartCase -> Case = \c -> case c of {
|
||||
PartNom => Nom ;
|
||||
PartDat => Dat ;
|
||||
PartGen => Gen ;
|
||||
PartAcc => Acc ;
|
||||
PartLoc => Loc
|
||||
} ;
|
||||
|
||||
case2partcase : Case -> PartCase = \c -> case c of {
|
||||
Nom => PartNom ;
|
||||
Gen => PartGen ;
|
||||
Dat => PartDat ;
|
||||
Acc => PartAcc ;
|
||||
Loc => PartLoc ;
|
||||
_ => PartNom
|
||||
} ;
|
||||
|
||||
param
|
||||
-- Number and gender has to be agreed in predicative nominal clauses
|
||||
Agreement =
|
||||
AgrP1 Number Gender
|
||||
@@ -73,15 +95,15 @@ oper
|
||||
|
||||
Adjective : Type = {s : AForm => Str} ;
|
||||
|
||||
Preposition : Type = {s : Str ; c : Number => Case} ;
|
||||
Preposition : Type = {s : Str ; c : Number => PartCase} ;
|
||||
|
||||
Verb : Type = {s : Polarity => VForm => Str ; leftVal : Case} ;
|
||||
Verb : Type = {s : Polarity => VForm => Str ; leftVal : PartCase} ;
|
||||
|
||||
VP : Type = {
|
||||
v : Verb ;
|
||||
compl : Agreement => Str ; -- the subject-complement agreement
|
||||
voice : Voice ;
|
||||
leftVal : Case ; -- the left valence (typically, the subject)
|
||||
leftVal : PartCase ; -- the left valence (typically, the subject)
|
||||
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
||||
rightPol : Polarity ; -- for the potential double negation
|
||||
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
||||
|
||||
@@ -67,7 +67,7 @@ lin
|
||||
oper
|
||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
||||
let agr : Agreement = case <vp.voice, vp.leftVal> of {
|
||||
let agr : Agreement = case <vp.voice, partcase2case vp.leftVal> of {
|
||||
<Act, Nom> => np.agr ;
|
||||
<Act, _ > => vp.rightAgr ;
|
||||
<Pass, Acc> => vp.rightAgr ;
|
||||
@@ -77,7 +77,7 @@ oper
|
||||
s = \\mood,pol =>
|
||||
case mood of { -- subject
|
||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||
_ => np.s ! vp.leftVal
|
||||
_ => np.s ! partcase2case vp.leftVal
|
||||
} ++
|
||||
closeRelCl np.isRel ++ -- comma, if necessary
|
||||
case vp.objPron of {
|
||||
|
||||
@@ -98,7 +98,7 @@ lin
|
||||
-- V3 -> NP -> VPSlash
|
||||
-- e.g. 'give it (to her)'
|
||||
Slash2V3 v3 np = insertObjSlash
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v3 ;
|
||||
compl = \\_ => [] ; -- will be overriden
|
||||
@@ -116,7 +116,7 @@ lin
|
||||
-- V3 -> NP -> VPSlash
|
||||
-- e.g. 'give (it) to her'
|
||||
Slash3V3 v3 np = insertObjSlash
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v3 ;
|
||||
compl = \\_ => [] ; -- will be overriden
|
||||
@@ -195,7 +195,7 @@ lin
|
||||
} ++ vpslash.compl ! agr ;
|
||||
-}
|
||||
compl = \\agr => vpslash.rightVal.s ++
|
||||
np.s ! (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
||||
np.s ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
||||
vpslash.compl ! agr ;
|
||||
voice = vpslash.voice ;
|
||||
leftVal = vpslash.leftVal ;
|
||||
@@ -221,7 +221,7 @@ lin
|
||||
-- V2V -> NP -> VPSlash -> VPSlash
|
||||
-- e.g. '-- beg me to buy'
|
||||
SlashV2VNP v2v np vpslash = insertObjSlash
|
||||
(\\_ => v2v.rightVal.s ++ np.s ! (v2v.rightVal.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v2v.rightVal.s ++ np.s ! partcase2case (v2v.rightVal.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v2v ;
|
||||
compl = \\agr => buildVP vpslash Pos VInf agr ;
|
||||
@@ -238,7 +238,7 @@ lin
|
||||
-- VPSlash -> VP
|
||||
-- e.g. 'love himself'
|
||||
ReflVP vpslash = insertObjPre
|
||||
(\\agr => vpslash.rightVal.s ++ reflPron ! (vpslash.rightVal.c ! (fromAgr agr).num))
|
||||
(\\agr => vpslash.rightVal.s ++ reflPron ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num))
|
||||
vpslash ;
|
||||
|
||||
-- Comp -> VP
|
||||
@@ -247,7 +247,7 @@ lin
|
||||
v = mkV "būt" ;
|
||||
compl = \\agr => comp.s ! agr ;
|
||||
voice = Act ;
|
||||
leftVal = Nom ;
|
||||
leftVal = PartNom ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
@@ -323,7 +323,7 @@ oper
|
||||
} ;
|
||||
agr = fromAgr agr
|
||||
; --# notpresent
|
||||
part = v.s ! Pos ! (VPart Pass agr.gend agr.num Nom) --# notpresent
|
||||
part = v.s ! Pos ! (VPart Pass agr.gend agr.num PartNom) --# notpresent
|
||||
in case mood of {
|
||||
Ind Simul tense => v.s ! finalPol ! (VInd agr.pers agr.num tense)
|
||||
; --# notpresent
|
||||
@@ -337,7 +337,7 @@ oper
|
||||
Deb Simul tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||
v.s ! Pos ! VDeb ; --# notpresent
|
||||
Deb Anter tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg Nom) ++ --# notpresent
|
||||
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg PartNom) ++ --# notpresent
|
||||
v.s ! Pos ! VDeb ; --# notpresent
|
||||
|
||||
Condit Simul => v.s ! finalPol ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent
|
||||
|
||||
Reference in New Issue
Block a user