From 0ac664d147092ae164e21f74308e166d40362912 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 10 Mar 2009 17:31:18 +0000 Subject: [PATCH] preliminary Italian in Attempto --- examples/attempto/AttemptoIta.gf | 7 +++ examples/attempto/LexAttemptoIta.gf | 28 +++++++++ examples/attempto/TestAttemptoGer.gf | 2 +- examples/attempto/TestAttemptoIta.gf | 89 +++++++++++++++++++++++++++ next-lib/src/Make.hs | 2 +- next-lib/src/api/Constructors.gf | 8 +-- next-lib/src/german/StructuralGer.gf | 2 +- next-lib/src/italian/StructuralIta.gf | 9 +-- 8 files changed, 136 insertions(+), 11 deletions(-) create mode 100644 examples/attempto/AttemptoIta.gf create mode 100644 examples/attempto/LexAttemptoIta.gf create mode 100644 examples/attempto/TestAttemptoIta.gf diff --git a/examples/attempto/AttemptoIta.gf b/examples/attempto/AttemptoIta.gf new file mode 100644 index 000000000..55656aaf0 --- /dev/null +++ b/examples/attempto/AttemptoIta.gf @@ -0,0 +1,7 @@ +--# -path=.:present + +concrete AttemptoIta of Attempto = SymbolsC ** AttemptoI with + (Syntax = SyntaxIta), + (Symbolic = SymbolicIta), + (LexAttempto = LexAttemptoIta) ; + diff --git a/examples/attempto/LexAttemptoIta.gf b/examples/attempto/LexAttemptoIta.gf new file mode 100644 index 000000000..04d79cfdb --- /dev/null +++ b/examples/attempto/LexAttemptoIta.gf @@ -0,0 +1,28 @@ +instance LexAttemptoIta of LexAttempto = + open ExtraIta, SyntaxIta, ParadigmsIta, ConstructX, + MakeStructuralIta + in { + +oper + possible_A = mkA "possibile" ; + necessary_A = mkA "necessario" ; + own_A = mkA "proprio" ; + have_VV = SyntaxIta.must_VV ; + provably_Adv = mkAdv "dimostrabilmente" ; + provable_A = mkA "dimostrabile" ; + false_A = mkA "falso" ; + such_A = mkA "tale" ; + + genitiveNP np cn = mkNP (mkNP the_Art cn) (SyntaxIta.mkAdv possess_Prep np) ; + + each_Det = every_Det ; ---- + + that_Subj = mkSubj "che" ; + + comma_and_Conj = mkConj [] ", e" plural ; + comma_or_Conj = mkConj [] ", o" singular ; + slash_Conj = mkConj [] "/" singular ; + + whose_IDet = mkIDet (mkIQuant "de chi") ; ---- + +} diff --git a/examples/attempto/TestAttemptoGer.gf b/examples/attempto/TestAttemptoGer.gf index 5f47dc9e5..377903a98 100644 --- a/examples/attempto/TestAttemptoGer.gf +++ b/examples/attempto/TestAttemptoGer.gf @@ -1,4 +1,4 @@ ---# -path=.:/Users/aarne/GF/next-lib/present +--# -path=.:present concrete TestAttemptoGer of TestAttempto = AttemptoGer ** open SyntaxGer, ParadigmsGer, IrregGer, (C = ConstructX) in { diff --git a/examples/attempto/TestAttemptoIta.gf b/examples/attempto/TestAttemptoIta.gf new file mode 100644 index 000000000..c1c275255 --- /dev/null +++ b/examples/attempto/TestAttemptoIta.gf @@ -0,0 +1,89 @@ +--# -path=.:present + +concrete TestAttemptoIta of TestAttempto = AttemptoIta ** + open SyntaxIta, ParadigmsIta, (C = ConstructX) in { + +lin card_N = mkkN "carta" ; +lin water_MCN = mkgN "acqua" feminine ; +lin john_PN = mkPN "John" ; +lin apple_N = mkkN "mela" ; +lin sleep_V = mkV "dormire" ; +lin young_A = mkA "giovane" ; +lin dog_N = mkkN "cane" ; +lin animal_N = mkkN "animale" ; +lin wait_V = mkV "aspattare" ; +lin man_N = mkCN (mkN "uomo" "uomini" masculine) ; +lin woman_N = mkkN "donna" ; +lin give_V3 = mkV3 (mkV "dare") accusative dative ; +lin tired_A = mkA "stanco" ; +lin rich_A = mkA "ricco" ; +lin customer_N = mkkN "cliente" ; +lin enter_V2 = mkV2 "entrare" ; +lin bank_N = mkkN "banco" ; +lin satisfied_A = mkA "contento" ; +lin lucky_A = mkA "fortunato" ; +lin well_known_A = mkA "conosciuto" ; +lin important_A = mkA "importante" ; +lin expensive_A = mkA "caro" ; +lin fill_in_V2 = mkV2 "riempire" ; ---- +lin form_N = mkgN "formulario" masculine ; ---- +lin age_N = mkgN "età" feminine ; +lin teacher_N = mkkN "professore" ; +lin successful_A = mkA "riuscito" ; +lin fond_A2 = mkA2 (mkA "attaccato") dative ; ---- +lin garden_N = mkkN "giardino" ; +lin morning_N = mkkN "mattino" ; +lin code_N = mkgN "code" masculine ; ---- +lin drinkable_A = mkA "potabile" ; +lin work_V = mkV "lavorare" ; +lin admitted_A = mkA "ammesso" ; +lin eat_V2 = mkV2 "mangiare" ; +lin burger_N = mkkN "hamburger" ; +lin earn_V2 = mkV2 "guadagnare" ; ---- +lin income_N = mkkN "revenuta" ; ---- +lin england_PN = mkPN "Inghilterra" ; +lin beginning_N = mkkN "inizio" ; +lin office_N = mkkN "ufficio" ; +lin interested_A2 = mkA2 (mkA "interessato") (mkPrep "per") ; +lin classroom_N = mkgN "classe" feminine ; +lin manually_Adv = mkAdv "manualmente" ; +lin slot_N = mkkN "troco" ; ---- +lin patiently_Adv = mkAdv "pazientemente" ; ---- +lin course_N = mkkN "corso" ; +lin carefully_Adv = mkAdv "piano" ; ---- +lin time_N = mkkN "tempo" ; +lin believe_VS = mkVS (mkV "credere") ; ---- +lin seriously_Adv = mkAdv "seriosamente" ; +lin clerk_N = mkkN "clerico" ; ---- +lin screen_N = mkkN "screen" ; ---- +lin blink_V = mkV "clignotare" ; ---- +lin bed_N = mkkN "letto" ; +lin container_N = mkkN "recipiente" ; +lin automated_teller_N = mkgN "automa" masculine ; ---- +lin reject_V2 = mkV2 "rigettare" ; ---- +lin accept_V2 = mkV2 "accettare" ; +lin type_V2 = mkV2 "stampare" ; ---- +lin know_VS = mkVS (mkV "sapere") ; ---- +lin manager_N = mkkN "direttore" ; +lin oversleep_V = mkV "dormire" ; ---- +lin valid_A = mkA "valido" ; +lin see_V2 = mkV2 (mkV "vedere") ; ---- +lin bark_V = mkV "aboiare" ; ---- +lin go_V2 = mkV2 (mkV "viaggiare") dative ; ---- +lin brother_N = mkgN "fratello" masculine ; +lin mary_PN = mkPN "Mary" ; +lin machine_N = mkkN "macchina" ; +lin correct_A = mkA "corretto" ; + +lin kilogram_Unit = mkkN "chilo" ; + +oper + mkkN : Str -> CN = \n -> mkCN (ParadigmsIta.mkN n) ; + mkgN : Str -> Gender -> CN = \n,g -> mkCN (ParadigmsIta.mkN n g) ; + +lin + in_Prep = SyntaxIta.in_Prep ; + at_Prep = SyntaxIta.to_Prep ; + into_Prep = mkPrep "dentro" ; + +} diff --git a/next-lib/src/Make.hs b/next-lib/src/Make.hs index 53428586e..9fca1713a 100644 --- a/next-lib/src/Make.hs +++ b/next-lib/src/Make.hs @@ -56,7 +56,7 @@ langsLang = langs `except` ["Ara","Ina"] langsAPI = langsLang `except` ["Ara","Hin","Ina","Tha"] -- languages for which to compile minimal Syntax -langsMinimal = langs `only` ["Eng","Bul","Ita"] +langsMinimal = langs `only` ["Eng","Bul","Ger","Ita"] -- languages for which to run treebank test langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Rus","Spa","Tha"] diff --git a/next-lib/src/api/Constructors.gf b/next-lib/src/api/Constructors.gf index a407c3440..c9e227ccf 100644 --- a/next-lib/src/api/Constructors.gf +++ b/next-lib/src/api/Constructors.gf @@ -1369,12 +1369,12 @@ incomplete resource Constructors = open Grammar in { = AdvIP --# notminimal } ; - mkIDet = overload { --# notminimal + mkIDet = overload { mkIDet : IQuant -> Num -> IDet -- which (songs) --# notminimal = \i,nu -> IdetQuant i nu ; --# notminimal - mkIDet : IQuant -> IDet -- which (song) --# notminimal - = \i -> IdetQuant i NumSg ; --# notminimal - } ; --# notminimal + mkIDet : IQuant -> IDet + = \i -> IdetQuant i NumSg ; + } ; whichSg_IDet : IDet = IdetQuant which_IQuant NumSg ; --# notminimal whichPl_IDet : IDet = IdetQuant which_IQuant NumPl ; --# notminimal diff --git a/next-lib/src/german/StructuralGer.gf b/next-lib/src/german/StructuralGer.gf index b8bba0170..723837974 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, (X = ConstructX), Prelude in { + open MorphoGer, MakeStructuralGer, (X = ConstructX), Prelude in { flags optimize=all ; diff --git a/next-lib/src/italian/StructuralIta.gf b/next-lib/src/italian/StructuralIta.gf index 37ab6ac4c..1cd96d3af 100644 --- a/next-lib/src/italian/StructuralIta.gf +++ b/next-lib/src/italian/StructuralIta.gf @@ -1,6 +1,6 @@ concrete StructuralIta of Structural = CatIta ** open - PhonoIta, MorphoIta, + PhonoIta, MorphoIta, MakeStructuralIta, ParadigmsIta, BeschIta, (X = ConstructX), Prelude in { flags optimize=all ; coding=utf8 ; @@ -152,9 +152,9 @@ lin mkPronoun "Lei" "La" "Le" "Glie" "Lei" "Suo" "Sua" "Suoi" "Sue" Masc Sg P3 ; - not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom} ; - nothing_but_Predet = {s = \\a,c => prepCase c ++ "rien excepté" ; c = Nom} ; - nobody_but_Predet = {s = \\a,c => prepCase c ++ "personne excepté" ; c = Nom} ; + not_Predet = {s = \\a,c => prepCase c ++ "non" ; c = Nom} ; + nothing_but_Predet = {s = \\a,c => prepCase c ++ "niente eccetto" ; c = Nom} ; + nobody_but_Predet = {s = \\a,c => prepCase c ++ "nessun eccetto" ; c = Nom} ; no_Quant = @@ -175,5 +175,6 @@ lin at_most_AdN = ss "al massimo" ; as_CAdv = X.mkCAdv "così" conjThan ; + except_Prep = mkPrep "eccetto" ; }