diff --git a/src/scots/AdjectiveSco.gf b/src/scots/AdjectiveSco.gf index 0283117f1..442495d18 100644 --- a/src/scots/AdjectiveSco.gf +++ b/src/scots/AdjectiveSco.gf @@ -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 + } ; } diff --git a/src/scots/ConstructionSco.gf b/src/scots/ConstructionSco.gf index 2c74072dc..a094cdde2 100644 --- a/src/scots/ConstructionSco.gf +++ b/src/scots/ConstructionSco.gf @@ -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 (mkN "year" "year")))) + (mkA "auld")) ; + } diff --git a/src/scots/ExtendSco.gf b/src/scots/ExtendSco.gf index 8436659a1..bd9f7c3da 100644 --- a/src/scots/ExtendSco.gf +++ b/src/scots/ExtendSco.gf @@ -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 + } + } ; + } diff --git a/src/scots/IdiomSco.gf b/src/scots/IdiomSco.gf index bad132b30..54ab3aa60 100644 --- a/src/scots/IdiomSco.gf +++ b/src/scots/IdiomSco.gf @@ -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} ; + } diff --git a/src/scots/NounSco.gf b/src/scots/NounSco.gf index 345553094..a7503fbe3 100644 --- a/src/scots/NounSco.gf +++ b/src/scots/NounSco.gf @@ -2,7 +2,7 @@ concrete NounSco of Noun = NounEng - [IndefArt, OrdSuperl, OrdNumeralSuperl] ** lin IndefArt = { s = \\hasCard,n => case of { - => "a" ; + => artIndef ; _ => [] } ; sp = \\g,hasCard,n => case of { diff --git a/src/scots/ParadigmsSco.gf b/src/scots/ParadigmsSco.gf index 4643ab750..d1d51a650 100644 --- a/src/scots/ParadigmsSco.gf +++ b/src/scots/ParadigmsSco.gf @@ -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}) ; diff --git a/src/scots/PhraseSco.gf b/src/scots/PhraseSco.gf index 990b25358..d6a02bfcf 100644 --- a/src/scots/PhraseSco.gf +++ b/src/scots/PhraseSco.gf @@ -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)} ; + } diff --git a/src/scots/QuestionSco.gf b/src/scots/QuestionSco.gf index bac4b6cb6..2699c4b76 100644 --- a/src/scots/QuestionSco.gf +++ b/src/scots/QuestionSco.gf @@ -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} ; + } diff --git a/src/scots/RelativeSco.gf b/src/scots/RelativeSco.gf index b17ae3c7d..ef2e978f8 100644 --- a/src/scots/RelativeSco.gf +++ b/src/scots/RelativeSco.gf @@ -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 + } ; + } diff --git a/src/scots/ResSco.gf b/src/scots/ResSco.gf index be21c22a0..b8e9fed43 100644 --- a/src/scots/ResSco.gf +++ b/src/scots/ResSco.gf @@ -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 of { + => vff fin [] ; + => vf (scoDoes agr) inf ; + => vf (haveContr agr) part ; --# notpresent + => vf (scoHave agr) part ; --# notpresent + => vfn c (haveContr agr) (scoHavent agr) part ; --# notpresent + => vfn c (scoHave agr) (scoHavent agr) part ; --# notpresent + => vff past [] ; --# notpresent + => vf "did" inf ; --# notpresent + => vfn c "did" "didna" inf ; --# notpresent + => vf (cBind "d") part ; --# notpresent + => vf "haed" part ; --# notpresent + => vfn c (cBind "d") (cBind "d no") part ; --# notpresent + => vfn c "haed" "haedna" part ; --# notpresent + => vf (cBind "ll") inf ; --# notpresent + => vf "will" inf ; --# notpresent + => vfn c (cBind "ll") (cBind "ll no") inf ; --# notpresent + => vfn c "will" "winna" inf ; --# notpresent + => vf (cBind "ll") ("hae" ++ part) ; --# notpresent + => vf "will" ("hae" ++ part) ; --# notpresent + => vfn c (cBind "ll") (cBind "ll no") ("hae" ++ part) ; --# notpresent + => vfn c "will" "winna" ("hae" ++ part) ; --# notpresent + => vf (cBind "d") inf ; --# notpresent + => vf "wad" inf ; --# notpresent + => vfn c (cBind "d") (cBind "d no") inf ; --# notpresent + => vfn c "wad" "wadna" inf ; --# notpresent + => vf (cBind "d") ("hae" ++ part) ; --# notpresent + => vf "wad" ("hae" ++ part) ; --# notpresent + => vfn c (cBind "d") (cBind "d no") ("hae" ++ part) ; --# notpresent + => vfn c "wad" "wadna" ("hae" ++ part) ; --# notpresent + => 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 of { + => vf (haveContr agr) part ; + => vf (scoHave agr) part ; + => vfn c (haveContr agr) (scoHavent agr) part ; + => vfn c (scoHave agr) (scoHavent agr) part ; + => vf (cBind "d") part ; + => vf "haed" part ; + => vfn c (cBind "d") (cBind "d no") part ; + => vfn c "haed" "haedna" part ; + => vf (cBind "ll") inf ; + => vf "will" inf ; + => vfn c (cBind "ll") (cBind "ll no") inf ; + => vfn c "will" "winna" inf ; + => vf (cBind "ll") ("hae" ++ part) ; + => vf "will" ("hae" ++ part) ; + => vfn c (cBind "ll") (cBind "ll no") ("hae" ++ part) ; + => vfn c "will" "winna" ("hae" ++ part) ; + => vf (cBind "d") inf ; + => vf "wad" inf ; + => vfn c (cBind "d") (cBind "d no") inf ; + => vfn c "wad" "wadna" inf ; + => vf (cBind "d") ("hae" ++ part) ; + => vf "wad" ("hae" ++ part) ; + => vfn c (cBind "d") (cBind "d no") ("hae" ++ part) ; + => vfn c "wad" "wadna" ("hae" ++ part) ; + => vf (verb.past ! b ! agr) [] ; --# notpresent + => vfn c (verb.past ! Pos ! agr) (verb.past ! Neg ! agr) [] ; --# notpresent + => vf cfin [] ; + => vf fin [] ; + => vfn c cfinp fin [] ; + => 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 + } + } ; + } diff --git a/src/scots/SentenceSco.gf b/src/scots/SentenceSco.gf index 2dc98c1d9..0bb4a2609 100644 --- a/src/scots/SentenceSco.gf +++ b/src/scots/SentenceSco.gf @@ -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)} ; + +} diff --git a/src/scots/StructuralSco.gf b/src/scots/StructuralSco.gf index f07db777a..b1bfc93d2 100644 --- a/src/scots/StructuralSco.gf +++ b/src/scots/StructuralSco.gf @@ -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" ; + } diff --git a/src/scots/VerbSco.gf b/src/scots/VerbSco.gf index 23ffda0f6..690396455 100644 --- a/src/scots/VerbSco.gf +++ b/src/scots/VerbSco.gf @@ -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) ;