forked from GitHub/gf-core
Latvian: if ~object~ is a Pron and is not modified by a RCl, it is more natural/neutral if it precedes the verb. For this, the lin types of NP and Adv are extended with a boolean field isPron (in addition to the previously introduced isRel field that indicates whether a CN or NP is modified by a RCl).
This commit is contained in:
@@ -17,8 +17,13 @@ lin
|
||||
|
||||
UseComparA a = { s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) } ;
|
||||
|
||||
-- A2 -> NP -> AP
|
||||
-- e.g. "married to her"
|
||||
ComplA2 a np = {
|
||||
s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num)
|
||||
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)
|
||||
}
|
||||
} ;
|
||||
|
||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
||||
@@ -36,4 +41,13 @@ lin
|
||||
|
||||
UseA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) } ;
|
||||
|
||||
-- AP -> Adv -> AP
|
||||
-- e.g. "warm by nature"
|
||||
AdvAP ap adv = {
|
||||
s = \\d,g,n,c => case adv.isPron of {
|
||||
False => ap.s ! d ! g ! n ! c ++ adv.s ;
|
||||
True => adv.s ++ ap.s ! d ! g ! n ! c
|
||||
}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,21 +9,37 @@ flags
|
||||
coding = utf8 ;
|
||||
|
||||
lin
|
||||
PositAdvAdj a = { s = a.s ! (AAdv Posit) } ;
|
||||
-- A -> Adv
|
||||
-- e.g. "warmly"
|
||||
PositAdvAdj a = {s = a.s ! (AAdv Posit) ; isPron = False} ;
|
||||
|
||||
-- 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} ;
|
||||
|
||||
-- CAdv -> A -> NP -> Adv
|
||||
-- e.g. "more warmly than John"
|
||||
-- TODO: vajag arī 'ātrāks par Jāni' un 'ātrāks nekā Jānis' pie more_CAdv
|
||||
-- TODO: vai te tiešām veido 'ātrāk par Jāni'? kurš ir pareizais adverbs? nevis 'ātrāks par Jāni'?
|
||||
ComparAdvAdj cadv a np = { s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ np.s ! Nom } ;
|
||||
ComparAdvAdj cadv a np = {s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ np.s ! Nom ; isPron = False} ;
|
||||
|
||||
ComparAdvAdjS cadv a s = { s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ s.s } ;
|
||||
-- CAdv -> A -> S -> Adv
|
||||
-- e.g. "more warmly than he runs"
|
||||
ComparAdvAdjS cadv a s = {s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ s.s ; isPron = False} ;
|
||||
|
||||
-- FIXME: postpozīcijas prievārdi
|
||||
PrepNP prep np = { s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) } ;
|
||||
-- AdA -> Adv -> Adv
|
||||
-- e.g. "very quickly"
|
||||
AdAdv ada adv = {s = ada.s ++ adv.s ; isPron = False} ;
|
||||
|
||||
AdAdv = cc2 ;
|
||||
-- TODO: PositAdAAdj : A -> AdA
|
||||
|
||||
SubjS = cc2 ;
|
||||
-- Subj -> S -> Adv
|
||||
-- e.g. "when she sleeps"
|
||||
SubjS subj s = {s = subj.s ++ s.s ; isPron = False} ;
|
||||
|
||||
-- CAdv -> AdN
|
||||
-- e.g. "less (than five)"
|
||||
AdnCAdv cadv = {
|
||||
s = case cadv.deg of {
|
||||
Posit => cadv.s ++ cadv.prep ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -path=.:abstract:common:prelude
|
||||
|
||||
concrete CatLav of Cat = CommonX - [CAdv, Voc] ** open ResLav, Prelude in {
|
||||
concrete CatLav of Cat = CommonX - [Adv, CAdv, Voc] ** open ResLav, Prelude in {
|
||||
|
||||
flags
|
||||
|
||||
@@ -57,7 +57,7 @@ lincat
|
||||
|
||||
CN = {s : Definiteness => Number => Case => Str ; gend : Gender ; isRel : Bool} ;
|
||||
|
||||
NP = { s : Case => Str ; agr : Agreement ; pol : Polarity ; isRel : Bool } ;
|
||||
NP = {s : Case => Str ; agr : Agreement ; pol : Polarity ; isRel : Bool ; isPron : Bool} ;
|
||||
|
||||
Pron = Pronoun ;
|
||||
|
||||
@@ -113,6 +113,8 @@ lincat
|
||||
|
||||
-- Overriden from CommonX
|
||||
|
||||
Adv = {s : Str ; isPron : Bool} ;
|
||||
|
||||
CAdv = {s, prep : Str ; deg : Degree} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,17 +14,22 @@ lin
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
agr = toAgr (fromAgr ss.agr).pers (conjNumber (fromAgr ss.agr).num conj.num) (fromAgr ss.agr).gend;
|
||||
pol = Pos ;
|
||||
isRel = False
|
||||
} ;
|
||||
ConjRS conj ss = conjunctDistrTable Agreement conj ss ;
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable4 Definiteness Gender Number Case conj ss ;
|
||||
|
||||
ConjRS conj ss = conjunctDistrTable Agreement conj ss ;
|
||||
-- Conj -> [NP] -> NP
|
||||
-- e.g. "she or we"
|
||||
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
agr = toAgr (fromAgr ss.agr).pers (conjNumber (fromAgr ss.agr).num conj.num) (fromAgr ss.agr).gend;
|
||||
pol = Pos ;
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- Conj -> [Adv] -> Adv
|
||||
-- e.g. "here or there"
|
||||
ConjAdv or xs = (conjunctDistrSS or xs) ** {isPron = False};
|
||||
|
||||
-- These fun's are generated from the list cat's:
|
||||
BaseS = twoSS ;
|
||||
@@ -44,9 +49,12 @@ lin
|
||||
lincat
|
||||
|
||||
[S] = {s1, s2 : Str} ;
|
||||
[Adv] = { s1, s2 : Str } ;
|
||||
[RS] = {s1, s2 : Agreement => Str} ;
|
||||
[NP] = {s1, s2 : Case => Str ; agr : Agreement} ;
|
||||
[AP] = {s1, s2 : Definiteness => Gender => Number => Case => Str} ;
|
||||
[RS] = { s1, s2 : Agreement => Str } ;
|
||||
[Adv] = {s1, s2 : Str} ;
|
||||
-- TODO: [AdV]{2}
|
||||
-- TODO: [IAdv]{2}
|
||||
-- TODO: [CN] {2}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ concrete GrammarLav of Grammar =
|
||||
RelativeLav,
|
||||
ConjunctionLav,
|
||||
PhraseLav,
|
||||
TextX - [CAdv],
|
||||
TextX - [Adv,CAdv],
|
||||
StructuralLav,
|
||||
IdiomLav,
|
||||
TenseX - [CAdv]
|
||||
TenseX - [Adv,CAdv]
|
||||
** {
|
||||
|
||||
flags
|
||||
|
||||
@@ -17,7 +17,8 @@ lin
|
||||
s = \\c => det.s ! cn.gend ! c ++ cn.s ! det.defin ! det.num ! c ;
|
||||
agr = AgrP3 det.num cn.gend ;
|
||||
pol = det.pol ;
|
||||
isRel = cn.isRel
|
||||
isRel = cn.isRel ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- PN -> NP
|
||||
@@ -26,7 +27,8 @@ lin
|
||||
s = pn.s ;
|
||||
agr = AgrP3 pn.num pn.gend ;
|
||||
pol = Pos ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- Pron -> NP
|
||||
@@ -35,7 +37,8 @@ lin
|
||||
s = pron.s ;
|
||||
agr = pron.agr ;
|
||||
pol = pron.pol ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = True
|
||||
} ;
|
||||
|
||||
-- Predet -> NP -> NP
|
||||
@@ -44,7 +47,8 @@ lin
|
||||
s = \\c => predet.s ! (fromAgr np.agr).gend ++ np.s ! c ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = np.isRel
|
||||
isRel = np.isRel ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- NP -> V2 -> NP
|
||||
@@ -53,7 +57,8 @@ lin
|
||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = np.isRel
|
||||
isRel = np.isRel ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- NP -> Adv -> NP
|
||||
@@ -62,7 +67,8 @@ lin
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- NP -> RS -> NP
|
||||
@@ -71,7 +77,8 @@ lin
|
||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.agr ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = True
|
||||
isRel = True ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- CN -> NP
|
||||
@@ -79,7 +86,8 @@ lin
|
||||
s = cn.s ! Indef ! Sg ; -- FIXME: bet 'šis alus'? un 'zaļš alus' vs. 'zaļais alus'?
|
||||
agr = AgrP3 Sg cn.gend ;
|
||||
pol = Pos ;
|
||||
isRel = cn.isRel
|
||||
isRel = cn.isRel ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- Det -> NP
|
||||
@@ -88,12 +96,14 @@ lin
|
||||
s = \\c => det.s ! Masc ! c ;
|
||||
agr = AgrP3 det.num Masc ;
|
||||
pol = det.pol ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} | {
|
||||
s = \\c => det.s ! Fem ! c ;
|
||||
agr = AgrP3 det.num Fem ;
|
||||
pol = det.pol ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- Determiners
|
||||
|
||||
@@ -143,7 +143,7 @@ oper
|
||||
|
||||
-- Adverbs
|
||||
|
||||
mkAdv : Str -> Adv = \x -> lin Adv (ss x) ;
|
||||
mkAdv : Str -> Adv = \x -> lin Adv {s = x ; isPron = False} ;
|
||||
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
|
||||
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
|
||||
mkAdN : Str -> AdN = \x -> lin AdN (ss x) ;
|
||||
|
||||
@@ -28,15 +28,19 @@ oper
|
||||
}
|
||||
in lin RCl {
|
||||
s = \\mood,pol,agr =>
|
||||
let verb : Str = case subjInTopic of {
|
||||
True => buildVerb vp.v mood pol (AgrP3 (fromAgr agr).num (fromAgr agr).gend) Pos vp.rightPol ;
|
||||
False => buildVerb vp.v mood pol vp.rightAgr Pos vp.rightPol
|
||||
} in
|
||||
case mood of { -- subject
|
||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||
_ => rp.s ! Masc ! vp.leftVal
|
||||
} ++
|
||||
case subjInTopic of { -- verb
|
||||
True => buildVerb vp.v mood pol (AgrP3 (fromAgr agr).num (fromAgr agr).gend) Pos vp.rightPol ;
|
||||
False => buildVerb vp.v mood pol vp.rightAgr Pos vp.rightPol
|
||||
} ++
|
||||
vp.compl ! agr -- object(s), complements, adverbial modifiers
|
||||
case vp.objPron of {
|
||||
False => verb ++ vp.compl ! agr ;
|
||||
True => (vp.compl ! agr ++ verb) --| (verb ++ vp.compl ! agr)
|
||||
-- FIXME: the object should be separated from other complements that should remain on the right side
|
||||
}
|
||||
} ;
|
||||
|
||||
lin
|
||||
|
||||
@@ -83,7 +83,8 @@ oper
|
||||
voice : Voice ;
|
||||
leftVal : Case ; -- 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
|
||||
rightPol : Polarity ; -- for the potential double negation
|
||||
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
||||
} ;
|
||||
|
||||
VPSlash : Type = VP ** {rightVal : Preposition} ; -- the right valence (typically, the object)
|
||||
@@ -91,26 +92,27 @@ oper
|
||||
buildVP : VP -> Polarity -> VForm -> Agreement -> Str = \vp,pol,vf,agr ->
|
||||
vp.v.s ! pol ! vf ++ vp.compl ! agr ;
|
||||
|
||||
insertObj : (Agreement => Str) -> VP -> VP = \obj,vp -> {
|
||||
insertObj : (Agreement => Str) -> Bool -> Bool -> VP -> VP = \obj,isPron,isPre,vp -> {
|
||||
v = vp.v ;
|
||||
compl = \\agr => vp.compl ! agr ++ obj ! agr ;
|
||||
compl = \\agr => case isPre of {
|
||||
False => vp.compl ! agr ++ obj ! agr ;
|
||||
True => obj ! agr ++ vp.compl ! agr
|
||||
} ;
|
||||
voice = vp.voice ;
|
||||
leftVal = vp.leftVal ;
|
||||
rightAgr = vp.rightAgr ;
|
||||
rightPol = vp.rightPol
|
||||
rightPol = vp.rightPol ;
|
||||
objPron = isPron
|
||||
} ;
|
||||
|
||||
insertObjPre : (Agreement => Str) -> VP -> VP = \obj,vp -> {
|
||||
v = vp.v ;
|
||||
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
||||
voice = vp.voice ;
|
||||
leftVal = vp.leftVal ;
|
||||
rightAgr = vp.rightAgr ;
|
||||
rightPol = vp.rightPol
|
||||
} ;
|
||||
insertObjReg : (Agreement => Str) -> Bool -> VP -> VP = \obj,isPron,vp ->
|
||||
insertObj obj isPron False vp ;
|
||||
|
||||
insertObjPre : (Agreement => Str) -> VP -> VP = \obj,vp ->
|
||||
insertObj obj True True vp ;
|
||||
|
||||
insertObjSlash : (Agreement => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||
insertObj obj vp ** { rightVal = vp.rightVal } ;
|
||||
insertObj obj vp.objPron False vp ** {rightVal = vp.rightVal} ;
|
||||
|
||||
getInf : Verb -> Str = \v -> v.s ! Pos ! VInf ;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ lin
|
||||
leftVal = vs.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
}) ** { prep = sslash.prep } ;
|
||||
|
||||
-- ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
||||
@@ -78,9 +79,21 @@ oper
|
||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||
_ => np.s ! vp.leftVal
|
||||
} ++
|
||||
closeRelCl np.isRel ++
|
||||
closeRelCl np.isRel ++ -- comma, if necessary
|
||||
case vp.objPron of {
|
||||
False =>
|
||||
buildVerb vp.v mood pol agr np.pol vp.rightPol ++ -- verb
|
||||
vp.compl ! np.agr -- object(s), complements, adverbial modifiers
|
||||
vp.compl ! np.agr ; -- object(s), modifiers and other complements
|
||||
True =>
|
||||
-- FIXME: the object should be separated from other complements that should remain on the right side
|
||||
(
|
||||
vp.compl ! np.agr ++ -- object(s), modifiers and other complements
|
||||
buildVerb vp.v mood pol agr np.pol vp.rightPol -- verb
|
||||
) --| (
|
||||
--buildVerb vp.v mood pol agr np.pol vp.rightPol ++ -- verb
|
||||
--vp.compl ! np.agr -- object(s), modifiers and other complements
|
||||
--)
|
||||
}
|
||||
} ;
|
||||
|
||||
-- FIXME: quick&dirty - lai kompilētos pret RGL API
|
||||
|
||||
@@ -15,25 +15,34 @@ lin
|
||||
FloatPN i = {s = \\_ => i.s ; gend = Masc ; num = Pl} ;
|
||||
NumPN i = {s = \\_ => i.s ! Masc ! Nom ; gend = Masc ; num = Pl} ;
|
||||
|
||||
-- CN -> Int -> NP
|
||||
-- e.g. "level 53" (covered by CNNumNP)
|
||||
CNIntNP cn i = {
|
||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ;
|
||||
agr = AgrP3 Sg cn.gend ;
|
||||
pol = Pos ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- Det -> CN -> ListSymb -> NP
|
||||
-- e.g. "(the) (2) numbers x and y"
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\_ => det.s ! cn.gend ! Nom ++ cn.s ! det.defin ! det.num ! Nom ++ xs.s ;
|
||||
agr = AgrP3 det.num cn.gend ;
|
||||
pol = Pos ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- CN -> Card -> NP
|
||||
-- e.g. "level five", "level 5"
|
||||
CNNumNP cn i = {
|
||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ;
|
||||
agr = AgrP3 Sg cn.gend ;
|
||||
pol = Pos ;
|
||||
isRel = False
|
||||
isRel = False ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
|
||||
@@ -30,7 +30,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = v.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- VV -> VP -> VP
|
||||
@@ -41,7 +42,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = vv.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- VS -> S -> VP
|
||||
@@ -52,7 +54,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = vs.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- VQ -> QS -> VP
|
||||
@@ -63,7 +66,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = vq.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- VA -> AP -> VP
|
||||
@@ -74,7 +78,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = va.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- V2 -> VPSlash
|
||||
@@ -86,6 +91,7 @@ lin
|
||||
leftVal = v2.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ; -- will be overriden
|
||||
rightPol = Pos ; -- will be overriden
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = v2.rightVal
|
||||
} ;
|
||||
|
||||
@@ -100,6 +106,7 @@ lin
|
||||
leftVal = v3.leftVal ;
|
||||
rightAgr = np.agr ;
|
||||
rightPol = np.pol ;
|
||||
objPron = np.isPron ;
|
||||
rightVal = v3.rightVal1
|
||||
} ;
|
||||
-- FIXME: "vīrietis runā par ābolus ar sievieti" ("a man talks to a woman about apples")
|
||||
@@ -117,6 +124,7 @@ lin
|
||||
leftVal = v3.leftVal ;
|
||||
rightAgr = np.agr ;
|
||||
rightPol = np.pol ;
|
||||
objPron = np.isPron ;
|
||||
rightVal = v3.rightVal1
|
||||
} ;
|
||||
|
||||
@@ -129,6 +137,7 @@ lin
|
||||
leftVal = v2v.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = v2v.rightVal
|
||||
} ;
|
||||
|
||||
@@ -141,6 +150,7 @@ lin
|
||||
leftVal = v2s.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = v2s.rightVal
|
||||
} ;
|
||||
|
||||
@@ -153,6 +163,7 @@ lin
|
||||
leftVal = v2q.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = v2q.rightVal
|
||||
} ;
|
||||
|
||||
@@ -165,6 +176,7 @@ lin
|
||||
leftVal = v2a.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = v2a.rightVal
|
||||
} ;
|
||||
|
||||
@@ -189,7 +201,8 @@ lin
|
||||
leftVal = vpslash.leftVal ;
|
||||
rightAgr = np.agr ;
|
||||
rightPol = np.pol ;
|
||||
rightVal = vpslash.rightVal ;
|
||||
objPron = np.isPron ;
|
||||
rightVal = vpslash.rightVal
|
||||
} ;
|
||||
|
||||
-- VV -> VPSlash -> VPSlash
|
||||
@@ -201,6 +214,7 @@ lin
|
||||
leftVal = vv.leftVal ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False ; -- will be overriden
|
||||
rightVal = nom_Prep
|
||||
} ;
|
||||
|
||||
@@ -215,6 +229,7 @@ lin
|
||||
leftVal = v2v.leftVal ;
|
||||
rightAgr = np.agr ;
|
||||
rightPol = np.pol ;
|
||||
objPron = np.isPron ;
|
||||
rightVal = v2v.rightVal
|
||||
} ;
|
||||
|
||||
@@ -234,7 +249,8 @@ lin
|
||||
voice = Act ;
|
||||
leftVal = Nom ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
} ;
|
||||
|
||||
-- V2 -> VP
|
||||
@@ -245,7 +261,8 @@ lin
|
||||
voice = Pass ;
|
||||
leftVal = v2.rightVal.c ! Sg ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
--rightVal = mkPrep v2.leftVal
|
||||
} ;
|
||||
-- TODO: val - should not be overriden in ComplSlash etc.?
|
||||
@@ -254,7 +271,7 @@ lin
|
||||
|
||||
-- VP -> Adv -> VP
|
||||
-- e.g. 'sleep here'
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
AdvVP vp adv = insertObjReg (\\_ => adv.s) adv.isPron vp ;
|
||||
|
||||
-- AdV -> VP -> VP
|
||||
-- e.g. 'always sleep'
|
||||
@@ -284,7 +301,7 @@ lin
|
||||
|
||||
-- Adv -> Comp
|
||||
-- e.g. '(be) here'
|
||||
CompAdv a = { s = \\_ => a.s } ;
|
||||
CompAdv adv = {s = \\_ => adv.s} ;
|
||||
|
||||
-- CN -> Comp
|
||||
-- e.g. '(be) a man/men'
|
||||
|
||||
Reference in New Issue
Block a user