updates from Codex

This commit is contained in:
Krasimir Angelov committed 2026-10-06 08:15:56 +02:00
1 parent 480d64637d
commit d4b6da0687
13 files changed
+440 -20

No files matched your search

+5 -1
View File
@@ -1,4 +1,4 @@
concrete AdjectiveSco of Adjective = AdjectiveEng - [ComparA,UseComparA] ** open Prelude, ResSco in {
concrete AdjectiveSco of Adjective = AdjectiveEng - [ComparA,UseComparA,ReflA2] ** open Prelude, ResSco in {
lin ComparA a np = {
s = \\_ => getCompar Nom a ++ "than" ++ np.s ! npNom ;
@@ -8,5 +8,9 @@ lin ComparA a np = {
s = \\_ => getCompar Nom a ;
isPre = a.isPre
} ;
ReflA2 a = {
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ reflPron ! ag ;
isPre = False
} ;
}
+8 -1
View File
@@ -1,2 +1,9 @@
concrete ConstructionSco of Construction = ConstructionEng ** {
concrete ConstructionSco of Construction = ConstructionEng - [has_age_VP] **
open SyntaxSco, SymbolicSco, ParadigmsSco in {
lin has_age_VP card =
mkVP (mkAP
(lin AdA (mkUtt (mkNP <lin Card card : Card> (mkN "year" "year"))))
(mkA "auld")) ;
}
+65 -4
View File
@@ -1,9 +1,12 @@
--# -path=.:../common:../abstract
concrete ExtendSco of Extend = ExtendEng-[passVPSlash,PassVPSlash,PassAgentVPSlash,ProgrVPSlash] ** open Prelude, ResSco in {
concrete ExtendSco of Extend = ExtendEng-[PassVPSlash,PassAgentVPSlash,
ProgrVPSlash,EmbedPresPart,PastPartAgentAP,ByVP,InOrderToVP,
PurposeVP,PredIAdvVP,NominalizeVPSlashNP,WithoutVP,UttVPShort,
ReflPron,ReflPoss,MkVPS,MkVPI] ** open Prelude, ResSco in {
oper
passVPSlash : VPSlash -> Str -> ResSco.VP =
scoPassVPSlash : VPSlash -> Str -> ResSco.VP =
\vps,ag ->
let
be = predAux auxBe ;
@@ -16,9 +19,67 @@ oper
ext = vps.ext
} ;
lin PassVPSlash vps = passVPSlash (lin VPSlash vps) [] ;
PassAgentVPSlash vps np = passVPSlash (lin VPSlash vps) ("by" ++ np.s ! NPAcc) ;
lin PassVPSlash vps = scoPassVPSlash (lin VPSlash vps) [] ;
PassAgentVPSlash vps np = scoPassVPSlash (lin VPSlash vps) ("bi" ++ np.s ! NPAcc) ;
ProgrVPSlash vp = insertObjc (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a)
(predAux auxBe ** {c2 = vp.c2; gapInMiddle = vp.gapInMiddle; missingAdv = vp.missingAdv});
EmbedPresPart vp = {s = infVP VVPresPart vp False Simul CPos (agrP3 Sg)} ;
PastPartAgentAP vp np = {
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ "bi" ++ np.s ! NPAcc ++ vp.ext ;
isPre = False
} ;
ByVP vp = {
s = "bi" ++ vp.ad ! AgP3Sg Neutr ++ vp.prp ++ vp.p ++ vp.s2 ! AgP3Sg Neutr ++ vp.ext
} ;
InOrderToVP vp = {
s = variants {"in order"; []} ++ infVP VVInf vp False Simul CPos (AgP3Sg Neutr)
} ;
PurposeVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
PredIAdvVP iadv vp = {
s = \\t,a,p,q => iadv.s ++ infVP VVInf vp False Simul CPos (agrP3 Sg)
} ;
NominalizeVPSlashNP vpslash np =
let vp : ResSco.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
a = AgP3Sg Neutr
in lin NP {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ; a = a} ;
WithoutVP vp = {
s = "withoot" ++ vp.ad ! AgP3Sg Neutr ++ vp.prp ++ vp.p ++ vp.s2 ! AgP3Sg Neutr ++ vp.ext
} ;
UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ;
ReflPron = {s = reflPron} ;
ReflPoss num cn = {
s = \\a => possPron ! a ++ num.s ! True ! Nom ++ cn.s ! num.n ! Nom
} ;
MkVPS t p vp = scoMkVPS (lin Temp t) (lin Pol p) (lin VP vp) ;
MkVPI vp = scoMkVPI (lin VP vp) ;
oper
scoMkVPS : CatEng.Temp -> CatEng.Pol -> ResSco.VP -> VPS = \t,p,vp -> lin VPS {
s = \\o,a =>
let verb = mkVerbForms a vp ! t.t ! t.a ! p.p ! o ! a ;
compl = vp.s2 ! a ++ vp.ext
in {fin = verb.aux ++ t.s ++ p.s ;
inf = verb.adv ++ vp.ad ! a ++ verb.fin ++ verb.inf ++ vp.p ++ compl}
} ;
scoMkVPI : ResSco.VP -> VPI = \vp -> lin VPI {
s = table {
VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ++ vp.ext ;
VVInf => \\a => "tae" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ++ vp.ext ;
VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a ++ vp.ext
}
} ;
}
+15 -2
View File
@@ -1,6 +1,11 @@
concrete IdiomSco of Idiom = IdiomEng - [CleftNP,CleftAdv,ExistNP,ExistIP,ExistNPAdv,ExistIPAdv,ProgrVP] ** open Prelude, ResSco in {
concrete IdiomSco of Idiom = IdiomEng - [ImpersCl,GenericCl,CleftNP,CleftAdv,
ExistNP,ExistIP,ExistNPAdv,ExistIPAdv,ProgrVP,ImpPl1,ImpP3,
SelfAdvVP,SelfAdVVP,SelfNP] ** open Prelude, ResSco in {
lin CleftNP np rs = mkClause "it" (agrP3 Sg)
lin ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
GenericCl vp = mkClause "ane" (agrP3 Sg) vp ;
CleftNP np rs = mkClause "it" (agrP3 Sg)
(insertObj (\\_ => rs.s ! np.a)
(insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
@@ -26,4 +31,12 @@ lin CleftNP np rs = mkClause "it" (agrP3 Sg)
ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
ImpPl1 vp = {s = "lat's" ++ infVP VVAux vp False Simul CPos (AgP1 Pl)} ;
ImpP3 np vp = {s = "lat" ++ np.s ! NPAcc ++ infVP VVAux vp False Simul CPos np.a} ;
SelfAdvVP vp = insertObj reflPron vp ;
SelfAdVVP vp = insertAdVAgr reflPron vp ;
SelfNP np = {s = \\c => np.s ! c ++ reflPron ! np.a ; a = np.a} ;
}
+1 -1
View File
@@ -2,7 +2,7 @@ concrete NounSco of Noun = NounEng - [IndefArt, OrdSuperl, OrdNumeralSuperl] **
lin IndefArt = {
s = \\hasCard,n => case <n,hasCard> of {
<Sg,False> => "a" ;
<Sg,False> => artIndef ;
_ => []
} ;
sp = \\g,hasCard,n => case <n,hasCard> of {
+38 -1
View File
@@ -1,4 +1,4 @@
resource ParadigmsSco = ParadigmsEng - [regV, reg2V, regDuplV, irregV, irreg4V, irregDuplV, mkV, mkV2, mkV3, mkV2V, mkV2Q] ** open Prelude, ResSco, CatSco in {
resource ParadigmsSco = ParadigmsEng - [regV, reg2V, regDuplV, irregV, irreg4V, irregDuplV, mkV, mkV2, mkV3, mkVV, mkV2V, mkV2Q] ** open Prelude, ResSco, CatSco in {
oper
regV : Str -> V ;
@@ -9,6 +9,7 @@ oper
rax@(_ + ("x"|"sh"|"ch")) => rax+"t";
hurt@(_ + ("t"|"p"|"d")) => hurt + "it" ;
traivel@(_ + ("l"|"n"|"r"|"ie"|"y")) => traivel + "t" ;
_ + "e" => cry + "d" ;
clean => clean + "ed"
} ;
cryin : Str = case cry of {
@@ -80,6 +81,42 @@ oper
mkV3 : Str -> V3 = \v -> dirdirV3 (regV v) ;
} ;
-- Modal verbs in Scots do not take the infinitive marker "tae". WordNet
-- builds lexical VVs with mkVV, so recognize the Scots modals here rather
-- than making every caller know about the lower-level auxVV constructor.
mkVV : V -> VV = \v -> case v.p of {
"" => case v.s ! VInf of {
"can" | "cuid" | "ken" | "maun" | "micht" | "suld" | "daur" => scoModalVV v [] ;
_ => scoInfVV v
} ;
"tae" => case v.s ! VInf of {
"hae" | "ocht" => scoModalVV v "tae" ;
_ => scoInfVV v
} ;
_ => scoInfVV v
} ;
scoInfVV : V -> VV = \v -> lin VV {
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
p = v.p ;
typ = VVInf
} ;
scoModalVV : V -> Str -> VV = \v,p -> lin VV {
s = table {
VVF VInf => v.s ! VInf ++ p ;
VVF VPres => v.s ! VInf ++ p ;
VVF VPPart => v.s ! VPPart ++ p ;
VVF VPresPart => v.s ! VPresPart ++ p ;
VVF VPast => v.s ! VPast ++ p ; --# notpresent
VVPresNeg => posneg Neg (v.s ! VInf) ++ p
; --# notpresent
VVPastNeg => posneg Neg (v.s ! VPast) ++ p --# notpresent
} ;
p = [] ;
typ = VVAux
} ;
mkV2V = overload {
mkV2V : Str -> V2V = \s -> lin V2V (dirV2 (regV s) ** {c3 = [] ; typ = VVAux}) ;
mkV2V : V -> V2V = \v -> lin V2V (dirV2 v ** {c3 = [] ; typ = VVAux}) ;
+4 -1
View File
@@ -1,2 +1,5 @@
concrete PhraseSco of Phrase = PhraseEng ** {
concrete PhraseSco of Phrase = PhraseEng - [UttVP] ** open Prelude, ResSco in {
lin UttVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
}
+10 -2
View File
@@ -1,6 +1,14 @@
concrete QuestionSco of Question = QuestionEng-[QuestIComp] ** open ResSco in {
concrete QuestionSco of Question = QuestionEng-[QuestVP,QuestIComp,QuestQVP] ** open ResSco in {
lin QuestIComp icomp np =
lin QuestVP qp vp =
let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! oDir} ;
QuestIComp icomp np =
mkQuestion icomp (mkClause (np.s ! npNom) np.a (predAux auxBe)) ;
QuestQVP qp vp =
let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! oDir} ;
}
+10 -1
View File
@@ -1,2 +1,11 @@
concrete RelativeSco of Relative = RelativeEng ** {
concrete RelativeSco of Relative = RelativeEng - [RelVP] ** open ResSco in {
lin RelVP rp vp = {
s = \\t,ant,b,ag =>
let agr = case rp.a of {RNoAg => ag ; RAg a => a} ;
cl = mkClause (rp.s ! RC (fromAgr agr).g npNom) agr vp
in cl.s ! t ! ant ! b ! oDir ;
c = npNom
} ;
}
+214 -1
View File
@@ -1,6 +1,16 @@
resource ResSco = ResEng - [getCompar,getSuperl,auxBe,posneg] ** {
resource ResSco = ResEng - [getCompar,getSuperl,artIndef,auxBe,posneg,mkVerbForms,
nonAuxVerbForms,auxVerbForms,infVP,
reflPron,possPron,predV,predVc,predVV,mkClause,vfn] ** open Prelude in {
oper
artIndef = pre {
"eu" | "Eu" | "unique" | "univers" | "unit" | "urin" | "utop" |
"uise" => "a" ;
"u" | "U" | "a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ;
"SMS" | "sms" => "an" ;
_ => "a"
} ;
getCompar : Case -> Adjective -> Str = \c,a -> case a.isMost of {
True => "mair" ++ a.s ! AAdj Posit c ;
False => a.s ! AAdj Compar c
@@ -35,4 +45,207 @@ oper
Neg => s + "na"
} ;
vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} =
\contr,x,y,z -> case contr of {
True => {aux = y ; adv = [] ; fin = [] ; inf = z} ;
False => {aux = x ; adv = "no" ; fin = [] ; inf = z}
} ;
reflPron : Agr => Str = table {
AgP1 Sg => "mysel" ;
AgP2 Sg => "yersel" ;
AgP3Sg Masc => "himsel" ;
AgP3Sg Fem => "hersel" ;
AgP3Sg Neutr => "itsel" ;
AgP1 Pl => "oursels" ;
AgP2 Pl => "yersels" ;
AgP3Pl _ => "thairsels"
} ;
possPron : Agr => Str = table {
AgP1 Sg => "my" ;
AgP2 Sg => "yer" ;
AgP3Sg Masc => "his" ;
AgP3Sg Fem => "her" ;
AgP3Sg Neutr => "its" ;
AgP1 Pl => "our" ;
AgP2 Pl => "yer" ;
AgP3Pl _ => "thair"
} ;
predV : Verb -> VP = \verb -> {
p = verb.p ;
prp = verb.s ! VPresPart ;
ptp = verb.s ! VPPart ;
inf = verb.s ! VInf ;
ad = \\_ => [] ;
ext = [] ;
isSimple = True ;
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] ;
isAux = False ;
auxForms = {contr,past,pres = \\_,_ => nonExist} ;
nonAuxForms = {
pres = \\agr => presVerb verb agr ;
past = verb.s ! VPast --# notpresent
}
} ;
predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb ->
predV verb ** {c2 = verb.c2 ; gapInMiddle = True; missingAdv = False} ;
predVV : {s : VVForm => Str ; p : Str ; typ : VVType} -> VP = \verb ->
let verbs = verb.s
in case verb.typ of {
VVAux => predAux {
pres,contr = table {
Pos => \\_ => verbs ! VVF VPres ;
Neg => \\_ => verbs ! VVPresNeg
} ;
past = table { --# notpresent
Pos => \\_ => verbs ! VVF VPast ; --# notpresent
Neg => \\_ => verbs ! VVPastNeg --# notpresent
} ; --# notpresent
p = verb.p ;
inf = verbs ! VVF VInf ;
ppart = verbs ! VVF VPPart ;
prpart = verbs ! VVF VPresPart
} ;
_ => predV {s = \\vf => verbs ! VVF vf ; p = verb.p ; isRefl = False}
} ;
mkVerbForms : Agr -> VP -> VerbForms = \agr,vp -> case vp.isAux of {
True =>
let aux : Aux = vp.auxForms ** {
inf = vp.inf ;
ppart = vp.ptp ;
prpart = vp.prp } ;
in auxVerbForms aux ;
False =>
let fin : Str = vp.nonAuxForms.pres ! agr ;
inf : Str = vp.inf ;
part : Str = vp.ptp ;
in nonAuxVerbForms fin inf part
vp.nonAuxForms.past --# notpresent
} ;
nonAuxVerbForms : (fin,inf,part : Str) ->
(past : Str) -> --# notpresent
VerbForms = \fin,inf,part
,past --# notpresent
->
\\tns,ant,pol,ord,agr =>
case <tns,ant,pol,ord> of {
<Pres,Simul,CPos,ODir _> => vff fin [] ;
<Pres,Simul,CPos,OQuest> => vf (scoDoes agr) inf ;
<Pres,Anter,CPos,ODir True> => vf (haveContr agr) part ; --# notpresent
<Pres,Anter,CPos,_> => vf (scoHave agr) part ; --# notpresent
<Pres,Anter,CNeg c,ODir True> => vfn c (haveContr agr) (scoHavent agr) part ; --# notpresent
<Pres,Anter,CNeg c,_> => vfn c (scoHave agr) (scoHavent agr) part ; --# notpresent
<Past,Simul,CPos,ODir _> => vff past [] ; --# notpresent
<Past,Simul,CPos,OQuest> => vf "did" inf ; --# notpresent
<Past,Simul,CNeg c,_> => vfn c "did" "didna" inf ; --# notpresent
<Past,Anter,CPos,ODir True> => vf (cBind "d") part ; --# notpresent
<Past,Anter,CPos,_> => vf "haed" part ; --# notpresent
<Past,Anter,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") part ; --# notpresent
<Past,Anter,CNeg c,_> => vfn c "haed" "haedna" part ; --# notpresent
<Fut,Simul,CPos,ODir True> => vf (cBind "ll") inf ; --# notpresent
<Fut,Simul,CPos,_> => vf "will" inf ; --# notpresent
<Fut,Simul,CNeg c,ODir True> => vfn c (cBind "ll") (cBind "ll no") inf ; --# notpresent
<Fut,Simul,CNeg c,_> => vfn c "will" "winna" inf ; --# notpresent
<Fut,Anter,CPos,ODir True> => vf (cBind "ll") ("hae" ++ part) ; --# notpresent
<Fut,Anter,CPos,_> => vf "will" ("hae" ++ part) ; --# notpresent
<Fut,Anter,CNeg c,ODir True> => vfn c (cBind "ll") (cBind "ll no") ("hae" ++ part) ; --# notpresent
<Fut,Anter,CNeg c,_> => vfn c "will" "winna" ("hae" ++ part) ; --# notpresent
<Cond,Simul,CPos,ODir True> => vf (cBind "d") inf ; --# notpresent
<Cond,Simul,CPos,_> => vf "wad" inf ; --# notpresent
<Cond,Simul,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") inf ; --# notpresent
<Cond,Simul,CNeg c,_> => vfn c "wad" "wadna" inf ; --# notpresent
<Cond,Anter,CPos,ODir True> => vf (cBind "d") ("hae" ++ part) ; --# notpresent
<Cond,Anter,CPos,_> => vf "wad" ("hae" ++ part) ; --# notpresent
<Cond,Anter,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") ("hae" ++ part) ; --# notpresent
<Cond,Anter,CNeg c,_> => vfn c "wad" "wadna" ("hae" ++ part) ; --# notpresent
<Pres,Simul,CNeg c,_> => vfn c (scoDoes agr) (scoDoesnt agr) inf
} ;
auxVerbForms : Aux -> VerbForms = \verb ->
\\t,ant,cb,ord,agr =>
let b = case cb of {CPos => Pos ; _ => Neg} ;
inf = verb.inf ;
fin = verb.pres ! b ! agr ;
finp = verb.pres ! Pos ! agr ;
cfin = verb.contr ! b ! agr ;
cfinp = verb.contr ! Pos ! agr ;
part = verb.ppart
in case <t,ant,cb,ord> of {
<Pres,Anter,CPos,ODir True> => vf (haveContr agr) part ;
<Pres,Anter,CPos,_> => vf (scoHave agr) part ;
<Pres,Anter,CNeg c,ODir True> => vfn c (haveContr agr) (scoHavent agr) part ;
<Pres,Anter,CNeg c,_> => vfn c (scoHave agr) (scoHavent agr) part ;
<Past,Anter,CPos,ODir True> => vf (cBind "d") part ;
<Past,Anter,CPos,_> => vf "haed" part ;
<Past,Anter,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") part ;
<Past,Anter,CNeg c,_> => vfn c "haed" "haedna" part ;
<Fut,Simul,CPos,ODir True> => vf (cBind "ll") inf ;
<Fut,Simul,CPos,_> => vf "will" inf ;
<Fut,Simul,CNeg c,ODir True> => vfn c (cBind "ll") (cBind "ll no") inf ;
<Fut,Simul,CNeg c,_> => vfn c "will" "winna" inf ;
<Fut,Anter,CPos,ODir True> => vf (cBind "ll") ("hae" ++ part) ;
<Fut,Anter,CPos,_> => vf "will" ("hae" ++ part) ;
<Fut,Anter,CNeg c,ODir True> => vfn c (cBind "ll") (cBind "ll no") ("hae" ++ part) ;
<Fut,Anter,CNeg c,_> => vfn c "will" "winna" ("hae" ++ part) ;
<Cond,Simul,CPos,ODir True> => vf (cBind "d") inf ;
<Cond,Simul,CPos,_> => vf "wad" inf ;
<Cond,Simul,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") inf ;
<Cond,Simul,CNeg c,_> => vfn c "wad" "wadna" inf ;
<Cond,Anter,CPos,ODir True> => vf (cBind "d") ("hae" ++ part) ;
<Cond,Anter,CPos,_> => vf "wad" ("hae" ++ part) ;
<Cond,Anter,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d no") ("hae" ++ part) ;
<Cond,Anter,CNeg c,_> => vfn c "wad" "wadna" ("hae" ++ part) ;
<Past,Simul,CPos,_> => vf (verb.past ! b ! agr) [] ; --# notpresent
<Past,Simul,CNeg c,_> => vfn c (verb.past ! Pos ! agr) (verb.past ! Neg ! agr) [] ; --# notpresent
<Pres,Simul,CPos,ODir True> => vf cfin [] ;
<Pres,Simul,CPos,_> => vf fin [] ;
<Pres,Simul,CNeg c,ODir True> => vfn c cfinp fin [] ;
<Pres,Simul,CNeg c,_> => vfn c finp fin []
} ;
infVP : VVType -> VP -> Bool -> Anteriority -> CPolarity -> Agr -> Str =
\typ,vp,ad_pos,ant,cb,a ->
case cb of {CPos => [] ; _ => "no"} ++
case ant of {
Simul => case typ of {
VVAux => vp.ad ! a ++ vp.inf ;
VVInf => case ad_pos of {
True => vp.ad ! a ++ "tae" ++ vp.inf ;
False => "tae" ++ vp.ad ! a ++ vp.inf
} ;
_ => vp.ad ! a ++ vp.prp
} ;
Anter => case typ of {
VVAux => "hae" ++ vp.ad ! a ++ vp.ptp ;
VVInf => case ad_pos of {
True => vp.ad ! a ++ "tae" ++ "hae" ++ vp.ptp ;
False => "tae" ++ "hae" ++ vp.ad ! a ++ vp.ptp
} ;
_ => "haein" ++ vp.ad ! a ++ vp.ptp
}
} ++ vp.p ++ vp.s2 ! a ++ vp.ext ;
scoHave : Agr -> Str = agrVerb "haes" "hae" ;
scoHavent : Agr -> Str = agrVerb "haesna" "haena" ;
scoDoes : Agr -> Str = agrVerb "dis" "dae" ;
scoDoesnt : Agr -> Str = agrVerb "disna" "dinna" ;
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {
s = \\t,a,b,o =>
let verb = mkVerbForms agr vp ! t ! a ! b ! o ! agr ;
compl = vp.s2 ! agr ++ vp.ext
in case o of {
ODir _ => subj ++ verb.aux ++ verb.adv ++ vp.ad ! agr ++
verb.fin ++ verb.inf ++ vp.p ++ compl ;
OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ! agr ++
verb.fin ++ verb.inf ++ vp.p ++ compl
}
} ;
}
+30 -2
View File
@@ -1,3 +1,31 @@
concrete SentenceSco of Sentence = SentenceEng ** {
}
concrete SentenceSco of Sentence = SentenceEng - [PredVP,PredSCVP,ImpVP,SlashVP,SlashVS,EmbedVP] **
open Prelude, ResSco in {
lin
PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
ImpVP vp = {
s = \\pol,n =>
let agr = AgP2 (numImp n) ;
verb = infVP VVAux vp False Simul CPos agr ;
dinna = case pol of {
CNeg True => "dinna" ;
CNeg False => "dae" ++ "no" ;
_ => []
}
in dinna ++ verb
} ;
SlashVP np vp =
mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ;
SlashVS np vs slash =
mkClause (np.s ! npNom) np.a
(insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
{c2 = slash.c2} ;
EmbedVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
}
+9 -1
View File
@@ -1,2 +1,10 @@
concrete StructuralSco of Structural = StructuralEng ** {
concrete StructuralSco of Structural = StructuralEng - [by8agent_Prep,from_Prep,to_Prep,with_Prep] **
open ParadigmsSco in {
lin
by8agent_Prep = mkPrep "bi" ;
from_Prep = mkPrep "frae" ;
to_Prep = mkPrep "tae" ;
with_Prep = mkPrep "wi" ;
}
+31 -2
View File
@@ -1,6 +1,35 @@
concrete VerbSco of Verb = VerbEng-[UseComp,UseCopula,PassV2] ** open ResSco in {
concrete VerbSco of Verb = VerbEng-[UseV,SlashV2a,Slash2V3,Slash3V3,
ComplVV,ComplVS,ComplVQ,ComplVA,SlashVV,SlashV2V,SlashV2VNP,SlashV2S,SlashV2Q,SlashV2A,
ReflVP,UseComp,UseCopula,PassV2] ** open Prelude, ResSco in {
lin UseComp comp = insertObj comp.s (predAux auxBe) ;
lin UseV = predV ;
SlashV2a v = predVc v ** {c2 = v.c2 ; gapInMiddle = False} ;
Slash2V3 v np =
insertObjc (\\_ => v.c2 ++ np.s ! NPAcc)
(predVc v ** {c2 = v.c3 ; gapInMiddle = False}) ;
Slash3V3 v np = insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ;
ComplVV v vp = insertObj (\\a => infVP v.typ vp False Simul CPos a) (predVV v) ;
ComplVS v s = insertExtra (conjThat ++ s.s) (predV v) ;
ComplVQ v q = insertExtra (q.s ! QIndir) (predV v) ;
ComplVA v ap = insertObj ap.s (predV v) ;
SlashVV vv vp = vp **
insertObj (\\a => infVP vv.typ vp False Simul CPos a) (predVV vv) ;
SlashV2V v vp =
insertObjc (\\a => v.c3 ++ infVP v.typ vp False Simul CPos a) (predVc v) ;
SlashV2VNP vv np vp = vp **
insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc)
(insertObjc (\\a => vv.c3 ++ infVP vv.typ vp False Simul CPos a) (predVc vv)) ;
SlashV2S v s = insertExtrac (conjThat ++ s.s) (predVc v) ;
SlashV2Q v q = insertExtrac (q.s ! QIndir) (predVc v) ;
SlashV2A v ap = insertObjc (\\a => v.c3 ++ ap.s ! a) (predVc v) ;
ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
UseComp comp = insertObj comp.s (predAux auxBe) ;
UseCopula = predAux auxBe ;
PassV2 v = insertObj (\\_ => v.s ! VPPart ++ v.p) (predAux auxBe) ;