diff --git a/src/hungarian/AdjectiveHun.gf b/src/hungarian/AdjectiveHun.gf index a9fdefd6..f5fa609d 100644 --- a/src/hungarian/AdjectiveHun.gf +++ b/src/hungarian/AdjectiveHun.gf @@ -7,7 +7,7 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in { -- : A -> AP ; PositA a = emptyAP ** { s = \\n,c => - let adj : Noun = (a ** {s = a.s ! Posit}) in + let adj : Noun = (a ** {s = a.s ! Posit; g = NonHuman}) in caseFromStem glue adj c n ; } ; @@ -35,7 +35,7 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in { -- : A -> AP ; -- warmer UseComparA a = emptyAP ** { s = \\n,c => - let adj : Noun = (a ** {s = a.s ! Compar}) in + let adj : Noun = (a ** {s = a.s ! Compar; g = NonHuman}) in caseFromStem glue adj c n ; } ; diff --git a/src/hungarian/ConjunctionHun.gf b/src/hungarian/ConjunctionHun.gf index 15305eb2..1a0465c3 100644 --- a/src/hungarian/ConjunctionHun.gf +++ b/src/hungarian/ConjunctionHun.gf @@ -52,12 +52,12 @@ lin in np ** {s = linTable} ; -- Relative sentences lincat - [RS] = {s1,s2 : Number => Case => Str} ; + [RS] = {s1,s2 : Gender => Number => Case => Str} ; lin - BaseRS = twoTable2 Number Case ; - ConsRS = consrTable2 Number Case comma ; - ConjRS = conjunctDistrTable2 Number Case ; + BaseRS = twoTable3 Gender Number Case ; + ConsRS = consrTable3 Gender Number Case comma ; + ConjRS = conjunctDistrTable3 Gender Number Case ; {- lincat diff --git a/src/hungarian/DocumentationHun.gf b/src/hungarian/DocumentationHun.gf index 6c31248a..84fc7194 100644 --- a/src/hungarian/DocumentationHun.gf +++ b/src/hungarian/DocumentationHun.gf @@ -173,7 +173,7 @@ oper \noun,n,c -> caseFromStem glue noun c n ; adjCase : Adjective -> Degree -> Number -> Case -> Str = - \adj,d,n,c -> caseFromStem glue {s = adj.s ! d ; h = adj.h} c n ; + \adj,d,n,c -> caseFromStem glue {s = adj.s ! d ; h = adj.h ; g = NonHuman} c n ; possForm : Noun -> Number -> Person -> Number -> Str = \noun,possd,person,possr -> diff --git a/src/hungarian/ExtendHun.gf b/src/hungarian/ExtendHun.gf index c6ff44b0..c48cb967 100644 --- a/src/hungarian/ExtendHun.gf +++ b/src/hungarian/ExtendHun.gf @@ -11,4 +11,8 @@ lin CompoundN n1 n2 = n2 ** {s = \\nc => n1.s ! SgNom ++ BIND ++ n2.s ! nc} ; + UseDAP = DetNP ; + UseDAPMasc, + UseDAPFem = \dap -> DetNP dap ** {g = Human} ; + } ; diff --git a/src/hungarian/LexiconHun.gf b/src/hungarian/LexiconHun.gf index 505d584f..2f0ffbe0 100644 --- a/src/hungarian/LexiconHun.gf +++ b/src/hungarian/LexiconHun.gf @@ -19,7 +19,7 @@ lin art_N = mkN "művészet" "művészetet" ; ---- -- B -lin baby_N = mkN "bébi" "bébit" ; +lin baby_N = humanN (mkN "bébi" "bébit") ; -- lin back_N = mkN "" ; lin bad_A = mkA "rossz" ; lin bank_N = mkN "bank" "bankot" ; @@ -65,7 +65,7 @@ lin cat_N = mkN "macska" "macskát"; lin ceiling_N = roof_N ; lin chair_N = mkN "szék" "széket"; lin cheese_N = mkN "sajt" "sajtot" ; -lin child_N = mkN "gyerek" "gyereket" ; +lin child_N = humanN (mkN "gyerek" "gyereket") ; lin church_N = mkN "templom" "templomot" ; lin city_N = mkN "város" "várost" ; lin clean_A = mkA "tiszta" ; @@ -92,7 +92,7 @@ lin day_N = mkN "nap" "napot" ; -- lin dirty_A = mkA "" ; -- lin distance_N3 = mkN "" ; -- lin do_V2 = mkV2 do_V ; -lin doctor_N = mkN "orvos" "orvost"; +lin doctor_N = humanN (mkN "orvos" "orvost"); lin dog_N = mkN "kutya" "kutyát"; lin door_N = mkN "ajtó" "ajtót" ; -- lin drink_V2 = mkV2 "" ; @@ -139,7 +139,7 @@ lin forest_N = mkN "erdő" "erdőt" ; -- lin forget_V2 = mkV2 "" ; -- lin freeze_V = mkV "" ; lin fridge_N = mkN "hűtő" "hűtőt" ; -lin friend_N = mkN "barát" "barátot" ; +lin friend_N = humanN (mkN "barát" "barátot") ; lin fruit_N = mkN "gyümölcs" "gyümölcsöt" "gyümölcsök" "gyümölcse" ; --TODO: plural PossPl2 fails "gyümölcseitek" instead of "gyümölcseitök", wovel harmony changing? lin full_A = mkA "tele" ; -- --lin fun_AV @@ -148,7 +148,7 @@ lin full_A = mkA "tele" ; -- G lin garden_N = mkN "kert" "kertet" ; -lin girl_N = mkN "lány" "lányt"; +lin girl_N = humanN (mkN "lány" "lányt"); -- lin give_V3 = mkV3 "" ; lin glove_N = mkN "kesztyű" "kesztyűt" ; -- lin go_V = mkV "" ; @@ -179,7 +179,7 @@ lin horse_N = mkN "ló" "lovat"; lin hot_A = mkA "forró" ; lin house_N = mkN "ház" "házat" ; -- lin hunt_V2 = mkV2 "" ; -lin husband_N = mkN "férj" "férjet"; +lin husband_N = humanN (mkN "férj" "férjet"); -------- -- I - K @@ -190,7 +190,7 @@ lin iron_N = mkN "vas" "vasat" ; -- lin john_PN = mkPN "" ; -- lin jump_V = mkV "" ; -- lin kill_V2 = mkV2 "" ; -lin king_N = mkN "király" "királyt" ; +lin king_N = humanN (mkN "király" "királyt") ; lin knee_N = mkN "térd" "térdet"; -- lin know_V2 = mkV2 "" ; -- lin know_VQ = mkVQ "" ; @@ -223,12 +223,12 @@ lin love_N = mkN "szerelem" "szerelmet"; ---- -- M -lin man_N = mkN "férfi" "ak" harmA ; -- force plural allomorph and a-harmony +lin man_N = humanN (mkN "férfi" "ak" harmA) ; -- force plural allomorph and a-harmony lin married_A2 = mkA2 "házas" Ins ; lin meat_N = mkN "hús" "húst"; lin milk_N = mkN "tej" "tejet" ; lin moon_N = mkN "hold" "holdat" ; -lin mother_N2 = mkN2 (mkN "anya" "anyát") ; +lin mother_N2 = mkN2 (humanN (mkN "anya" "anyát")) ; lin mountain_N = mkN "hegy" "hegyet"; lin mouth_N = mkN "száj" "szájat" ; lin music_N = mkN "zene" "zenét"; @@ -259,12 +259,12 @@ lin paper_N = mkN "papír" "papírt" "papírok" "papírja" ; -- lin paris_PN = mkPN "Paris" ; lin peace_N = mkN "béke" "békét"; lin pen_N = mkN "toll" "tollat" ; -lin person_N = mkN "ember" "embert"; +lin person_N = humanN (mkN "ember" "embert"); lin planet_N = mkN "bolygó" "bolygót" ; lin plastic_N = mkN "műanyag" "műanyagot" "műanyagok" "műanyaga" ; -- lin play_V = mkV "" ; -lin policeman_N = mkN "rendőr" "rendőrt"; --the police "rendőrség" -lin priest_N = mkN "pap" "papot" "papok" "papja" ; +lin policeman_N = humanN (mkN "rendőr" "rendőrt"); --the police "rendőrség" +lin priest_N = humanN (mkN "pap" "papot" "papok" "papja") ; -- lin pull_V2 = mkV2 "" ; -- lin push_V2 = mkV2 "" ; -- lin put_V2 = mkV2 "" ; @@ -272,7 +272,7 @@ lin priest_N = mkN "pap" "papot" "papok" "papja" ; -- -------- -- -- Q - R -- -lin queen_N = mkN "kírálynő" "kírálynőt" ; +lin queen_N = humanN (mkN "kírálynő" "kírálynőt") ; lin question_N = mkN "kérdés" "kérdést" ; lin radio_N = mkN "rádió" "rádiót" ; lin rain_N = mkN "eső" "esőt" ; @@ -363,7 +363,7 @@ lin table_N = mkN "asztal" "asztalt"; lin tail_N = mkN "farok" "farkot"; lin talk_V3 = mkV3 "beszél" ; -- lin teach_V2 = mkV2 "" ; -lin teacher_N = mkN "tanár" "tanárt" ; +lin teacher_N = humanN (mkN "tanár" "tanárt") ; lin television_N = mkN "tévé" "tévét" ; --also "televízió" but not used lin thick_A = mkA "vastag" ; lin thin_A = mkA "vekony" ; @@ -401,14 +401,14 @@ lin water_N = mkN "víz" "vizet" ; lin wet_A = mkA "nedves" ; lin white_A = mkA "fehér" ; lin wide_A = mkA "széles" ; -lin wife_N = mkN "feleség" "feleséget" ; +lin wife_N = humanN (mkN "feleség" "feleséget") ; -- lin win_V2 = mkV2 "" ; lin wind_N = mkN "szél" "szelet" ; lin window_N = mkN "ablak" "ablakot" "ablakok" "ablaka" ; lin wine_N = mkN "bor" "bort"; lin wing_N = mkN "szárny" "szárnyat"; -- lin wipe_V2 = mkV2 "" ; -lin woman_N = mkN "nő" "nőt" ; +lin woman_N = humanN (mkN "nő" "nőt") ; -- lin wonder_VQ = mkVQ "" ; lin wood_N = mkN "fa" "fát"; --same as tree lin worm_N = mkN "féreg" "férget"; --also "kukac" diff --git a/src/hungarian/NounHun.gf b/src/hungarian/NounHun.gf index b82df430..90d895e1 100644 --- a/src/hungarian/NounHun.gf +++ b/src/hungarian/NounHun.gf @@ -65,7 +65,7 @@ concrete NounHun of Noun = CatHun ** open -- : NP -> RS -> NP ; -- Paris, which is here RelNP np rs = np ** { - s = \\p,c => np.s ! p ! c ++ bindComma ++ rs.s ! np.agr.p2 ! c ; + s = \\p,c => np.s ! p ! c ++ bindComma ++ rs.s ! np.g ! np.agr.p2 ! c ; } ; -- Determiners can form noun phrases directly. @@ -159,7 +159,7 @@ concrete NounHun of Noun = CatHun ** open -- : A -> Ord ; OrdSuperl a = { s = \\n,c => - let adj : Noun = (a ** {s = a.s ! Superl}) in + let adj : Noun = (a ** {s = a.s ! Superl; g=NonHuman}) in caseFromStem glue adj c n ; n = Sg -- ?? is this meaningful? } ; @@ -220,7 +220,7 @@ concrete NounHun of Noun = CatHun ** open -- : CN -> RS -> CN ; RelCN cn rs = cn ** { - compl = \\n,c => cn.compl ! n ! c ++ rs.s ! n ! c + compl = \\n,c => cn.compl ! n ! c ++ rs.s ! cn.g ! n ! c } ; -- : CN -> Adv -> CN ; @@ -248,29 +248,20 @@ concrete NounHun of Noun = CatHun ** open --2 Possessive and partitive constructs -- : PossNP : CN -> NP -> CN ; - -- PossNP cn np = cn ** { - -- compl = \\n,c => cn.compl ! n ! c ++ np.s ! Poss P3 n ! c -- TODO check - -- } ; + PossNP cn np = cn ** { + compl = \\n,c => cn.compl ! n ! c ++ np.s ! NoPoss ! Dat ++ np.postmod + } ; -- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples -- PartNP cn np = cn ** { -- } ; -{- - --- This is different from the partitive, as shown by many languages. - - -- : Det -> NP -> NP ; - CountNP det np = np ** - { } ; -- Nonsense for DefArt or IndefArt - --3 Conjoinable determiners and ones with adjectives -- : DAP -> AP -> DAP ; -- the large (one) - AdjDAP dap ap = dap ** { } ; + AdjDAP dap ap = dap ; -- : Det -> DAP ; -- this (or that) DetDAP det = det ; --} } diff --git a/src/hungarian/NounMorphoHun.gf b/src/hungarian/NounMorphoHun.gf index bb5965c2..53751d14 100644 --- a/src/hungarian/NounMorphoHun.gf +++ b/src/hungarian/NounMorphoHun.gf @@ -1,7 +1,7 @@ resource NounMorphoHun = ParamHun ** open Prelude, Predef in { oper - Noun = {s : NumCaseStem => Str ; h : Harm} ; + Noun = {s : NumCaseStem => Str ; h : Harm ; g : Gender} ; -- Paradigm functions -- http://www.cse.chalmers.se/~aarne/articles/smart-preprint.pdf @@ -275,6 +275,7 @@ oper PossdSg_PossrSg1P2 => init possdSg_PossrSg1P2 ; PossdPl => possdPl } ; h = h ; + g = NonHuman } ; @@ -593,7 +594,7 @@ oper -- All other singular forms and stems c => w + endCaseSg c ! h } ; - + g = NonHuman } ; diff --git a/src/hungarian/ParadigmsHun.gf b/src/hungarian/ParadigmsHun.gf index 120cccd9..9845d452 100644 --- a/src/hungarian/ParadigmsHun.gf +++ b/src/hungarian/ParadigmsHun.gf @@ -25,6 +25,8 @@ oper mkN : (unoka : Str) -> (testvér : N) -> N ; -- Compound noun. Use: `mkN "unoka" (mkN "testvér")` (would give wrong harmony with `mkN "unokatestvér"`) } ; + humanN : N -> N = \n -> n ** {g = Human} ; + mkPN : overload { mkPN : Str -> PN ; -- Singular PN out of a string mkPN : Str -> Number -> PN -- PN with a given number diff --git a/src/hungarian/ParamHun.gf b/src/hungarian/ParamHun.gf index 64e2f376..79082833 100644 --- a/src/hungarian/ParamHun.gf +++ b/src/hungarian/ParamHun.gf @@ -56,6 +56,7 @@ oper -- Nouns param + Gender = Human | NonHuman ; NumCaseStem = SgNom | SgAccStem | SgSup -- These may use 2-3 different stems diff --git a/src/hungarian/RelativeHun.gf b/src/hungarian/RelativeHun.gf index 84b873a1..0b20cd7f 100644 --- a/src/hungarian/RelativeHun.gf +++ b/src/hungarian/RelativeHun.gf @@ -13,16 +13,30 @@ lin -- : RP ; IdRP = {s = - table {Sg => caseTable "ami" "amit" "aminek" -- nom, acc, dat - "amibe" "amiben" "amiből" -- ill, ine, ela - "amihez" "aminél" "amitől" -- all, ade, abl - "amire" "amin" "amiről" -- sub, sup, del - "amiért" "amivel" "amivé" ; -- cau, ins, tra - Pl => caseTable "amik" "amiket" "amiknek" -- nom, acc, dat - "amikbe" "amikben" "amikből" -- ill, ine, ela - "amikhez" "amiknél" "amiktől" -- all, ade, abl - "amikre" "amiken" "amikről" -- sub, sup, del - "amikért" "amikkel" "amikké"}; -- cau, ins, tra + table { + Human => + table {Sg => caseTable "aki" "akit" "akinek" -- nom, acc, dat + "akibe" "akiben" "akiből" -- ill, ine, ela + "akihez" "akinél" "akitől" -- all, ade, abl + "akire" "akin" "akiről" -- sub, sup, del + "akiért" "akivel" "akivé" ; -- cau, ins, tra + Pl => caseTable "akik" "akiket" "akiknek" -- nom, acc, dat + "akikbe" "akikben" "akikből" -- ill, ine, ela + "akikhez" "akiknél" "akiktől" -- all, ade, abl + "akikre" "akiken" "akikről" -- sub, sup, del + "akikért" "akikkel" "akikké"} ; -- cau, ins, tra + NonHuman => + table {Sg => caseTable "ami" "amit" "aminek" -- nom, acc, dat + "amibe" "amiben" "amiből" -- ill, ine, ela + "amihez" "aminél" "amitől" -- all, ade, abl + "amire" "amin" "amiről" -- sub, sup, del + "amiért" "amivel" "amivé" ; -- cau, ins, tra + Pl => caseTable "amik" "amiket" "amiknek" -- nom, acc, dat + "amikbe" "amikben" "amikből" -- ill, ine, ela + "amikhez" "amiknél" "amiktől" -- all, ade, abl + "amikre" "amiken" "amikről" -- sub, sup, del + "amikért" "amikkel" "amikké"} -- cau, ins, tra + } ; } ; -- : Prep -> NP -> RP -> RP ; -- the mother of whom diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 71c5cd05..27ef397b 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -16,6 +16,7 @@ oper CNoun : Type = Noun ** { compl : Number => Case => Str ; postmod : Str ; + g : Gender } ; mkCaseNoun : Str -> Number => Case => Str = \s -> @@ -75,6 +76,7 @@ oper agr : Person*Number ; objdef : ObjDef ; empty : Str ; -- standard trick for pro-drop + g : Gender ; } ; NounPhrase : Type = BaseNP ** { @@ -86,6 +88,7 @@ oper s = \\_,_ => [] ; agr = ; objdef = Indef ; + g = NonHuman ; postmod, empty = [] ; } ; @@ -604,16 +607,16 @@ oper -- Relative - RP : Type = {s : Number => Case => Str} ; - RClause : Type = {s : Tense => Anteriority => Polarity => Number => Case => Str} ; + RP : Type = {s : Gender => Number => Case => Str} ; + RClause : Type = {s : Tense => Anteriority => Polarity => Gender => Number => Case => Str} ; relVP : RP -> VerbPhrase -> RClause = \rp -> relVP' (rp ** {agr=}) ; relVP' : RP ** {agr : Person*Number} -> VerbPhrase -> RClause = \rp,vp -> { - s = \\t,a,p,n,c => let subjcase : Case = case vp.sc of { + s = \\t,a,p,g,n,c => let subjcase : Case = case vp.sc of { SCNom => Nom ; SCDat => Dat } - in rp.s ! n ! subjcase + in rp.s ! g ! n ! subjcase ++ if_then_Pol p [] "nem" ++ vp.obj -- ! ++ vp.adv @@ -625,10 +628,11 @@ oper } ; relSlash : RP -> ClSlash -> RClause = \rp,cls -> { - s = \\t,a,p,n,c => let objcase : Case = case cls.c2 of { - Acc => c ; - _ => cls.c2 } - in rp.s ! n ! objcase + s = \\t,a,p,g,n,c => let objcase : Case = case cls.c2 of { + Acc => c ; + _ => cls.c2 + } + in rp.s ! g ! n ! objcase ++ cls.s ! t ! a ! p } ; -------------------------------------------------------------------------------- diff --git a/src/hungarian/SentenceHun.gf b/src/hungarian/SentenceHun.gf index 82f884ca..8ddef3f1 100644 --- a/src/hungarian/SentenceHun.gf +++ b/src/hungarian/SentenceHun.gf @@ -56,7 +56,7 @@ lin UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ; -- : Temp -> Pol -> RCl -> RS ; - UseRCl t p cl = {s = \\n,c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! n ! c} ; + UseRCl t p cl = {s = \\g,n,c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! g ! n ! c} ; -- AdvS : Adv -> S -> S ; -- then I will go home AdvS = advS "" ; diff --git a/src/hungarian/StructuralHun.gf b/src/hungarian/StructuralHun.gf index 711ca6f0..8f3440cf 100644 --- a/src/hungarian/StructuralHun.gf +++ b/src/hungarian/StructuralHun.gf @@ -121,14 +121,14 @@ lin under_Prep = nomAdp "alatt" ; -- Pron -- Pronouns are closed class, no constructor in ParadigmsHun. - i_Pron = pronTable ! ; + i_Pron = pronTable ! ** {g = Human} ; youPol_Pron, - youSg_Pron = pronTable ! ; + youSg_Pron = pronTable ! ** {g = Human} ; he_Pron, - she_Pron, + she_Pron = pronTable ! ** {g = Human} ; it_Pron = pronTable ! ; - we_Pron = pronTable ! ; - youPl_Pron = pronTable ! ; + we_Pron = pronTable ! ** {g = Human} ; + youPl_Pron = pronTable ! ** {g = Human} ; they_Pron = pronTable ! ; --lin whatPl_IP = ;