From e52dd4892c47ca8ca04e092ffd3a39b65e1dff27 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 24 Jan 2005 20:32:28 +0000 Subject: [PATCH] cleand up VPI --- lib/resource/abstract/Categories.gf | 2 +- lib/resource/abstract/Rules.gf | 4 +- lib/resource/scandinavian/CategoriesScand.gf | 6 +-- lib/resource/scandinavian/RulesScand.gf | 3 +- lib/resource/scandinavian/SyntaxScand.gf | 43 ++++++++------------ 5 files changed, 25 insertions(+), 33 deletions(-) diff --git a/lib/resource/abstract/Categories.gf b/lib/resource/abstract/Categories.gf index a12d50bff..d377c50f5 100644 --- a/lib/resource/abstract/Categories.gf +++ b/lib/resource/abstract/Categories.gf @@ -99,7 +99,7 @@ cat VV ; -- verb-compl. verb, e.g. "can", "want" VP ; -- verb phrase, e.g. "switch the light on" - VPI ; -- infin. or imp. verb phrase e.g. "switch the light on", "don't run" + VPI ; -- infinitive verb phrase e.g. "switch the light on", "not have run" --! --3 Adverbs and prepositions/cases diff --git a/lib/resource/abstract/Rules.gf b/lib/resource/abstract/Rules.gf index ee365018a..8ccbce86a 100644 --- a/lib/resource/abstract/Rules.gf +++ b/lib/resource/abstract/Rules.gf @@ -138,8 +138,8 @@ fun ExistQCl : CN -> QCl ; -- "is there a bar", ExistNumQCl : Num -> CN -> QCl ; -- "are there (86) bars" ---- ImperVP : VP -> Imp ; -- "be a man" - ImperVP : VPI -> Imp ; -- "(don't) be a man" +--- ImperVP : VP -> Imp ; -- "be a man" + PosImperVP, NegImperVP : VP -> Imp ; -- "(don't) be a man" ----rename these ?? IndicPhrase : S -> Phr ; -- "I walk." diff --git a/lib/resource/scandinavian/CategoriesScand.gf b/lib/resource/scandinavian/CategoriesScand.gf index c53d94251..e37f73279 100644 --- a/lib/resource/scandinavian/CategoriesScand.gf +++ b/lib/resource/scandinavian/CategoriesScand.gf @@ -33,10 +33,10 @@ lincat V = Verb ; -- = {s : VerbForm => Str ; s1 : Str} ; - VP = {s : SForm => Str ; s2 : Bool => Str ; + VP = {s : SForm => Str ; s2 : Bool => Str ; s3 : SForm => Gender => Number => Person => Str} ; - VPI = {s : VIForm => Str ; s2 : Str ; - s3 : VIForm => Gender => Number => Person => Str} ; + VPI = {s : Str ; s2 : Str ; + s3 : Gender => Number => Person => Str} ; V2 = TransVerb ; -- = Verb ** {s2 : Preposition} ; V3 = TransVerb ** {s3 : Preposition} ; diff --git a/lib/resource/scandinavian/RulesScand.gf b/lib/resource/scandinavian/RulesScand.gf index 8c9028d9a..cb2360006 100644 --- a/lib/resource/scandinavian/RulesScand.gf +++ b/lib/resource/scandinavian/RulesScand.gf @@ -149,7 +149,8 @@ lin UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ; - ImperVP = imperVerbPhrase ; + PosImperVP = imperVerbPhrase True ; + NegImperVP = imperVerbPhrase False ; IndicPhrase = indicUtt ; QuestPhrase = interrogUtt ; diff --git a/lib/resource/scandinavian/SyntaxScand.gf b/lib/resource/scandinavian/SyntaxScand.gf index 4763ecdea..a5ac82345 100644 --- a/lib/resource/scandinavian/SyntaxScand.gf +++ b/lib/resource/scandinavian/SyntaxScand.gf @@ -479,9 +479,6 @@ param VFinite Tense Anteriority | VImperat | VInfinit Anteriority ; - VIForm = - VIImperat - | VIInfinit ; oper verbSForm : Verbum -> Voice -> SForm -> {fin,inf : Str} = \se,vo,sf -> @@ -525,9 +522,9 @@ oper -- to account for word order variations. No particle needs to be retained. VerbPhrase : Type = { - s : VIForm => Str ; + s : Str ; s2 : Str ; - s3 : VIForm => Gender => Number => Person => Str + s3 : Gender => Number => Person => Str } ; VerbGroup : Type = { s : SForm => Str ; @@ -540,15 +537,9 @@ oper vgs = vg.s ; vgs3 = vg.s3 in - {s = table { - VIInfinit => vgs ! VInfinit a ; - VIImperat => vgs ! VImperat - } ; + {s = vg.s ! VInfinit a ; s2 = vg.s2 ! b ; - s3 = table { - VIInfinit => vgs3 ! VInfinit a ; - VIImperat => vgs3 ! VImperat - } ; + s3 = vg.s3 ! VInfinit a ; } ; -- A simple verb can be made into a verb phrase with an empty complement. @@ -827,13 +818,13 @@ oper (\\g,n,p => vilja.s1 ++ vilja.s3 ++ - simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter! - simma.s3 ! VIInfinit ! g ! n ! p) ; + simma.s ++ simma.s2 ++ ---- Anter! + simma.s3 ! g ! n ! p) ; transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta -> {s = vilja.s ; s1 = vilja.s1 ++ vilja.s3 ++ - hitta.s ! VI (Inf Act) ++ hitta.s1 ; ---- Anter! + hitta.s ! VI (Inf Act) ++ hitta.s1 ; s2 = hitta.s2 } ; @@ -842,8 +833,8 @@ oper (\\g,n,p => grei.s ! predFormAdj g n ! Nom ++ infinAtt ++ - simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter! - simma.s3 ! VIInfinit ! g ! n ! p) ; + simma.s ++ simma.s2 ++ + simma.s3 ! g ! n ! p) ; -- Notice agreement to object vs. subject: @@ -854,10 +845,10 @@ oper \obj,be,dig,simma -> useVerb be (\\g,n,p => be.s1 ++ be.s2 ++ dig.s ! PAcc ++ be.s3 ++ - simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter! + simma.s ++ simma.s2 ++ if_then_Str obj - (simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p) - (simma.s3 ! VIInfinit ! g ! n ! p) + (simma.s3 ! dig.g ! dig.n ! dig.p) + (simma.s3 ! g ! n ! p) ) ; complVerbAdj2 : @@ -867,10 +858,10 @@ oper grei.s ! predFormAdj g n ! Nom ++ grei.s2 ++ dig.s ! PAcc ++ infinAtt ++ - simma.s ! VIInfinit ++ simma.s2 ++ ---- Anter! + simma.s ++ simma.s2 ++ if_then_Str obj - (simma.s3 ! VIInfinit ! dig.g ! dig.n ! dig.p) - (simma.s3 ! VIInfinit ! g ! n ! p) + (simma.s3 ! dig.g ! dig.n ! dig.p) + (simma.s3 ! g ! n ! p) ) ; --2 Sentences missing noun phrases @@ -1159,9 +1150,9 @@ oper Imperative = {s : Number => Str} ; - imperVerbPhrase : VerbPhrase -> Imperative = \titta -> + imperVerbPhrase : Bool -> VerbGroup -> Imperative = \b,titta -> {s = \\n => - titta.s ! VIImperat ++ titta.s2 ++ titta.s3 ! VIImperat ! utrum ! n ! P2 + titta.s ! VImperat ++ titta.s2 ! b ++ titta.s3 ! VImperat ! utrum ! n ! P2 } ; imperUtterance : Number -> Imperative -> Utterance = \n,I ->