diff --git a/lib/resource/abstract/Clause.gf b/lib/resource/abstract/Clause.gf index f8909b81d..7843ff847 100644 --- a/lib/resource/abstract/Clause.gf +++ b/lib/resource/abstract/Clause.gf @@ -33,6 +33,9 @@ fun SPredAV : NP -> AV ->VPI ->Cl ; -- "John is eager to leave" SPredObjA2V : NP -> A2V -> NP ->VPI ->Cl ; -- "John is easy for us to convince" + SPredProgVP : NP -> VPI -> Cl ; -- "he is eating" + + QPredV : IP -> V -> QCl ; -- "who walks" QPredPassV : IP -> V -> QCl ; -- "who is seen" QPredV2 : IP -> V2 -> NP -> QCl ; -- "who sees Mary" diff --git a/lib/resource/abstract/Rules.gf b/lib/resource/abstract/Rules.gf index db06af88b..716109029 100644 --- a/lib/resource/abstract/Rules.gf +++ b/lib/resource/abstract/Rules.gf @@ -214,7 +214,6 @@ fun --- The type signatures of these ones should be changed from VP to VPI. - ProgVG : VP -> VP ; -- he is eating - OneVP : VP -> Cl ; -- "one walks" + OneVP : VP -> Cl ; -- "one walks" } ; diff --git a/lib/resource/danish/SyntaxDan.gf b/lib/resource/danish/SyntaxDan.gf index 07c7f58b6..b62269d58 100644 --- a/lib/resource/danish/SyntaxDan.gf +++ b/lib/resource/danish/SyntaxDan.gf @@ -114,4 +114,13 @@ instance SyntaxDan of SyntaxScand = TypesDan ** {s3 = ["ved at"]} ) (predVerbGroup True Simul verb) ; + + progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp -> + predVerbGroupClause np + (complVerbVerb + (verbVara ** + {s3 = ["ved at"]} + ) + vp) ; + } \ No newline at end of file diff --git a/lib/resource/english/CategoriesEng.gf b/lib/resource/english/CategoriesEng.gf index 2a712bb7b..1bd2346c6 100644 --- a/lib/resource/english/CategoriesEng.gf +++ b/lib/resource/english/CategoriesEng.gf @@ -53,7 +53,7 @@ lincat V = Verb ; -- = {s : VForm => Str ; s1 : Particle} VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ; - VPI = {s : Agr => Str ; s1 : Str} ; -- s1 is "not" or [] + VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or [] V2 = TransVerb ; -- = Verb ** {s3 : Preposition} ; V3 = TransVerb ** {s4 : Preposition} ; diff --git a/lib/resource/english/ClauseEng.gf b/lib/resource/english/ClauseEng.gf index d15bcc729..e86b76f3d 100644 --- a/lib/resource/english/ClauseEng.gf +++ b/lib/resource/english/ClauseEng.gf @@ -29,6 +29,8 @@ concrete ClauseEng of Clause = CategoriesEng ** SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ; SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ; + SPredProgVP = progressiveClause ; + QPredV np v = intVerbPhrase np (predVerb v) ; QPredPassV np v = intVerbPhrase np (passVerb v) ; QPredV2 np v x = intVerbPhrase np (complTransVerb v x) ; diff --git a/lib/resource/english/RulesEng.gf b/lib/resource/english/RulesEng.gf index 9ae7595f1..4c5161de5 100644 --- a/lib/resource/english/RulesEng.gf +++ b/lib/resource/english/RulesEng.gf @@ -87,10 +87,6 @@ lin UseA2S x = x ; UseA2V x = x ; --- Formation of infinitival phrases. - - ProgVG = progressiveVerbPhrase ; - UseCl tp cl = {s = tp.s ++ cl.s ! Dir ! tp.b ! VFinite tp.t tp.a} ; UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ; UseRCl tp cl = {s = \\a => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! a} ; diff --git a/lib/resource/english/SyntaxEng.gf b/lib/resource/english/SyntaxEng.gf index f2bf4aed1..e58d03f3f 100644 --- a/lib/resource/english/SyntaxEng.gf +++ b/lib/resource/english/SyntaxEng.gf @@ -453,9 +453,13 @@ oper -- This is just an infinitival (or present participle) phrase + +param + VIForm = VIInfinit | VIPresPart ; + oper VerbPhrase = { - s : Agr => Str ; + s : VIForm => Agr => Str ; s1 : Str -- "not" or [] } ; @@ -463,14 +467,17 @@ oper -- All negative verb phrase behave as auxiliary ones in questions. predVerbGroup : Bool -> Anteriority -> VerbGroup -> VerbPhrase = \b,ant,vg -> { - s = \\a => vg.s2 ! b ! VInfinit ant ! a ; -- s1 is just neg for inf + s = table { + VIInfinit => \\a => vg.s2 ! b ! VInfinit ant ! a ; -- s1 is just neg for inf + VIPresPart => \\a => vg.s2 ! b ! VPresPart ! a + } ; s1 = if_then_Str b [] "not" } ; predVerbGroupI : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase = \b,ant,vg -> let vp = predVerbGroup b ant.a vg in - {s = \\a => ant.s ++ vp.s ! a ; + {s = \\f,a => ant.s ++ vp.s ! f ! a ; s1 = vp.s1 } ; @@ -709,8 +716,11 @@ oper APl P3 => "themselves" } ; - progressiveVerbPhrase : VerbGroup -> VerbGroup = \vp -> - beGroup (vp.s2 ! True ! VPresPart) ; + progressiveVerbPhrase : VerbPhrase -> VerbGroup = \vp -> + beGroup (vp.s ! VIPresPart) ; + + progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp -> + predBeGroup np (vp.s ! VIPresPart) ; --- negation of prp ignored: "not" only for "be" @@ -794,7 +804,7 @@ oper taux = try.isAux ; to = if_then_Str taux [] "to" ; torun : Agr => Str = - \\a => run.s1 ++ to ++ run.s ! a + \\a => run.s1 ++ to ++ run.s ! VIInfinit ! a in if_then_else VerbGroup taux (useVerb try torun) @@ -830,8 +840,8 @@ oper (\\a => be.s1 ++ be.s3 ++ dig.s ! AccP ++ be.s3 ++ be.s4 ++ simma.s1 ++ -- negation if_then_Str obj - (simma.s ! dig.a) - (simma.s ! a) + (simma.s ! VIInfinit ! dig.a) + (simma.s ! VIInfinit ! a) ) ; transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta -> @@ -846,7 +856,7 @@ oper (\\a => grei.s ! AAdj ++ simma.s1 ++ "to" ++ - simma.s ! a) ; + simma.s ! VIInfinit ! a) ; complVerbAdj2 : Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> VerbGroup = @@ -857,8 +867,8 @@ oper grei.s2 ++ dig.s ! AccP ++ simma.s1 ++ "to" ++ if_then_Str obj - (simma.s ! dig.a) - (simma.s ! a) + (simma.s ! VIInfinit ! dig.a) + (simma.s ! VIInfinit ! a) ) ; @@ -1127,7 +1137,7 @@ oper a = toAgr n P2 human ; dont = if_then_Str b [] "don't" in - dont ++ walk.s ! a + dont ++ walk.s ! VIInfinit ! a } ; imperUtterance : Number -> Imperative -> Utterance = \n,I -> @@ -1137,7 +1147,7 @@ oper -- "What do you want to do? - Wash myself." verbUtterance : VerbPhrase -> Utterance = \vp -> - ss (vp.s1 ++ vp.s ! ASgP1) ; + ss (vp.s1 ++ vp.s ! VIInfinit ! ASgP1) ; --2 Sentence adverbs diff --git a/lib/resource/norwegian/RulesNor.gf b/lib/resource/norwegian/RulesNor.gf index 6f993b69a..211670ad4 100644 --- a/lib/resource/norwegian/RulesNor.gf +++ b/lib/resource/norwegian/RulesNor.gf @@ -1,4 +1,4 @@ --# -path=.:../scandinavian:../abstract:../../prelude -concrete RulesNor of Rules = +concrete RulesNor of Rules = CategoriesNor ** RulesScand with (SyntaxScand=SyntaxNor) ; diff --git a/lib/resource/norwegian/SyntaxNor.gf b/lib/resource/norwegian/SyntaxNor.gf index 0b9ded984..bc6f7cb01 100644 --- a/lib/resource/norwegian/SyntaxNor.gf +++ b/lib/resource/norwegian/SyntaxNor.gf @@ -116,4 +116,12 @@ instance SyntaxNor of SyntaxScand = TypesNor ** ) (predVerbGroup True Simul verb) ; + progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp -> + predVerbGroupClause np + (complVerbVerb + (verbVara ** + {s3 = ["ved at"]} + ) + vp) ; + } diff --git a/lib/resource/norwegian/TestResourceNor.gf b/lib/resource/norwegian/TestResourceNor.gf index eca484f14..cc68a0163 100644 --- a/lib/resource/norwegian/TestResourceNor.gf +++ b/lib/resource/norwegian/TestResourceNor.gf @@ -1,6 +1,6 @@ --# -path=.:../scandinavian:../abstract:../../prelude -concrete TestResourceNor of TestResource = RulesNor, StructuralNor ** +concrete TestResourceNor of TestResource = RulesNor, ClauseNor, StructuralNor ** open Prelude, MorphoNor, SyntaxNor in { flags startcat=Phr ; lexer=text ; unlexer=text ; diff --git a/lib/resource/scandinavian/ClauseScand.gf b/lib/resource/scandinavian/ClauseScand.gf index b290eff13..8966fe6ae 100644 --- a/lib/resource/scandinavian/ClauseScand.gf +++ b/lib/resource/scandinavian/ClauseScand.gf @@ -28,6 +28,8 @@ incomplete concrete ClauseScand of Clause = CategoriesScand ** SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ; SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ; + SPredProgVP = progressiveClause ; + QPredV np v = intVerbPhrase np (predVerb v) ; QPredPassV np v = intVerbPhrase np (passVerb v) ; diff --git a/lib/resource/scandinavian/RulesScand.gf b/lib/resource/scandinavian/RulesScand.gf index 3aedc1c7c..6f7c68174 100644 --- a/lib/resource/scandinavian/RulesScand.gf +++ b/lib/resource/scandinavian/RulesScand.gf @@ -70,8 +70,6 @@ lin -- Formation of infinitival phrases. - ProgVG = progressiveVerbPhrase ; - UseCl tp cl = {s = \\o => tp.s ++ cl.s ! tp.b ! ClFinite tp.t tp.a o} ; UseRCl tp cl = {s = \\gn,p => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! gn ! p} ; diff --git a/lib/resource/scandinavian/SyntaxScand.gf b/lib/resource/scandinavian/SyntaxScand.gf index b70ce1365..6f50f689a 100644 --- a/lib/resource/scandinavian/SyntaxScand.gf +++ b/lib/resource/scandinavian/SyntaxScand.gf @@ -575,7 +575,8 @@ oper predVerb0 : Verb -> Clause = \regna -> predVerbGroupClause npDet (predVerb regna) ; - progressiveVerbPhrase : VerbGroup -> VerbGroup ; + progressiveVerbPhrase : VerbGroup -> VerbGroup ; + progressiveClause : NounPhrase -> VerbPhrase -> Clause ; -- Verb phrases can also be formed from adjectives ("är snäll"), -- common nouns ("är en man"), and noun phrases ("är den yngste mannen"). diff --git a/lib/resource/swedish/SyntaxSwe.gf b/lib/resource/swedish/SyntaxSwe.gf index 5ac4eec5b..7dbd17369 100644 --- a/lib/resource/swedish/SyntaxSwe.gf +++ b/lib/resource/swedish/SyntaxSwe.gf @@ -121,6 +121,13 @@ instance SyntaxSwe of SyntaxScand = TypesSwe ** {s3 = ["på att"]}) (predVerbGroup True Simul verb) ; + progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp -> + predVerbGroupClause np + (complVerbVerb + (mkVerb "hålla" "håller" "håll" "höll" "hållit" "hållen" ** + {s3 = ["på att"]}) + vp) ; + strPrep : ComplPrep -> Str = \p -> case p of { CPnoPrep => [] ; CPav => "av" ;