From 3ff57f6184963acde7f3cc2dcf0638c0e819929a Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 15 Nov 2008 11:19:10 +0000 Subject: [PATCH] comparative adverbs generalized to cover more of Attempto --- examples/attempto/Attempto.gf | 14 +++++++------- examples/attempto/AttemptoI.gf | 17 +++++++---------- examples/attempto/LexAttemptoEng.gf | 10 +++++----- examples/attempto/TestAttempto.gf | 4 ++-- examples/attempto/TestAttemptoEng.gf | 4 ++-- examples/attempto/TestAttemptoFre.gf | 4 ++-- examples/attempto/TestAttemptoGer.gf | 4 ++-- examples/attempto/TestAttemptoSwe.gf | 4 ++-- next-lib/src/abstract/Adjective.gf | 1 + next-lib/src/abstract/Sentence.gf | 5 +++++ next-lib/src/abstract/Structural.gf | 2 ++ next-lib/src/api/Constructors.gf | 11 ++++++++--- next-lib/src/catalan/StructuralCat.gf | 6 +++--- next-lib/src/common/CommonX.gf | 2 +- next-lib/src/common/ConstructX.gf | 2 +- next-lib/src/english/AdjectiveEng.gf | 4 ++++ next-lib/src/english/AdverbEng.gf | 7 +++---- next-lib/src/english/LexiconEng.gf | 8 ++++---- next-lib/src/english/MakeStructuralEng.gf | 4 +++- next-lib/src/english/StructuralEng.gf | 9 ++++++--- next-lib/src/finnish/AdjectiveFin.gf | 3 +++ next-lib/src/finnish/AdverbFin.gf | 4 ++-- next-lib/src/finnish/StructuralFin.gf | 7 ++++--- next-lib/src/french/StructuralFre.gf | 8 +++++--- next-lib/src/german/AdjectiveGer.gf | 4 ++++ next-lib/src/german/AdverbGer.gf | 4 ++-- next-lib/src/german/StructuralGer.gf | 9 ++++++--- next-lib/src/italian/StructuralIta.gf | 7 ++++--- next-lib/src/romance/AdjectiveRomance.gf | 4 ++++ next-lib/src/romance/AdverbRomance.gf | 4 ++-- next-lib/src/scandinavian/AdjectiveScand.gf | 5 +++++ next-lib/src/scandinavian/AdverbScand.gf | 4 ++-- next-lib/src/spanish/StructuralSpa.gf | 8 +++++--- next-lib/src/swedish/StructuralSwe.gf | 9 ++++++--- 34 files changed, 124 insertions(+), 78 deletions(-) diff --git a/examples/attempto/Attempto.gf b/examples/attempto/Attempto.gf index 546e525eb..9e9051df4 100644 --- a/examples/attempto/Attempto.gf +++ b/examples/attempto/Attempto.gf @@ -16,6 +16,7 @@ cat Prep ; cat S ; cat VP ; cat V ; +cat VS ; cat V2 ; cat V3 ; cat Adv ; @@ -86,6 +87,7 @@ fun they_NP : NP ; fun somebody_NP : NP ; fun something_NP : NP ; --fun noone_NP : NP ; +fun nobody_NP : NP ; fun nothing_NP : NP ; --fun not_everyoneNP : NP ; fun not_everybodyNP : NP ; @@ -150,17 +152,17 @@ fun neg_vpS : NP -> VP -> S ; fun not_provably_vpS : NP -> VP -> S ; fun vVP : V -> VP ; +fun vsVP : VS -> S -> VP ; fun v2VP : V2 -> NP -> VP ; fun v3VP : V3 -> NP -> NP -> VP ; -- 2.3.2 -fun apVP : AP -> VP ; -fun compVP : A -> NP -> VP ; -- John is richer than Mary -fun as_asVP : A -> NP -> VP ; -- John is as rich as Mary +fun apVP : AP -> VP ; +fun compVP : A -> NP -> VP ; -- John is richer than Mary +fun as_asVP : AP -> NP -> VP ; -- John is as rich as Mary +fun more_thanVP : AP -> NP -> VP ; -- John is as rich as Mary --- John is as fond-of Mary as Bill --- John is more fond-of Mary than Bill -- John is as fond-of Mary as of Sue -- John is more fond-of Mary than of Sue @@ -213,8 +215,6 @@ fun not_possibleS : S -> S ; fun necessaryS : S -> S ; fun not_necessaryS : S -> S ; -fun thatS : S -> S -> S ; - -- 3.5 fun npQS : NP -> VP -> QS ; diff --git a/examples/attempto/AttemptoI.gf b/examples/attempto/AttemptoI.gf index 1841cd197..8d67e6c79 100644 --- a/examples/attempto/AttemptoI.gf +++ b/examples/attempto/AttemptoI.gf @@ -18,6 +18,7 @@ lincat Prep = Syntax.Prep ; lincat S = Syntax.S ; lincat VP = Syntax.VP ; lincat V = Syntax.V ; +lincat VS = Syntax.VS ; lincat V2 = Syntax.V2 ; lincat V3 = Syntax.V3 ; lincat Adv = Syntax.Adv ; @@ -118,8 +119,7 @@ lin superlAP a = mkAP (mkOrd a) ; -- 2.2.2 lin relCN = mkCN ; ---lin relNP = mkNP ; - +lin relNP = mkNP ; lin andRS = mkRS and_Conj ; lin orRS = mkRS or_Conj ; @@ -145,6 +145,7 @@ lin neg_vpS np vp = mkS negativePol (mkCl np vp) ; lin not_provably_vpS np vp = mkS negativePol (mkCl np (mkVP vp provably_Adv)) ; lin vVP = mkVP ; +lin vsVP = mkVP ; lin v2VP = mkVP ; lin v3VP = mkVP ; @@ -152,13 +153,11 @@ lin v3VP = mkVP ; lin apVP = mkVP ; lin compVP a np = mkVP (mkAP a np) ; ---lin as_asVP : A -> NP -> S ; -- John is as rich as Mary - --- John is as fond-of Mary as Bill --- John is more fond-of Mary than Bill --- John is as fond-of Mary as of Sue --- John is more fond-of Mary than of Sue +lin as_asVP ap np = mkVP (mkAP as_CAdv ap np) ; -- John is as rich as Mary +lin more_thanVP ap np = mkVP (mkAP more_CAdv ap np) ; +---- John is as fond-of Mary as of Sue +---- John is more fond-of Mary than of Sue lincat PP = Adv ; lincat [PP] = Adv ; @@ -222,8 +221,6 @@ lin necessaryS s = mkS (adj_thatCl necessary_A s) ; lin not_necessaryS s = mkS negativePol (adj_thatCl necessary_A s) ; ---lin thatS s t = mkS s (mkAdv that_Subj t) ; - -- 3.5 lin npQS np vp = mkQS (mkCl np vp) ; diff --git a/examples/attempto/LexAttemptoEng.gf b/examples/attempto/LexAttemptoEng.gf index 65ed0aa28..395e00c35 100644 --- a/examples/attempto/LexAttemptoEng.gf +++ b/examples/attempto/LexAttemptoEng.gf @@ -4,7 +4,7 @@ instance LexAttemptoEng of LexAttempto = SyntaxEng, ParadigmsEng, ConstructX, - MakeStructuralEng, + (M = MakeStructuralEng), IrregEng in { oper @@ -23,11 +23,11 @@ oper each_Det = ExtraEng.each_Det ; - that_Subj = mkSubj "that" ; + that_Subj = M.mkSubj "that" ; - comma_and_Conj = mkConj [] ", and" plural ; - comma_or_Conj = mkConj [] ", or" singular ; - slash_Conj = mkConj [] "/" singular ; + comma_and_Conj = M.mkConj [] ", and" plural ; + comma_or_Conj = M.mkConj [] ", or" singular ; + slash_Conj = M.mkConj [] "/" singular ; } diff --git a/examples/attempto/TestAttempto.gf b/examples/attempto/TestAttempto.gf index ad76f4d15..1b953ed2d 100644 --- a/examples/attempto/TestAttempto.gf +++ b/examples/attempto/TestAttempto.gf @@ -51,7 +51,7 @@ fun course_N : CN ; carefully_Adv : Adv ; time_N : CN ; - believe_V : V ; + believe_VS : VS ; seriously_Adv : Adv ; clerk_N : CN ; screen_N : CN ; @@ -62,7 +62,7 @@ fun reject_V2 : V2 ; accept_V2 : V2 ; type_V2 : V2 ; - know_V : V ; + know_VS : VS ; manager_N : CN ; oversleep_V : V ; valid_A : A ; diff --git a/examples/attempto/TestAttemptoEng.gf b/examples/attempto/TestAttemptoEng.gf index 2cf864744..9da59ff12 100644 --- a/examples/attempto/TestAttemptoEng.gf +++ b/examples/attempto/TestAttemptoEng.gf @@ -53,7 +53,7 @@ lin patiently_Adv = mkAdv "patiently" ; lin course_N = mkkN "course" ; lin carefully_Adv = mkAdv "carefully" ; lin time_N = mkkN "time" ; -lin believe_V = mkV "believe" ; +lin believe_VS = mkVS (mkV "believe") ; lin seriously_Adv = mkAdv "seriously" ; lin clerk_N = mkkN "clerk" ; lin screen_N = mkkN "screen" ; @@ -64,7 +64,7 @@ lin automated_teller_N = mkkN "automated" ; lin reject_V2 = mkV2 "reject" ; lin accept_V2 = mkV2 "accept" ; lin type_V2 = mkV2 "type" ; -lin know_V = IrregEng.know_V ; +lin know_VS = mkVS IrregEng.know_V ; lin manager_N = mkkN "manager" ; lin oversleep_V = mkV "oversleep" "overslept" "overslept" ; lin valid_A = mkA "valid" ; diff --git a/examples/attempto/TestAttemptoFre.gf b/examples/attempto/TestAttemptoFre.gf index d8e281083..3c2f0fcdd 100644 --- a/examples/attempto/TestAttemptoFre.gf +++ b/examples/attempto/TestAttemptoFre.gf @@ -52,7 +52,7 @@ lin patiently_Adv = mkAdv "patiemment" ; lin course_N = mkkN "cours" ; lin carefully_Adv = mkAdv "soigneusement" ; lin time_N = mkkN "temps" ; -lin believe_V = mkV croire_V2 ; +lin believe_VS = mkVS (mkV croire_V2) ; lin seriously_Adv = mkAdv "sérieusement" ; lin clerk_N = mkkN "employé" ; lin screen_N = mkkN "écran" ; @@ -63,7 +63,7 @@ lin automated_teller_N = mkgN "automate" masculine ; lin reject_V2 = mkV2 "rejeter" ; lin accept_V2 = mkV2 "accepter" ; lin type_V2 = mkV2 "taper" ; -lin know_V = mkV savoir_V2 ; +lin know_VS = mkVS (mkV savoir_V2) ; lin manager_N = mkkN "directeur" ; lin oversleep_V = mkV dormir_V2 ; ---- lin valid_A = mkA "valide" ; diff --git a/examples/attempto/TestAttemptoGer.gf b/examples/attempto/TestAttemptoGer.gf index 4f1092e3e..5f47dc9e5 100644 --- a/examples/attempto/TestAttemptoGer.gf +++ b/examples/attempto/TestAttemptoGer.gf @@ -52,7 +52,7 @@ lin patiently_Adv = mkAdv "geduldig" ; lin course_N = mkkN "Kurse" ; ---- lin carefully_Adv = mkAdv "vorsichtig" ; lin time_N = mkgN "Zeit" "Zeiten" feminine ; -lin believe_V = mkV "glauben" ; +lin believe_VS = mkVS (mkV "glauben") ; lin seriously_Adv = mkAdv "seriös" ; ---- lin clerk_N = mkgN "Angestellt" "Angestellten" masculine ; ---- lin screen_N = mkgN "Schirm" "Schirme" masculine ; @@ -63,7 +63,7 @@ lin automated_teller_N = mkgN "Automat" "Automate" neuter ; lin reject_V2 = mkV2 (mkV "verwerfen" "verwirft" "verwarf" "verwürfe" "verworfen") ; lin accept_V2 = mkV2 (mkV "an" nehmen_V) ; lin type_V2 = mkV2 schreiben_V ; -lin know_V = wissen_V ; +lin know_VS = mkVS wissen_V ; lin manager_N = mkgN "Manager" "Manager" masculine ; ---- lin oversleep_V = schlafen_V ; ---- lin valid_A = mkA "gültig" ; diff --git a/examples/attempto/TestAttemptoSwe.gf b/examples/attempto/TestAttemptoSwe.gf index 21b1d8b37..c6e7698e6 100644 --- a/examples/attempto/TestAttemptoSwe.gf +++ b/examples/attempto/TestAttemptoSwe.gf @@ -52,7 +52,7 @@ lin patiently_Adv = mkAdv "t lin course_N = mkCN (mkN "kurs" "kurser") ; lin carefully_Adv = mkAdv "försiktigt" ; lin time_N = mkCN (mkN "tid" "tider") ; -lin believe_V = mkV "tro" ; +lin believe_VS = mkVS (mkV "tro") ; lin seriously_Adv = mkAdv "seriöst" ; lin clerk_N = mkCN (mkN "kontorist" "kontorister") ; lin screen_N = mkkN "skärm" neutrum ; @@ -63,7 +63,7 @@ lin automated_teller_N = mkCN (mkN "automat" "automater") ; lin reject_V2 = mkV2 "förkasta" ; lin accept_V2 = mkV2 "acceptera" ; lin type_V2 = mkV2 skriva_V ; ---- -lin know_V = veta_V ; +lin know_VS = mkVS veta_V ; lin manager_N = mkCN (mkN "chef" "chefer") ; lin oversleep_V = mkV "försova" "försov" "försovit" ; lin valid_A = mkA "giltig" ; diff --git a/next-lib/src/abstract/Adjective.gf b/next-lib/src/abstract/Adjective.gf index b934dfa82..d8fe2d9ac 100644 --- a/next-lib/src/abstract/Adjective.gf +++ b/next-lib/src/abstract/Adjective.gf @@ -14,6 +14,7 @@ abstract Adjective = Cat ** { ReflA2 : A2 -> AP ; -- married to itself UseA2 : A2 -> AP ; -- married UseComparA : A -> AP ; -- warmer + CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John -- The superlative use is covered in $Ord$. diff --git a/next-lib/src/abstract/Sentence.gf b/next-lib/src/abstract/Sentence.gf index a7661ae7a..903567ea1 100644 --- a/next-lib/src/abstract/Sentence.gf +++ b/next-lib/src/abstract/Sentence.gf @@ -70,6 +70,11 @@ abstract Sentence = Cat ** { RelS : S -> RS -> S ; -- she sleeps, which is good +---- A sentence can also be post-modified by a subjunct sentence. + +---- ModSubjS : S -> Subj -> S -> S ; -- she sleeps, because she is old +---- cf. Adverb.SubjS + } --. diff --git a/next-lib/src/abstract/Structural.gf b/next-lib/src/abstract/Structural.gf index 1c952a4b7..57cb6453e 100644 --- a/next-lib/src/abstract/Structural.gf +++ b/next-lib/src/abstract/Structural.gf @@ -117,4 +117,6 @@ abstract Structural = Cat ** { nothing_NP : NP ; except_Prep : Prep ; + as_CAdv : CAdv ; + } diff --git a/next-lib/src/api/Constructors.gf b/next-lib/src/api/Constructors.gf index 4c3e91c38..305c30c6d 100644 --- a/next-lib/src/api/Constructors.gf +++ b/next-lib/src/api/Constructors.gf @@ -389,12 +389,13 @@ incomplete resource Constructors = open Grammar in { mkNP : Predet -> NP -> NP ; -- 21. only John mkNP : NP -> V2 -> NP ; -- 22. John killed mkNP : NP -> Adv -> NP ; -- 23. John in Paris + mkNP : NP -> RS -> NP ; -- 24. John, who lives in Paris -- A conjunction can be formed both from two noun phrases and a longer -- list of them. - mkNP : Conj -> NP -> NP -> NP ; -- 22. John and I - mkNP : Conj -> ListNP -> NP ; -- 23. John, I, and that + mkNP : Conj -> NP -> NP -> NP ; -- 25. John and I + mkNP : Conj -> ListNP -> NP ; -- 26. John, I, and that } ; @@ -614,6 +615,7 @@ incomplete resource Constructors = open Grammar in { mkAP : Conj -> ListAP -> AP ; -- 11. old, big, and warm mkAP : Ord -> AP ; -- 12. oldest + mkAP : CAdv -> AP -> NP -> AP ; -- 13. as old as John } ; reflAP : A2 -> AP ; -- married to himself @@ -894,7 +896,8 @@ incomplete resource Constructors = open Grammar in { = \c,xy -> ConjAP c xy ; mkAP : Ord -> AP = AdjOrd ; - + mkAP : CAdv -> AP -> NP -> AP + = CAdvAP ; } ; reflAP = ReflA2 ; @@ -1055,6 +1058,8 @@ incomplete resource Constructors = open Grammar in { = PPartNP ; mkNP : NP -> Adv -> NP -- Paris at midnight = AdvNP ; + mkNP : NP -> RS -> NP + = RelNP ; mkNP : Conj -> NP -> NP -> NP = \c,x,y -> ConjNP c (BaseNP x y) ; mkNP : Conj -> ListNP -> NP diff --git a/next-lib/src/catalan/StructuralCat.gf b/next-lib/src/catalan/StructuralCat.gf index 64a25b6f5..b48a94a9a 100644 --- a/next-lib/src/catalan/StructuralCat.gf +++ b/next-lib/src/catalan/StructuralCat.gf @@ -1,5 +1,5 @@ concrete StructuralCat of Structural = CatCat ** - open PhonoCat, MorphoCat, ParadigmsCat, BeschCat, Prelude in { + open PhonoCat, MorphoCat, ParadigmsCat, BeschCat, (X = ConstructX), Prelude in { flags optimize=all ; coding=utf8 ; @@ -60,10 +60,10 @@ lin "ell" "lo" "el" "ell" ["el seu"] ["la seva"] ["els seus"] ["les seves"] Masc Sg P3 ; - less_CAdv = ss "menys" ; ---- + less_CAdv = X.mkCAdv "menys" conjThan ; ---- many_Det = { s,sp = \\g,c => prepCase c ++ genForms "molts" "moltes" ! g ; n = Pl ; s2 = []} ; - more_CAdv = ss "més" ; + more_CAdv = X.mkCAdv "més" conjThan ; most_Predet = {s = \\_,c => prepCase c ++ ["la majoria"] ; c = CPrep P_de} ; much_Det = { s,sp = \\g,c => prepCase c ++ genForms "molt" "molta" ! g ; n = Sg ; s2 = []} ; diff --git a/next-lib/src/common/CommonX.gf b/next-lib/src/common/CommonX.gf index 9401e1ea5..5dcd7ce15 100644 --- a/next-lib/src/common/CommonX.gf +++ b/next-lib/src/common/CommonX.gf @@ -11,7 +11,7 @@ concrete CommonX of Common = open (R = ParamX) in { AdA = {s : Str} ; --lock_AdA : {}} ; AdN = {s : Str} ; --lock_AdN : {}} ; IAdv = {s : Str} ; --lock_IAdv : {}} ; - CAdv = {s : Str} ; --lock_CAdv : {}} ; + CAdv = {s,p : Str} ; --lock_CAdv : {}} ; PConj = {s : Str} ; --lock_PConj : {}} ; Temp = {s : Str ; t : R.Tense ; a : R.Anteriority} ; diff --git a/next-lib/src/common/ConstructX.gf b/next-lib/src/common/ConstructX.gf index ee4decf00..0c6de51ae 100644 --- a/next-lib/src/common/ConstructX.gf +++ b/next-lib/src/common/ConstructX.gf @@ -13,7 +13,7 @@ resource ConstructX = open CommonX in { mkAdA : Str -> AdA = \s -> {s = s ; lock_AdA = <>} ; mkAdN : Str -> AdN = \s -> {s = s ; lock_AdN = <>} ; mkIAdv : Str -> IAdv = \s -> {s = s ; lock_IAdv = <>} ; - mkCAdv : Str -> CAdv = \s -> {s = s ; lock_CAdv = <>} ; + mkCAdv : Str -> Str -> CAdv = \s,p -> {s = s ; p = p ; lock_CAdv = <>} ; mkPConj : Str -> PConj = \s -> {s = s ; lock_PConj = <>} ; } diff --git a/next-lib/src/english/AdjectiveEng.gf b/next-lib/src/english/AdjectiveEng.gf index 2306f5d9c..a060860dd 100644 --- a/next-lib/src/english/AdjectiveEng.gf +++ b/next-lib/src/english/AdjectiveEng.gf @@ -20,6 +20,10 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in { isPre = True } ; + CAdvAP ad ap np = { + s = \\a => ad.s ++ ap.s ! a ++ ad.p ++ np.s ! Nom ; + isPre = False + } ; ComplA2 a np = { s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ; diff --git a/next-lib/src/english/AdverbEng.gf b/next-lib/src/english/AdverbEng.gf index ec7d46321..178f85e4c 100644 --- a/next-lib/src/english/AdverbEng.gf +++ b/next-lib/src/english/AdverbEng.gf @@ -3,10 +3,10 @@ concrete AdverbEng of Adverb = CatEng ** open ResEng, Prelude in { lin PositAdvAdj a = {s = a.s ! AAdv} ; ComparAdvAdj cadv a np = { - s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom + s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ np.s ! Nom } ; ComparAdvAdjS cadv a s = { - s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s + s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ s.s } ; PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; @@ -14,8 +14,7 @@ concrete AdverbEng of Adverb = CatEng ** open ResEng, Prelude in { AdAdv = cc2 ; SubjS = cc2 ; ----b AdvSC s = s ; --- this rule give stack overflow in ordinary parsing - AdnCAdv cadv = {s = cadv.s ++ "than"} ; + AdnCAdv cadv = {s = cadv.s ++ cadv.p} ; } diff --git a/next-lib/src/english/LexiconEng.gf b/next-lib/src/english/LexiconEng.gf index 92319b8b2..301f0d683 100644 --- a/next-lib/src/english/LexiconEng.gf +++ b/next-lib/src/english/LexiconEng.gf @@ -178,7 +178,7 @@ lin stone_N = regN "stone" ; stove_N = regN "stove" ; student_N = mkN human (regN "student") ; - stupid_A = regADeg "stupid" ; + stupid_A = mkA "stupid" ; sun_N = regN "sun" ; switch8off_V2 = dirV2 (partV (regV "switch") "off") ; switch8on_V2 = dirV2 (partV (regV "switch") "on") ; @@ -193,7 +193,7 @@ lin travel_V = (regDuplV "travel") ; tree_N = regN "tree" ; ---- trousers_N = regN "trousers" ; - ugly_A = regADeg "ugly" ; + ugly_A = mkA "ugly" ; understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; university_N = regN "university" ; village_N = regN "village" ; @@ -203,7 +203,7 @@ lin war_N = regN "war" ; watch_V2 = dirV2 (regV "watch") ; water_N = regN "water" ; - white_A = regADeg "white" ; + white_A = mkA "white" ; window_N = regN "window" ; wine_N = regN "wine" ; win_V2 = dirV2 (irregDuplV "win" "won" "won") ; @@ -211,7 +211,7 @@ lin wonder_VQ = mkVQ (regV "wonder") ; wood_N = regN "wood" ; write_V2 = dirV2 (irregV "write" "wrote" "written") ; - yellow_A = regADeg "yellow" ; + yellow_A = mkA "yellow" ; young_A = regADeg "young" ; do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; diff --git a/next-lib/src/english/MakeStructuralEng.gf b/next-lib/src/english/MakeStructuralEng.gf index 31f3c0960..7871cb3c6 100644 --- a/next-lib/src/english/MakeStructuralEng.gf +++ b/next-lib/src/english/MakeStructuralEng.gf @@ -1,11 +1,13 @@ --# -path=.:../common:../abstract -resource MakeStructuralEng = open CatEng, ParadigmsEng, MorphoEng, Prelude in { +resource MakeStructuralEng = open CatEng, ParadigmsEng, ResEng, MorphoEng, Prelude in { oper mkConj : Str -> Str -> Number -> Conj = \x,y,n -> {s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ; mkSubj : Str -> Subj = \x -> {s = x ; lock_Subj = <>} ; + mkNP : Str -> Number -> NP = \s,n -> + regNP s n ** {lock_NP = <>} ; } diff --git a/next-lib/src/english/StructuralEng.gf b/next-lib/src/english/StructuralEng.gf index bbad3efdd..893ca2e82 100644 --- a/next-lib/src/english/StructuralEng.gf +++ b/next-lib/src/english/StructuralEng.gf @@ -1,5 +1,5 @@ concrete StructuralEng of Structural = CatEng ** - open MorphoEng, ResEng, ParadigmsEng, Prelude in { + open MorphoEng, ResEng, ParadigmsEng, (C = ConstructX), Prelude in { flags optimize=all ; @@ -54,9 +54,9 @@ concrete StructuralEng of Structural = CatEng ** i_Pron = mkPron "I" "me" "my" "mine" singular P1 human ; in_Prep = mkPrep "in" ; it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ; - less_CAdv = ss "less" ; + less_CAdv = C.mkCAdv "less" "than" ; many_Det = mkDeterminer plural "many" ; - more_CAdv = ss "more" ; + more_CAdv = C.mkCAdv "more" "than" ; most_Predet = ss "most" ; much_Det = mkDeterminer singular "much" ; must_VV = { @@ -132,5 +132,8 @@ concrete StructuralEng of Structural = CatEng ** at_most_AdN = mkAdN "at most" ; except_Prep = mkPrep "except" ; + + as_CAdv = C.mkCAdv "as" "as" ; + } diff --git a/next-lib/src/finnish/AdjectiveFin.gf b/next-lib/src/finnish/AdjectiveFin.gf index 737887d17..ee6bc58dd 100644 --- a/next-lib/src/finnish/AdjectiveFin.gf +++ b/next-lib/src/finnish/AdjectiveFin.gf @@ -13,6 +13,9 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, Prelude in { _ => a.s ! Compar ! AN af ++ "kuin" ++ np.s ! NPCase Nom -- isompi kuin minä } } ; + CAdvAP ad ap np = { + s = \\m,af => ad.s ++ ap.s ! m ! af ++ ad.p ++ np.s ! NPCase Nom + } ; UseComparA a = { s = \\_,nf => a.s ! Compar ! AN nf ; } ; diff --git a/next-lib/src/finnish/AdverbFin.gf b/next-lib/src/finnish/AdverbFin.gf index a331f985a..307971101 100644 --- a/next-lib/src/finnish/AdverbFin.gf +++ b/next-lib/src/finnish/AdverbFin.gf @@ -3,10 +3,10 @@ concrete AdverbFin of Adverb = CatFin ** open ResFin, Prelude in { lin PositAdvAdj a = {s = a.s ! Posit ! AAdv} ; ComparAdvAdj cadv a np = { - s = cadv.s ++ a.s ! Posit ! AAdv ++ "kuin" ++ np.s ! NPCase Nom + s = cadv.s ++ a.s ! Posit ! AAdv ++ cadv.p ++ np.s ! NPCase Nom } ; ComparAdvAdjS cadv a s = { - s = cadv.s ++ a.s ! Posit ! AAdv ++ "kuin" ++ s.s + s = cadv.s ++ a.s ! Posit ! AAdv ++ cadv.p ++ s.s } ; PrepNP prep np = {s = preOrPost prep.isPre prep.s (np.s ! prep.c)} ; diff --git a/next-lib/src/finnish/StructuralFin.gf b/next-lib/src/finnish/StructuralFin.gf index f013ad665..0a610f93e 100644 --- a/next-lib/src/finnish/StructuralFin.gf +++ b/next-lib/src/finnish/StructuralFin.gf @@ -1,5 +1,5 @@ concrete StructuralFin of Structural = CatFin ** - open MorphoFin, ParadigmsFin, Prelude in { + open MorphoFin, ParadigmsFin, (X = ConstructX), Prelude in { flags optimize=all ; @@ -57,9 +57,9 @@ concrete StructuralFin of Structural = CatFin ** a = agrP3 Sg ; isPron = False } ; - less_CAdv = ss "vähemmän" ; + less_CAdv = X.mkCAdv "vähemmän" "kuin" ; many_Det = mkDet Sg (mkN "moni" "monia") ; - more_CAdv = ss "enemmän" ; + more_CAdv = X.mkCAdv "enemmän" "kuin" ; most_Predet = {s = \\n,c => (nForms2N (dSuurin "useinta")).s ! NCase n (npform2case n c)} ; much_Det = mkDet Sg {s = \\_ => "paljon"} ; must_VV = mkVV (caseV genitive (mkV "täytyä")) ; @@ -302,6 +302,7 @@ lin at_least_AdN = ss "vähintään" ; at_most_AdN = ss "enintään" ; + as_CAdv = X.mkCAdv "yhtä" "kuin" ; } diff --git a/next-lib/src/french/StructuralFre.gf b/next-lib/src/french/StructuralFre.gf index 133455612..8096a0c8e 100644 --- a/next-lib/src/french/StructuralFre.gf +++ b/next-lib/src/french/StructuralFre.gf @@ -1,7 +1,7 @@ --# -path=.:../abstract:../romance:../common:prelude concrete StructuralFre of Structural = CatFre ** - open PhonoFre, MorphoFre, ParadigmsFre, IrregFre, Prelude in { + open PhonoFre, MorphoFre, ParadigmsFre, IrregFre, (X = ConstructX), Prelude in { flags optimize=all ; coding=utf8 ; @@ -57,9 +57,9 @@ lin mkPronoun "il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses" Masc Sg P3 ; - less_CAdv = ss "moins" ; + less_CAdv = X.mkCAdv "moins" conjThan ; many_Det = {s,sp = \\_,c => prepCase c ++ "plusieurs" ; n = Pl ; s2 = []} ; - more_CAdv = ss "plus" ; + more_CAdv = X.mkCAdv "plus" conjThan ; most_Predet = {s = \\_,c => prepCase c ++ ["la plupart"] ; c = CPrep P_de} ; much_Det = {s,sp = \\_,c => prepCase c ++ "beaucoup" ++ elisDe ; n = Pl ; s2 = []} ; must_VV = mkVV (devoir_V2 ** {lock_V = <>}) ; @@ -183,5 +183,7 @@ lin except_Prep = mkPreposition "excepté" ; + as_CAdv = X.mkCAdv "aussi" conjThan ; + } diff --git a/next-lib/src/german/AdjectiveGer.gf b/next-lib/src/german/AdjectiveGer.gf index 10b4b3cfd..a0ced749c 100644 --- a/next-lib/src/german/AdjectiveGer.gf +++ b/next-lib/src/german/AdjectiveGer.gf @@ -12,6 +12,10 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in { s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Nom ; isPre = True } ; + CAdvAP ad ap np = { + s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ np.s ! Nom ; + isPre = False + } ; UseComparA a = { s = \\af => a.s ! Compar ! af ; isPre = True diff --git a/next-lib/src/german/AdverbGer.gf b/next-lib/src/german/AdverbGer.gf index 4bac57a98..82ccd6193 100644 --- a/next-lib/src/german/AdverbGer.gf +++ b/next-lib/src/german/AdverbGer.gf @@ -4,10 +4,10 @@ concrete AdverbGer of Adverb = CatGer ** open ResGer, Prelude in { PositAdvAdj a = {s = a.s ! Posit ! APred} ; ComparAdvAdj cadv a np = { - s = cadv.s ++ a.s ! Posit ! APred ++ conjThan ++ np.s ! Nom + s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ np.s ! Nom } ; ComparAdvAdjS cadv a s = { - s = cadv.s ++ a.s ! Posit ! APred ++ conjThan ++ s.s ! Sub + s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ s.s ! Sub } ; PrepNP prep np = {s = appPrep prep np.s} ; diff --git a/next-lib/src/german/StructuralGer.gf b/next-lib/src/german/StructuralGer.gf index beda7514a..b8bba0170 100644 --- a/next-lib/src/german/StructuralGer.gf +++ b/next-lib/src/german/StructuralGer.gf @@ -1,6 +1,6 @@ concrete StructuralGer of Structural = CatGer ** - open MorphoGer, Prelude in { + open MorphoGer, (X = ConstructX), Prelude in { flags optimize=all ; @@ -48,9 +48,9 @@ concrete StructuralGer of Structural = CatGer ** i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ; in_Prep = mkPrep "in" Dat ; it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ; - less_CAdv = ss "weniger" ; + less_CAdv = X.mkCAdv "weniger" "als" ; many_Det = detLikeAdj Pl "viel" ; - more_CAdv = ss "mehr" ; + more_CAdv = X.mkCAdv "mehr" "als" ; most_Predet = {s = appAdj (regA "meist") ; c = NoCase} ; much_Det = detLikeAdj Sg "viel" ; must_VV = auxVV @@ -143,4 +143,7 @@ concrete StructuralGer of Structural = CatGer ** at_least_AdN = ss "wenigstens" ; at_most_AdN = ss "höchstens" ; except_Prep = mkPrep "außer" Dat ; + + as_CAdv = X.mkCAdv "ebenso" "wie" ; + } diff --git a/next-lib/src/italian/StructuralIta.gf b/next-lib/src/italian/StructuralIta.gf index d080b4d7d..37ab6ac4c 100644 --- a/next-lib/src/italian/StructuralIta.gf +++ b/next-lib/src/italian/StructuralIta.gf @@ -1,7 +1,7 @@ concrete StructuralIta of Structural = CatIta ** open PhonoIta, MorphoIta, - ParadigmsIta, BeschIta, Prelude in { + ParadigmsIta, BeschIta, (X = ConstructX), Prelude in { flags optimize=all ; coding=utf8 ; @@ -57,9 +57,9 @@ lin mkPronoun "lui" "lo" "gli" "glie" "lui" "suo" "sua" "suoi" "sue" Masc Sg P3 ; - less_CAdv = ss "meno" ; + less_CAdv = X.mkCAdv "meno" conjThan ; many_Det = {s,sp = \\g,c => prepCase c ++ genForms "molti" "molte" ! g ; n = Pl ; s2 = []} ; - more_CAdv = ss "più" ; + more_CAdv = X.mkCAdv "più" conjThan ; most_Predet = {s = \\_,c => prepCase c ++ ["la maggior parte"] ; c = CPrep P_di} ; much_Det = {s,sp = \\g,c => prepCase c ++ genForms "molto" "molta" ! g ; n = Sg ; s2 = []} ; must_VV = mkVV (verboV (dovere_47 "dovere")) ; @@ -174,5 +174,6 @@ lin at_least_AdN = ss "almeno" ; at_most_AdN = ss "al massimo" ; + as_CAdv = X.mkCAdv "così" conjThan ; } diff --git a/next-lib/src/romance/AdjectiveRomance.gf b/next-lib/src/romance/AdjectiveRomance.gf index 359e4088a..d24d6dff0 100644 --- a/next-lib/src/romance/AdjectiveRomance.gf +++ b/next-lib/src/romance/AdjectiveRomance.gf @@ -11,6 +11,10 @@ incomplete concrete AdjectiveRomance of Adjective = s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ; isPre = False } ; + CAdvAP ad ap np = { + s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ (np.s ! Nom).ton ; + isPre = False + } ; UseComparA a = { s = \\af => a.s ! Compar ! af ; isPre = a.isPre diff --git a/next-lib/src/romance/AdverbRomance.gf b/next-lib/src/romance/AdverbRomance.gf index bfd55f776..79e9e8326 100644 --- a/next-lib/src/romance/AdverbRomance.gf +++ b/next-lib/src/romance/AdverbRomance.gf @@ -6,10 +6,10 @@ incomplete concrete AdverbRomance of Adverb = s = a.s ! Posit ! AA } ; ComparAdvAdj cadv a np = { - s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ (np.s ! Nom).ton + s = cadv.s ++ a.s ! Posit ! AA ++ cadv.p ++ (np.s ! Nom).ton } ; ComparAdvAdjS cadv a s = { - s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ s.s ! Conjunct --- ne + s = cadv.s ++ a.s ! Posit ! AA ++ cadv.p ++ s.s ! Conjunct --- ne } ; PrepNP prep np = {s = prep.s ++ (np.s ! prep.c).ton} ; diff --git a/next-lib/src/scandinavian/AdjectiveScand.gf b/next-lib/src/scandinavian/AdjectiveScand.gf index 3dfe36fec..f6243e4a5 100644 --- a/next-lib/src/scandinavian/AdjectiveScand.gf +++ b/next-lib/src/scandinavian/AdjectiveScand.gf @@ -23,6 +23,11 @@ incomplete concrete AdjectiveScand of Adjective = isPre = False } ; + CAdvAP ad ap np = { + s = \\a => ad.s ++ ap.s ! a ++ ad.p ++ np.s ! nominative ; + isPre = False + } ; + AdjOrd ord = { s = \\_ => ord.s ; isPre = True diff --git a/next-lib/src/scandinavian/AdverbScand.gf b/next-lib/src/scandinavian/AdverbScand.gf index 1afa40cf1..ba25954ef 100644 --- a/next-lib/src/scandinavian/AdverbScand.gf +++ b/next-lib/src/scandinavian/AdverbScand.gf @@ -5,10 +5,10 @@ incomplete concrete AdverbScand of Adverb = CatScand ** open CommonScand, ResSca s = a.s ! adverbForm } ; ComparAdvAdj cadv a np = { - s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ np.s ! nominative + s = cadv.s ++ a.s ! adverbForm ++ cadv.p ++ np.s ! nominative } ; ComparAdvAdjS cadv a s = { - s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ s.s ! Sub + s = cadv.s ++ a.s ! adverbForm ++ cadv.p ++ s.s ! Sub } ; PrepNP prep np = {s = prep.s ++ np.s ! accusative} ; diff --git a/next-lib/src/spanish/StructuralSpa.gf b/next-lib/src/spanish/StructuralSpa.gf index 033c2a9ab..597b207c4 100644 --- a/next-lib/src/spanish/StructuralSpa.gf +++ b/next-lib/src/spanish/StructuralSpa.gf @@ -1,5 +1,5 @@ concrete StructuralSpa of Structural = CatSpa ** - open PhonoSpa, MorphoSpa, ParadigmsSpa, BeschSpa, Prelude in { + open PhonoSpa, MorphoSpa, ParadigmsSpa, BeschSpa, (X = ConstructX), Prelude in { flags optimize=all ; @@ -60,10 +60,10 @@ lin "el" "lo" "le" "él" "su" "su" "sus" "sus" Masc Sg P3 ; - less_CAdv = ss "meno" ; ---- + less_CAdv = X.mkCAdv "menos" conjThan ; ---- many_Det = { s,sp = \\g,c => prepCase c ++ genForms "muchos" "muchas" ! g ; n = Pl ; s2 = []} ; - more_CAdv = ss "mas" ; + more_CAdv = X.mkCAdv "más" conjThan ; most_Predet = {s = \\_,c => prepCase c ++ ["la mayor parte"] ; c = CPrep P_de} ; much_Det = { s,sp = \\g,c => prepCase c ++ genForms "mucho" "mucha" ! g ; n = Sg ; s2 = []} ; @@ -168,6 +168,8 @@ oper "y" / strs {"ya" ; "ye" ; "yo" ; "yu"} ; "e" / strs {"i" ; "hi" ; "y"} }} ** {n = Pl} ; +lin + as_CAdv = X.mkCAdv "si" conjThan ; ---- } diff --git a/next-lib/src/swedish/StructuralSwe.gf b/next-lib/src/swedish/StructuralSwe.gf index a6a3a00b2..21af94fa6 100644 --- a/next-lib/src/swedish/StructuralSwe.gf +++ b/next-lib/src/swedish/StructuralSwe.gf @@ -1,5 +1,5 @@ concrete StructuralSwe of Structural = CatSwe ** - open MorphoSwe, ParadigmsSwe, Prelude in { + open MorphoSwe, ParadigmsSwe, (X = ConstructX), Prelude in { flags optimize=all ; @@ -43,9 +43,9 @@ concrete StructuralSwe of Structural = CatSwe ** i_Pron = MorphoSwe.mkNP "jag" "mig" "min" "mitt" "mina" SgUtr P1 ; in_Prep = ss "i" ; it_Pron = MorphoSwe.regNP "det" "dess" SgNeutr ; - less_CAdv = ss "mindre" ; + less_CAdv = X.mkCAdv "mindre" "än" ; many_Det = {s = \\_,_ => "många" ; n = Pl ; det = DDef Indef} ; - more_CAdv = ss "mer" ; + more_CAdv = X.mkCAdv "mer" "än" ; most_Predet = {s = gennumForms ["den mesta"] ["det mesta"] ["de flesta"]} ; much_Det = {s = \\_,_ => "mycket" ; n = Pl ; det = DDef Indef} ; must_VV = @@ -141,5 +141,8 @@ lin at_most_AdN = ss "högst" ; except_Prep = ss "utom" ; + + as_CAdv = X.mkCAdv "lika" "som" ; + }