From 56c50bfb39eb0adcc3cafeb66796d15114c73ae6 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 26 Sep 2014 06:44:03 +0000 Subject: [PATCH] more verb constructions in Translate (Eng,Swe,Fin): without moving, by moving, in order to move --- lib/src/translator/Extensions.gf | 4 ++++ lib/src/translator/ExtensionsEng.gf | 8 +++++++- lib/src/translator/ExtensionsFin.gf | 6 ++++++ lib/src/translator/ExtensionsIta.gf | 1 + lib/src/translator/ExtensionsSwe.gf | 12 ++++++++++++ lib/src/translator/Translate.gf | 1 + lib/src/translator/TranslateEng.gf | 6 ++++-- lib/src/translator/TranslateFin.gf | 7 ++++--- lib/src/translator/TranslateIta.gf | 6 +++++- lib/src/translator/TranslateSwe.gf | 8 +++++--- 10 files changed, 49 insertions(+), 10 deletions(-) diff --git a/lib/src/translator/Extensions.gf b/lib/src/translator/Extensions.gf index fa39585f0..3198ad38f 100644 --- a/lib/src/translator/Extensions.gf +++ b/lib/src/translator/Extensions.gf @@ -54,6 +54,10 @@ fun GerundNP : VP -> NP ; -- publishing the document (by nature definite) GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb) + WithoutVP : VP -> Adv ; -- without publishing the document + ByVP : VP -> Adv ; -- by publishing the document + InOrderToVP : VP -> Adv ; -- (in order) to publish the document + PresPartAP : VP -> AP ; -- sleeping (man), (man) sleeping in the car PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space diff --git a/lib/src/translator/ExtensionsEng.gf b/lib/src/translator/ExtensionsEng.gf index 37c94032a..ea4a60ec2 100644 --- a/lib/src/translator/ExtensionsEng.gf +++ b/lib/src/translator/ExtensionsEng.gf @@ -62,7 +62,7 @@ lin } ; GerundNP vp = - let a = AgP3Sg Neutr + let a = AgP3Sg Neutr ---- agr in {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ++ vp.ext ; a = a} ; @@ -71,6 +71,12 @@ lin in {s = vp.ad ! a ++ vp.prp ++ vp.s2 ! a ++ vp.ext} ; + WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ; + + InOrderToVP vp = {s = ("in order" | []) ++ infVP VVInf vp Simul CPos (AgP3Sg Neutr)} ; + + ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ; + PresPartAP = E.PartVP ; PastPartAP vp = { diff --git a/lib/src/translator/ExtensionsFin.gf b/lib/src/translator/ExtensionsFin.gf index 5401c69f3..65e5efe07 100644 --- a/lib/src/translator/ExtensionsFin.gf +++ b/lib/src/translator/ExtensionsFin.gf @@ -83,6 +83,12 @@ lin GerundAdv vp = {s = (sverb2verbSep vp.s).s ! Inf Inf2Instr ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkuen + WithoutVP vp = {s = (sverb2verbSep vp.s).s ! Inf Inf3Abess ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkumatta + InOrderToVP vp = { + s = (sverb2verbSep vp.s).s ! Inf Inf1Long ++ Predef.BIND ++ "en" ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext + } ; -- nukkuakseen --- agr + ByVP vp = {s = (sverb2verbSep vp.s).s ! Inf Inf3Adess ++ vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ vp.ext} ; -- nukkumalla + -- tänään löydetty PastPartAP vp = {s = \\_,f => vp.s2 ! True ! Pos ! agrP3 Sg ++ vp.adv ! Pos ++ (sverb2verbSep vp.s).s ! PastPartPass (AN f) ++ vp.ext} ; diff --git a/lib/src/translator/ExtensionsIta.gf b/lib/src/translator/ExtensionsIta.gf index 869cf2308..8c79c86cc 100644 --- a/lib/src/translator/ExtensionsIta.gf +++ b/lib/src/translator/ExtensionsIta.gf @@ -58,6 +58,7 @@ lin isPre = False } ; +-- infVP : VP -> Agr -> Str = \vp,agr -> {- GerundN v = { diff --git a/lib/src/translator/ExtensionsSwe.gf b/lib/src/translator/ExtensionsSwe.gf index 6c72c37b0..fcaf1f724 100644 --- a/lib/src/translator/ExtensionsSwe.gf +++ b/lib/src/translator/ExtensionsSwe.gf @@ -56,6 +56,18 @@ lin s = partVPPlusPost vp (PartPres Sg Indef (Nom|Gen)) {g = Utr ; n = Sg ; p = P3} Pos -- sovande(s) i sängen } ; + WithoutVP vp = { -- utan att dricka öl, utan att vara glad + s = "utan att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} + } ; + + InOrderToVP vp = { -- för att dricka öl, för att vara glad + s = "för att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} + } ; + + ByVP vp = { -- genom att dricka öl, genom att vara glad + s = "för att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} + } ; + PresPartAP vp = { s = \\af => partVPPlus vp (PartPres Sg Indef Nom) (aformpos2agr af) Pos ; isPre = True diff --git a/lib/src/translator/Translate.gf b/lib/src/translator/Translate.gf index 175c3d983..50e56b3f8 100644 --- a/lib/src/translator/Translate.gf +++ b/lib/src/translator/Translate.gf @@ -27,6 +27,7 @@ abstract Translate = CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, DirectComplVS, DirectComplVQ, FocusObjS , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv ---- not yet available for all languages + , WithoutVP, InOrderToVP, ByVP ], Dictionary, Documentation diff --git a/lib/src/translator/TranslateEng.gf b/lib/src/translator/TranslateEng.gf index b06fb310f..164bc94b5 100644 --- a/lib/src/translator/TranslateEng.gf +++ b/lib/src/translator/TranslateEng.gf @@ -34,9 +34,11 @@ concrete TranslateEng of Translate = DocumentationEng, ChunkEng, - ExtensionsEng [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, - DirectComplVS, DirectComplVQ, FocusObjS + ExtensionsEng [ + CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP + , DirectComplVS, DirectComplVQ, FocusObjS , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv + , WithoutVP, InOrderToVP, ByVP ], DictionaryEng ** open MorphoEng, ResEng, ParadigmsEng, (G = GrammarEng), (E = ExtraEng), Prelude in { diff --git a/lib/src/translator/TranslateFin.gf b/lib/src/translator/TranslateFin.gf index 9e97551be..cc117e6b3 100644 --- a/lib/src/translator/TranslateFin.gf +++ b/lib/src/translator/TranslateFin.gf @@ -28,9 +28,10 @@ concrete TranslateFin of Translate = ChunkFin, ExtensionsFin [ - CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, - DirectComplVS, DirectComplVQ, FocusObjS - ,PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv + CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, + DirectComplVS, DirectComplVQ, FocusObjS + , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv + , WithoutVP, InOrderToVP, ByVP ], DictionaryFin ** diff --git a/lib/src/translator/TranslateIta.gf b/lib/src/translator/TranslateIta.gf index cc101666e..8e52784dc 100644 --- a/lib/src/translator/TranslateIta.gf +++ b/lib/src/translator/TranslateIta.gf @@ -25,7 +25,11 @@ concrete TranslateIta of Translate = DocumentationIta, ChunkIta, - ExtensionsIta [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP], + ExtensionsIta [ + CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP + , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv +---- , WithoutVP, InOrderToVP, ByVP + ], DictionaryIta ** open MorphoIta, ResIta, ParadigmsIta, SyntaxIta, (E = ExtraIta), (G = GrammarIta), Prelude in { diff --git a/lib/src/translator/TranslateSwe.gf b/lib/src/translator/TranslateSwe.gf index 041e54fad..0ee444b7d 100644 --- a/lib/src/translator/TranslateSwe.gf +++ b/lib/src/translator/TranslateSwe.gf @@ -23,9 +23,11 @@ concrete TranslateSwe of Translate = DocumentationSwe, ChunkSwe, - ExtensionsSwe [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP, - DirectComplVS, DirectComplVQ, FocusObjS - ,PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv + ExtensionsSwe [ + CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP + , DirectComplVS, DirectComplVQ, FocusObjS + , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv + , WithoutVP, InOrderToVP, ByVP ], DictionarySwe **