From fa47612071ed2cb819670cab775ea43bf12beff6 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 24 Jan 2005 21:00:58 +0000 Subject: [PATCH] started updating English --- lib/resource/abstract/Rules.gf | 4 +--- lib/resource/english/CategoriesEng.gf | 12 +++++----- lib/resource/english/RulesEng.gf | 15 +++++-------- lib/resource/english/SyntaxEng.gf | 32 ++++++++++++++------------- 4 files changed, 30 insertions(+), 33 deletions(-) diff --git a/lib/resource/abstract/Rules.gf b/lib/resource/abstract/Rules.gf index 8ccbce86a..2bfc877f1 100644 --- a/lib/resource/abstract/Rules.gf +++ b/lib/resource/abstract/Rules.gf @@ -91,7 +91,6 @@ fun AdvPP : PP -> Adv ; -- "in London", "after the war" PrepNP : Prep -> NP -> PP ; -- "in London", "after the war" ---- AdvVP : VP -> Adv -> VP ; -- "always walks", "walks in the park" AdvVP : VP -> Adv -> VP ; -- "always walks", "walks in the park" AdvCN : CN -> PP -> CN ; -- "house in London" AdvAP : AdA -> AP -> AP ; -- "very good" @@ -111,8 +110,7 @@ fun IdRP : RP ; -- "which" FunRP : N2 -> RP -> RP ; -- "the successor of which" ---- RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk" - RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk" + RelVP : RP -> VP -> RCl ; -- "who walks", "who doesn't walk" RelSlash : RP -> Slash -> RCl ; -- "that I wait for"/"for which I wait" --- ModRC : CN -> RS -> CN ; -- "man who walks" ModRS : CN -> RS -> CN ; -- "man who walks" diff --git a/lib/resource/english/CategoriesEng.gf b/lib/resource/english/CategoriesEng.gf index 0181ff91a..e0c681098 100644 --- a/lib/resource/english/CategoriesEng.gf +++ b/lib/resource/english/CategoriesEng.gf @@ -48,8 +48,8 @@ lincat V = Verb ; -- = {s : VForm => Str ; s1 : Particle} - VG = {s,s2 : Bool => VPForm => Str ; s3 : Number => Str ; isAux : Bool} ; - VP = {s,s2 : VPForm => Str ; s3 : Number => Str ; isAux : Bool} ; + VP = {s,s2 : Bool => SForm => Str ; s3 : Number => Str ; isAux : Bool} ; + VPI = {s,s2 : Str ; s3 : Number => Str ; isAux : Bool} ; V2 = TransVerb ; -- = Verb ** {s3 : Preposition} ; V3 = TransVerb ** {s4 : Preposition} ; @@ -61,12 +61,14 @@ lincat S = {s : Str} ; Cl = Clause ; -- = {s : Bool => SForm => Str} ; - Slash = {s : Order => Str ; s2 : Preposition} ; + Slash = Clause ** {s2 : Preposition} ; RP = {s : Gender => Number => NPForm => Str} ; - RC = {s : Gender => Number => Str} ; + RCl = {s : Bool => SForm => Gender => Number => Str} ; + RS = {s : Gender => Number => Str} ; IP = {s : NPForm => Str ; n : Number} ; - Qu = {s : QuestForm => Str} ; + QCl = {s : Bool => SForm => QuestForm => Str} ; + QS = {s : QuestForm => Str} ; Imp = {s : Number => Str} ; Phr = {s : Str} ; Text = {s : Str} ; diff --git a/lib/resource/english/RulesEng.gf b/lib/resource/english/RulesEng.gf index 9f61b3184..358a8b585 100644 --- a/lib/resource/english/RulesEng.gf +++ b/lib/resource/english/RulesEng.gf @@ -60,18 +60,14 @@ lin {s = \\n,c => cn.s ! n ! c ++ s.s ; g = cn.g} ; - PredVP = predVerbPhrase ; - PosVG = predVerbGroup True ; - NegVG = predVerbGroup False ; - - PredVG = predVerbGroupClause ; + PredVP = predVerbGroupClause ; PredV = predVerb ; PredAP = predAdjective ; PredSuperl a = predAdjective (superlAdjPhrase a) ; PredCN = predCommNoun ; PredV2 = complTransVerb ; - PredV3 = complDitransVerb ; +---- PredV3 = complDitransVerb ; PredPassV = passVerb ; PredNP = predNounPhrase ; PredPP = predAdverb ; @@ -86,10 +82,9 @@ lin AdvCN = advCommNounPhrase ; AdvAP = advAdjPhrase ; - PosSlashV2 = slashTransVerb True ; - NegSlashV2 = slashTransVerb False ; - OneVP = predVerbPhrase (nameNounPhrase (nameReg "one")) ; - ThereNP = thereIs ; + SlashV2 = slashTransVerb ; +---- OneVP = predVerbPhrase (nameNounPhrase (nameReg "one")) ; +---- ThereNP = thereIs ; IdRP = identRelPron ; FunRP = funRelPron ; diff --git a/lib/resource/english/SyntaxEng.gf b/lib/resource/english/SyntaxEng.gf index de9a43634..0abfcad36 100644 --- a/lib/resource/english/SyntaxEng.gf +++ b/lib/resource/english/SyntaxEng.gf @@ -306,7 +306,7 @@ oper Tense = Present | Past ; Anteriority = Simul | Anter ; Order = Direct | Indirect ; - VPForm = + SForm = VIndic Tense Anteriority Number Person | VFut Anteriority | VCondit Anteriority @@ -320,7 +320,7 @@ oper oper - verbVPForm : Verb -> VPForm -> {fin,inf : Str} = \goes,sf -> + verbSForm : Verb -> SForm -> {fin,inf : Str} = \goes,sf -> let tense : Tense -> Number -> Person -> VForm = \t,n,p -> case of { => Indic p ; @@ -363,10 +363,10 @@ oper useVerb : Verb -> (Number => Str) -> VerbGroup = \verb,arg -> let - go = verbVPForm verb ; + go = verbSForm verb ; off = verb.s1 ; - has : VPForm => Str = \\f => (go f).fin ; - gone : VPForm => Str = \\f => (go f).inf ++ off + has : SForm => Str = \\f => (go f).fin ; + gone : SForm => Str = \\f => (go f).inf ++ off in { s = table { True => has ; @@ -392,9 +392,9 @@ oper useVerbAux : Verb -> (Number => Str) -> VerbGroup = \verb,arg -> let - go = verbVPForm verb ; - has : VPForm => Str = \\f => (go f).fin ; - gone : VPForm => Str = \\f => (go f).inf + go = verbSForm verb ; + has : SForm => Str = \\f => (go f).fin ; + gone : SForm => Str = \\f => (go f).inf in { s = \\b => table { @@ -428,15 +428,15 @@ oper -- this is needed in question. VerbGroup = { - s : Bool => VPForm => Str ; - s2 : Bool => VPForm => Str ; + s : Bool => SForm => Str ; + s2 : Bool => SForm => Str ; s3 : Number => Str ; isAux : Bool } ; VerbPhrase = { - s : VPForm => Str ; - s2 : VPForm => Str ; + s : Str ; + s2 : Str ; s3 : Number => Str ; isAux : Bool ; } ; @@ -630,7 +630,7 @@ oper ; oper - cl2s : ClForm -> Number -> Person -> {form : VPForm ; order : Order} = \c,n,p -> case c of { + cl2s : ClForm -> Number -> Person -> {form : SForm ; order : Order} = \c,n,p -> case c of { ClIndic Indirect t Simul => {form = VQuest t n p ; order = Indirect} ; ClIndic o t a => {form = VIndic t a n p ; order = o} ; ClFut o a => {form = VFut a ; order = o} ; @@ -785,7 +785,8 @@ oper -- Relative clauses can be formed from both verb phrases ("who walks") and -- slash expressions ("whom you see", "on which you sit" / "that you sit on"). - RelClause : Type = {s : Gender => Number => Str} ; + RelClause : Type = {s : Bool => SForm => Gender => Number => Str} ; + RelSentence : Type = {s : Gender => Number => Str} ; relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \who,walks -> {s = \\g,n => (predVerbPhrase (relNounPhrase who g n) walks).s} ; @@ -885,7 +886,8 @@ param QuestForm = DirQ | IndirQ ; oper - Question = SS1 QuestForm ; + Question = {s : Bool => SForm => QuestForm => Str} ; + QuestionSent = {s : QuestForm => Str} ; --- TODO: questions in all tenses.