diff --git a/src/abstract/Documentation.gf b/src/abstract/Documentation.gf index b5afc4ea..c8c3389d 100644 --- a/src/abstract/Documentation.gf +++ b/src/abstract/Documentation.gf @@ -14,6 +14,7 @@ fun InflectionN2 : N2 -> Inflection ; InflectionN3 : N3 -> Inflection ; InflectionPN : PN -> Inflection ; + InflectionLN : LN -> Inflection ; InflectionGN : GN -> Inflection ; InflectionSN : SN -> Inflection ; InflectionA : A -> Inflection ; diff --git a/src/afrikaans/DocumentationAfr.gf b/src/afrikaans/DocumentationAfr.gf index b58c51af..ebaf00e8 100644 --- a/src/afrikaans/DocumentationAfr.gf +++ b/src/afrikaans/DocumentationAfr.gf @@ -28,6 +28,12 @@ lin s2 = paragraph (pn.s ! NPNom) } ; + InflectionLN = \ln -> { + t = "ln" ; + s1 = heading1 "Naam" ; + s2 = paragraph (ln.s ! NPNom) + } ; + InflectionGN = \pn -> { t = "vnm" ; s1 = heading1 "Voornaam" ; diff --git a/src/afrikaans/NamesAfr.gf b/src/afrikaans/NamesAfr.gf index a85481be..15d12e89 100644 --- a/src/afrikaans/NamesAfr.gf +++ b/src/afrikaans/NamesAfr.gf @@ -3,4 +3,7 @@ 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} ; + +lin UseLN pn = {s = pn.s ; a = agrP3 Sg ; isPron = False} ; + } diff --git a/src/bulgarian/CatBul.gf b/src/bulgarian/CatBul.gf index 5ec3bd64..c4bbfe3e 100644 --- a/src/bulgarian/CatBul.gf +++ b/src/bulgarian/CatBul.gf @@ -88,7 +88,8 @@ 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} ; - LN, PN = {s : Str; gn : GenNum} ; + LN = {s : Species => Str; c : Preposition; gn : GenNum} ; + PN = {s : Str; gn : GenNum} ; lindef SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}}; diff --git a/src/bulgarian/DocumentationBul.gf b/src/bulgarian/DocumentationBul.gf index 30c4f76c..b047edda 100644 --- a/src/bulgarian/DocumentationBul.gf +++ b/src/bulgarian/DocumentationBul.gf @@ -92,6 +92,21 @@ lin s3 = "" } ; + InflectionLN = \n -> { + t = "същ.с." ; + s1= heading1 ("Име за Място"++ + case n.gn of { + GSg Masc => "(м.р.)" ; + GSg Fem => "(ж.р.)" ; + GSg Neut => "(ср.р.)" ; + GPl => "(мн.ч.)" + }) ; + s2 = paragraph (n.s ! Indef) ++ + heading1 ("Наречие") ++ + paragraph (n.c.s ++ linCase n.c.c Pos ++ n.s ! Def) ; + s3 = "" + } ; + InflectionGN = \gn -> { t = "същ.с.л." ; s1= heading1 (case gn.g of { diff --git a/src/bulgarian/MorphoFunsBul.gf b/src/bulgarian/MorphoFunsBul.gf index 903a9961..6fa19478 100644 --- a/src/bulgarian/MorphoFunsBul.gf +++ b/src/bulgarian/MorphoFunsBul.gf @@ -291,6 +291,17 @@ oper \s,gn -> {s = s; gn = gn ; lock_PN = <>} ; } ; + mkLN = overload { + mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg Masc} ; + mkLN : Str -> Gender -> LN = + \s,g -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg g} ; + mkLN : Str -> GenNum -> LN = + \s,gn -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = gn} ; + mkLN : Str -> Str -> GenNum -> LN = + \s1,s2,gn -> lin LN {s = table Species [s2; s1]; c = {s = vyv_Str; c = CPrep}; gn = gn} ; + } ; + + prepLN : LN -> Prep -> LN = \n,p -> n ** {c = p} ; --2 IAdv -- diff --git a/src/bulgarian/NamesBul.gf b/src/bulgarian/NamesBul.gf index 7391ba29..97f0307a 100644 --- a/src/bulgarian/NamesBul.gf +++ b/src/bulgarian/NamesBul.gf @@ -36,4 +36,21 @@ lin FullName gn sn = { p = NounP3 Pos } ; +lin UseLN, PlainLN = \n -> { + s = table { RObj c => linCase c Pos ++ n.s ! Def ; + _ => n.s ! Def + } ; + gn = n.gn ; + p = NounP3 Pos + } ; + + InLN n = {s = n.c.s ++ linCase n.c.c Pos ++ n.s ! Def} ; + + AdjLN ap n = n ** { + s = \\sp => case ap.isPre of { + True => ap.s ! aform n.gn sp RSubj ! P3 ++ n.s ! Indef ; + False => n.s ! sp ++ ap.s ! aform n.gn sp RSubj ! P3 + } + } ; + } diff --git a/src/bulgarian/ResBul.gf b/src/bulgarian/ResBul.gf index 8be1f534..cde09a47 100644 --- a/src/bulgarian/ResBul.gf +++ b/src/bulgarian/ResBul.gf @@ -859,4 +859,9 @@ resource ResBul = ParamX ** open Prelude, Predef in { Female => Fem } ; + vyv_Str : Str + = pre { "в" ; + "във" / strs {"в" ; "ф" ; "В" ; "Ф"} + } ; + } diff --git a/src/bulgarian/StructuralBul.gf b/src/bulgarian/StructuralBul.gf index 4ee12dba..1dae72ee 100644 --- a/src/bulgarian/StructuralBul.gf +++ b/src/bulgarian/StructuralBul.gf @@ -44,9 +44,7 @@ concrete StructuralBul of Structural = CatBul ** if_Subj = ss "ако" ; in8front_Prep = mkPrep "пред" ; i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ; - in_Prep = mkPrep (pre { "в" ; - "във" / strs {"в" ; "ф" ; "В" ; "Ф"} - }) ; + in_Prep = mkPrep vyv_Str ; it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ; less_CAdv = X.mkCAdv "по-малко" "от" ; many_Det = mkDeterminerPl "много" ; diff --git a/src/chinese/DocumentationChi.gf b/src/chinese/DocumentationChi.gf index 6fb61393..4b3e8678 100644 --- a/src/chinese/DocumentationChi.gf +++ b/src/chinese/DocumentationChi.gf @@ -117,6 +117,12 @@ lin s2 = n.s } ; + InflectionLN = \n -> { + t = "v" ; + s1 = heading1 "Location Name" ; + s2 = n.s + } ; + InflectionGN = \n -> { t = "v" ; s1 = heading1 "Given Name" ; diff --git a/src/chinese/NamesChi.gf b/src/chinese/NamesChi.gf index f0dc95b9..c583a763 100644 --- a/src/chinese/NamesChi.gf +++ b/src/chinese/NamesChi.gf @@ -6,4 +6,6 @@ lin FullName gn sn = { det = [] } ; +lin UseLN pn = pn ** {det = []} ; + } diff --git a/src/dutch/NamesDut.gf b/src/dutch/NamesDut.gf index c28a38e8..c79205aa 100644 --- a/src/dutch/NamesDut.gf +++ b/src/dutch/NamesDut.gf @@ -4,4 +4,6 @@ lin GivenName, MaleSurname, FemaleSurname = \n -> noMerge ** {s = n.s ; a = agrP lin FullName gn sn = noMerge ** {s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ; +lin UseLN pn = noMerge ** {s = pn.s ; a = agrP3 Sg ; isPron = False} ; + } diff --git a/src/english/CatEng.gf b/src/english/CatEng.gf index 7bb08abd..8a9482f3 100644 --- a/src/english/CatEng.gf +++ b/src/english/CatEng.gf @@ -110,7 +110,7 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in { LN = {s : Case => Str; p : Str; -- preposition "in Scandinavia", "on the Balkans" art : Bool; -- plain name "United States" vs "the United States" - a : Agr; + n : Number; } ; lindef diff --git a/src/english/DocumentationEng.gf b/src/english/DocumentationEng.gf index d5441e74..343e0c24 100644 --- a/src/english/DocumentationEng.gf +++ b/src/english/DocumentationEng.gf @@ -38,6 +38,23 @@ lin ) } ; + InflectionLN = \n -> { + t = "ln" ; + s1 = heading1 ("Location Name" ++ + case n.n of { + Sg => ""; + Pl => "(plural)" + }) ; + s2 = frameTable ( + tr (th "nom" ++ th "gen") ++ + tr (td (n.s ! Nom) ++ td (n.s ! Gen)) + ) ++ + heading1 ("Adverb") ++ + paragraph (n.p ++ case n.art of { + True => "the" ++ n.s ! Nom ; + False => n.s ! Nom}) ; + } ; + InflectionGN = \pn -> { t = "gn" ; s1 = heading1 ("Given Name" ++ diff --git a/src/english/NamesEng.gf b/src/english/NamesEng.gf index f02bf38e..fa341f9c 100644 --- a/src/english/NamesEng.gf +++ b/src/english/NamesEng.gf @@ -9,12 +9,12 @@ lin UseLN n = { True => "the" ++ n.s ! npcase2case c ; False => n.s ! npcase2case c } ; - a = n.a + a = agrP3 n.n } ; lin PlainLN n = { s = \\c => n.s ! npcase2case c ; - a = n.a + a = agrP3 n.n } ; lin InLN n = { @@ -25,7 +25,7 @@ lin InLN n = { } ; lin AdjLN ap n = n ** { - s = \\c => preOrPost ap.isPre (ap.s ! n.a) (n.s ! c) ; + s = \\c => preOrPost ap.isPre (ap.s ! agrP3 n.n) (n.s ! c) ; } ; } diff --git a/src/english/ParadigmsEng.gf b/src/english/ParadigmsEng.gf index 38cefe1f..bf9556c0 100644 --- a/src/english/ParadigmsEng.gf +++ b/src/english/ParadigmsEng.gf @@ -135,13 +135,13 @@ oper lin LN {s = table {Gen => s + "'s" ; _ => s} ; p = "in" ; art = False ; - a = agrP3 Sg} ; + n = Sg} ; mkLN : Str -> Number -> LN = \s,n -> lin LN {s = table {Gen => s + "'s" ; _ => s} ; p = "in" ; art = False ; - a = agrP3 n} ; + n = n} ; } ; defLN : LN -> LN = \n -> n ** {art = True} ; diff --git a/src/estonian/NamesEst.gf b/src/estonian/NamesEst.gf index 694021ec..ee2c5371 100644 --- a/src/estonian/NamesEst.gf +++ b/src/estonian/NamesEst.gf @@ -11,4 +11,10 @@ lin FullName gn sn = emptyNP ** { isPron = False } ; +lin UseLN pn = emptyNP ** { + s = \\c => pn.s ! npform2case Sg c ; + a = agrP3 Sg ; + isPron = False + } ; + } diff --git a/src/finnish/DocumentationFinFunctor.gf b/src/finnish/DocumentationFinFunctor.gf index 47dec43d..65a041fe 100644 --- a/src/finnish/DocumentationFinFunctor.gf +++ b/src/finnish/DocumentationFinFunctor.gf @@ -37,6 +37,12 @@ lin s2 = inflPN (\c -> pn.s ! c) } ; + InflectionLN = \pn -> { + t = "s" ; + s1 = heading1 (heading noun_Category) ; + s2 = inflPN (\c -> pn.s ! c) + } ; + InflectionGN = \pn -> { t = "s" ; s1 = heading1 "Etunimi" ; diff --git a/src/finnish/NamesFin.gf b/src/finnish/NamesFin.gf index 2ffe811b..4039dc02 100644 --- a/src/finnish/NamesFin.gf +++ b/src/finnish/NamesFin.gf @@ -11,4 +11,10 @@ lin FullName gn sn = { isPron = False ; isNeg = False } ; +lin UseLN pn = { + s = snoun2np Sg pn ; + a = agrP3 Sg ; + isPron = False ; isNeg = False + } ; + } diff --git a/src/french/NamesFre.gf b/src/french/NamesFre.gf index 821f7969..b7415da8 100644 --- a/src/french/NamesFre.gf +++ b/src/french/NamesFre.gf @@ -7,11 +7,10 @@ lin FullName gn sn = pn2np { } ; lin PlainLN n = heavyNP { - s = \\c => n.s; + 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 ; diff --git a/src/french/ParadigmsFre.gf b/src/french/ParadigmsFre.gf index c0ead4dc..83a7fff2 100644 --- a/src/french/ParadigmsFre.gf +++ b/src/french/ParadigmsFre.gf @@ -151,7 +151,7 @@ oper defLN : LN -> LN = \n -> n ** {art = AlwaysArt} ; useDefLN : LN -> LN = \n -> n ** {art = UseArt} ; - prepLN : LN -> Compl -> LN = \n,s -> n ** {p = s} ; + prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ; mkPN : overload { mkPN : Str -> PN ; -- feminine if ends with "e", otherwise masculine diff --git a/src/german/NamesGer.gf b/src/german/NamesGer.gf index d7d35f2f..978b99ca 100644 --- a/src/german/NamesGer.gf +++ b/src/german/NamesGer.gf @@ -35,4 +35,11 @@ lin FullName gn sn = { rc, ext = [] } ; +lin UseLN pn = { + s = \\c => usePrepC c (\k -> pn.s ! k) ; + a = agrgP3 pn.g pn.n ; + w = WLight ; + rc, ext = [] + } ; + } diff --git a/src/korean/NamesKor.gf b/src/korean/NamesKor.gf index 5f0f3ad0..f6c6069a 100644 --- a/src/korean/NamesKor.gf +++ b/src/korean/NamesKor.gf @@ -6,4 +6,6 @@ lin FullName gn sn = { p = gn.p } ; + UseLN pn = pn ; + } diff --git a/src/maltese/NamesMlt.gf b/src/maltese/NamesMlt.gf index c470fbe4..40ad01ef 100644 --- a/src/maltese/NamesMlt.gf +++ b/src/maltese/NamesMlt.gf @@ -13,4 +13,11 @@ lin FullName gn sn = { isDefn = False } ; +lin UseLN pn = { + s = \\c => pn.s ; + a = pn.a ; + isPron = False ; + isDefn = False ; + } ; + } diff --git a/src/polish/DocumentationPol.gf b/src/polish/DocumentationPol.gf index 8eda32b1..9ac7a034 100644 --- a/src/polish/DocumentationPol.gf +++ b/src/polish/DocumentationPol.gf @@ -52,6 +52,25 @@ lin ) } ; + InflectionLN = \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)) + ) + } ; + InflectionGN = \pn -> { t = "im" ; s1 = heading1 ("Imię" ++ case pn.gn of { diff --git a/src/polish/NamesPol.gf b/src/polish/NamesPol.gf index e5cc8225..a8d060db 100644 --- a/src/polish/NamesPol.gf +++ b/src/polish/NamesPol.gf @@ -9,4 +9,6 @@ lin FullName gn sn = { p = gn.p } ; +lin UseLN n = n; + } diff --git a/src/romanian/NamesRon.gf b/src/romanian/NamesRon.gf index 6784ba91..951d9001 100644 --- a/src/romanian/NamesRon.gf +++ b/src/romanian/NamesRon.gf @@ -31,4 +31,19 @@ lin FullName gn sn = -- KA: guessed indForm = gn.s ! No ++ sn.s ! No } ; +lin UseLN pn = 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 + } ; + } diff --git a/src/russian/NamesRus.gf b/src/russian/NamesRus.gf index 1a31cd93..e35bbf6d 100644 --- a/src/russian/NamesRus.gf +++ b/src/russian/NamesRus.gf @@ -22,4 +22,10 @@ lin FullName gn sn = a=Ag (gennum gn.g Sg) P3 } ; + UseLN pn = { + s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ; + pron=False; + a=Ag (gennum pn.g Sg) P3 + } ; -- Does NP need animacy? + } diff --git a/src/scandinavian/CatScand.gf b/src/scandinavian/CatScand.gf index 737ae6ee..e78a312c 100644 --- a/src/scandinavian/CatScand.gf +++ b/src/scandinavian/CatScand.gf @@ -108,7 +108,8 @@ incomplete concrete CatScand of Cat = -- {s : Number => Species => Case => Str ; g : Gender} ; N2 = Noun ** {c2 : Complement} ; N3 = Noun ** {c2,c3 : Complement} ; - GN, SN, LN, PN = {s : Case => Str ; g : Gender} ; + LN = {s : Case => Str ; c : Complement ; g : Gender ; n : Number} ; + GN, SN, PN = {s : Case => Str ; g : Gender} ; diff --git a/src/slovenian/NamesSlv.gf b/src/slovenian/NamesSlv.gf index 85e7fa59..016f7715 100644 --- a/src/slovenian/NamesSlv.gf +++ b/src/slovenian/NamesSlv.gf @@ -21,4 +21,10 @@ lin FullName gn sn = { isPron = False } ; +lin UseLN pn = { + s = pn.s; + a = {g=agender2gender pn.g; n=pn.n; p=P3}; + isPron = False + } ; + } diff --git a/src/somali/NamesSom.gf b/src/somali/NamesSom.gf index b560613e..4cb51d4a 100644 --- a/src/somali/NamesSom.gf +++ b/src/somali/NamesSom.gf @@ -15,4 +15,11 @@ lin FullName gn sn = { empty = [] ; } ; + UseLN pn = pn ** { + s = \\c => pn.s ; + isPron = False ; + st = Definite ; + empty = [] ; + } ; + } diff --git a/src/spanish/ParadigmsSpa.gf b/src/spanish/ParadigmsSpa.gf index 7ecba539..124f3aef 100644 --- a/src/spanish/ParadigmsSpa.gf +++ b/src/spanish/ParadigmsSpa.gf @@ -155,6 +155,7 @@ oper defLN : LN -> LN = \n -> n ** {art = UseArt} ; + prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ; mkPN : overload { mkPN : (Anna : Str) -> PN ; -- feminine for "-a" diff --git a/src/swedish/DocumentationSwe.gf b/src/swedish/DocumentationSwe.gf index 3c4b551a..c5e011b8 100644 --- a/src/swedish/DocumentationSwe.gf +++ b/src/swedish/DocumentationSwe.gf @@ -32,16 +32,18 @@ lin ) } ; - InflectionPN = \pn -> { + InflectionLN = \n -> { t = "nm" ; - s1 = heading1 ("Namn" ++ case pn.g of { - Utr => "(utr)" ; - Neutr => "(neutr)" - }) ; + s1 = heading1 ("Platsnamn" ++ case n.g of { + Utr => "(utr)" ; + Neutr => "(neutr)" + }) ; s2 = frameTable ( - tr (th "nom" ++ td (pn.s ! Nom)) ++ - tr (th "gen" ++ td (pn.s ! Gen)) - ) + tr (th "nom" ++ td (n.s ! Nom)) ++ + tr (th "gen" ++ td (n.s ! Gen)) + ) ++ + heading1 ("Adverb") ++ + paragraph (n.c.s ++ n.s ! caseNP accusative) ; } ; InflectionGN = \pn -> { diff --git a/src/swedish/NamesSwe.gf b/src/swedish/NamesSwe.gf index 6f0791e1..a6a99337 100644 --- a/src/swedish/NamesSwe.gf +++ b/src/swedish/NamesSwe.gf @@ -11,4 +11,12 @@ lin FullName gn sn = { isPron = False } ; + UseLN, PlainLN = \n -> { + s = \\c => n.s ! caseNP c ; + a = agrP3 n.g n.n ; + isPron = False + } ; + + InLN n = {s = n.c.s ++ n.s ! caseNP accusative} ; + } diff --git a/src/swedish/ParadigmsSwe.gf b/src/swedish/ParadigmsSwe.gf index 4436915d..2898f1fd 100644 --- a/src/swedish/ParadigmsSwe.gf +++ b/src/swedish/ParadigmsSwe.gf @@ -154,6 +154,14 @@ oper geoPN : Str -> PN ; -- neuter, with identical genitive if ends in a vowel + mkLN = overload { + mkLN : Str -> LN = \s -> lin LN (regPN s) ** {c={s="i";hasPrep=True}; n=Sg}; -- default gender utrum + mkLN : Str -> Gender -> LN = \s,g -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=Sg} ; -- set other gender + mkLN : Str -> Gender -> Number -> LN = \s,g,n -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=n} ; -- set other gender + } ; + + prepLN : LN -> Prep -> LN = \n,p -> n ** {c = mkComplement p.s} ; + --2 Adjectives -- Adjectives need one to seven forms. diff --git a/src/turkish/NamesTur.gf b/src/turkish/NamesTur.gf index df4c4c6a..a03a12d4 100644 --- a/src/turkish/NamesTur.gf +++ b/src/turkish/NamesTur.gf @@ -16,4 +16,10 @@ lin FullName gn sn = { a = {n = Sg; p = P3} } ; +lin UsePN pn = { + s = \\c => pn.s ! c; + h = pn.h; + a = {n = pn.n; p = P3} + } ; + }