From 645de9955ab50e2e206177aa4ef7b975018a62f1 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Mon, 24 Jul 2023 17:24:13 +0200 Subject: [PATCH] started a separate module for names --- src/abstract/Cat.gf | 3 ++- src/abstract/Extend.gf | 6 ----- src/abstract/Grammar.gf | 2 +- src/abstract/Names.gf | 14 ++++++++++ src/afrikaans/CatAfr.gf | 2 +- src/afrikaans/ExtendAfr.gf | 5 ---- src/afrikaans/GrammarAfr.gf | 3 ++- src/afrikaans/NamesAfr.gf | 6 +++++ src/bantu/CatBantu.gf | 2 +- src/bulgarian/CatBul.gf | 2 +- src/bulgarian/ExtendBul.gf | 21 --------------- src/bulgarian/GrammarBul.gf | 3 ++- src/bulgarian/NamesBul.gf | 39 +++++++++++++++++++++++++++ src/catalan/ExtendCat.gf | 6 ----- src/catalan/GrammarCat.gf | 3 ++- src/catalan/NamesCat.gf | 9 +++++++ src/chinese/CatChi.gf | 2 +- src/chinese/ExtendChi.gf | 10 +++---- src/chinese/GrammarChi.gf | 3 ++- src/chinese/NamesChi.gf | 8 ++++++ src/dutch/CatDut.gf | 2 +- src/dutch/ExtendDut.gf | 5 ---- src/dutch/GrammarDut.gf | 3 ++- src/dutch/NamesDut.gf | 7 +++++ src/english/CatEng.gf | 5 ++++ src/english/ExtendEng.gf | 7 ----- src/english/GrammarEng.gf | 3 ++- src/english/NamesEng.gf | 31 +++++++++++++++++++++ src/english/ParadigmsEng.gf | 18 +++++++++++++ src/estonian/CatEst.gf | 2 +- src/estonian/ExtendEst.gf | 6 ----- src/estonian/GrammarEst.gf | 3 ++- src/estonian/NamesEst.gf | 14 ++++++++++ src/finnish/CatFin.gf | 2 +- src/finnish/ExtendFin.gf | 6 ----- src/finnish/GrammarFin.gf | 3 ++- src/finnish/NamesFin.gf | 14 ++++++++++ src/french/DiffFre.gf | 3 +++ src/french/ExtendFre.gf | 6 ----- src/french/GrammarFre.gf | 3 ++- src/french/NamesFre.gf | 36 +++++++++++++++++++++++++ src/french/ParadigmsFre.gf | 21 +++++++++++++++ src/german/CatGer.gf | 2 +- src/german/ExtendGer.gf | 10 ------- src/german/GrammarGer.gf | 3 ++- src/german/NamesGer.gf | 38 ++++++++++++++++++++++++++ src/italian/ExtendIta.gf | 6 ----- src/italian/GrammarIta.gf | 3 ++- src/italian/NamesIta.gf | 9 +++++++ src/korean/CatKor.gf | 2 +- src/korean/ExtendKor.gf | 6 ----- src/korean/GrammarKor.gf | 3 ++- src/korean/NamesKor.gf | 9 +++++++ src/maltese/CatMlt.gf | 2 +- src/maltese/ExtraMlt.gf | 6 ----- src/maltese/GrammarMlt.gf | 3 ++- src/maltese/NamesMlt.gf | 16 +++++++++++ src/polish/CatPol.gf | 2 +- src/polish/ExtendPol.gf | 9 ------- src/polish/GrammarPol.gf | 1 + src/polish/NamesPol.gf | 12 +++++++++ src/portuguese/ExtendPor.gf | 6 ----- src/portuguese/GrammarPor.gf | 3 ++- src/portuguese/NamesPor.gf | 9 +++++++ src/romance/CatRomance.gf | 7 +++++ src/romance/DiffRomance.gf | 2 ++ src/romanian/CatRon.gf | 2 +- src/romanian/ExtendRon.gf | 10 +------ src/romanian/GrammarRon.gf | 3 ++- src/romanian/NamesRon.gf | 34 +++++++++++++++++++++++ src/russian/CatRus.gf | 2 +- src/russian/ExtendRus.gf | 22 --------------- src/russian/GrammarRus.gf | 5 ++-- src/russian/NamesRus.gf | 25 +++++++++++++++++ src/scandinavian/CatScand.gf | 2 +- src/slovenian/CatSlv.gf | 2 +- src/slovenian/ExtendSlv.gf | 9 ------- src/slovenian/GrammarSlv.gf | 3 ++- src/slovenian/NamesSlv.gf | 24 +++++++++++++++++ src/somali/CatSom.gf | 2 +- src/somali/ExtendSom.gf | 6 ----- src/somali/GrammarSom.gf | 3 ++- src/somali/NamesSom.gf | 18 +++++++++++++ src/spanish/DiffSpa.gf | 3 +++ src/spanish/ExtendSpa.gf | 6 ----- src/spanish/GrammarSpa.gf | 3 ++- src/spanish/NamesSpa.gf | 52 ++++++++++++++++++++++++++++++++++++ src/spanish/ParadigmsSpa.gf | 19 +++++++++++++ src/swahili/GrammarSwa.gf | 3 ++- src/swahili/NamesSwa.gf | 1 + src/swedish/ExtendSwe.gf | 6 ----- src/swedish/GrammarSwe.gf | 3 ++- src/swedish/NamesSwe.gf | 14 ++++++++++ src/thai/CatTha.gf | 2 +- src/thai/GrammarTha.gf | 3 ++- src/thai/NamesTha.gf | 1 + src/turkish/CatTur.gf | 2 +- src/turkish/ExtendTur.gf | 8 ------ src/turkish/GrammarTur.gf | 3 ++- src/turkish/NamesTur.gf | 19 +++++++++++++ 100 files changed, 611 insertions(+), 227 deletions(-) create mode 100644 src/abstract/Names.gf create mode 100644 src/afrikaans/NamesAfr.gf create mode 100644 src/bulgarian/NamesBul.gf create mode 100644 src/catalan/NamesCat.gf create mode 100644 src/chinese/NamesChi.gf create mode 100644 src/dutch/NamesDut.gf create mode 100644 src/english/NamesEng.gf create mode 100644 src/estonian/NamesEst.gf create mode 100644 src/finnish/NamesFin.gf create mode 100644 src/french/NamesFre.gf create mode 100644 src/german/NamesGer.gf create mode 100644 src/italian/NamesIta.gf create mode 100644 src/korean/NamesKor.gf create mode 100644 src/maltese/NamesMlt.gf create mode 100644 src/polish/NamesPol.gf create mode 100644 src/portuguese/NamesPor.gf create mode 100644 src/romanian/NamesRon.gf create mode 100644 src/russian/NamesRus.gf create mode 100644 src/slovenian/NamesSlv.gf create mode 100644 src/somali/NamesSom.gf create mode 100644 src/spanish/NamesSpa.gf create mode 100644 src/swahili/NamesSwa.gf create mode 100644 src/swedish/NamesSwe.gf create mode 100644 src/thai/NamesTha.gf create mode 100644 src/turkish/NamesTur.gf diff --git a/src/abstract/Cat.gf b/src/abstract/Cat.gf index 20c19f20c..93b7fa75c 100644 --- a/src/abstract/Cat.gf +++ b/src/abstract/Cat.gf @@ -128,7 +128,8 @@ abstract Cat = Common ** { 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" + LN ; -- location name e.g. "Sweden" + PN ; -- proper name -- DEPRECATED: QuantSg, QuantPl --- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every" diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index c35e3617f..2781e92af 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -297,12 +297,6 @@ fun fun CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc - GivenName : GN -> PN ; - MaleSurname : SN -> PN ; - FemaleSurname : SN -> PN ; - PlSurname : SN -> PN ; - FullName : GN -> SN -> PN ; - fun AnaphPron : NP -> Pron ; diff --git a/src/abstract/Grammar.gf b/src/abstract/Grammar.gf index 25ded6029..8bb5ac420 100644 --- a/src/abstract/Grammar.gf +++ b/src/abstract/Grammar.gf @@ -19,6 +19,6 @@ abstract Grammar = Structural, Idiom, Tense, + Names, Transfer ; - diff --git a/src/abstract/Names.gf b/src/abstract/Names.gf new file mode 100644 index 000000000..0c469f9b1 --- /dev/null +++ b/src/abstract/Names.gf @@ -0,0 +1,14 @@ +abstract Names = Cat ** { + +fun GivenName : GN -> NP ; + MaleSurname : SN -> NP ; + FemaleSurname : SN -> NP ; + PlSurname : SN -> NP ; + FullName : GN -> SN -> NP ; + +fun UseLN : LN -> NP ; + PlainLN : LN -> NP ; + InLN : LN -> Adv ; + AdjLN : AP -> LN -> LN ; + +} diff --git a/src/afrikaans/CatAfr.gf b/src/afrikaans/CatAfr.gf index 09293f065..e2f230c24 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} ; - GN, SN, PN = {s : NPCase => Str} ; + GN, SN, LN, PN = {s : NPCase => Str} ; } diff --git a/src/afrikaans/ExtendAfr.gf b/src/afrikaans/ExtendAfr.gf index 5becbada8..603378da7 100644 --- a/src/afrikaans/ExtendAfr.gf +++ b/src/afrikaans/ExtendAfr.gf @@ -12,9 +12,4 @@ lin PassVPSlash vps = PassAgentVPSlash vps np = insertAdv (appPrep "door" np.s) (insertInf (vps.s.s ! VPerf) (predV word_V)) ; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\c => gn.s ! NPNom ++ sn.s ! c ; - } ; - } diff --git a/src/afrikaans/GrammarAfr.gf b/src/afrikaans/GrammarAfr.gf index af0d853e2..15b024260 100644 --- a/src/afrikaans/GrammarAfr.gf +++ b/src/afrikaans/GrammarAfr.gf @@ -14,4 +14,5 @@ concrete GrammarAfr of Grammar = TextX, IdiomAfr, StructuralAfr, - TenseX ; + TenseX, + NamesAfr ; diff --git a/src/afrikaans/NamesAfr.gf b/src/afrikaans/NamesAfr.gf new file mode 100644 index 000000000..a85481be0 --- /dev/null +++ b/src/afrikaans/NamesAfr.gf @@ -0,0 +1,6 @@ +concrete NamesAfr of Names = CatAfr ** open ResAfr, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> {s = n.s ; a = agrP3 Sg ; isPron = False} ; +lin FullName gn sn = + {s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ; +} diff --git a/src/bantu/CatBantu.gf b/src/bantu/CatBantu.gf index a9d3acf21..0f810524c 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} ; - GN, SN, PN = {s : Case => Str ; g : Gender} ; + GN, SN, LN, 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 656713c69..5ec3bd64f 100644 --- a/src/bulgarian/CatBul.gf +++ b/src/bulgarian/CatBul.gf @@ -88,7 +88,7 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, ( N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ; GN = {s : Str; g : Sex} ; SN = {s : Sex => Str; pl : Str} ; - PN = {s : Str; gn : GenNum} ; + LN, PN = {s : Str; gn : GenNum} ; lindef SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}}; diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index 0ca1aa0b6..bae3834de 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -303,27 +303,6 @@ lin UseDAP dap = { lin UseComp_estar = UseComp ; UseComp_ser = UseComp ; -lin GivenName = \n -> { - s = n.s ; - gn = GSg (sex2gender n.g) - } ; -lin MaleSurname = \n -> { - s = n.s ! Male ; - gn = GSg Masc - } ; -lin FemaleSurname = \n -> { - s = n.s ! Female; - gn = GSg Fem - } ; -lin PlSurname = \n -> { - s = n.pl ; - gn = GPl - } ; -lin FullName gn sn = { - s = gn.s ++ sn.s ! gn.g ; - gn = GSg (sex2gender gn.g) - } ; - lin ProDrop pro = pro ; lin AnaphPron np = diff --git a/src/bulgarian/GrammarBul.gf b/src/bulgarian/GrammarBul.gf index f9a05a99e..39adaefe0 100644 --- a/src/bulgarian/GrammarBul.gf +++ b/src/bulgarian/GrammarBul.gf @@ -15,7 +15,8 @@ concrete GrammarBul of Grammar = TextBul, StructuralBul, IdiomBul, - TenseX - [CAdv,IAdv,AdV,SC] + TenseX - [CAdv,IAdv,AdV,SC], + NamesBul ** { flags coding=utf8 ; diff --git a/src/bulgarian/NamesBul.gf b/src/bulgarian/NamesBul.gf new file mode 100644 index 000000000..7391ba29b --- /dev/null +++ b/src/bulgarian/NamesBul.gf @@ -0,0 +1,39 @@ +concrete NamesBul of Names = CatBul ** open ResBul in { + +lin GivenName = \n -> { + s = table { RObj c => linCase c Pos ++ n.s; + _ => n.s + } ; + gn = GSg (sex2gender n.g) ; + p = NounP3 Pos + } ; +lin MaleSurname = \n -> { + s = table { RObj c => linCase c Pos ++ n.s ! Male; + _ => n.s ! Male + } ; + gn = GSg Masc ; + p = NounP3 Pos + } ; +lin FemaleSurname = \n -> { + s = table { RObj c => linCase c Pos ++ n.s ! Female; + _ => n.s ! Female + } ; + gn = GSg Fem ; + p = NounP3 Pos + } ; +lin PlSurname = \n -> { + s = table { RObj c => linCase c Pos ++ n.pl ; + _ => n.pl + } ; + gn = GPl ; + p = NounP3 Pos + } ; +lin FullName gn sn = { + s = table { RObj c => linCase c Pos ++ gn.s ++ sn.s ! gn.g ; + _ => gn.s ++ sn.s ! gn.g + } ; + gn = GSg (sex2gender gn.g) ; + p = NounP3 Pos + } ; + +} diff --git a/src/catalan/ExtendCat.gf b/src/catalan/ExtendCat.gf index b157182b6..c0de2ffd9 100644 --- a/src/catalan/ExtendCat.gf +++ b/src/catalan/ExtendCat.gf @@ -15,10 +15,4 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- - ParadigmsCat in { -- put your own definitions here -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - g = gn.g - } ; - } ; diff --git a/src/catalan/GrammarCat.gf b/src/catalan/GrammarCat.gf index a1a4fda2b..afd7472e3 100644 --- a/src/catalan/GrammarCat.gf +++ b/src/catalan/GrammarCat.gf @@ -14,7 +14,8 @@ concrete GrammarCat of Grammar = TextX - [SC,Temp,Tense,Pol,PPos,PNeg], IdiomCat, StructuralCat, - TenseCat + TenseCat, + NamesCat ** { diff --git a/src/catalan/NamesCat.gf b/src/catalan/NamesCat.gf new file mode 100644 index 000000000..52d69dbae --- /dev/null +++ b/src/catalan/NamesCat.gf @@ -0,0 +1,9 @@ +concrete NamesCat of Names = CatCat ** open ResCat in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ; +lin FullName gn sn = pn2np { + s = gn.s ++ sn.s ; + g = gn.g + } ; + +} diff --git a/src/chinese/CatChi.gf b/src/chinese/CatChi.gf index ff9966430..4ff355668 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} ; - GN, SN, PN = ResChi.NP ; + GN, SN, LN, PN = ResChi.NP ; -- overridden diff --git a/src/chinese/ExtendChi.gf b/src/chinese/ExtendChi.gf index dfcabd299..866f1b4a3 100644 --- a/src/chinese/ExtendChi.gf +++ b/src/chinese/ExtendChi.gf @@ -11,7 +11,7 @@ concrete ExtendChi of Extend = CatChi ** , MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2 , ProDrop, ComplDirectVS, ComplDirectVQ , PassVPSlash, PassAgentVPSlash - , GerundAdv, GerundNP ] + , GerundAdv, GerundNP, ApposNP ] with (Grammar=GrammarChi) ** open Prelude , Coordination @@ -79,13 +79,11 @@ concrete ExtendChi of Extend = CatChi ** AdvVP (UseV ) (mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes + lin + ApposNP np1 np2 = {s = np1.s ++ np2.s} ; + oper mkAdv : Str -> CatChi.Adv ; mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ; -lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s - } ; - }; diff --git a/src/chinese/GrammarChi.gf b/src/chinese/GrammarChi.gf index a57c24ab9..7b8af2c83 100644 --- a/src/chinese/GrammarChi.gf +++ b/src/chinese/GrammarChi.gf @@ -14,7 +14,8 @@ concrete GrammarChi of Grammar = TextChi, StructuralChi, IdiomChi, - TenseChi + TenseChi, + NamesChi ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/chinese/NamesChi.gf b/src/chinese/NamesChi.gf new file mode 100644 index 000000000..ccb35fa80 --- /dev/null +++ b/src/chinese/NamesChi.gf @@ -0,0 +1,8 @@ +concrete NamesChi of Names = CatChi ** { + +lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; +lin FullName gn sn = { + s = gn.s ++ sn.s + } ; + +} diff --git a/src/dutch/CatDut.gf b/src/dutch/CatDut.gf index 382aa2824..80763f90e 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} ; - GN, SN, PN = {s : NPCase => Str} ; + GN, SN, LN, PN = {s : NPCase => Str} ; } diff --git a/src/dutch/ExtendDut.gf b/src/dutch/ExtendDut.gf index f1ed70fde..6769eda51 100644 --- a/src/dutch/ExtendDut.gf +++ b/src/dutch/ExtendDut.gf @@ -121,9 +121,4 @@ lin isPron = False } ; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\c => gn.s ! NPNom ++ sn.s ! c - } ; - } diff --git a/src/dutch/GrammarDut.gf b/src/dutch/GrammarDut.gf index 14084207a..4144ee76f 100644 --- a/src/dutch/GrammarDut.gf +++ b/src/dutch/GrammarDut.gf @@ -14,4 +14,5 @@ concrete GrammarDut of Grammar = TextX, IdiomDut, StructuralDut, - TenseX ; + TenseX, + NamesDut ; diff --git a/src/dutch/NamesDut.gf b/src/dutch/NamesDut.gf new file mode 100644 index 000000000..c28a38e8a --- /dev/null +++ b/src/dutch/NamesDut.gf @@ -0,0 +1,7 @@ +concrete NamesDut of Names = CatDut ** open Prelude, ResDut in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> noMerge ** {s = n.s ; a = agrP3 Sg ; isPron = False} ; +lin FullName gn sn = + noMerge ** {s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ; + +} diff --git a/src/english/CatEng.gf b/src/english/CatEng.gf index 7731e26c2..7bb08abdf 100644 --- a/src/english/CatEng.gf +++ b/src/english/CatEng.gf @@ -107,6 +107,11 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in { N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; GN, SN, PN = {s : Case => Str ; g : Gender} ; + LN = {s : Case => Str; + p : Str; -- preposition "in Scandinavia", "on the Balkans" + art : Bool; -- plain name "United States" vs "the United States" + a : Agr; + } ; lindef SSlash = \s -> {s = s; c2 = ""} ; diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index 94e87a497..c43e535a0 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -474,13 +474,6 @@ lin CardCNCard card cn = lin theyFem_Pron = mkPron "they" "them" "their" "theirs" plural P3 feminine ; lin theyNeutr_Pron = mkPron "they" "them" "their" "theirs" plural P3 nonhuman ; -lin GivenName gn = gn ; -lin MaleSurname, FemaleSurname = \sn -> sn ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! c ; - g = gn.g - } ; - lin AnaphPron np = case np.a of { AgP1 Sg => i_Pron ; diff --git a/src/english/GrammarEng.gf b/src/english/GrammarEng.gf index c2600a7b3..7280125c5 100644 --- a/src/english/GrammarEng.gf +++ b/src/english/GrammarEng.gf @@ -14,7 +14,8 @@ concrete GrammarEng of Grammar = TextX - [Pol,PPos,PNeg,SC,CAdv], StructuralEng, IdiomEng, - TenseX - [Pol,PPos,PNeg,SC,CAdv] + TenseX - [Pol,PPos,PNeg,SC,CAdv], + NamesEng ** open ResEng, Prelude in { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/english/NamesEng.gf b/src/english/NamesEng.gf new file mode 100644 index 000000000..f02bf38e7 --- /dev/null +++ b/src/english/NamesEng.gf @@ -0,0 +1,31 @@ +concrete NamesEng of Names = CatEng ** open Prelude, ResEng in { + +lin GivenName gn = {s = \\c => gn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ; +lin MaleSurname, FemaleSurname = \sn -> {s = \\c => sn.s ! npcase2case c ; a = agrgP3 Sg sn.g} ; +lin FullName gn sn = {s = \\c => gn.s ! Nom ++ sn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ; + +lin UseLN n = { + s = \\c => case n.art of { + True => "the" ++ n.s ! npcase2case c ; + False => n.s ! npcase2case c + } ; + a = n.a + } ; + +lin PlainLN n = { + s = \\c => n.s ! npcase2case c ; + a = n.a + } ; + +lin InLN n = { + s = n.p ++ case n.art of { + True => "the" ++ n.s ! Nom ; + False => n.s ! Nom + } ; + } ; + +lin AdjLN ap n = n ** { + s = \\c => preOrPost ap.isPre (ap.s ! n.a) (n.s ! c) ; + } ; + +} diff --git a/src/english/ParadigmsEng.gf b/src/english/ParadigmsEng.gf index 0d331c9ff..01f73acfb 100644 --- a/src/english/ParadigmsEng.gf +++ b/src/english/ParadigmsEng.gf @@ -129,6 +129,24 @@ oper -- -- Proper names, with a regular genitive, are formed from strings. +oper + mkLN = overload { + mkLN : Str -> LN = \s -> + lin LN {s = table {Gen => s + "'s" ; _ => s} ; + p = "in" ; + art = False ; + a = agrP3 Sg} ; + + mkLN : Str -> Number -> LN = \s,n -> + lin LN {s = table {Gen => s + "'s" ; _ => s} ; + p = "in" ; + art = False ; + a = agrP3 n} ; + } ; + + defLN : LN -> LN = \n -> n ** {art = True} ; + prepLN : LN -> Str -> LN = \n,s -> n ** {p = s} ; + mkPN : overload { mkPN : Str -> PN ; diff --git a/src/estonian/CatEst.gf b/src/estonian/CatEst.gf index 28fdd42f7..2c49380dd 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 } ; - GN, SN, PN = {s : Case => Str} ; + GN, SN, LN, PN = {s : Case => Str} ; linref VP = \vp -> linV vp.v ; diff --git a/src/estonian/ExtendEst.gf b/src/estonian/ExtendEst.gf index aaaf8ff59..3700bb36e 100644 --- a/src/estonian/ExtendEst.gf +++ b/src/estonian/ExtendEst.gf @@ -436,10 +436,4 @@ concrete ExtendEst of Extend = -- : VP -> Adv ; -- ilma raamatut nägemata WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ; - -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! c - } ; - } diff --git a/src/estonian/GrammarEst.gf b/src/estonian/GrammarEst.gf index 1daf4bd42..01339dc7d 100644 --- a/src/estonian/GrammarEst.gf +++ b/src/estonian/GrammarEst.gf @@ -12,7 +12,8 @@ concrete GrammarEst of Grammar = TextX, IdiomEst, StructuralEst, - TenseX + TenseX, + NamesEst ** { flags startcat = Phr ; unlexer = finnish ; lexer = text ; diff --git a/src/estonian/NamesEst.gf b/src/estonian/NamesEst.gf new file mode 100644 index 000000000..694021ec7 --- /dev/null +++ b/src/estonian/NamesEst.gf @@ -0,0 +1,14 @@ +concrete NamesEst of Names = CatEst ** open ResEst, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> emptyNP ** { + s = \\c => n.s ! npform2case Sg c ; + a = agrP3 Sg ; + isPron = False + } ; +lin FullName gn sn = emptyNP ** { + s = \\c => gn.s ! Nom ++ sn.s ! npform2case Sg c ; + a = agrP3 Sg ; + isPron = False + } ; + +} diff --git a/src/finnish/CatFin.gf b/src/finnish/CatFin.gf index 08b07efe7..14778ba69 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} ; - GN, SN, PN = SPN ; + GN, SN, LN, PN = SPN ; linref SSlash = \ss -> ss.s ++ ss.c2.s.p1 ; diff --git a/src/finnish/ExtendFin.gf b/src/finnish/ExtendFin.gf index 093956e1c..fe7d41b08 100644 --- a/src/finnish/ExtendFin.gf +++ b/src/finnish/ExtendFin.gf @@ -241,10 +241,4 @@ 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, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! c - } ; - - } diff --git a/src/finnish/GrammarFin.gf b/src/finnish/GrammarFin.gf index 297a4f2d7..c43971632 100644 --- a/src/finnish/GrammarFin.gf +++ b/src/finnish/GrammarFin.gf @@ -14,7 +14,8 @@ concrete GrammarFin of Grammar = TextX, IdiomFin, StructuralFin, - TenseX + TenseX, + NamesFin ** { flags startcat = Phr ; unlexer = finnish ; lexer = text ; diff --git a/src/finnish/NamesFin.gf b/src/finnish/NamesFin.gf new file mode 100644 index 000000000..2ffe811bc --- /dev/null +++ b/src/finnish/NamesFin.gf @@ -0,0 +1,14 @@ +concrete NamesFin of Names = CatFin ** open ResFin, StemFin, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> { + s = snoun2np Sg n ; + a = agrP3 Sg ; + isPron = False ; isNeg = False + } ; +lin FullName gn sn = { + s = snoun2np Sg {s = \\c => gn.s ! Nom ++ sn.s ! c} ; + a = agrP3 Sg ; + isPron = False ; isNeg = False + } ; + +} diff --git a/src/french/DiffFre.gf b/src/french/DiffFre.gf index bafd709fb..303bb731d 100644 --- a/src/french/DiffFre.gf +++ b/src/french/DiffFre.gf @@ -338,4 +338,7 @@ instance DiffFre of DiffRomance - [ verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t- +param + HasArt = NoArt | UseArt | AlwaysArt ; + } ; diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf index 12d88f0d5..3c3f209d3 100644 --- a/src/french/ExtendFre.gf +++ b/src/french/ExtendFre.gf @@ -59,10 +59,4 @@ lin ApposNP np1 np2 = np1 ** { -- guessed by KA } ; } ; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - g = gn.g - } ; - } diff --git a/src/french/GrammarFre.gf b/src/french/GrammarFre.gf index 97cd5e438..7fc42bd6d 100644 --- a/src/french/GrammarFre.gf +++ b/src/french/GrammarFre.gf @@ -14,7 +14,8 @@ concrete GrammarFre of Grammar = TextX - [SC,Temp,Tense,Pol,PPos,PNeg], IdiomFre, StructuralFre, - TenseFre + TenseFre, + NamesFre ** { flags startcat = Phr ; diff --git a/src/french/NamesFre.gf b/src/french/NamesFre.gf new file mode 100644 index 000000000..821f79693 --- /dev/null +++ b/src/french/NamesFre.gf @@ -0,0 +1,36 @@ +concrete NamesFre of Names = CatFre ** open Prelude, ResFre, CommonRomance, PhonoFre in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ; +lin FullName gn sn = pn2np { + s = gn.s ++ sn.s ; + g = gn.g + } ; + +lin PlainLN n = heavyNP { + s = \\c => n.s; + a = {g = n.g ; n = n.num ; p = P3} + } ; + + +lin UseLN n = heavyNP { + s = \\c => case n.art of { + AlwaysArt | UseArt => artDef True n.g n.num c ++ n.s ; + _ => n.s + } ; + a = {g = n.g ; n = n.num ; p = P3} + } ; + + +lin InLN n = { + s = n.p.s ++ case n.art of { + AlwaysArt => artDef True n.g n.num n.p.c ++ n.s; + _ => prepCase n.p.c ++ n.s + } ; + } ; + + +lin AdjLN ap n = n ** { + s = preOrPost ap.isPre (ap.s ! AF n.g n.num) n.s ; + } ; + +} diff --git a/src/french/ParadigmsFre.gf b/src/french/ParadigmsFre.gf index e87fcd92e..e4d97828f 100644 --- a/src/french/ParadigmsFre.gf +++ b/src/french/ParadigmsFre.gf @@ -132,6 +132,27 @@ oper -- Proper names need a string and a gender. If no gender is given, the -- feminine is used for strings ending with "e", the masculine for other strings. + mkLN = overload { + mkLN : Str -> Gender -> LN = \s,g -> + lin LN {s = s ; + p = {s=""; c=CPrep P_a; isDir=True} ; + art = NoArt ; + g = g ; + num = Sg} ; + + mkLN : Str -> Gender -> Number -> LN = \s,g,num -> + lin LN {s = s ; + p = {s=""; c=CPrep P_a; isDir=True} ; + art = NoArt ; + g = g ; + num = num} ; + } ; + + + defLN : LN -> LN = \n -> n ** {art = AlwaysArt} ; + useDefLN : LN -> LN = \n -> n ** {art = UseArt} ; + prepLN : LN -> Compl -> LN = \n,s -> n ** {p = s} ; + mkPN : overload { mkPN : Str -> PN ; -- feminine if ends with "e", otherwise masculine mkPN : Str -> Gender -> PN ; -- gender deviant from the simple rule diff --git a/src/german/CatGer.gf b/src/german/CatGer.gf index 48016759c..8130ea6f6 100644 --- a/src/german/CatGer.gf +++ b/src/german/CatGer.gf @@ -102,7 +102,7 @@ concrete CatGer of Cat = N3 = ResGer.Noun ** {c2,c3 : Preposition} ; GN = {s : Case => Str; g : Sex} ; SN = {s : Sex => Case => Str} ; - PN = {s : Case => Str; g : Gender; n : Number} ; + LN, 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 4c60590d0..db9c75b19 100644 --- a/src/german/ExtendGer.gf +++ b/src/german/ExtendGer.gf @@ -142,16 +142,6 @@ lin n = Pl } ; -lin GivenName = \n -> { s = n.s; g = sex2gender n.g; n = Sg } ; -lin MaleSurname = \n -> { s = n.s ! Male ; g = Masc; n = Sg } ; -lin FemaleSurname = \n -> { s = n.s ! Female ; g = Fem; n = Sg } ; -lin PlSurname = \n -> { s = n.s ! Male ; g = Masc; n = Pl } ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ; - g = sex2gender gn.g ; - n = Sg - } ; - lin PassVPSlash vp = insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) ** { c1 = subjPrep vp.c2 } ; diff --git a/src/german/GrammarGer.gf b/src/german/GrammarGer.gf index ea79032a7..781ecb6ee 100644 --- a/src/german/GrammarGer.gf +++ b/src/german/GrammarGer.gf @@ -14,7 +14,8 @@ concrete GrammarGer of Grammar = TextX - [Tense,Temp], IdiomGer, StructuralGer, - TenseGer + TenseGer, + NamesGer ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/german/NamesGer.gf b/src/german/NamesGer.gf new file mode 100644 index 000000000..d7d35f2f6 --- /dev/null +++ b/src/german/NamesGer.gf @@ -0,0 +1,38 @@ +concrete NamesGer of Names = CatGer ** open ResGer in { + +lin GivenName gn = { + s = \\c => usePrepC c (\k -> gn.s ! k) ; + a = agrgP3 (sex2gender gn.g) Sg ; + w = WLight ; + rc, ext = [] + } ; + +lin MaleSurname sn = { + s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ; + a = agrgP3 Masc Sg ; + w = WLight ; + rc, ext = [] + } ; + +lin FemaleSurname sn = { + s = \\c => usePrepC c (\k -> sn.s ! Female ! k) ; + a = agrgP3 Fem Sg ; + w = WLight ; + rc, ext = [] + } ; + +lin PlSurname sn = { + s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ; + a = agrgP3 Masc Pl ; + w = WLight ; + rc, ext = [] + } ; + +lin FullName gn sn = { + s = \\c => usePrepC c (\k -> gn.s ! Nom ++ sn.s ! gn.g ! k) ; + a = agrgP3 (sex2gender gn.g) Sg ; + w = WLight ; + rc, ext = [] + } ; + +} diff --git a/src/italian/ExtendIta.gf b/src/italian/ExtendIta.gf index 45da30608..b50ae1e12 100644 --- a/src/italian/ExtendIta.gf +++ b/src/italian/ExtendIta.gf @@ -16,12 +16,6 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor - ParadigmsIta in { -- put your own definitions here -lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - g = gn.g - } ; - lin PassVPSlash vps = passVPSlash vps [] ; PassAgentVPSlash vps np = passVPSlash diff --git a/src/italian/GrammarIta.gf b/src/italian/GrammarIta.gf index 7204cbcd3..773a2a176 100644 --- a/src/italian/GrammarIta.gf +++ b/src/italian/GrammarIta.gf @@ -14,7 +14,8 @@ concrete GrammarIta of Grammar = TextX - [SC,Temp,Tense,Pol,PPos,PNeg,TPres,TPast,TFut,TCond], IdiomIta, StructuralIta, - TenseIta + TenseIta, + NamesIta ** { diff --git a/src/italian/NamesIta.gf b/src/italian/NamesIta.gf new file mode 100644 index 000000000..9dde301b1 --- /dev/null +++ b/src/italian/NamesIta.gf @@ -0,0 +1,9 @@ +concrete NamesIta of Names = CatIta ** open ResIta in { + +lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> pn2np n ; +lin FullName gn sn = pn2np { + s = gn.s ++ sn.s ; + g = gn.g + } ; + +} diff --git a/src/korean/CatKor.gf b/src/korean/CatKor.gf index 05a56da1b..8f6a076b5 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 ; - GN, SN, PN = ResKor.NounPhrase ; + GN, SN, LN, PN = ResKor.NounPhrase ; linref V, V2, V3 = linVerb ; diff --git a/src/korean/ExtendKor.gf b/src/korean/ExtendKor.gf index 560f6bcea..9e318518a 100644 --- a/src/korean/ExtendKor.gf +++ b/src/korean/ExtendKor.gf @@ -9,10 +9,4 @@ concrete ExtendKor of Extend = CatKor -- : NP -> NP -> NP ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\nf => gn.s ! nf ++ sn.s ! nf ; - p = gn.p - } ; - } ; diff --git a/src/korean/GrammarKor.gf b/src/korean/GrammarKor.gf index 55550ada2..e0fd1c01b 100644 --- a/src/korean/GrammarKor.gf +++ b/src/korean/GrammarKor.gf @@ -12,7 +12,8 @@ concrete GrammarKor of Grammar = TextX, StructuralKor, IdiomKor, - TenseX + TenseX, + NamesKor ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/korean/NamesKor.gf b/src/korean/NamesKor.gf new file mode 100644 index 000000000..5f0f3ad0a --- /dev/null +++ b/src/korean/NamesKor.gf @@ -0,0 +1,9 @@ +concrete NamesKor of Names = CatKor ** open ResKor in { + +lin GivenName, MaleSurname, FemaleSurname = \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 aa8009343..a091c831d 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} ; - GN, SN, PN = ProperNoun ; + GN, SN, LN, PN = ProperNoun ; -- Overridden from CommonX diff --git a/src/maltese/ExtraMlt.gf b/src/maltese/ExtraMlt.gf index 7b9dab47a..8a9a9c885 100644 --- a/src/maltese/ExtraMlt.gf +++ b/src/maltese/ExtraMlt.gf @@ -24,10 +24,4 @@ concrete ExtraMlt of ExtraMltAbs = CatMlt ** a = p.a ; } ; -lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - a = gn.a - } ; - } diff --git a/src/maltese/GrammarMlt.gf b/src/maltese/GrammarMlt.gf index 885e72082..4dbf5e94e 100644 --- a/src/maltese/GrammarMlt.gf +++ b/src/maltese/GrammarMlt.gf @@ -20,7 +20,8 @@ concrete GrammarMlt of Grammar = TextX - [Adv], StructuralMlt, IdiomMlt, - TenseX - [Adv] + TenseX - [Adv], + NamesMlt ** { flags coding=utf8 ; diff --git a/src/maltese/NamesMlt.gf b/src/maltese/NamesMlt.gf new file mode 100644 index 000000000..c470fbe45 --- /dev/null +++ b/src/maltese/NamesMlt.gf @@ -0,0 +1,16 @@ +concrete NamesMlt of Names = CatMlt ** open ResMlt, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> { + s = \\c => n.s ; + a = n.a ; + isPron = False ; + isDefn = False + } ; +lin FullName gn sn = { + s = \\c => gn.s ++ sn.s ; + a = gn.a ; + isPron = False ; + isDefn = False + } ; + +} diff --git a/src/polish/CatPol.gf b/src/polish/CatPol.gf index 702952fe0..877432cab 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 = Noun ** { c1, c2 : Complement } ; - GN, SN, PN = NounPhrase; + GN, SN, LN, PN = NounPhrase; CAdv = {s,p,sn,pn : Str} ; diff --git a/src/polish/ExtendPol.gf b/src/polish/ExtendPol.gf index f787007fe..afa4f84cf 100644 --- a/src/polish/ExtendPol.gf +++ b/src/polish/ExtendPol.gf @@ -40,13 +40,4 @@ oper -- KA: PassVPSlash is derived from PassV2. Objects might be ignored lin PassVPSlash vps = setImienne vps True; -lin GivenName, MaleSurname, FemaleSurname = \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/polish/GrammarPol.gf b/src/polish/GrammarPol.gf index 6393ceee8..85172e1d0 100644 --- a/src/polish/GrammarPol.gf +++ b/src/polish/GrammarPol.gf @@ -15,6 +15,7 @@ concrete GrammarPol of Grammar = PhrasePol, TenseX - [CAdv], TextX - [CAdv], + NamesPol, StructuralPol, IdiomPol ** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ; diff --git a/src/polish/NamesPol.gf b/src/polish/NamesPol.gf new file mode 100644 index 000000000..e5cc8225e --- /dev/null +++ b/src/polish/NamesPol.gf @@ -0,0 +1,12 @@ +concrete NamesPol of Names = CatPol ** { + +lin GivenName, MaleSurname, FemaleSurname = \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 68ba4f96c..c91b169ad 100644 --- a/src/portuguese/ExtendPor.gf +++ b/src/portuguese/ExtendPor.gf @@ -116,10 +116,4 @@ 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, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - g = gn.g - } ; - } ; diff --git a/src/portuguese/GrammarPor.gf b/src/portuguese/GrammarPor.gf index 4f28e1ec1..7e41abd2b 100644 --- a/src/portuguese/GrammarPor.gf +++ b/src/portuguese/GrammarPor.gf @@ -14,7 +14,8 @@ concrete GrammarPor of Grammar = TextPor - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation IdiomPor, StructuralPor, - TensePor + TensePor, + NamesPor ** { diff --git a/src/portuguese/NamesPor.gf b/src/portuguese/NamesPor.gf new file mode 100644 index 000000000..1d1853258 --- /dev/null +++ b/src/portuguese/NamesPor.gf @@ -0,0 +1,9 @@ +concrete NamesPor of Names = CatPor ** open ResPor in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ; +lin FullName gn sn = pn2np { + s = gn.s ++ sn.s ; + g = gn.g + } ; + +} diff --git a/src/romance/CatRomance.gf b/src/romance/CatRomance.gf index 3b52a1038..06cd7d87c 100644 --- a/src/romance/CatRomance.gf +++ b/src/romance/CatRomance.gf @@ -111,6 +111,13 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] N2 = Noun ** {c2 : Compl} ; N3 = Noun ** {c2,c3 : Compl} ; GN, SN, PN = {s : Str ; g : Gender} ; + + lincat LN = {s : Str; + p : Compl; + art : HasArt; + g : Gender; + num : Number; + } ; -- tense augmented with passé simple lincat diff --git a/src/romance/DiffRomance.gf b/src/romance/DiffRomance.gf index 93fd0eef3..acb5237d1 100644 --- a/src/romance/DiffRomance.gf +++ b/src/romance/DiffRomance.gf @@ -218,4 +218,6 @@ oper stare_V : Verb ; stare_V = essere_V ; + param HasArt ; + } ; diff --git a/src/romanian/CatRon.gf b/src/romanian/CatRon.gf index 094a6ed9b..9cb5bb4fb 100644 --- a/src/romanian/CatRon.gf +++ b/src/romanian/CatRon.gf @@ -131,7 +131,7 @@ concrete CatRon of Cat = N3 = Noun ** {c2,c3 : Compl} ; - GN, SN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ; + GN, SN, LN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ; Comp = {s : Agr => Str} ; diff --git a/src/romanian/ExtendRon.gf b/src/romanian/ExtendRon.gf index 340538bf0..a70d332b2 100644 --- a/src/romanian/ExtendRon.gf +++ b/src/romanian/ExtendRon.gf @@ -1,7 +1,7 @@ --# -path=.:../common:../abstract concrete ExtendRon of Extend = - CatRon ** ExtendFunctor - [PassVPSlash, GivenName, MaleSurname, FemaleSurname, FullName] + CatRon ** ExtendFunctor - [PassVPSlash] with (Grammar = GrammarRon) ** open ResRon in { @@ -17,12 +17,4 @@ lin iFem_Pron = mkPronoun "eu" "mine" "mie" [] [] "meu" "mea" "mei" "mele" Fem S -- KA: derived from PassV2, objects are ignored lin PassVPSlash vps = insertSimpObj (\\a => vps.s ! PPasse a.g a.n Indef ANomAcc) auxPassive ** {lock_VP = <>}; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { -- KA: guessed - s = \\c => gn.s ! No ++ sn.s ! c ; - g = gn.g ; - n = gn.n ; - a = gn.a - } ; - } diff --git a/src/romanian/GrammarRon.gf b/src/romanian/GrammarRon.gf index f929ac573..8b4883322 100644 --- a/src/romanian/GrammarRon.gf +++ b/src/romanian/GrammarRon.gf @@ -15,7 +15,8 @@ concrete GrammarRon of Grammar = TextX - [CAdv,Temp,Tense], -- Prelude, MorphoRon, Coordination, StructuralRon, - TenseRon + TenseRon, + NamesRon ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/romanian/NamesRon.gf b/src/romanian/NamesRon.gf new file mode 100644 index 000000000..6784ba919 --- /dev/null +++ b/src/romanian/NamesRon.gf @@ -0,0 +1,34 @@ +concrete NamesRon of Names = CatRon ** open ResRon, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \pn -> -- KA: guessed + let + g = pn.g ; + n = pn.n ; + ag = agrP3 g n ; + hc = getClit pn.a + in { + s = \\c => {comp = pn.s ! c ; + clit = \\cs => if_then_Str hc ((genCliticsCase ag c).s ! cs) [] } ; + + a = ag; + nForm = if_then_else NForm hc HasClit (HasRef False) ; + isPronoun = False ; isPol = False; + indForm = pn.s ! No + } ; + +lin FullName gn sn = -- KA: guessed + let + g = gn.g ; + n = gn.n ; + ag = agrP3 g n ; + hc = getClit gn.a + in { + s = \\c => {comp = gn.s ! No ++ sn.s ! c ; + clit = \\cs => if_then_Str hc ((genCliticsCase ag c).s ! cs) [] } ; + a = ag; + nForm = if_then_else NForm hc HasClit (HasRef False) ; + isPronoun = False ; isPol = False; + indForm = gn.s ! No ++ sn.s ! No + } ; + +} diff --git a/src/russian/CatRus.gf b/src/russian/CatRus.gf index 0c0a01482..76c8d14d1 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, GN, SN, PN = ResRus.NounForms ; + N, GN, SN, LN, PN = ResRus.NounForms ; N2 = ResRus.Noun2Forms ; N3 = ResRus.Noun3Forms ; diff --git a/src/russian/ExtendRus.gf b/src/russian/ExtendRus.gf index 4d9692cca..04060d9b6 100644 --- a/src/russian/ExtendRus.gf +++ b/src/russian/ExtendRus.gf @@ -217,26 +217,4 @@ lin oper rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude? -lin GivenName, MaleSurname, FemaleSurname, PlSurname = \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/russian/GrammarRus.gf b/src/russian/GrammarRus.gf index 2973754cc..1090a3016 100644 --- a/src/russian/GrammarRus.gf +++ b/src/russian/GrammarRus.gf @@ -14,5 +14,6 @@ concrete GrammarRus of Grammar = TextX, StructuralRus, IdiomRus, - TenseRus - ** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ; \ No newline at end of file + TenseRus, + NamesRus + ** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ; diff --git a/src/russian/NamesRus.gf b/src/russian/NamesRus.gf new file mode 100644 index 000000000..1a31cd938 --- /dev/null +++ b/src/russian/NamesRus.gf @@ -0,0 +1,25 @@ +concrete NamesRus of Names = CatRus ** open ResRus, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname, PlSurname = \pn -> + { s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ; + pron=False; + a=Ag (gennum pn.g Sg) P3 + } ; -- Does NP need animacy? + +lin FullName gn sn = + { s= table { + Nom => gn.snom ++ sn.snom ; + Gen => gn.snom ++ sn.sgen ; + Dat => gn.snom ++ sn.sdat ; + Acc => gn.snom ++ sn.sacc ; + Ins => gn.snom ++ sn.sins ; + Pre => gn.snom ++ sn.sprep ; + Loc => gn.snom ++ sn.sloc ; + Ptv => gn.snom ++ sn.sptv ; + VocRus => gn.snom ++ sn.svoc + } ; + pron=False; + a=Ag (gennum gn.g Sg) P3 + } ; + +} diff --git a/src/scandinavian/CatScand.gf b/src/scandinavian/CatScand.gf index 454d6e762..737ae6ee9 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} ; - GN, SN, PN = {s : Case => Str ; g : Gender} ; + GN, SN, LN, PN = {s : Case => Str ; g : Gender} ; diff --git a/src/slovenian/CatSlv.gf b/src/slovenian/CatSlv.gf index c5994727b..7c069fb73 100644 --- a/src/slovenian/CatSlv.gf +++ b/src/slovenian/CatSlv.gf @@ -58,7 +58,7 @@ lincat GN = {s : Case => Str; g : Sex}; SN = {s : Sex => Case => Str}; - PN = {s : Case => Str; g : AGender; n : Number}; + LN, PN = {s : Case => Str; g : AGender; n : Number}; linref V, VA, VS, V2, V3, V2A, V2S, V2Q, V2V = \v -> v.s ! VInf ++ v.refl ++ v.p; diff --git a/src/slovenian/ExtendSlv.gf b/src/slovenian/ExtendSlv.gf index 0e95985f6..c03f7ae15 100644 --- a/src/slovenian/ExtendSlv.gf +++ b/src/slovenian/ExtendSlv.gf @@ -57,14 +57,5 @@ lin youPolPl_Pron = youPol_Pron ; youPolPlFem_Pron = youPlFem_Pron ; -lin GivenName = \n -> {s = n.s; g = sex2agender n.g; n = Sg} ; -lin MaleSurname = \n -> {s = n.s ! Male; g = AMasc Animate; n = Sg} ; -lin FemaleSurname = \n -> {s = n.s ! Female; g = AFem; n = Sg} ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ; - g = sex2agender gn.g ; - n = Sg - } ; - } diff --git a/src/slovenian/GrammarSlv.gf b/src/slovenian/GrammarSlv.gf index f8650ba29..660891af6 100644 --- a/src/slovenian/GrammarSlv.gf +++ b/src/slovenian/GrammarSlv.gf @@ -14,7 +14,8 @@ concrete GrammarSlv of Grammar = TextX - [Pol,PPos,PNeg], StructuralSlv, IdiomSlv, ----AR - TenseX + TenseX, + NamesSlv ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/slovenian/NamesSlv.gf b/src/slovenian/NamesSlv.gf new file mode 100644 index 000000000..85e7fa599 --- /dev/null +++ b/src/slovenian/NamesSlv.gf @@ -0,0 +1,24 @@ +concrete NamesSlv of Names = CatSlv ** open ResSlv, Prelude in { + +lin GivenName = \n -> { + s = n.s; + a = {g=agender2gender (sex2agender n.g); n=Sg; p=P3}; + isPron = False + } ; +lin MaleSurname = \n -> { + s = n.s ! Male; + a = {g=Masc; n=Sg; p=P3}; + isPron = False + } ; +lin FemaleSurname = \n -> { + s = n.s ! Female; + a = {g=Fem; n=Sg; p=P3}; + isPron = False + } ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ; + a = {g=agender2gender (sex2agender gn.g); n=Sg; p=P3}; + isPron = False + } ; + +} diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index adc4d2a46..f6f84ad68 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 ; - GN, SN, PN = ResSom.PNoun ; + GN, SN, LN, 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 dd21115b1..ef59243dd 100644 --- a/src/somali/ExtendSom.gf +++ b/src/somali/ExtendSom.gf @@ -17,10 +17,4 @@ lin -- FocusAdV : AdV -> S -> Utt ; -- never will I sleep -- FocusAP : AP -> NP -> Utt ; -- green was the tree -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - a = gn.a - } ; - } ; diff --git a/src/somali/GrammarSom.gf b/src/somali/GrammarSom.gf index 1b32f79ae..b7b935e07 100644 --- a/src/somali/GrammarSom.gf +++ b/src/somali/GrammarSom.gf @@ -12,7 +12,8 @@ concrete GrammarSom of Grammar = TextX - [Adv,IAdv], StructuralSom, IdiomSom, - TenseX - [Adv,IAdv] + TenseX - [Adv,IAdv], + NamesSom ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/somali/NamesSom.gf b/src/somali/NamesSom.gf new file mode 100644 index 000000000..b560613eb --- /dev/null +++ b/src/somali/NamesSom.gf @@ -0,0 +1,18 @@ +concrete NamesSom of Names = CatSom ** open ResSom, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> n ** { + s = \\c => n.s ; + isPron = False ; + st = Definite ; + empty = [] ; + }; + +lin FullName gn sn = { + s = \\c => gn.s ++ sn.s ; + a = gn.a ; + isPron = False ; + st = Definite ; + empty = [] ; + } ; + +} diff --git a/src/spanish/DiffSpa.gf b/src/spanish/DiffSpa.gf index f86ac962d..d36d82320 100644 --- a/src/spanish/DiffSpa.gf +++ b/src/spanish/DiffSpa.gf @@ -237,4 +237,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg polNegDirSubj = RPos ; +param + HasArt = NoArt | UseArt ; + } diff --git a/src/spanish/ExtendSpa.gf b/src/spanish/ExtendSpa.gf index 75292f0c5..c853586b0 100644 --- a/src/spanish/ExtendSpa.gf +++ b/src/spanish/ExtendSpa.gf @@ -106,12 +106,6 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor - lin UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ; UseComp_ser comp = insertComplement comp.s (predV copula) ; -lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; -lin FullName gn sn = { - s = gn.s ++ sn.s ; - g = gn.g - } ; - lin PassVPSlash vps = passVPSlash vps [] ; PassAgentVPSlash vps np = passVPSlash vps (let by = in by.s ++ (np.s ! by.c).ton) ; diff --git a/src/spanish/GrammarSpa.gf b/src/spanish/GrammarSpa.gf index f34515711..019440529 100644 --- a/src/spanish/GrammarSpa.gf +++ b/src/spanish/GrammarSpa.gf @@ -14,7 +14,8 @@ concrete GrammarSpa of Grammar = TextSpa - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation IdiomSpa, StructuralSpa, - TenseSpa + TenseSpa, + NamesSpa ** { diff --git a/src/spanish/NamesSpa.gf b/src/spanish/NamesSpa.gf new file mode 100644 index 000000000..8164d81d3 --- /dev/null +++ b/src/spanish/NamesSpa.gf @@ -0,0 +1,52 @@ +concrete NamesSpa of Names = CatSpa ** open Prelude, ResSpa, CommonRomance in { + +lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> pn2np n ; +lin FullName gn sn = pn2np { + s = gn.s ++ sn.s ; + g = gn.g + } ; + +lin PlainLN n = heavyNP { + s = \\c => n.s; + a = {g = n.g ; n = n.num ; p = P3} + } ; + + +lin UseLN n = heavyNP { + s = \\c => case n.art of { + UseArt => case n.g of { + Fem => case n.num of { + Sg => "la" ++ n.s; + Pl => "las" ++ n.s} ; + Masc => case n.num of { + Sg => "el" ++ n.s; + Pl => "los" ++ n.s + } + } ; + NoArt => n.s + } ; + a = {g = n.g ; n = n.num ; p = P3} + } ; + + +lin InLN n = { + s = n.p.s ++ case n.art of { + UseArt => case n.g of { + Fem => case n.num of { + Sg => "la" ++ n.s; + Pl => "las" ++ n.s} ; + Masc => case n.num of { + Sg => "el" ++ n.s; + Pl => "los" ++ n.s + } + } ; + NoArt => n.s + } ; + } ; + + +lin AdjLN ap n = n ** { + s = preOrPost ap.isPre (ap.s ! AF n.g n.num) n.s ; + } ; + +} diff --git a/src/spanish/ParadigmsSpa.gf b/src/spanish/ParadigmsSpa.gf index 56ead98f2..a0080fb5d 100644 --- a/src/spanish/ParadigmsSpa.gf +++ b/src/spanish/ParadigmsSpa.gf @@ -137,6 +137,25 @@ oper -- Proper names need a string and a gender. -- The default gender is feminine for names ending with "a", otherwise masculine. + mkLN = overload { + mkLN : Str -> Gender -> LN = \s,g -> + lin LN {s = s ; + p = {s = "en"; c = Nom; isDir = True} ; + art = NoArt ; + g = g ; + num = Sg} ; + + mkLN : Str -> Gender -> Number -> LN = \s,g,num -> + lin LN {s = s ; + p = {s = "en"; c = Nom; isDir = True} ; + art = NoArt ; + g = g ; + num = num} ; + } ; + + + defLN : LN -> LN = \n -> n ** {art = UseArt} ; + mkPN : overload { mkPN : (Anna : Str) -> PN ; -- feminine for "-a" mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender diff --git a/src/swahili/GrammarSwa.gf b/src/swahili/GrammarSwa.gf index 023714dab..5e7230e90 100644 --- a/src/swahili/GrammarSwa.gf +++ b/src/swahili/GrammarSwa.gf @@ -14,7 +14,8 @@ concrete GrammarSwa of Grammar = TextX, StructuralSwa, IdiomSwa, - TenseX + TenseX, + NamesSwa ** { flags startcat = Phr ; diff --git a/src/swahili/NamesSwa.gf b/src/swahili/NamesSwa.gf new file mode 100644 index 000000000..580f416a8 --- /dev/null +++ b/src/swahili/NamesSwa.gf @@ -0,0 +1 @@ +concrete NamesSwa of Names = CatSwa ** { } diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index f895b7a45..c16898456 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -392,11 +392,5 @@ lin UseDAPMasc, UseDAPFem = \dap -> lin CardCNCard card cn = {s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ; - -lin GivenName, MaleSurname, FemaleSurname = \n -> n ; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! c ; - g = gn.g - } ; } diff --git a/src/swedish/GrammarSwe.gf b/src/swedish/GrammarSwe.gf index 2bfe758a8..6a9172611 100644 --- a/src/swedish/GrammarSwe.gf +++ b/src/swedish/GrammarSwe.gf @@ -14,7 +14,8 @@ concrete GrammarSwe of Grammar = TextX -[Tense,Temp], IdiomSwe, StructuralSwe, - TenseSwe + TenseSwe, + NamesSwe ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/swedish/NamesSwe.gf b/src/swedish/NamesSwe.gf new file mode 100644 index 000000000..6f0791e15 --- /dev/null +++ b/src/swedish/NamesSwe.gf @@ -0,0 +1,14 @@ +concrete NamesSwe of Names = CatSwe ** open CommonScand, ResSwe, Prelude in { + +lin GivenName, MaleSurname, FemaleSurname = \pn -> { + s = \\c => pn.s ! caseNP c ; + a = agrP3 pn.g Sg ; + isPron = False + } ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! caseNP c ; + a = agrP3 gn.g Sg ; + isPron = False + } ; + +} diff --git a/src/thai/CatTha.gf b/src/thai/CatTha.gf index ecab4fbd1..398c19f1f 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} ; - GN, SN, PN = ResTha.NP ; + GN, SN, LN, PN = ResTha.NP ; } diff --git a/src/thai/GrammarTha.gf b/src/thai/GrammarTha.gf index a338635c7..3ed12b024 100644 --- a/src/thai/GrammarTha.gf +++ b/src/thai/GrammarTha.gf @@ -14,7 +14,8 @@ concrete GrammarTha of Grammar = TextTha, StructuralTha, IdiomTha, - TenseX + TenseX, + NamesTha ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/thai/NamesTha.gf b/src/thai/NamesTha.gf new file mode 100644 index 000000000..3d009d959 --- /dev/null +++ b/src/thai/NamesTha.gf @@ -0,0 +1 @@ +concrete NamesTha of Names = CatTha ** { } diff --git a/src/turkish/CatTur.gf b/src/turkish/CatTur.gf index 83199fbb4..ec30fa205 100644 --- a/src/turkish/CatTur.gf +++ b/src/turkish/CatTur.gf @@ -49,7 +49,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud N = Noun ; N2 = Noun ** {c : Prep} ; N3 = Noun ** {c1,c2 : Prep} ; - GN, SN, PN = { + GN, SN, LN, PN = { s : Case => Str ; h : Harmony ; n : Number diff --git a/src/turkish/ExtendTur.gf b/src/turkish/ExtendTur.gf index dc45b9e78..775457b77 100644 --- a/src/turkish/ExtendTur.gf +++ b/src/turkish/ExtendTur.gf @@ -7,12 +7,4 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in { a = {n=num.n; p=P3} ; } ; -lin GivenName, MaleSurname, FemaleSurname = \n -> n ** {n = Sg}; -lin PlSurname = \n -> n ** {n = Pl}; -lin FullName gn sn = { - s = \\c => gn.s ! Nom ++ sn.s ! c ; - h = sn.h ; - n = Sg - } ; - } diff --git a/src/turkish/GrammarTur.gf b/src/turkish/GrammarTur.gf index 72c0c357c..c1f3322a2 100644 --- a/src/turkish/GrammarTur.gf +++ b/src/turkish/GrammarTur.gf @@ -14,7 +14,8 @@ concrete GrammarTur of Grammar = StructuralTur, PhraseTur, IdiomTur, - TenseX - [CAdv, AdN] + TenseX - [CAdv, AdN], + NamesTur ** { flags startcat = Phr ; diff --git a/src/turkish/NamesTur.gf b/src/turkish/NamesTur.gf new file mode 100644 index 000000000..df4c4c6a9 --- /dev/null +++ b/src/turkish/NamesTur.gf @@ -0,0 +1,19 @@ +concrete NamesTur of Names = CatTur ** open ResTur in { + +lin GivenName, MaleSurname, FemaleSurname = \n -> { + s = \\c => n.s ! c; + h = n.h; + a = {n = Sg; p = P3} + } ; +lin PlSurname = \n -> { + s = \\c => n.s ! c; + h = n.h; + a = {n = Pl; p = P3} + } ; +lin FullName gn sn = { + s = \\c => gn.s ! Nom ++ sn.s ! c; + h = sn.h; + a = {n = Sg; p = P3} + } ; + +}