From 49fb720224d3689204d6a8dbb2ff475c5ce615ad Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 9 Jun 2016 14:14:39 +0000 Subject: [PATCH] updated uddeps.labels with ResourceDemo-specific functions, added relative clauses to ResourceDemo --- lib/src/demo/ResourceDemo.gf | 10 ++++++++-- lib/src/demo/ResourceDemoEng.gf | 13 +++++++++++-- lib/src/uddeps.labels | 8 +++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/src/demo/ResourceDemo.gf b/lib/src/demo/ResourceDemo.gf index 59b9c74c9..bbd71d5b1 100644 --- a/lib/src/demo/ResourceDemo.gf +++ b/lib/src/demo/ResourceDemo.gf @@ -103,6 +103,12 @@ abstract ResourceDemo = Lexicon, Numeral, Grammar [ QuestIComp, CompIAdv, + UseRCl, -- Tense -> Pol -> RCl -> RS, + RelVP , -- RP -> VP -> QCl, -- who walks + RelSlash, -- RP -> ClSlash -> QCl, -- who does she walk with + RelCN, -- CN -> RS -> CN + IdRP, -- RP + SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run PrepNP , -- Prep -> NP -> Adv, -- in the house @@ -156,10 +162,10 @@ fun possDet : Pron -> Det ; numeralDet : Numeral -> Det ; i_Pron, youSg_Pron, he_Pron, she_Pron, we_Pron, youPl_Pron, they_Pron : Pron ; - SubjS : Subj -> S -> S -> S ; -- if she walks we run + RSubjS : Subj -> S -> S -> S ; -- if she walks we run SlashV2 : NP -> V2 -> ClSlash ; -- she loves SlashPrep : Cl -> Prep -> ClSlash ; -- she walks with - AdvCN : CN -> Prep -> NP -> CN ; -- man in the city + RAdvCN : CN -> Prep -> NP -> CN ; -- man in the city } diff --git a/lib/src/demo/ResourceDemoEng.gf b/lib/src/demo/ResourceDemoEng.gf index 1111c9483..58af98481 100644 --- a/lib/src/demo/ResourceDemoEng.gf +++ b/lib/src/demo/ResourceDemoEng.gf @@ -64,6 +64,8 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ Utt, -- utterance (sentence or question) e.g. "does she walk" QS, -- question (fixed tense) e.g. "who doesn't walk" QCl, -- question clause (variable tense) e.g. "who walks" + RS, -- relative (fixed tense) e.g. "that doesn't walk" + RCl, -- relative clause (variable tense) e.g. "that walks" ClSlash, -- clause missing noun phrase e.g. "she walks with" Adv, -- adverb e.g. "here" Prep, -- preposition (and/or case) e.g. "with" @@ -71,6 +73,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ VQ, -- question-complement verb e.g. "wonder" VV, -- verb-phrase-complement verb e.g. "want" IP, -- interrogative pronoun e.g. "who" + RP, -- relative pronoun e.g. "that" PN, -- proper name e.g. "John" Subj, -- subjunction e.g. "because" IAdv, -- interrogative adverb e.g. "why" @@ -107,6 +110,12 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ QuestIComp, CompIAdv, + UseRCl, -- Tense -> Pol -> RCl -> RS, + RelVP , -- RP -> VP -> QCl, -- who walks + RelSlash, -- RP -> ClSlash -> QCl, -- who does she walk with + RelCN, -- CN -> RS -> CN + IdRP, -- RP + SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run PrepNP , -- Prep -> NP -> Adv, -- in the house @@ -161,8 +170,8 @@ lin those_Det = S.those_Det ; possDet p = S.mkDet

; numeralDet n = S.mkDet ; - SubjS subj a b = mkS (S.mkAdv ) b ; + RSubjS subj a b = mkS (S.mkAdv ) b ; SlashV2 np v2 = mkClSlash np v2 ; SlashPrep cl p = mkClSlash (lin Cl cl)

; - AdvCN cn p pp = mkCN (mkAdv

) ; + RAdvCN cn p pp = mkCN (mkAdv

) ; } diff --git a/lib/src/uddeps.labels b/lib/src/uddeps.labels index ca9173150..ab47f3096 100644 --- a/lib/src/uddeps.labels +++ b/lib/src/uddeps.labels @@ -159,7 +159,13 @@ ComplV2V head dobj xcomp ComplV3 head iobj dobj ---- could be dobj dobj PassAgentV2 head ncomp -- not sure RelV2 mark nsubj head -QuestV2 dobj nsubj head +QuestV2 dobj nsubj head + +ModCN amod head -- in ResourceDemo +RSubjS mark advcl head +SlashV2 nsubj head +RAdvCN head case nmod +SubjCl head mark advcl A ADJ A2 ADJ