mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
change type of np and add helper function to construct string from split category
This commit is contained in:
@@ -8,12 +8,12 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
||||
|
||||
-- ComparA : A -> NP -> AP ; -- warmer than I
|
||||
ComparA a np = {
|
||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ np.s ! Nom ;
|
||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! Nom ;
|
||||
} ;
|
||||
|
||||
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a np = {
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ np.s ! a.c.c ;
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! a.c.c ;
|
||||
} ;
|
||||
|
||||
-- ReflA2 : A2 -> AP -- married to myself
|
||||
@@ -31,7 +31,7 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
||||
|
||||
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
CAdvAP cadv ap np =
|
||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ np.s ! Nom } ;
|
||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom } ;
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
|
||||
@@ -8,13 +8,12 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
|
||||
|
||||
-- PrepNP : Prep -> NP -> Adv ; -- in the house
|
||||
PrepNP prep np =
|
||||
mkAdv (prep.s ++ np.adv ++ np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++
|
||||
np.s ! prep.c ++ np.postap.s ! (Ag np.g np.n prep.c ) ++ np.det.sp ! np.g ! prep.c ) ;
|
||||
mkAdv (prep.s ++ np.adv ++ (combineNounPhrase np) ! PronNonDrop ! prep.c ) ;
|
||||
|
||||
|
||||
-- ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||
ComparAdvAdj cadv a np =
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ np.s ! Nom) ;
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom) ;
|
||||
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
ComparAdvAdjS cadv a s =
|
||||
|
||||
@@ -87,7 +87,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
||||
A2 = Adjective ** { c : Prep} ;
|
||||
|
||||
linref
|
||||
NP = \np -> np.preap.s ! Ag np.g np.n Nom ++ np.s ! Nom ++ np.postap.s ! Ag np.g np.n Nom ;
|
||||
NP = \np -> combineNounPhrase np ! PronNonDrop ! Nom ;
|
||||
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
|
||||
S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
||||
V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||
|
||||
@@ -34,7 +34,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- } ;
|
||||
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||
-- } ;
|
||||
s = \\ca => conj.s1 ++ (nps.s ! conj.c).init ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! ca++ conj.s3 ;
|
||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! ca ++ conj.s3 ;
|
||||
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
||||
g = nps.g ;
|
||||
p = nps.p ;
|
||||
@@ -113,7 +113,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||
ConsNP x xs = {
|
||||
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
||||
s = \\co => { init = \\ca => coord co { init = (xs.s ! co).init ! ca ; last = (xs.s ! co).last ! ca} ; last = x.s } ;
|
||||
s = \\co => { init = \\pd,ca => coord co { init = (xs.s ! co).init ! pd ! ca ; last = (xs.s ! co).last ! pd ! ca} ; last = x.s } ;
|
||||
n = matchNumber x.n xs.n ;
|
||||
g = xs.g ;
|
||||
p = xs.p ;
|
||||
@@ -134,7 +134,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
lincat
|
||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
||||
[NP] = { s : Coordinator => {init,last : Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
||||
[NP] = { s : Coordinator => {init,last : PronDropForm => Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
||||
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
||||
|
||||
oper
|
||||
|
||||
@@ -8,7 +8,7 @@ concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in {
|
||||
--
|
||||
-- CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||
-- (insertObj (\\_ => rs.s ! np.a)
|
||||
-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
||||
-- (insertObj (\\_ => combineNounPhrase np ! PronNonDrop ! rs.c) (predAux auxBe))) ;
|
||||
--
|
||||
-- CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
||||
-- (insertObj (\\_ => conjThat ++ s.s)
|
||||
@@ -16,7 +16,7 @@ concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in {
|
||||
--
|
||||
-- ExistNP np =
|
||||
-- mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
-- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ;
|
||||
-- (insertObj (\\_ => combineNounPhrase np ! PronNonDrop ! Acc) (predAux auxBe)) ;
|
||||
--
|
||||
-- ExistIP ip =
|
||||
-- mkQuestion (ss (ip.s ! Nom))
|
||||
|
||||
@@ -6,7 +6,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- DetCN : Det -> CN -> NP ; -- the man
|
||||
DetCN det cn =
|
||||
{
|
||||
s = \\c => cn.s ! det.n ! c ;
|
||||
s = \\_,c => cn.s ! det.n ! c ;
|
||||
n = det.n ; g = cn.g ; p = P3 ;
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
@@ -27,19 +27,15 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- UsePron : Pron -> NP ; -- he
|
||||
UsePron p =
|
||||
{
|
||||
g = p.pers.g ;
|
||||
n = p.pers.n ;
|
||||
p.pers **
|
||||
{
|
||||
p = p.p ;
|
||||
s = \\c => case c of {
|
||||
Nom => p.pers.s ! PronDrop ! PronNonRefl ; -- Drop pronoun in nominative case
|
||||
_ => p.pers.s ! PronNonDrop ! PronNonRefl -- but don't drop it otherwise
|
||||
} ! c ;
|
||||
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
} ;
|
||||
|
||||
|
||||
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np =
|
||||
np ** {
|
||||
@@ -48,7 +44,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||
-- PPartNP np v2 = {
|
||||
-- s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! c ++ v2.s ! VPPart ;
|
||||
-- a = np.a
|
||||
-- } ;
|
||||
--
|
||||
@@ -56,7 +52,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- AdvNP : NP -> Adv -> NP ; -- Paris today
|
||||
AdvNP np adv = np ** { adv = np.adv ++ (adv.s ! Posit) } ;
|
||||
-- {
|
||||
-- s = \\c => np.s ! c ;
|
||||
-- s = \\pd,c => combineNounPhrase np ! pd ! c ;
|
||||
-- g = np.g ; n = np.n; p = np.p ;
|
||||
-- adv = cc2 np.adv adv ;
|
||||
-- preap = np.preap ;
|
||||
@@ -72,7 +68,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- DetNP : Det -> NP ; -- these five
|
||||
DetNP det = {
|
||||
s = det.s ! Neutr ;
|
||||
s = \\_ => det.s ! Neutr ;
|
||||
g = Neutr ;
|
||||
n = det.n ;
|
||||
p = P3 ;
|
||||
@@ -127,15 +123,11 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
} ;
|
||||
|
||||
MassNP cn =
|
||||
{
|
||||
s = cn.s ! Sg ;
|
||||
cn ** {
|
||||
s = \\_ => cn.s ! Sg ;
|
||||
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg } ;
|
||||
};
|
||||
|
||||
@@ -181,11 +173,8 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
--
|
||||
-- ApposCN : CN -> NP -> CN
|
||||
ApposCN cn np =
|
||||
cn **
|
||||
{
|
||||
s = \\n,c => cn.s ! n ! c ++ np.det.s ! np.g ! c ++ np.preap.s ! (Ag np.g n c) ++ np.s ! c ++ np.postap .s ! (Ag np.g n c) ++ np.det.sp ! np.g ! c ;
|
||||
g = cn.g ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
adv = cn.adv
|
||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! c ;
|
||||
} ; -- massable = cn.massable } ;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
||||
-- UttIAdv : IAdv -> Utt
|
||||
UttIAdv iadv = iadv ;
|
||||
-- UttNP : NP -> Utt
|
||||
UttNP np = {s = np.adv ++ np.det.s ! np.g ! Nom ++ np.preap.s ! (Ag np.g np.n Nom) ++ np.s ! Nom ++ np.postap.s ! (Ag np.g np.n Nom) ++ np.det.sp ! np.g ! Nom} ;
|
||||
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! Nom} ;
|
||||
-- UttVP : VP -> Utt
|
||||
UttVP vp = ss (vp.inf ! VInfActPres) ;
|
||||
|
||||
@@ -36,6 +36,6 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
||||
PConjConj conj = {s = conj.s2} ; ---
|
||||
--
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||
VocNP np = {s = "," ++ (combineNounPhrase np) ! PronNonDrop ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||
--
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
s = \\_ => "" ;
|
||||
adv = "" ;
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => np.s ! Nom ;
|
||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! Nom ; -- Should probably not go into the object field
|
||||
q = icomp.s ;
|
||||
v = \\t,a,_,ap,cp => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
||||
} ;
|
||||
|
||||
@@ -33,7 +33,7 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
||||
-- } ;
|
||||
--
|
||||
-- FunRP p np rp = {
|
||||
-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- a = RAg np.a
|
||||
-- } ;
|
||||
--
|
||||
|
||||
@@ -15,7 +15,7 @@ param
|
||||
Noun : Type = {s : Number => Case => Str ; g : Gender } ; -- massable : Bool } ;
|
||||
NounPhrase : Type =
|
||||
{
|
||||
s : Case => Str ;
|
||||
s : PronDropForm => Case => Str ;
|
||||
g : Gender ;
|
||||
n : Number ;
|
||||
p : Person ;
|
||||
@@ -135,7 +135,7 @@ param
|
||||
regNP : (_,_,_,_,_,_ : Str) -> Gender -> Number -> NounPhrase =
|
||||
\nom,acc,gen,dat,abl,voc,g,n ->
|
||||
{
|
||||
s = table Case [ nom ; acc ; gen ; dat ; abl ; voc ] ;
|
||||
s = \\_ => table Case [ nom ; acc ; gen ; dat ; abl ; voc ] ;
|
||||
g = g ;
|
||||
n = n ;
|
||||
p = P3;
|
||||
@@ -146,7 +146,10 @@ param
|
||||
|
||||
dummyNP : Str -> NounPhrase = \s -> regNP s s s s s s Masc Sg ;
|
||||
|
||||
emptyNP : NounPhrase = { s = \\_ => ""; g = Masc; n = Sg; p = P1 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = Sg } ;};
|
||||
emptyNP : NounPhrase = { s = \\_,_ => ""; g = Masc; n = Sg; p = P1 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = Sg } ;};
|
||||
|
||||
combineNounPhrase : NounPhrase -> PronDropForm => Case => Str = \np ->
|
||||
\\pd,c => np.det.s ! np.g ! c ++ np.adv ++ np.preap.s ! (Ag np.g np.n c) ++ np.s ! pd ! c ++ np.postap.s ! (Ag np.g np.n c) ++ np.det.sp ! np.g ! c ;
|
||||
-- also used for adjectives and so on
|
||||
|
||||
-- adjectives
|
||||
@@ -1066,7 +1069,7 @@ param
|
||||
|
||||
param
|
||||
PronReflForm = PronRefl | PronNonRefl ;
|
||||
PronDropForm = PronDrop | PronNonDrop;
|
||||
PronDropForm = PronDrop | PronNonDrop ;
|
||||
-- PronIndefUsage = PronSubst | PronAdj ;
|
||||
-- PronIndefPol = PronPos | PronNeg ;
|
||||
-- PronIndefMeaning = PronSomeone | PronCertainOne | PronEvery ;
|
||||
@@ -1253,7 +1256,7 @@ oper
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
obj = np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep np.s) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! np.g ! prep.c ++ vp.obj ;
|
||||
obj = np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! np.g ! prep.c ++ vp.obj ;
|
||||
compl = vp.compl ;
|
||||
adv = vp.adv ++ np.adv
|
||||
} ;
|
||||
@@ -1263,7 +1266,7 @@ oper
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
obj = np.det.s ! np.g ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c np.s) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! np.g ! vp.c.c ++ vp.obj ;
|
||||
obj = np.det.s ! np.g ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! np.g ! vp.c.c ++ vp.obj ;
|
||||
compl = vp.compl ;
|
||||
c = vp.c ;
|
||||
adv = vp.adv ++ np.adv
|
||||
@@ -1327,7 +1330,7 @@ oper
|
||||
np.det.s ! np.g ! Nom ++ -- the determiner, if any
|
||||
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
|
||||
ins advpos ++ -- adverbs can be placed within the subject noun phrase
|
||||
np.s ! Nom ++ -- the noun of the subject noun phrase in nominative
|
||||
np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative
|
||||
np.postap .s ! (Ag np.g np.n Nom) ++ -- adjectives which come after the subject noun, agreeing with it
|
||||
np.det.sp ! np.g ! Nom ; -- second part of split determiners
|
||||
-- verb part of the clause:
|
||||
|
||||
@@ -36,7 +36,7 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
--
|
||||
-- SlashVS np vs slash =
|
||||
-- mkClause (np.s ! Nom) np.a
|
||||
-- mkClause (combineNounPhrase np ! PronNonDrop ! Nom) np.a
|
||||
-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
||||
-- {c2 = slash.c2} ;
|
||||
--
|
||||
@@ -50,9 +50,10 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
||||
-- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion
|
||||
UseQCl t p cl =
|
||||
{
|
||||
s = \\q => case q of {
|
||||
QDir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||
QIndir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||
s = let qs = combineClause cl t t.a p VQTrue in
|
||||
\\q => case q of {
|
||||
QDir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||
QIndir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ lin
|
||||
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
NumPN i = {s = \\c => i.s ! Neutr ! c; g = Neutr ; n = Pl } ; --- c
|
||||
CNIntNP cn i = {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
@@ -18,7 +18,7 @@ lin
|
||||
preap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
g = cn.g ;
|
||||
n = det.n ;
|
||||
adv = [] ;
|
||||
@@ -32,7 +32,7 @@ lin
|
||||
-- } ;
|
||||
-- } ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
|
||||
@@ -17,10 +17,21 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
} ;
|
||||
|
||||
-- ComplVS : VS -> S -> VP ; -- say that she runs
|
||||
ComplVS v s = insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
||||
|
||||
ComplVS vs s = -- insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
||||
vs ** {
|
||||
s = \\af,qf => vs.act ! af ;
|
||||
compl = \\ag => combineSentence s ! SPreS ! PreV ! CPostV ! SOV ; -- s.s ! QIndir ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
} ;
|
||||
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
||||
ComplVQ v q = insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||
ComplVQ vq qs = -- insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||
vq ** {
|
||||
s = \\af,qf => vq.act ! af ;
|
||||
compl = \\ag => qs.s ! QIndir ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
} ;
|
||||
|
||||
-- ComplVA : VA -> AP -> VP ; -- they become red
|
||||
ComplVA v ap = (predV v) ** { compl = ap.s } ;
|
||||
@@ -57,7 +68,7 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
|
||||
-- SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
-- SlashV2VNP vv np vp =
|
||||
-- insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
||||
-- insertObjPre (\\_ => vv.c2 ++ (combineNounPhrase np) ! PronNonDrop ! Acc)
|
||||
-- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||
-- {c2 = vp.c2} ;
|
||||
|
||||
@@ -103,7 +114,9 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
CompAP ap = ap ;
|
||||
|
||||
-- CompNP : NP -> Comp ; -- (be) the man
|
||||
CompNP np = {s = \\_ => let a = Ag np.g np.n Nom in np.adv ++ np.det.s ! np.g ! Nom ++ np.preap.s ! a ++ np.s ! Nom ++ np.postap.s ! a } ;
|
||||
CompNP np = {s = \\_ =>
|
||||
(combineNounPhrase np) ! PronNonDrop ! Nom
|
||||
} ;
|
||||
|
||||
-- CompAdv : Adv -> Comp ; -- (be) here
|
||||
CompAdv a = {s = \\_ => a.s ! Posit } ;
|
||||
|
||||
Reference in New Issue
Block a user