diff --git a/src/abstract/Cat.gf b/src/abstract/Cat.gf index 48056809..20c19f20 100644 --- a/src/abstract/Cat.gf +++ b/src/abstract/Cat.gf @@ -126,6 +126,8 @@ abstract Cat = Common ** { N ; -- common noun e.g. "house" N2 ; -- relational noun e.g. "son" N3 ; -- three-place relational noun e.g. "connection" + GN ; -- given name e.g. "George" + SN ; -- second name e.g. "Washington" PN ; -- proper name e.g. "Paris" -- DEPRECATED: QuantSg, QuantPl diff --git a/src/abstract/Documentation.gf b/src/abstract/Documentation.gf index f5be1a36..b5afc4ea 100644 --- a/src/abstract/Documentation.gf +++ b/src/abstract/Documentation.gf @@ -14,6 +14,8 @@ fun InflectionN2 : N2 -> Inflection ; InflectionN3 : N3 -> Inflection ; InflectionPN : PN -> Inflection ; + InflectionGN : GN -> Inflection ; + InflectionSN : SN -> Inflection ; InflectionA : A -> Inflection ; InflectionA2 : A2 -> Inflection ; InflectionV : V -> Inflection ; diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 66016941..491ff6ed 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -292,4 +292,8 @@ cat X ; -- for words that are difficult to classify, mainly for MorphoDict fun CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc + GivenName : GN -> PN ; + Surname : SN -> PN ; + FullName : GN -> SN -> PN ; + } diff --git a/src/afrikaans/AllAfr.gf b/src/afrikaans/AllAfr.gf index db82f7df..08c762c1 100644 --- a/src/afrikaans/AllAfr.gf +++ b/src/afrikaans/AllAfr.gf @@ -3,7 +3,7 @@ concrete AllAfr of AllAfrAbs = LangAfr, IrregAfr, - ExtraAfr + ExtendAfr ** { --{} ; diff --git a/src/afrikaans/CatAfr.gf b/src/afrikaans/CatAfr.gf index d0d06f3e..09293f06 100644 --- a/src/afrikaans/CatAfr.gf +++ b/src/afrikaans/CatAfr.gf @@ -83,6 +83,6 @@ concrete CatAfr of Cat = N = Noun ; N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ; N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ; - PN = {s : NPCase => Str} ; + GN, SN, PN = {s : NPCase => Str} ; } diff --git a/src/afrikaans/DocumentationAfr.gf b/src/afrikaans/DocumentationAfr.gf index 95c3f6ad..b58c51af 100644 --- a/src/afrikaans/DocumentationAfr.gf +++ b/src/afrikaans/DocumentationAfr.gf @@ -28,6 +28,18 @@ lin s2 = paragraph (pn.s ! NPNom) } ; + InflectionGN = \pn -> { + t = "vnm" ; + s1 = heading1 "Voornaam" ; + s2 = paragraph (pn.s ! NPNom) + } ; + + InflectionSN = \pn -> { + t = "van" ; + s1 = heading1 "Van" ; + s2 = paragraph (pn.s ! NPNom) + } ; + InflectionA, InflectionA2 = \adj -> let gforms : AForm -> Str = \a -> diff --git a/src/afrikaans/ExtendAfr.gf b/src/afrikaans/ExtendAfr.gf new file mode 100644 index 00000000..a2e6b52e --- /dev/null +++ b/src/afrikaans/ExtendAfr.gf @@ -0,0 +1,14 @@ +concrete ExtendAfr of Extend = + CatAfr ** ExtendFunctor + with + (Grammar = GrammarAfr) ** + + open + ResAfr in { + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\c => gn.s ! NPNom ++ sn.s ! c ; + } ; + +} diff --git a/src/bantu/CatBantu.gf b/src/bantu/CatBantu.gf index 8105755e..a9d3acf2 100644 --- a/src/bantu/CatBantu.gf +++ b/src/bantu/CatBantu.gf @@ -81,7 +81,7 @@ incomplete concrete CatBantu of Cat = -- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ; N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ; - PN = {s : Case => Str ; g : Gender} ; + GN, SN, PN = {s : Case => Str ; g : Gender} ; --Tense = {s : Str ; t : ResKam.Tense} ; linref diff --git a/src/bulgarian/CatBul.gf b/src/bulgarian/CatBul.gf index 44f64d31..3651a542 100644 --- a/src/bulgarian/CatBul.gf +++ b/src/bulgarian/CatBul.gf @@ -86,6 +86,7 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, ( N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ; N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ; N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ; + GN, SN = {s : Str; g : Gender} ; PN = {s : Str; gn : GenNum} ; lindef diff --git a/src/bulgarian/DocumentationBul.gf b/src/bulgarian/DocumentationBul.gf index 850de1e4..9c3100a3 100644 --- a/src/bulgarian/DocumentationBul.gf +++ b/src/bulgarian/DocumentationBul.gf @@ -92,6 +92,30 @@ lin s3 = "" } ; + InflectionGN = \pn -> { + t = "същ.с.л." ; + s1= heading1 ("Собствено Име"++ + case pn.g of { + Masc => "(м.р.)" ; + Fem => "(ж.р.)" ; + Neut => "(ср.р.)" + }) ; + s2 = pn.s ; + s3 = "" + } ; + + InflectionSN = \pn -> { + t = "същ.с.ф." ; + s1= heading1 ("Фамилно Име"++ + case pn.g of { + Masc => "(м.р.)" ; + Fem => "(ж.р.)" ; + Neut => "(ср.р.)" + }) ; + s2 = pn.s ; + s3 = "" + } ; + InflectionA, InflectionA2 = \a -> { t = "пр" ; s1= heading1 ("Прилагателно") ; diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index 2d2d82bc..e798bc6f 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -300,5 +300,14 @@ lin UseDAP dap = { p = NounP3 dap.p } ; +lin GivenName, Surname = \n -> { + s = n.s ; + gn = GSg n.g + } ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + gn = GSg gn.g + } ; + } diff --git a/src/bulgarian/MorphoFunsBul.gf b/src/bulgarian/MorphoFunsBul.gf index 43add119..4b9cd009 100644 --- a/src/bulgarian/MorphoFunsBul.gf +++ b/src/bulgarian/MorphoFunsBul.gf @@ -271,6 +271,15 @@ oper feminine : Gender = Fem ; neutr : Gender = Neut ; + mkGN : Str -> Gender -> GN = + \s,g -> lin GN {s = s; g = g} ; + mkSN = overload { + mkSN : Str -> SN = + \s -> lin SN {s = s; g = Masc} ; + mkSN : Str -> Gender -> SN = + \s,g -> lin SN {s = s; g = g} ; + } ; + mkPN = overload { mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ; mkPN : Str -> Gender -> PN = diff --git a/src/catalan/ExtendCat.gf b/src/catalan/ExtendCat.gf index 20ab56ae..04e9fac3 100644 --- a/src/catalan/ExtendCat.gf +++ b/src/catalan/ExtendCat.gf @@ -15,5 +15,10 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- - ParadigmsCat in { -- put your own definitions here +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + g = gn.g + } ; } ; diff --git a/src/chinese/CatChi.gf b/src/chinese/CatChi.gf index a046e755..2470cf82 100644 --- a/src/chinese/CatChi.gf +++ b/src/chinese/CatChi.gf @@ -79,7 +79,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu N = ResChi.Noun ; N2 = ResChi.Noun ** {c2 : Preposition} ; N3 = ResChi.Noun ** {c2,c3 : Preposition} ; - PN = ResChi.NP ; + GN, SN, PN = ResChi.NP ; -- overridden diff --git a/src/chinese/ExtendChi.gf b/src/chinese/ExtendChi.gf index 682f8159..c49e4da2 100644 --- a/src/chinese/ExtendChi.gf +++ b/src/chinese/ExtendChi.gf @@ -16,4 +16,10 @@ concrete ExtendChi of Extend = CatChi ** oper mkAdv : Str -> Adv ; mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ; - }; + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s + } ; + +}; diff --git a/src/dutch/CatDut.gf b/src/dutch/CatDut.gf index c48adbe3..382aa282 100644 --- a/src/dutch/CatDut.gf +++ b/src/dutch/CatDut.gf @@ -81,6 +81,6 @@ concrete CatDut of Cat = N = Noun ; N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ; N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ; - PN = {s : NPCase => Str} ; + GN, SN, PN = {s : NPCase => Str} ; } diff --git a/src/dutch/ExtendDut.gf b/src/dutch/ExtendDut.gf index 4cc3d758..8b822c3b 100644 --- a/src/dutch/ExtendDut.gf +++ b/src/dutch/ExtendDut.gf @@ -115,4 +115,9 @@ lin isPron = False } ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\c => gn.s ! NPNom ++ sn.s ! c + } ; + } diff --git a/src/english/CatEng.gf b/src/english/CatEng.gf index 049210bc..7731e26c 100644 --- a/src/english/CatEng.gf +++ b/src/english/CatEng.gf @@ -106,7 +106,7 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in { N = {s : Number => Case => Str ; g : Gender} ; N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; - PN = {s : Case => Str ; g : Gender} ; + GN, SN, PN = {s : Case => Str ; g : Gender} ; lindef SSlash = \s -> {s = s; c2 = ""} ; diff --git a/src/english/DocumentationEng.gf b/src/english/DocumentationEng.gf index 5de58b0c..d5441e74 100644 --- a/src/english/DocumentationEng.gf +++ b/src/english/DocumentationEng.gf @@ -38,6 +38,34 @@ lin ) } ; + InflectionGN = \pn -> { + t = "gn" ; + s1 = heading1 ("Given Name" ++ + case pn.g of { + Neutr => ""; + Masc => "(masc)"; + Fem => "(fem)" + }) ; + s2 = frameTable ( + tr (th "nom" ++ th "gen") ++ + tr (td (pn.s ! Nom) ++ td (pn.s ! Gen)) + ) + } ; + + InflectionSN = \pn -> { + t = "sn" ; + s1 = heading1 ("Secondary Name" ++ + case pn.g of { + Neutr => ""; + Masc => "(masc)"; + Fem => "(fem)" + }) ; + s2 = frameTable ( + tr (th "nom" ++ th "gen") ++ + tr (td (pn.s ! Nom) ++ td (pn.s ! Gen)) + ) + } ; + InflectionA, InflectionA2 = \adj -> { t = "a" ; s1 = heading1 "Adjective" ; diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index c2560268..a9cdb3fb 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -471,4 +471,11 @@ lin UseDAPFem dap = { lin CardCNCard card cn = {s,sp = \\d,c => card.s ! d ! Nom ++ cn.s ! card.n ! c ; n = Pl} ; +lin GivenName gn = gn ; +lin Surname sn = sn ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c ; + g = gn.g + } ; + } diff --git a/src/estonian/CatEst.gf b/src/estonian/CatEst.gf index e63e33fa..28fdd42f 100644 --- a/src/estonian/CatEst.gf +++ b/src/estonian/CatEst.gf @@ -91,7 +91,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in { c2,c3 : Compl ; isPre,isPre2 : Bool } ; - PN = {s : Case => Str} ; + GN, SN, PN = {s : Case => Str} ; linref VP = \vp -> linV vp.v ; diff --git a/src/estonian/ExtendEst.gf b/src/estonian/ExtendEst.gf index 128a72ad..53750804 100644 --- a/src/estonian/ExtendEst.gf +++ b/src/estonian/ExtendEst.gf @@ -437,4 +437,9 @@ concrete ExtendEst of Extend = WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c + } ; + } diff --git a/src/finnish/CatFin.gf b/src/finnish/CatFin.gf index 312efcd8..08b07efe 100644 --- a/src/finnish/CatFin.gf +++ b/src/finnish/CatFin.gf @@ -95,7 +95,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in { N = SNoun ; N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ; N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ; - PN = SPN ; + GN, SN, PN = SPN ; linref SSlash = \ss -> ss.s ++ ss.c2.s.p1 ; diff --git a/src/finnish/DocumentationFinFunctor.gf b/src/finnish/DocumentationFinFunctor.gf index 71395dd9..47dec43d 100644 --- a/src/finnish/DocumentationFinFunctor.gf +++ b/src/finnish/DocumentationFinFunctor.gf @@ -37,6 +37,18 @@ lin s2 = inflPN (\c -> pn.s ! c) } ; + InflectionGN = \pn -> { + t = "s" ; + s1 = heading1 "Etunimi" ; + s2 = inflPN (\c -> pn.s ! c) + } ; + + InflectionSN = \pn -> { + t = "s" ; + s1 = heading1 "Sukunimi" ; + s2 = inflPN (\c -> pn.s ! c) + } ; + InflectionA, InflectionA2 = \adj -> { t = "a" ; s1 = heading1 (heading adjective_Category) ; diff --git a/src/finnish/ExtendFin.gf b/src/finnish/ExtendFin.gf index 26837de7..0d215e68 100644 --- a/src/finnish/ExtendFin.gf +++ b/src/finnish/ExtendFin.gf @@ -240,4 +240,11 @@ lin CardCNCard card cn = { lin UttAccNP np = {s = P.addNegation np.isNeg ++ np.s ! NPAcc} ; lin AdjAsCN ap = {s = ap.s ! True ; postmod = \\_ => ap.p ; h = Back} ; ---- Harmony just a guess lin AdjAsNP ap = MassNP (AdjAsCN ap) ; + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c + } ; + + } diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf index d03498d0..963c2ab0 100644 --- a/src/french/ExtendFre.gf +++ b/src/french/ExtendFre.gf @@ -38,6 +38,10 @@ lin oper de_Quant : Quant = IndefArt ** {s = \\_,_,_,_ => elisDe} ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + g = gn.g + } ; - - } \ No newline at end of file +} diff --git a/src/german/CatGer.gf b/src/german/CatGer.gf index 6b5c20cf..a7e0814b 100644 --- a/src/german/CatGer.gf +++ b/src/german/CatGer.gf @@ -100,6 +100,7 @@ concrete CatGer of Cat = N = ResGer.Noun ; N2 = ResGer.Noun ** {c2 : Preposition} ; N3 = ResGer.Noun ** {c2,c3 : Preposition} ; + GN, SN = {s : Case => Str; g : Gender} ; PN = {s : Case => Str; g : Gender; n : Number} ; -- tense with possibility to choose conjunctive forms diff --git a/src/german/ExtendGer.gf b/src/german/ExtendGer.gf index bf6757c7..de7f24b3 100644 --- a/src/german/ExtendGer.gf +++ b/src/german/ExtendGer.gf @@ -140,5 +140,11 @@ lin (Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! NPC c ; n = Pl } ; - + +lin GivenName, Surname = \n -> n ** { n = Sg } ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c ; + g = gn.g ; + n = Sg + } ; } diff --git a/src/italian/ExtendIta.gf b/src/italian/ExtendIta.gf index 0df8be02..8e537611 100644 --- a/src/italian/ExtendIta.gf +++ b/src/italian/ExtendIta.gf @@ -15,5 +15,10 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor-- - ParadigmsIta in { -- put your own definitions here +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + g = gn.g + } ; } ; diff --git a/src/korean/CatKor.gf b/src/korean/CatKor.gf index a6fc9d84..05a56da1 100644 --- a/src/korean/CatKor.gf +++ b/src/korean/CatKor.gf @@ -115,7 +115,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in { N = ResKor.Noun ; N2 = ResKor.Noun2 ; N3 = ResKor.Noun3 ; - PN = ResKor.NounPhrase ; + GN, SN, PN = ResKor.NounPhrase ; linref V, V2, V3 = linVerb ; diff --git a/src/korean/ExtendKor.gf b/src/korean/ExtendKor.gf index d0d462dd..d85dd205 100644 --- a/src/korean/ExtendKor.gf +++ b/src/korean/ExtendKor.gf @@ -8,4 +8,11 @@ concrete ExtendKor of Extend = CatKor lin -- : NP -> NP -> NP ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ; + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\nf => gn.s ! nf ++ sn.s ! nf ; + p = gn.p + } ; + } ; diff --git a/src/maltese/CatMlt.gf b/src/maltese/CatMlt.gf index 7860a721..aa800934 100644 --- a/src/maltese/CatMlt.gf +++ b/src/maltese/CatMlt.gf @@ -118,7 +118,7 @@ concrete CatMlt of Cat = CommonX - [Adv] ** open ResMlt, Prelude in { N = Noun ; N2 = Noun ** {c2 : Compl} ; N3 = Noun ** {c2, c3 : Compl} ; - PN = ProperNoun ; + GN, SN, PN = ProperNoun ; -- Overridden from CommonX diff --git a/src/maltese/ExtraMlt.gf b/src/maltese/ExtraMlt.gf index 8a9a9c88..9f010e7c 100644 --- a/src/maltese/ExtraMlt.gf +++ b/src/maltese/ExtraMlt.gf @@ -24,4 +24,10 @@ concrete ExtraMlt of ExtraMltAbs = CatMlt ** a = p.a ; } ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + a = gn.a + } ; + } diff --git a/src/polish/CatPol.gf b/src/polish/CatPol.gf index a5b47971..031ea35d 100644 --- a/src/polish/CatPol.gf +++ b/src/polish/CatPol.gf @@ -119,7 +119,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX) N3 = CommNoun3;-- ** { c, c2 : Complement } ; - PN = NounPhrase; + GN, SN, PN = NounPhrase; CAdv = {s,p,sn,pn : Str} ; diff --git a/src/polish/DocumentationPol.gf b/src/polish/DocumentationPol.gf index e92bf0ee..8eda32b1 100644 --- a/src/polish/DocumentationPol.gf +++ b/src/polish/DocumentationPol.gf @@ -52,6 +52,44 @@ lin ) } ; + InflectionGN = \pn -> { + t = "im" ; + s1 = heading1 ("Imię" ++ case pn.gn of { + MascPersSg|MascAniSg|MascInaniSg|MascPersPl => "(męskorzeczowy)"; + FemSg => "(żeński)"; + NeutSg => "(nijaki)"; + _ => "" + }) ; + s2 = frameTable ( + tr (th "mianownik" ++ td (pn.nom)) ++ + tr (th "dopełniacz" ++ td (pn.dep ! GenPrep)) ++ + tr (th "celownik" ++ td (pn.dep ! DatPrep)) ++ + tr (th "biernik" ++ td (pn.dep ! AccPrep)) ++ + tr (th "narzędnik" ++ td (pn.dep ! InstrC)) ++ + tr (th "miejscownik" ++ td (pn.dep ! LocPrep)) ++ + tr (th "wołacz" ++ td (pn.voc)) + ) + } ; + + InflectionSN = \pn -> { + t = "im" ; + s1 = heading1 ("Nazwisko" ++ case pn.gn of { + MascPersSg|MascAniSg|MascInaniSg|MascPersPl => "(męskorzeczowy)"; + FemSg => "(żeński)"; + NeutSg => "(nijaki)"; + _ => "" + }) ; + s2 = frameTable ( + tr (th "mianownik" ++ td (pn.nom)) ++ + tr (th "dopełniacz" ++ td (pn.dep ! GenPrep)) ++ + tr (th "celownik" ++ td (pn.dep ! DatPrep)) ++ + tr (th "biernik" ++ td (pn.dep ! AccPrep)) ++ + tr (th "narzędnik" ++ td (pn.dep ! InstrC)) ++ + tr (th "miejscownik" ++ td (pn.dep ! LocPrep)) ++ + tr (th "wołacz" ++ td (pn.voc)) + ) + } ; + InflectionA, InflectionA2 = \adj -> { t = "a" ; s1 = heading1 "Przymiotnik" ; diff --git a/src/polish/ExtendPol.gf b/src/polish/ExtendPol.gf index b976212e..b241d935 100644 --- a/src/polish/ExtendPol.gf +++ b/src/polish/ExtendPol.gf @@ -37,4 +37,13 @@ oper p = P3 }; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + nom = gn.nom ++ sn.nom ; + voc = gn.nom ++ sn.voc ; + dep = \\c => gn.nom ++ sn.dep ! c ; + gn = gn.gn ; + p = gn.p + } ; + } diff --git a/src/portuguese/ExtendPor.gf b/src/portuguese/ExtendPor.gf index c91b169a..35e05212 100644 --- a/src/portuguese/ExtendPor.gf +++ b/src/portuguese/ExtendPor.gf @@ -116,4 +116,10 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor - youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ; theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + g = gn.g + } ; + } ; diff --git a/src/romance/CatRomance.gf b/src/romance/CatRomance.gf index 24ebad7c..3b52a103 100644 --- a/src/romance/CatRomance.gf +++ b/src/romance/CatRomance.gf @@ -110,7 +110,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] N = Noun ; N2 = Noun ** {c2 : Compl} ; N3 = Noun ** {c2,c3 : Compl} ; - PN = {s : Str ; g : Gender} ; + GN, SN, PN = {s : Str ; g : Gender} ; -- tense augmented with passé simple lincat diff --git a/src/romanian/CatRon.gf b/src/romanian/CatRon.gf index d085ec6d..094a6ed9 100644 --- a/src/romanian/CatRon.gf +++ b/src/romanian/CatRon.gf @@ -131,7 +131,7 @@ concrete CatRon of Cat = N3 = Noun ** {c2,c3 : Compl} ; - PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ; + GN, SN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ; Comp = {s : Agr => Str} ; diff --git a/src/russian/CatRus.gf b/src/russian/CatRus.gf index 4ff4a2fb..0c0a0148 100644 --- a/src/russian/CatRus.gf +++ b/src/russian/CatRus.gf @@ -1,7 +1,7 @@ concrete CatRus of Cat = CommonX ** open ResRus, Prelude in { flags coding=utf8 ; optimize=all ; lincat - N, PN = ResRus.NounForms ; + N, GN, SN, PN = ResRus.NounForms ; N2 = ResRus.Noun2Forms ; N3 = ResRus.Noun3Forms ; diff --git a/src/russian/ExtendRus.gf b/src/russian/ExtendRus.gf index 995078d8..cf796071 100644 --- a/src/russian/ExtendRus.gf +++ b/src/russian/ExtendRus.gf @@ -216,4 +216,27 @@ lin oper rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude? + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + snom = gn.snom ++ sn.snom ; + sgen = gn.snom ++ sn.sgen ; + sdat = gn.snom ++ sn.sdat ; + sacc = gn.snom ++ sn.sacc ; + sins = gn.snom ++ sn.sins ; + sprep = gn.snom ++ sn.sprep ; + sloc = gn.snom ++ sn.sloc ; + sptv = gn.snom ++ sn.sptv ; + svoc = gn.snom ++ sn.svoc ; + pnom = gn.snom ++ sn.pnom ; + pgen = gn.snom ++ sn.pgen ; + pdat = gn.snom ++ sn.pdat ; + pacc = gn.snom ++ sn.pacc ; + pins = gn.snom ++ sn.pins ; + pprep = gn.snom ++ sn.pprep ; + g = gn.g ; + mayben = gn.mayben ; + anim = gn.anim + } ; + } ; diff --git a/src/scandinavian/CatScand.gf b/src/scandinavian/CatScand.gf index 370e62ff..454d6e76 100644 --- a/src/scandinavian/CatScand.gf +++ b/src/scandinavian/CatScand.gf @@ -108,7 +108,7 @@ incomplete concrete CatScand of Cat = -- {s : Number => Species => Case => Str ; g : Gender} ; N2 = Noun ** {c2 : Complement} ; N3 = Noun ** {c2,c3 : Complement} ; - PN = {s : Case => Str ; g : Gender} ; + GN, SN, PN = {s : Case => Str ; g : Gender} ; diff --git a/src/slovenian/CatSlv.gf b/src/slovenian/CatSlv.gf index 0ed6b591..4c66fe16 100644 --- a/src/slovenian/CatSlv.gf +++ b/src/slovenian/CatSlv.gf @@ -56,6 +56,7 @@ lincat N2 = {s : Case => Number => Str; g : AGender; c : Prep} ; N3 = {s : Case => Number => Str; g : AGender; c : Prep} ; + GN, SN = {s : Case => Str; g : AGender}; PN = {s : Case => Str; g : AGender; n : Number}; linref diff --git a/src/slovenian/ExtendSlv.gf b/src/slovenian/ExtendSlv.gf index c03f7ae1..988e1d92 100644 --- a/src/slovenian/ExtendSlv.gf +++ b/src/slovenian/ExtendSlv.gf @@ -57,5 +57,12 @@ lin youPolPl_Pron = youPol_Pron ; youPolPlFem_Pron = youPlFem_Pron ; +lin GivenName, Surname = \n -> n ** {n = Sg} ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c ; + g = gn.g ; + n = Sg + } ; + } diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index c4da9418..adc4d2a4 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -118,7 +118,7 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in { N = ResSom.Noun ; N2 = ResSom.Noun2 ; N3 = ResSom.Noun3 ; - PN = ResSom.PNoun ; + GN, SN, PN = ResSom.PNoun ; Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb. diff --git a/src/somali/ExtendSom.gf b/src/somali/ExtendSom.gf index f5196760..33989701 100644 --- a/src/somali/ExtendSom.gf +++ b/src/somali/ExtendSom.gf @@ -16,4 +16,11 @@ lin -- FocusAdv : Adv -> S -> Utt ; -- today I will sleep -- FocusAdV : AdV -> S -> Utt ; -- never will I sleep -- FocusAP : AP -> NP -> Utt ; -- green was the tree + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + a = gn.a + } ; + } ; diff --git a/src/spanish/ExtendSpa.gf b/src/spanish/ExtendSpa.gf index 1baf582b..16be8294 100644 --- a/src/spanish/ExtendSpa.gf +++ b/src/spanish/ExtendSpa.gf @@ -100,4 +100,10 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor - cop = serCopula } ; +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s ; + g = gn.g + } ; + } ; diff --git a/src/swedish/DocumentationSwe.gf b/src/swedish/DocumentationSwe.gf index bb82b5b4..3c4b551a 100644 --- a/src/swedish/DocumentationSwe.gf +++ b/src/swedish/DocumentationSwe.gf @@ -44,6 +44,30 @@ lin ) } ; + InflectionGN = \pn -> { + t = "fnm" ; + s1 = heading1 ("Förnamn" ++ case pn.g of { + Utr => "(utr)" ; + Neutr => "(neutr)" + }) ; + s2 = frameTable ( + tr (th "nom" ++ td (pn.s ! Nom)) ++ + tr (th "gen" ++ td (pn.s ! Gen)) + ) + } ; + + InflectionSN = \pn -> { + t = "enm" ; + s1 = heading1 ("Efternamn" ++ case pn.g of { + Utr => "(utr)" ; + Neutr => "(neutr)" + }) ; + s2 = frameTable ( + tr (th "nom" ++ td (pn.s ! Nom)) ++ + tr (th "gen" ++ td (pn.s ! Gen)) + ) + } ; + InflectionA, InflectionA2 = \adj -> { t = "a" ; s1 = heading1 "Adjektiv" ; diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index c1689845..eda3f4b3 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -392,5 +392,11 @@ lin UseDAPMasc, UseDAPFem = \dap -> lin CardCNCard card cn = {s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ; + +lin GivenName, Surname = \n -> n ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c ; + g = gn.g + } ; } diff --git a/src/thai/CatTha.gf b/src/thai/CatTha.gf index b407d488..ecab4fbd 100644 --- a/src/thai/CatTha.gf +++ b/src/thai/CatTha.gf @@ -71,6 +71,6 @@ concrete CatTha of Cat = CommonX ** open ResTha, Prelude in { N = ResTha.Noun ; N2 = ResTha.Noun ** {c2 : Str} ; N3 = ResTha.Noun ** {c2,c3 : Str} ; - PN = ResTha.NP ; + GN, SN, PN = ResTha.NP ; } diff --git a/src/turkish/CatTur.gf b/src/turkish/CatTur.gf index 527da0ff..6e3a8c08 100644 --- a/src/turkish/CatTur.gf +++ b/src/turkish/CatTur.gf @@ -49,7 +49,16 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud N = Noun ; N2 = Noun ** {c : Prep} ; N3 = Noun ** {c1,c2 : Prep} ; - PN = Noun ; + GN, SN = { + s : Case => Str ; + h : Harmony + } ; + PN = { + s : Case => Str ; + h : Harmony ; + n : Number + } ; + linref V = \v -> v.s ! VInfinitive ; diff --git a/src/turkish/ExtendTur.gf b/src/turkish/ExtendTur.gf index 775457b7..874b079b 100644 --- a/src/turkish/ExtendTur.gf +++ b/src/turkish/ExtendTur.gf @@ -7,4 +7,11 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in { a = {n=num.n; p=P3} ; } ; +lin GivenName, Surname = \n -> n ** {n = Sg}; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c ; + h = sn.h ; + n = Sg + } ; + } diff --git a/src/turkish/NounTur.gf b/src/turkish/NounTur.gf index 839ffad5..92ce1db8 100644 --- a/src/turkish/NounTur.gf +++ b/src/turkish/NounTur.gf @@ -19,9 +19,9 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude UsePron p = p ; UsePN pn = { - s = \\c => pn.s ! Sg ! c; + s = \\c => pn.s ! c; h = pn.h; - a = {n = Sg; p = P3} + a = {n = pn.n; p = P3} } ; PossPron p = {s = []; useGen = YesGen p.a} ; diff --git a/src/turkish/ParadigmsTur.gf b/src/turkish/ParadigmsTur.gf index 6f50a212..9b9ad2c8 100644 --- a/src/turkish/ParadigmsTur.gf +++ b/src/turkish/ParadigmsTur.gf @@ -155,7 +155,7 @@ resource ParadigmsTur = open -- digits can be seen as proper noun, but we need an additional harmony argument -- since harmony information can not be extracted from digit string. - makeHarPN : Str -> Str -> Harmony -> Noun ; + makeHarNoun : Str -> Str -> Harmony -> Noun ; -- Link two nouns, e.g. zeytin (olive) + yağ (oil) -> zeytinyağı (olive oil) linkNoun : (tere,yag : N) -> Species -> Contiguity -> N ; @@ -393,24 +393,28 @@ resource ParadigmsTur = open regPN sn = makePN sn sn ; - makeHarPN sn sy har = + makeHarNoun sn sy har = let bn = sn + "'" ; by = sy + "'" ; - pln = add_number Pl bn har.vow ; - in - mkNoun sn - (addSuffix by har accSuffix) - (addSuffix by har datSuffix) - (addSuffix by har genSuffix) - (addSuffix bn har locSuffix) - (addSuffix bn har ablatSuffix) - (addSuffix bn har abessPosSuffix) - (addSuffix bn har abessNegSuffix) - by - pln - har ; + pln = add_number Pl bn har.vow + in mkNoun sn + (addSuffix by har accSuffix) + (addSuffix by har datSuffix) + (addSuffix by har genSuffix) + (addSuffix bn har locSuffix) + (addSuffix bn har ablatSuffix) + (addSuffix bn har abessPosSuffix) + (addSuffix bn har abessNegSuffix) + by + pln + har ; - makePN sn sy = lin PN (makeHarPN sn sy (getHarmony sn)) ; + makePN sn sy = + let noun = makeHarNoun sn sy (getHarmony sn) + in lin PN { s = \\c => noun.s ! Sg ! c ; + h = noun.h ; + n = Sg + } ; linkNoun n1 n2 lt ct = let n1sn = n1.s ! Sg ! Nom ;--tere @@ -570,8 +574,8 @@ resource ParadigmsTur = open in { s = table { - NCard => (makeHarPN card card harCard).s ; - NOrd => (makeHarPN ordi ordi harOrd).s + NCard => (makeHarNoun card card harCard).s ; + NOrd => (makeHarNoun ordi ordi harOrd).s } ; n = num } ; diff --git a/src/turkish/SymbolTur.gf b/src/turkish/SymbolTur.gf index 52085b2a..074fdccf 100644 --- a/src/turkish/SymbolTur.gf +++ b/src/turkish/SymbolTur.gf @@ -3,7 +3,7 @@ concrete SymbolTur of Symbol = CatTur ** open Prelude, ResTur, HarmonyTur in { lin - SymbPN i = {s,gen = \\_,_ => i.s ; h = {vow=I_Har; con=SCon Soft}} ; -- just a placeholder, probably wrong + SymbPN i = {s = \\_ => i.s ; h = {vow=I_Har; con=SCon Soft}; n = Sg} ; -- just a placeholder, probably wrong {- TODO! IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;