From 3e159f7d53a08ee5375835ed6c3aa3a3742cbd60 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 5 Nov 2013 13:53:12 +0000 Subject: [PATCH] some missing Swe functions; ParseEng.who_RP to enable the parsing of "who" as RP, which is now blocked since Eng nouns don't have the human feature marked --- lib/src/english/ParseEng.gf | 5 +++++ lib/src/english/ParseEngAbs.gf | 1 + lib/src/scandinavian/CatScand.gf | 2 ++ lib/src/scandinavian/CommonScand.gf | 11 +++++++++++ lib/src/scandinavian/VerbScand.gf | 6 +++++- lib/src/swedish/ParseSwe.gf | 1 + 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/src/english/ParseEng.gf b/lib/src/english/ParseEng.gf index 1ca26b4c2..6b7905f04 100644 --- a/lib/src/english/ParseEng.gf +++ b/lib/src/english/ParseEng.gf @@ -113,6 +113,11 @@ lin a = RNoAg } ; + who_RP = { + s = \\_ => "who" ; + a = RNoAg + } ; + CompS s = {s = \\_ => "that" ++ s.s} ; CompQS qs = {s = \\_ => qs.s ! QIndir} ; CompVP ant p vp = {s = \\a => ant.s ++ p.s ++ diff --git a/lib/src/english/ParseEngAbs.gf b/lib/src/english/ParseEngAbs.gf index 1ceb1c926..57183ec21 100644 --- a/lib/src/english/ParseEngAbs.gf +++ b/lib/src/english/ParseEngAbs.gf @@ -51,6 +51,7 @@ fun CompoundCN : Num -> N -> CN -> CN ; PredVPosv,PredVPovs : NP -> VP -> Cl ; that_RP : RP ; + who_RP : RP ; CompS : S -> Comp ; CompQS : QS -> Comp ; diff --git a/lib/src/scandinavian/CatScand.gf b/lib/src/scandinavian/CatScand.gf index 0210d498f..fa9a57a74 100644 --- a/lib/src/scandinavian/CatScand.gf +++ b/lib/src/scandinavian/CatScand.gf @@ -123,6 +123,8 @@ incomplete concrete CatScand of Cat = V3 = \v -> infVP (predV v) agrUSgP3 ++ v.c2.s ++ v.c3.s ; VV = \v -> infVP (predV v) agrUSgP3 ; V2V = \v -> infVP (predV v) agrUSgP3 ++ v.c2.s ; + + Conj = \c -> c.s1 ++ c.s2 ; {- A = \a -> a.s ! AAdj Posit Nom ; A2 = \a -> a.s ! AAdj Posit Nom ++ a.c2 ; diff --git a/lib/src/scandinavian/CommonScand.gf b/lib/src/scandinavian/CommonScand.gf index 8ade99585..098c20987 100644 --- a/lib/src/scandinavian/CommonScand.gf +++ b/lib/src/scandinavian/CommonScand.gf @@ -315,6 +315,17 @@ oper eext = vp.eext } ; + insertExt : Str -> VP -> VP = \ext,vp -> { + s = vp.s ; + a1 = vp.a1 ; + n2 = vp.n2 ; + a2 = vp.a2 ; + ext = vp.ext ++ ext ; + en2 = vp.en2 ; + ea2 = vp.ea2 ; + eext = True ; + } ; + insertAdV : Str -> VP -> VP = \adv,vp -> { s = vp.s ; a1 = \\b => vp.a1 ! b ++ adv ; diff --git a/lib/src/scandinavian/VerbScand.gf b/lib/src/scandinavian/VerbScand.gf index 06b4da02a..0f0a8000a 100644 --- a/lib/src/scandinavian/VerbScand.gf +++ b/lib/src/scandinavian/VerbScand.gf @@ -16,7 +16,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand, } ; ComplVV v vp = insertObjPost (\\a => v.c2.s ++ infVP vp a) (predV v) ; - ComplVS v s = insertObjPost (\\_ => conjThat ++ s.s ! Sub) (predV v) ; + ComplVS v s = insertObjPost (\\_ => conjThat ++ s.s ! Sub) (predV v) ; --- insertExt ? ComplVQ v q = insertObjPost (\\_ => q.s ! QIndir) (predV v) ; ComplVA v ap = insertObjPost (\\a => ap.s ! agrAdjNP a DIndef) (predV v) ; @@ -76,4 +76,8 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand, UseCopula = predV verbBe ; + AdvVPSlash vps adv = insertAdv adv.s vps ** {c2 = vps.c2 ; n3 = vps.n3} ; + AdVVPSlash adv vps = insertAdV adv.s vps ** {c2 = vps.c2 ; n3 = vps.n3} ; + ExtAdvVP vp adv = insertExt ("," ++ adv.s) vp ; + } diff --git a/lib/src/swedish/ParseSwe.gf b/lib/src/swedish/ParseSwe.gf index 729ce249d..3f3f85065 100644 --- a/lib/src/swedish/ParseSwe.gf +++ b/lib/src/swedish/ParseSwe.gf @@ -98,6 +98,7 @@ lin PredVPovs np vp = mkCl np vp ; ---- that_RP = which_RP ; -- som + who_RP = who_RP ; CompS s = {s = \\_ => "att" ++ s.s ! Sub} ; CompQS qs = {s = \\_ => qs.s ! QIndir} ;