diff --git a/lib/resource-1.0/gf/LexEng.gf b/lib/resource-1.0/gf/LexEng.gf index 434f6162d..72c74787e 100644 --- a/lib/resource-1.0/gf/LexEng.gf +++ b/lib/resource-1.0/gf/LexEng.gf @@ -1,4 +1,5 @@ concrete LexEng of Lex = CatEng ** open ResEng in { + lin walk_V = regV "walk" ; kill_V2 = regV "kill" ** {c2 = []} ; @@ -24,4 +25,8 @@ concrete LexEng of Lex = CatEng ** open ResEng in { whoSg_IP = mkIP "who" "whom" "whose" Sg ; whoPl_IP = mkIP "who" "whom" "whose" Pl ; + when_IAdv = {s = "when"} ; + + whichSg_IDet = {s = "which" ; n = Sg} ; + } diff --git a/lib/resource-1.0/gf/Question.gf b/lib/resource-1.0/gf/Question.gf index db47f0e53..0a1571c39 100644 --- a/lib/resource-1.0/gf/Question.gf +++ b/lib/resource-1.0/gf/Question.gf @@ -11,7 +11,7 @@ abstract Question = Cat, Sentence ** { FunIP : N2 -> IP -> IP ; AdvIP : IP -> Adv -> IP ; - IDetCN : IDet -> Num -> IP ; + IDetCN : IDet -> Num -> CN -> IP ; } diff --git a/lib/resource-1.0/gf/QuestionEng.gf b/lib/resource-1.0/gf/QuestionEng.gf index 215f19e0d..47cd33aa8 100644 --- a/lib/resource-1.0/gf/QuestionEng.gf +++ b/lib/resource-1.0/gf/QuestionEng.gf @@ -8,7 +8,7 @@ concrete QuestionEng of Question = CatEng, SentenceEng ** open ResEng in { in table { QDir => cls ! OQuest ; QIndir => "if" ++ cls ! ODir - } ---- "whether" in exts + } ---- "whether" in ExtEng } ; QuestVP qp vp = { @@ -22,16 +22,40 @@ concrete QuestionEng of Question = CatEng, SentenceEng ** open ResEng in { subj ++ verb.fin ++ verb.inf ++ compl } ; -{- - QuestSlash : IP -> Slash -> QCl ; - QuestIAdv : IAdv -> Cl -> QCl ; + QuestSlash ip slash = { + s = \\t,a,p => + let + cls = slash.s ! t ! a ! p ; + who = slash.c2 ++ ip.s ! Acc --- stranding in ExtEng + in table { + QDir => who ++ cls ! OQuest ; + QIndir => who ++ cls ! ODir + } + } ; - PrepIP : Prep -> IP -> IAdv ; - FunIP : N2 -> IP -> IP ; - AdvIP : IP -> Adv -> IP ; + QuestIAdv iadv cl = { + s = \\t,a,p => + let + cls = cl.s ! t ! a ! p ; + why = iadv.s + in table { + QDir => why ++ cls ! OQuest ; + QIndir => why ++ cls ! ODir + } + } ; + + PrepIP p ip = {s = p.s ++ ip.s ! Nom} ; + +---- FunIP : N2 -> IP -> IP ; + AdvIP ip adv = { + s = \\c => ip.s ! c ++ adv.s ; + n = ip.n + } ; - IDetCN : IDet -> Num -> IP ; --} + IDetCN idet num cn = { + s = \\c => idet.s ++ num.s ++ cn.s ! idet.n ! c ; + n = idet.n + } ; } diff --git a/lib/resource-1.0/gf/Sentence.gf b/lib/resource-1.0/gf/Sentence.gf index 88ff0f31e..5a5ba0498 100644 --- a/lib/resource-1.0/gf/Sentence.gf +++ b/lib/resource-1.0/gf/Sentence.gf @@ -6,5 +6,6 @@ abstract Sentence = Cat ** { SlashV2 : NP -> V2 -> Slash ; + AdvSlash : Slash -> Adv -> Slash ; } diff --git a/lib/resource-1.0/gf/SentenceEng.gf b/lib/resource-1.0/gf/SentenceEng.gf index d2cb0def0..05daa8113 100644 --- a/lib/resource-1.0/gf/SentenceEng.gf +++ b/lib/resource-1.0/gf/SentenceEng.gf @@ -17,4 +17,23 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in { } } ; + SlashV2 np v2 = { + s = \\t,a,b,o => + let + agr = np.a ; + verb = (predV v2).s ! t ! a ! b ! o ! agr ; + subj = np.s ! Nom + in + case o of { + ODir => subj ++ verb.fin ++ verb.inf ; + OQuest => verb.fin ++ subj ++ verb.inf + } ; + c2 = v2.c2 + } ; +--- PredVP (np ** {lock_NP =<>}) (UseV (v2 ** {lock_V = <>})) ** {c2 = v2.c2} ; + + AdvSlash slash adv = { + s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; + c2 = slash.c2 + } ; }