forked from GitHub/gf-rgl
change determiners in np and fix emptynp
This commit is contained in:
@@ -11,7 +11,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
det = det
|
||||
det = { s = det.s ! cn.g ; sp = det.sp ! cn.g } ;
|
||||
} ;
|
||||
|
||||
-- UsePN : PN -> NP ; -- John
|
||||
@@ -22,7 +22,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg }
|
||||
det = { s,sp = \\_ => "" ; n = Sg }
|
||||
} ;
|
||||
|
||||
-- UsePron : Pron -> NP ; -- he
|
||||
@@ -33,13 +33,13 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
det = { s,sp = \\_ => "" ; n = p.pers.n } ;
|
||||
} ;
|
||||
|
||||
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np =
|
||||
np ** {
|
||||
det = np.det ** { s = \\g,c => predet.s ++ np.det.s ! g ! c }
|
||||
det = { s = \\c => predet.s ++ np.det.s ! c ; sp = np.det.sp }
|
||||
} ;
|
||||
|
||||
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||
@@ -74,7 +74,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = det.n } ;
|
||||
det = { s,sp = \\_ => "" ; n = det.n } ;
|
||||
} ;
|
||||
--
|
||||
-- DetQuantOrd quant num ord = {
|
||||
@@ -130,7 +130,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg } ;
|
||||
det = { s,sp = \\_ => "" ; n = Sg } ;
|
||||
};
|
||||
|
||||
UseN n = -- N -> CN
|
||||
@@ -182,6 +182,6 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||
CountNP det np = np ** {
|
||||
det = det ** { s = \\g,c => det.s ! g ! c++ np.det.s ! g ! c } ;
|
||||
det = { s = \\c => det.s ! np.g ! c ++ np.det.s ! c ; sp = \\c => det.sp ! np.g ! c ++ np.det.sp ! c } ;
|
||||
};
|
||||
}
|
||||
@@ -17,8 +17,9 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => vp.obj ;
|
||||
q = ip.s ! Nom ;
|
||||
v = \\t,a,_,ap,cp => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse ;
|
||||
vcompl = vp.compl ! Ag Masc ip.n Nom ; -- default gender masculine
|
||||
v = \\t,a,_,ap => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse ;
|
||||
compl = vp.compl ! Ag Masc ip.n Nom ; -- default gender masculine
|
||||
det = { s, sp = \\_ => [] ; n = ip.n } ;
|
||||
} ;
|
||||
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
|
||||
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
|
||||
@@ -40,8 +41,9 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! APostN ! DPreN ! 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 ;
|
||||
vcompl = "" ;
|
||||
v = \\t,a,_,ap => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
||||
det = { s , sp = \\_=> [] ; n = Sg } ; -- default number singilar
|
||||
compl = "" ;
|
||||
} ;
|
||||
--
|
||||
--
|
||||
|
||||
@@ -22,7 +22,7 @@ param
|
||||
adv : Str ;
|
||||
preap : {s : Agr => Str } ;
|
||||
postap : {s : Agr => Str } ;
|
||||
det : Determiner
|
||||
det : { s, sp : Case => Str } ;
|
||||
} ;
|
||||
param
|
||||
-- Parameters to determine word order
|
||||
@@ -150,12 +150,12 @@ param
|
||||
p = P3;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = n} ;
|
||||
det = { s,sp = \\_ => "" ; n = n} ;
|
||||
} ;
|
||||
|
||||
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 = P3 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s , sp = \\_ => "" ; n = Sg } ;};
|
||||
|
||||
combineNounPhrase : NounPhrase -> PronDropForm => AdvPos => DetPos => Case => Str = \np ->
|
||||
let detpren : DetPos -> { s , sp : Case => Str} = \dp -> case dp of { DPreN => np.det ; _ => { s, sp = \\_ => [] } } ;
|
||||
|
||||
Reference in New Issue
Block a user