From b57e5dcc12da696ee7b98e2b8c41f24cde42cba0 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 22 May 2015 11:31:57 +0000 Subject: [PATCH] fixed the word order of Scand discontious conjunctions: antinger jag vinner eller... -> antingen vinner jag eller... --- lib/src/chinese/StructuralChi.gf | 4 ++-- lib/src/danish/StructuralDan.gf | 8 ++++---- lib/src/norwegian/StructuralNor.gf | 8 ++++---- lib/src/scandinavian/CatScand.gf | 2 +- lib/src/scandinavian/ConjunctionScand.gf | 7 +++++-- lib/src/swedish/MakeStructuralSwe.gf | 6 ++++-- lib/src/swedish/StructuralSwe.gf | 10 +++++----- lib/src/translator/DictionarySwe.gf | 4 ++-- 8 files changed, 27 insertions(+), 22 deletions(-) diff --git a/lib/src/chinese/StructuralChi.gf b/lib/src/chinese/StructuralChi.gf index 0bb8ebcae..bf959abba 100644 --- a/lib/src/chinese/StructuralChi.gf +++ b/lib/src/chinese/StructuralChi.gf @@ -23,8 +23,8 @@ lin -- in_Prep = mkPrep "里" []; --- in Paris in_Prep = mkPrep "在" "中" ; --- in the house, the car, etc possess_Prep = mkPrep [] "的" ATPoss ; - with_Prep = mkPrep "和" "一起" ; ----- with_Prep = mkPrep [] "和"; -- an alternative for some uses + with_Prep = mkPrep "和" "一起" (ATPlace True) ; -- "with you" +---- with_Prep = mkPrep "和" [] ; -- "with bread" and_Conj = {s = table { CPhr CNPhrase => mkConjForm "和" ; diff --git a/lib/src/danish/StructuralDan.gf b/lib/src/danish/StructuralDan.gf index 64438e161..7bbcae8e0 100644 --- a/lib/src/danish/StructuralDan.gf +++ b/lib/src/danish/StructuralDan.gf @@ -12,19 +12,19 @@ concrete StructuralDan of Structural = CatDan ** almost_AdA, almost_AdN = ss "næsten" ; although_Subj = ss ["selv om"] ; always_AdV = ss "altid" ; - and_Conj = {s1 = [] ; s2 = "og" ; n = Pl} ; + and_Conj = {s1 = [] ; s2 = "og" ; n = Pl ; isDiscont = False} ; because_Subj = ss "fordi" ; before_Prep = ss "før" ; behind_Prep = ss "bag" ; between_Prep = ss "mellem" ; - both7and_DConj = sd2 "både" "og" ** {n = Pl} ; + both7and_DConj = sd2 "både" "og" ** {n = Pl ; isDiscont = True} ; but_PConj = ss "men" ; by8means_Prep = ss "med" ; can8know_VV, can_VV = mkV "kunne" "kan" "kan" "kunne" "kunnet" "kan" ** {c2 = mkComplement [] ; lock_VV = <>} ; during_Prep = ss "under" ; - either7or_DConj = sd2 "enten" "eller" ** {n = Sg} ; + either7or_DConj = sd2 "enten" "eller" ** {n = Sg ; isDiscont = True} ; everybody_NP = regNP "alle" "alles" Utr Pl ; every_Det = {s = \\_,_ => "hver" ; sp = \\_,_ => "enhver" ; n = Sg ; det = DDef Indef} ; everything_NP = regNP "alt" "alts" Neutr Sg ; @@ -56,7 +56,7 @@ concrete StructuralDan of Structural = CatDan ** no_Utt = ss ["nej"] ; on_Prep = ss "på" ; only_Predet = {s = \\_,_ => "kun" ; p = [] ; a = PNoAg} ; - or_Conj = {s1 = [] ; s2 = "eller" ; n = Pl} ; + or_Conj = {s1 = [] ; s2 = "eller" ; n = Pl ; isDiscont = False} ; otherwise_PConj = ss "anderledes" ; part_Prep = ss "af" ; please_Voc = ss "tak" ; --- diff --git a/lib/src/norwegian/StructuralNor.gf b/lib/src/norwegian/StructuralNor.gf index 810b2e3e9..a65cd9bb3 100644 --- a/lib/src/norwegian/StructuralNor.gf +++ b/lib/src/norwegian/StructuralNor.gf @@ -12,19 +12,19 @@ concrete StructuralNor of Structural = CatNor ** almost_AdA, almost_AdN = ss "nesten" ; although_Subj = ss ["selv om"] ; always_AdV = ss "altid" ; - and_Conj = {s1 = [] ; s2 = "og" ; n = Pl} ; + and_Conj = {s1 = [] ; s2 = "og" ; n = Pl ; isDiscont = False} ; because_Subj = ss "fordi" ; before_Prep = ss "før" ; behind_Prep = ss "bakom" ; between_Prep = ss "mellom" ; - both7and_DConj = sd2 "både" "og" ** {n = Pl} ; + both7and_DConj = sd2 "både" "og" ** {n = Pl ; isDiscont = True} ; but_PConj = ss "men" ; by8means_Prep = ss "med" ; can8know_VV, can_VV = mkV "kunne" "kan" "kunn" "kunne" "kunnet" "kunnen" ** {c2 = mkComplement [] ; lock_VV = <>} ; during_Prep = ss "under" ; - either7or_DConj = sd2 "enten" "eller" ** {n = Sg} ; + either7or_DConj = sd2 "enten" "eller" ** {n = Sg ; isDiscont = True} ; everybody_NP = regNP "alle" "alles" Utr Pl ; every_Det = {s = \\_,_ => "hver" ; sp = \\_,_ =>"enhver" ; n = Sg ; det = DDef Indef} ; everything_NP = regNP "alt" "alts" Neutr Sg ; @@ -58,7 +58,7 @@ concrete StructuralNor of Structural = CatNor ** on_Prep = ss "på" ; only_Predet = {s = \\_,_ => "kun" ; p = [] ; a = PNoAg} ; - or_Conj = {s1 = [] ; s2 = "eller" ; n = Pl} ; + or_Conj = {s1 = [] ; s2 = "eller" ; n = Pl ; isDiscont = False} ; otherwise_PConj = ss "annarledes" ; part_Prep = ss "av" ; please_Voc = ss "takk" ; --- diff --git a/lib/src/scandinavian/CatScand.gf b/lib/src/scandinavian/CatScand.gf index 2dcdb3008..0e50038f6 100644 --- a/lib/src/scandinavian/CatScand.gf +++ b/lib/src/scandinavian/CatScand.gf @@ -85,7 +85,7 @@ incomplete concrete CatScand of Cat = -- Structural - Conj = {s1,s2 : Str ; n : Number} ; + Conj = {s1,s2 : Str ; n : Number ; isDiscont : Bool} ; -- isDiscont: there is an adverb: antingen vinner jag eller du vinner Subj = {s : Str} ; Prep = {s : Str} ; diff --git a/lib/src/scandinavian/ConjunctionScand.gf b/lib/src/scandinavian/ConjunctionScand.gf index 68a366790..3df83e0e7 100644 --- a/lib/src/scandinavian/ConjunctionScand.gf +++ b/lib/src/scandinavian/ConjunctionScand.gf @@ -5,7 +5,10 @@ incomplete concrete ConjunctionScand of Conjunction = lin - ConjS conj ss = conjunctDistrTable Order conj ss ; + ConjS conj ss = { + s = \\p => let o : Order = case conj.isDiscont of {True => Inv ; _ => p} + in conj.s1 ++ ss.s1 ! o ++ conj.s2 ++ ss.s2 ! p ; + } ; ConjAdv conj ss = conjunctDistrSS conj ss ; @@ -40,7 +43,7 @@ incomplete concrete ConjunctionScand of Conjunction = s2 = table {Inv => y.s ! Main ; o => y.s ! o} } ; ConsS x xs = { -- consrTable Order comma ; - s1 = \\o => x.s ! Inv ++ comma ++ xs.s1 ! case o of {Inv => Main ; _ => o} ; + s1 = \\o => x.s ! o ++ comma ++ xs.s1 ! case o of {Inv => Main ; _ => o} ; s2 = xs.s2 } ; BaseAdv = twoSS ; diff --git a/lib/src/swedish/MakeStructuralSwe.gf b/lib/src/swedish/MakeStructuralSwe.gf index f679d2f95..469823565 100644 --- a/lib/src/swedish/MakeStructuralSwe.gf +++ b/lib/src/swedish/MakeStructuralSwe.gf @@ -6,9 +6,11 @@ resource MakeStructuralSwe = open CatSwe, oper mkConj = overload { mkConj : Str -> Conj - = \s -> lin Conj {s1 = [] ; s2 = s ; n = P.plural} ; + = \s -> lin Conj {s1 = [] ; s2 = s ; n = P.plural ; isDiscont = False} ; mkConj : Str -> Str -> P.Number -> Conj - = \x,y,n -> {s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ; + = \x,y,n -> lin Conj {s1 = x ; s2 = y ; n = n ; isDiscont = False} ; + mkConj : Str -> Str -> P.Number -> Bool -> Conj + = \x,y,n,d -> lin Conj {s1 = x ; s2 = y ; n = n ; isDiscont = d} ; } ; mkSubj : Str -> Subj diff --git a/lib/src/swedish/StructuralSwe.gf b/lib/src/swedish/StructuralSwe.gf index 48e34fc49..ecf80501e 100644 --- a/lib/src/swedish/StructuralSwe.gf +++ b/lib/src/swedish/StructuralSwe.gf @@ -13,19 +13,19 @@ concrete StructuralSwe of Structural = CatSwe ** almost_AdA, almost_AdN = ss "nästan" ; although_Subj = ss "fast" ; always_AdV = ss "alltid" ; - and_Conj = {s1 = [] ; s2 = "och" ; n = Pl} ; + and_Conj = {s1 = [] ; s2 = "och" ; n = Pl ; isDiscont = False} ; because_Subj = ss "eftersom" ; before_Prep = ss "före" ; behind_Prep = ss "bakom" ; between_Prep = ss "mellan" ; - both7and_DConj = sd2 "både" "och" ** {n = Pl} ; + both7and_DConj = sd2 "både" "och" ** {n = Pl ; isDiscont = True} ; but_PConj = ss "men" ; by8means_Prep = ss "med" ; can8know_VV, can_VV = mkV "kunna" "kan" "kunn" "kunde" "kunnat" "kunnen" ** {c2 = mkComplement [] ; lock_VV = <>} ; during_Prep = ss "under" ; - either7or_DConj = sd2 "antingen" "eller" ** {n = Sg} ; + either7or_DConj = sd2 "antingen" "eller" ** {n = Sg ; isDiscont = True} ; everybody_NP = regNP "alla" "allas" Utr Pl ; every_Det = { s = \\_,_ => "varje" ; @@ -63,7 +63,7 @@ concrete StructuralSwe of Structural = CatSwe ** on_Prep = ss "på" ; --- one_Quant = {s = \\_,_ => genderForms ["en"] ["ett"] ; n = Sg ; det = DIndef} ; only_Predet = {s = \\_,_ => "bara" ; p = [] ; a = PNoAg} ; - or_Conj = {s1 = [] ; s2 = "eller" ; n = Sg} ; + or_Conj = {s1 = [] ; s2 = "eller" ; n = Sg ; isDiscont = False} ; otherwise_PConj = ss "annars" ; part_Prep = ss "av" ; please_Voc = ss "tack" ; --- @@ -142,7 +142,7 @@ lin det = DIndef } ; - if_then_Conj = {s1 = "om" ; s2 = "så" ; n = singular} ; + if_then_Conj = {s1 = "om" ; s2 = "så" ; n = singular ; isDiscont = False} ; ---- nobody_NP = regNP "ingen" "ingens" Utr Sg ; nothing_NP = regNP "inget" "ingets" Neutr Sg ; diff --git a/lib/src/translator/DictionarySwe.gf b/lib/src/translator/DictionarySwe.gf index ca5e10f54..45d0ca284 100644 --- a/lib/src/translator/DictionarySwe.gf +++ b/lib/src/translator/DictionarySwe.gf @@ -37206,7 +37206,7 @@ lin neighbouring_A = variants {} ; -- lin neighbourliness_N = mkN "grannsämja" ; lin neighbourly_A = variants {} ; -- status=guess lin neil_PN = mkPN "Neil" ; -- src=eng status=guess -lin neither7nor_DConj = M.mkConj "varken" "eller" singular ; -- status=guess +lin neither7nor_DConj = M.mkConj "varken" "eller" singular True ; -- status=guess lin neither_A = variants {} ; -- status=guess lin neither_Adv = mkAdv "varken" ; -- comment=2 lin neither_Det = M.mkDet "ingendera" | M.mkDet "ingen av" ; -- status=guess status=guess @@ -38023,7 +38023,7 @@ lin nor'_nor'_west_Adv = variants {} ; -- status=guess lin nor'_nor'_west_N = variants {} ; -- status=guess lin nor'_west_Adv = variants {} ; -- status=guess lin nor'_west_N = variants {} ; -- status=guess -lin nor_Conj = M.mkConj "inte heller" ; ---- not the same as in neither-nor +lin nor_Conj = M.mkConj [] "och inte heller" singular True ; ---- not the same as in neither-nor lin nora_PN = mkPN "Nora" neutrum ; -- src=geonames status=guess lin noradrenaline_N = mkN "noradrenalin" "noradrenaliner" ; lin nordic_A = compoundA (mkA "nordisk") ;