diff --git a/examples/attempto/Attempto.gf b/examples/attempto/Attempto.gf index 64fd60944..bdc8ba1c5 100644 --- a/examples/attempto/Attempto.gf +++ b/examples/attempto/Attempto.gf @@ -1,10 +1,11 @@ -abstract Attempto = { +abstract Attempto = Symbols ** { flags startcat = ACEText ; cat CN ; cat NP ; cat Card ; +cat Numeral ; cat PN ; cat A ; cat A2 ; @@ -51,6 +52,11 @@ fun noMassNP : MCN -> NP ; fun allMassNP : MCN -> NP ; fun notAllMassNP : MCN -> NP ; +fun one_Card : Card ; +fun two_Card : Card ; +fun five_Card : Card ; +fun ten_Card : Card ; + fun pnNP : PN -> NP ; fun intNP : Int -> NP ; @@ -97,7 +103,6 @@ fun nobody_butNP : PN -> NP ; -- nobody but John fun no_butNP : CN -> PN -> NP ; -- no man but John cat Unit ; -- SI measurement units -cat Var ; fun unitNP : Card -> Unit -> NP ; fun unit_ofNP : Card -> Unit -> CN -> NP ; -- 3 kg of apples @@ -124,6 +129,8 @@ fun andRS : RS -> RS -> RS ; fun orRS : RS -> RS -> RS ; fun eachRS : RS -> RS ; -- each of who +fun suchCN : CN -> S -> CN ; + -- 2.2.4 fun genNP : NP -> CN -> NP ; -- everybody's customer diff --git a/examples/attempto/AttemptoEng.gf b/examples/attempto/AttemptoEng.gf index d251c8888..19f3654f8 100644 --- a/examples/attempto/AttemptoEng.gf +++ b/examples/attempto/AttemptoEng.gf @@ -1,6 +1,6 @@ --# -path=.:present -concrete AttemptoEng of Attempto = AttemptoI with +concrete AttemptoEng of Attempto = SymbolsC ** AttemptoI with (Syntax = SyntaxEng), (Symbolic = SymbolicEng), (LexAttempto = LexAttemptoEng) ; diff --git a/examples/attempto/AttemptoFre.gf b/examples/attempto/AttemptoFre.gf index f0665616f..22ec92df6 100644 --- a/examples/attempto/AttemptoFre.gf +++ b/examples/attempto/AttemptoFre.gf @@ -1,6 +1,6 @@ --# -path=.:/Users/aarne/GF/next-lib/present -concrete AttemptoFre of Attempto = AttemptoI with +concrete AttemptoFre of Attempto = SymbolsC ** AttemptoI with (Syntax = SyntaxFre), (Symbolic = SymbolicFre), (LexAttempto = LexAttemptoFre) ; diff --git a/examples/attempto/AttemptoGer.gf b/examples/attempto/AttemptoGer.gf index abfd44df5..5d5d28430 100644 --- a/examples/attempto/AttemptoGer.gf +++ b/examples/attempto/AttemptoGer.gf @@ -1,6 +1,6 @@ --# -path=.:/Users/aarne/GF/next-lib/present -concrete AttemptoGer of Attempto = AttemptoI with +concrete AttemptoGer of Attempto = SymbolsC ** AttemptoI with (Syntax = SyntaxGer), (Symbolic = SymbolicGer), (LexAttempto = LexAttemptoGer) ; diff --git a/examples/attempto/AttemptoI.gf b/examples/attempto/AttemptoI.gf index a10214cf9..9af611bc5 100644 --- a/examples/attempto/AttemptoI.gf +++ b/examples/attempto/AttemptoI.gf @@ -1,4 +1,4 @@ -incomplete concrete AttemptoI of Attempto = open +incomplete concrete AttemptoI of Attempto = SymbolsC ** open Syntax, Symbolic, LexAttempto @@ -7,6 +7,7 @@ in { lincat CN = Syntax.CN ; lincat NP = Syntax.NP ; lincat Card = Syntax.Card ; +lincat Numeral = Syntax.Numeral ; lincat PN = Syntax.PN ; lincat A = Syntax.A ; lincat A2 = Syntax.A2 ; @@ -28,31 +29,35 @@ lincat Text = Syntax.Text ; lincat ACEText = Syntax.Text ; lincat MCN = Syntax.CN ; ---lincat Var = Symb ; lincat PP = Adv ; lin aNP = mkNP a_Art ; lin theNP = mkNP the_Art ; lin cardNP d = mkNP d ; ---lin noNP : CN -> NP ; +lin noNP = mkNP no_Quant ; lin everyNP = mkNP every_Det ; ---lin eachNP : CN -> NP ; ---lin notEveryNP : CN -> NP ; ---lin notEachNP : CN -> NP ; +lin eachNP = mkNP each_Det ; +lin notEveryNP cn = mkNP not_Predet (mkNP every_Det cn) ; +lin notEachNP cn = mkNP not_Predet (mkNP each_Det cn) ; lin theCollNP = mkNP the_Art plNum ; lin someCollNP = mkNP somePl_Det ; lin allCollNP cn = mkNP all_Predet (mkNP a_Art plNum cn) ; ---lin noCollNP : CN -> NP ; ---lin eachTheNP : CN -> NP ; ---lin eachSomeNP : CN -> NP ; ---lin eachNumNP : Card -> CN -> NP ; +lin noCollNP = mkNP no_Quant plNum ; +lin eachTheNP cn = mkNP (mkNP each_Det) (mkAdv part_Prep (mkNP the_Art plNum cn)) ; +lin eachSomeNP cn = mkNP (mkNP each_Det) (mkAdv part_Prep (mkNP somePl_Det cn)) ; +lin eachNumNP ca cn = mkNP (mkNP each_Det) (mkAdv part_Prep (mkNP ca cn)) ; lin someMassNP = mkNP someSg_Det ; lin allMassNP cn = mkNP all_Predet (mkNP cn) ; ---lin noMassNP : MCN -> NP ; ---lin notAllMassNP : MCN -> NP ; +lin noMassNP = mkNP no_Quant ; +lin notAllMassNP cn = mkNP not_Predet (mkNP all_Predet (mkNP cn)) ; + +lin one_Card = mkCard n1_Numeral ; +lin two_Card = mkCard n2_Numeral ; +lin five_Card = mkCard n5_Numeral ; +lin ten_Card = mkCard n10_Numeral ; lin pnNP = mkNP ; lin intNP = symb ; @@ -67,38 +72,37 @@ lin they_NP = mkNP they_Pron ; lin conjNP = mkNP and_Conj ; lin adjCN = mkCN ; -{- -lin someone_NP : NP ; -lin somebody_NP : NP ; -lin something_NP : NP ; -lin noone_NP : NP ; -lin nothing_NP : NP ; -lin not_everyoneNP : NP ; -lin not_everybodyNP : NP ; -lin not_everythingNP : NP ; +--lin someone_NP : NP ; +lin somebody_NP = Syntax.somebody_NP ; +lin something_NP = Syntax.something_NP ; +--lin noone_NP : NP ; +lin nobody_NP = Syntax.nobody_NP ; +lin nothing_NP = Syntax.nothing_NP ; +--lin not_everyoneNP : NP ; +lin not_everybodyNP = mkNP not_Predet Syntax.everybody_NP ; +lin not_everythingNP = mkNP not_Predet Syntax.everything_NP ; -lin at_leastNP : Card -> CN -> NP ; -lin not_at_leastNP : Card -> CN -> NP ; -lin at_mostNP : Card -> CN -> NP ; -lin not_at_mostNP : Card -> CN -> NP ; -lin more_thanNP : Card -> CN -> NP ; -lin not_more_thanNP : Card -> CN -> NP ; +lin at_leastNP ca = mkNP (mkCard at_least_AdN ca) ; +lin not_at_leastNP ca cn = mkNP not_Predet (mkNP (mkCard at_least_AdN ca) cn) ; +lin at_mostNP ca = mkNP (mkCard at_most_AdN ca) ; +lin not_at_mostNP ca cn = mkNP not_Predet (mkNP (mkCard at_most_AdN ca) cn) ; +lin more_thanNP ca = mkNP (mkCard (mkAdN more_CAdv) ca) ; +lin not_more_thanNP ca cn = mkNP not_Predet (mkNP (mkCard (mkAdN more_CAdv) ca) cn) ; -lin nothing_butNP : CN -> NP ; -- nothing but apples -lin nothing_butMassNP : MCN -> NP ; -- nothing but water -lin nobody_butNP : PN -> NP ; -- nobody but John -lin no_butNP : CN -> PN -> NP ; -- no man but John +lin nothing_butNP cn = mkNP nothing_but_Predet (mkNP a_Art plNum cn) ; +lin nothing_butMassNP cn = mkNP nothing_but_Predet (mkNP cn) ; +--lin nobody_butNP : PN -> NP ; -- nobody but John +--lin no_butNP : CN -> PN -> NP ; -- no man but John -cat Unit ; -- SI measurement units -cat Var ; +lincat Unit = CN ; + +lin unitNP = mkNP ; +lin unit_ofNP ca u cn = mkNP (mkNP ca u) (mkAdv part_Prep (mkNP a_Art plNum cn)) ; +lin unit_ofMassNP ca u cn = mkNP (mkNP ca u) (mkAdv part_Prep (mkNP cn)) ; -lin unitNP : Card -> Unit -> NP ; -lin unit_ofNP : Card -> Unit -> CN -> NP ; -- 3 kg of apples -lin unit_ofMassNP : Card -> Unit -> MCN -> NP ; -- 3 l of water --} lin apposVarCN cn v = mkCN cn (symb v) ; -lin varNP = symb ; +lin varNP x = symb x ; -- 2.2.1 @@ -120,6 +124,8 @@ lin orRS : RS -> RS -> RS ; lin eachRS : RS -> RS ; -- each of who -} +lin suchCN cn s = mkCN (mkAP (mkAP such_A) s) cn ; + -- 2.2.4 lin genNP = genitiveNP ; @@ -174,10 +180,10 @@ lin modVP = mkVP ; lin thereNP np = mkS (mkCl np) ; -{- + -- 3.3 -- Boolean formulas = \= < > <= >= --} + -- 3.4.1 @@ -189,16 +195,16 @@ lin or_Conj = Syntax.or_Conj ; --lin comma_or_Conj : Conj ; -- 3.4.3 -{- -lin for_everyS : CN -> S -> S ; -lin for_eachS : CN -> S -> S ; -lin for_each_ofS : Card -> CN -> S -> S ; -- for each of 3 men -lin for_allMassS : MCN -> S -> S ; -- for all water + +lin for_everyS cn = mkS (mkAdv for_Prep (mkNP every_Det cn)) ; +lin for_eachS cn = mkS (mkAdv for_Prep (mkNP each_Det cn)) ; +--lin for_each_ofS : Card -> CN -> S -> S ; -- for each of 3 men +--lin for_allMassS : MCN -> S -> S ; -- for all water -- 3.4.4 -lin if_thenS : S -> S -> S ; --} +lin if_thenS = mkS if_then_Conj ; + oper adj_thatCl : A -> S -> Cl = \a,s -> mkCl (mkVP (mkAP (mkAP a) s)) ; @@ -223,11 +229,10 @@ lin when_IAdv = Syntax.when_IAdv ; lin whoSg_IP = Syntax.whoSg_IP ; lin whoPl_IP = Syntax.whoPl_IP ; -{- -lin there_ipQS : IP -> QS ; -- there is who -lin whoseIP : CN -> IP ; -- whose dog --} +--lin there_ipQS : IP -> QS ; -- there is who +--lin whoseIP : CN -> IP ; -- whose dog + -- 3.6 lin impVP np vp = mkText (mkPhr (mkUtt (mkImp vp)) (mkVoc np)) exclMarkPunct ; diff --git a/examples/attempto/AttemptoSwe.gf b/examples/attempto/AttemptoSwe.gf index 8997766ab..f0f1e6249 100644 --- a/examples/attempto/AttemptoSwe.gf +++ b/examples/attempto/AttemptoSwe.gf @@ -1,6 +1,6 @@ --# -path=.:present -concrete AttemptoSwe of Attempto = AttemptoI with +concrete AttemptoSwe of Attempto = SymbolsC ** AttemptoI with (Syntax = SyntaxSwe), (Symbolic = SymbolicSwe), (LexAttempto = LexAttemptoSwe) ; diff --git a/examples/attempto/LexAttempto.gf b/examples/attempto/LexAttempto.gf index 69561e42a..5b2ce5d9f 100644 --- a/examples/attempto/LexAttempto.gf +++ b/examples/attempto/LexAttempto.gf @@ -8,6 +8,7 @@ oper provably_Adv : Adv ; provable_A : A ; false_A : A ; + such_A : A ; genitiveNP : NP -> CN -> NP ; @@ -15,4 +16,6 @@ oper -- l_Unit : Unit ; -- kg_Unit : Unit ; + each_Det : Det ; + } diff --git a/examples/attempto/LexAttemptoEng.gf b/examples/attempto/LexAttemptoEng.gf index f9d975d18..c1ea27b4c 100644 --- a/examples/attempto/LexAttemptoEng.gf +++ b/examples/attempto/LexAttemptoEng.gf @@ -1,5 +1,10 @@ instance LexAttemptoEng of LexAttempto = - open ExtraEng, SyntaxEng, ParadigmsEng, ConstructX, IrregEng in { + open + ExtraEng, + SyntaxEng, + ParadigmsEng, + ConstructX, + IrregEng in { oper possible_A = mkA "possible" ; @@ -9,7 +14,12 @@ oper provably_Adv = mkAdv "provably" ; provable_A = mkA "provable" ; false_A = mkA "false" ; - + such_A = mkA "such" ; + genitiveNP np = mkNP (GenNP np) ; + kilogram_CN = mkCN (mkN "kilogram") ; + + each_Det = ExtraEng.each_Det ; + } diff --git a/examples/attempto/LexAttemptoFre.gf b/examples/attempto/LexAttemptoFre.gf index c3a45a433..91ebc32c4 100644 --- a/examples/attempto/LexAttemptoFre.gf +++ b/examples/attempto/LexAttemptoFre.gf @@ -9,7 +9,10 @@ oper provably_Adv = mkAdv "démontrablement" ; provable_A = mkA "démontrable" ; false_A = mkA "faux" ; + such_A = mkA "tel" "telle" ; genitiveNP np cn = mkNP (mkNP the_Art cn) (SyntaxFre.mkAdv possess_Prep np) ; + each_Det = every_Det ; ---- + } diff --git a/examples/attempto/LexAttemptoGer.gf b/examples/attempto/LexAttemptoGer.gf index f97b46456..9274d80f3 100644 --- a/examples/attempto/LexAttemptoGer.gf +++ b/examples/attempto/LexAttemptoGer.gf @@ -9,7 +9,10 @@ oper provably_Adv = mkAdv "beweisbar" ; provable_A = mkA "beweisbar" ; false_A = mkA "falsch" ; + such_A = mkA "solch" ; genitiveNP np cn = mkNP (mkNP the_Art cn) (SyntaxGer.mkAdv possess_Prep np) ; + each_Det = every_Det ; + } diff --git a/examples/attempto/LexAttemptoSwe.gf b/examples/attempto/LexAttemptoSwe.gf index cdb5a56f3..59d8e4b21 100644 --- a/examples/attempto/LexAttemptoSwe.gf +++ b/examples/attempto/LexAttemptoSwe.gf @@ -9,7 +9,9 @@ oper provably_Adv = mkAdv "bevisbart" ; provable_A = mkA "bevisbar" ; false_A = mkA "falsk" ; + such_A = mkA "sĺdan" ; genitiveNP np = mkNP (GenNP np) ; + each_Det = every_Det ; ---- } diff --git a/examples/attempto/Symbols.gf b/examples/attempto/Symbols.gf new file mode 100644 index 000000000..3744ecd4a --- /dev/null +++ b/examples/attempto/Symbols.gf @@ -0,0 +1,8 @@ +abstract Symbols = { + +cat Var ; + +fun X_Var : Var ; +fun Y_Var : Var ; + +} diff --git a/examples/attempto/SymbolsC.gf b/examples/attempto/SymbolsC.gf new file mode 100644 index 000000000..9949912ca --- /dev/null +++ b/examples/attempto/SymbolsC.gf @@ -0,0 +1,8 @@ +concrete SymbolsC of Symbols = open Prelude in { + +lincat Var = SS ; + +lin X_Var = ss "X" ; +lin Y_Var = ss "Y" ; + +} diff --git a/examples/attempto/TestAttempto.gf b/examples/attempto/TestAttempto.gf index 39ddc48e5..ad76f4d15 100644 --- a/examples/attempto/TestAttempto.gf +++ b/examples/attempto/TestAttempto.gf @@ -74,6 +74,8 @@ fun machine_N : CN ; correct_A : A ; + kilogram_Unit : Unit ; + in_Prep : Prep ; at_Prep : Prep ; into_Prep : Prep ; diff --git a/examples/attempto/TestAttemptoEng.gf b/examples/attempto/TestAttemptoEng.gf index 75c1c4755..bf7333307 100644 --- a/examples/attempto/TestAttemptoEng.gf +++ b/examples/attempto/TestAttemptoEng.gf @@ -76,6 +76,8 @@ lin mary_PN = mkPN "mary" ; lin machine_N = mkkN "machine" ; lin correct_A = mkA "correct" ; +lin kilogram_Unit = mkkN "kilogram" ; + oper mkkN : Str -> CN = \n -> mkCN (ParadigmsEng.mkN n) ; lin