1
0
forked from GitHub/gf-rgl

added GN & SN categories for constructing names

This commit is contained in:
Krasimir Angelov
2022-12-15 08:44:42 +01:00
parent d0e433cd46
commit 7085acacc9
55 changed files with 371 additions and 43 deletions

View File

@@ -126,6 +126,8 @@ abstract Cat = Common ** {
N ; -- common noun e.g. "house" N ; -- common noun e.g. "house"
N2 ; -- relational noun e.g. "son" N2 ; -- relational noun e.g. "son"
N3 ; -- three-place relational noun e.g. "connection" 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" PN ; -- proper name e.g. "Paris"
-- DEPRECATED: QuantSg, QuantPl -- DEPRECATED: QuantSg, QuantPl

View File

@@ -14,6 +14,8 @@ fun
InflectionN2 : N2 -> Inflection ; InflectionN2 : N2 -> Inflection ;
InflectionN3 : N3 -> Inflection ; InflectionN3 : N3 -> Inflection ;
InflectionPN : PN -> Inflection ; InflectionPN : PN -> Inflection ;
InflectionGN : GN -> Inflection ;
InflectionSN : SN -> Inflection ;
InflectionA : A -> Inflection ; InflectionA : A -> Inflection ;
InflectionA2 : A2 -> Inflection ; InflectionA2 : A2 -> Inflection ;
InflectionV : V -> Inflection ; InflectionV : V -> Inflection ;

View File

@@ -292,4 +292,8 @@ cat X ; -- for words that are difficult to classify, mainly for MorphoDict
fun fun
CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc
GivenName : GN -> PN ;
Surname : SN -> PN ;
FullName : GN -> SN -> PN ;
} }

View File

@@ -3,7 +3,7 @@
concrete AllAfr of AllAfrAbs = concrete AllAfr of AllAfrAbs =
LangAfr, LangAfr,
IrregAfr, IrregAfr,
ExtraAfr ExtendAfr
** **
{ {
--{} ; --{} ;

View File

@@ -83,6 +83,6 @@ concrete CatAfr of Cat =
N = Noun ; N = Noun ;
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ; N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ; N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
PN = {s : NPCase => Str} ; GN, SN, PN = {s : NPCase => Str} ;
} }

View File

@@ -28,6 +28,18 @@ lin
s2 = paragraph (pn.s ! NPNom) 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 -> InflectionA, InflectionA2 = \adj ->
let let
gforms : AForm -> Str = \a -> gforms : AForm -> Str = \a ->

View File

@@ -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 ;
} ;
}

View File

@@ -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 : Str} ;
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ; N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : 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} ; --Tense = {s : Str ; t : ResKam.Tense} ;
linref linref

View File

@@ -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} ; N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ;
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ; 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} ; 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} ; PN = {s : Str; gn : GenNum} ;
lindef lindef

View File

@@ -92,6 +92,30 @@ lin
s3 = "" 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 -> { InflectionA, InflectionA2 = \a -> {
t = "пр" ; t = "пр" ;
s1= heading1 ("Прилагателно") ; s1= heading1 ("Прилагателно") ;

View File

@@ -300,5 +300,14 @@ lin UseDAP dap = {
p = NounP3 dap.p 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
} ;
} }

View File

@@ -271,6 +271,15 @@ oper
feminine : Gender = Fem ; feminine : Gender = Fem ;
neutr : Gender = Neut ; 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 = overload {
mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ; mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ;
mkPN : Str -> Gender -> PN = mkPN : Str -> Gender -> PN =

View File

@@ -15,5 +15,10 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
ParadigmsCat in { ParadigmsCat in {
-- put your own definitions here -- put your own definitions here
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
} ; } ;

View File

@@ -79,7 +79,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
N = ResChi.Noun ; N = ResChi.Noun ;
N2 = ResChi.Noun ** {c2 : Preposition} ; N2 = ResChi.Noun ** {c2 : Preposition} ;
N3 = ResChi.Noun ** {c2,c3 : Preposition} ; N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
PN = ResChi.NP ; GN, SN, PN = ResChi.NP ;
-- overridden -- overridden

View File

@@ -16,4 +16,10 @@ concrete ExtendChi of Extend = CatChi **
oper oper
mkAdv : Str -> Adv ; mkAdv : Str -> Adv ;
mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ; mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ;
};
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s
} ;
};

View File

@@ -81,6 +81,6 @@ concrete CatDut of Cat =
N = Noun ; N = Noun ;
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ; N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ; N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
PN = {s : NPCase => Str} ; GN, SN, PN = {s : NPCase => Str} ;
} }

View File

@@ -115,4 +115,9 @@ lin
isPron = False isPron = False
} ; } ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! NPNom ++ sn.s ! c
} ;
} }

View File

@@ -106,7 +106,7 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
N = {s : Number => Case => Str ; g : Gender} ; N = {s : Number => Case => Str ; g : Gender} ;
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : 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 lindef
SSlash = \s -> {s = s; c2 = ""} ; SSlash = \s -> {s = s; c2 = ""} ;

View File

@@ -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 -> { InflectionA, InflectionA2 = \adj -> {
t = "a" ; t = "a" ;
s1 = heading1 "Adjective" ; s1 = heading1 "Adjective" ;

View File

@@ -471,4 +471,11 @@ lin UseDAPFem dap = {
lin CardCNCard card cn = lin CardCNCard card cn =
{s,sp = \\d,c => card.s ! d ! Nom ++ cn.s ! card.n ! c ; n = Pl} ; {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
} ;
} }

View File

@@ -91,7 +91,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
c2,c3 : Compl ; c2,c3 : Compl ;
isPre,isPre2 : Bool isPre,isPre2 : Bool
} ; } ;
PN = {s : Case => Str} ; GN, SN, PN = {s : Case => Str} ;
linref linref
VP = \vp -> linV vp.v ; VP = \vp -> linV vp.v ;

View File

@@ -437,4 +437,9 @@ concrete ExtendEst of Extend =
WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ; WithoutVP vp = {s = "ilma" ++ infVPdefault vp InfMata} ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c
} ;
} }

View File

@@ -95,7 +95,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
N = SNoun ; N = SNoun ;
N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ; N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ;
N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ; N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ;
PN = SPN ; GN, SN, PN = SPN ;
linref linref
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ; SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;

View File

@@ -37,6 +37,18 @@ lin
s2 = inflPN (\c -> pn.s ! c) 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 -> { InflectionA, InflectionA2 = \adj -> {
t = "a" ; t = "a" ;
s1 = heading1 (heading adjective_Category) ; s1 = heading1 (heading adjective_Category) ;

View File

@@ -240,4 +240,11 @@ lin CardCNCard card cn = {
lin UttAccNP np = {s = P.addNegation np.isNeg ++ np.s ! NPAcc} ; 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 AdjAsCN ap = {s = ap.s ! True ; postmod = \\_ => ap.p ; h = Back} ; ---- Harmony just a guess
lin AdjAsNP ap = MassNP (AdjAsCN ap) ; lin AdjAsNP ap = MassNP (AdjAsCN ap) ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c
} ;
} }

View File

@@ -38,6 +38,10 @@ lin
oper oper
de_Quant : Quant = IndefArt ** {s = \\_,_,_,_ => elisDe} ; de_Quant : Quant = IndefArt ** {s = \\_,_,_,_ => elisDe} ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
}
}

View File

@@ -100,6 +100,7 @@ concrete CatGer of Cat =
N = ResGer.Noun ; N = ResGer.Noun ;
N2 = ResGer.Noun ** {c2 : Preposition} ; N2 = ResGer.Noun ** {c2 : Preposition} ;
N3 = ResGer.Noun ** {c2,c3 : Preposition} ; N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
GN, SN = {s : Case => Str; g : Gender} ;
PN = {s : Case => Str; g : Gender; n : Number} ; PN = {s : Case => Str; g : Gender; n : Number} ;
-- tense with possibility to choose conjunctive forms -- tense with possibility to choose conjunctive forms

View File

@@ -141,4 +141,10 @@ lin
n = Pl 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
} ;
} }

View File

@@ -15,5 +15,10 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor-- -
ParadigmsIta in { ParadigmsIta in {
-- put your own definitions here -- put your own definitions here
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
} ; } ;

View File

@@ -115,7 +115,7 @@ concrete CatKor of Cat = CommonX ** open ResKor, Prelude in {
N = ResKor.Noun ; N = ResKor.Noun ;
N2 = ResKor.Noun2 ; N2 = ResKor.Noun2 ;
N3 = ResKor.Noun3 ; N3 = ResKor.Noun3 ;
PN = ResKor.NounPhrase ; GN, SN, PN = ResKor.NounPhrase ;
linref linref
V, V2, V3 = linVerb ; V, V2, V3 = linVerb ;

View File

@@ -8,4 +8,11 @@ concrete ExtendKor of Extend = CatKor
lin lin
-- : NP -> NP -> NP -- : NP -> NP -> NP
ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ; 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
} ;
} ; } ;

View File

@@ -118,7 +118,7 @@ concrete CatMlt of Cat = CommonX - [Adv] ** open ResMlt, Prelude in {
N = Noun ; N = Noun ;
N2 = Noun ** {c2 : Compl} ; N2 = Noun ** {c2 : Compl} ;
N3 = Noun ** {c2, c3 : Compl} ; N3 = Noun ** {c2, c3 : Compl} ;
PN = ProperNoun ; GN, SN, PN = ProperNoun ;
-- Overridden from CommonX -- Overridden from CommonX

View File

@@ -24,4 +24,10 @@ concrete ExtraMlt of ExtraMltAbs = CatMlt **
a = p.a ; a = p.a ;
} ; } ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
a = gn.a
} ;
} }

View File

@@ -119,7 +119,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX)
N3 = CommNoun3;-- ** { c, c2 : Complement } ; N3 = CommNoun3;-- ** { c, c2 : Complement } ;
PN = NounPhrase; GN, SN, PN = NounPhrase;
CAdv = {s,p,sn,pn : Str} ; CAdv = {s,p,sn,pn : Str} ;

View File

@@ -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 -> { InflectionA, InflectionA2 = \adj -> {
t = "a" ; t = "a" ;
s1 = heading1 "Przymiotnik" ; s1 = heading1 "Przymiotnik" ;

View File

@@ -37,4 +37,13 @@ oper
p = P3 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
} ;
} }

View File

@@ -116,4 +116,10 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ; youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ; 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
} ;
} ; } ;

View File

@@ -110,7 +110,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
N = Noun ; N = Noun ;
N2 = Noun ** {c2 : Compl} ; N2 = Noun ** {c2 : Compl} ;
N3 = Noun ** {c2,c3 : Compl} ; N3 = Noun ** {c2,c3 : Compl} ;
PN = {s : Str ; g : Gender} ; GN, SN, PN = {s : Str ; g : Gender} ;
-- tense augmented with passé simple -- tense augmented with passé simple
lincat lincat

View File

@@ -131,7 +131,7 @@ concrete CatRon of Cat =
N3 = Noun ** {c2,c3 : Compl} ; 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} ; Comp = {s : Agr => Str} ;

View File

@@ -1,7 +1,7 @@
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in { concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
flags coding=utf8 ; optimize=all ; flags coding=utf8 ; optimize=all ;
lincat lincat
N, PN = ResRus.NounForms ; N, GN, SN, PN = ResRus.NounForms ;
N2 = ResRus.Noun2Forms ; N2 = ResRus.Noun2Forms ;
N3 = ResRus.Noun3Forms ; N3 = ResRus.Noun3Forms ;

View File

@@ -216,4 +216,27 @@ lin
oper oper
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude? 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
} ;
} ; } ;

View File

@@ -108,7 +108,7 @@ incomplete concrete CatScand of Cat =
-- {s : Number => Species => Case => Str ; g : Gender} ; -- {s : Number => Species => Case => Str ; g : Gender} ;
N2 = Noun ** {c2 : Complement} ; N2 = Noun ** {c2 : Complement} ;
N3 = Noun ** {c2,c3 : Complement} ; N3 = Noun ** {c2,c3 : Complement} ;
PN = {s : Case => Str ; g : Gender} ; GN, SN, PN = {s : Case => Str ; g : Gender} ;

View File

@@ -56,6 +56,7 @@ lincat
N2 = {s : Case => Number => Str; g : AGender; c : Prep} ; N2 = {s : Case => Number => Str; g : AGender; c : Prep} ;
N3 = {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}; PN = {s : Case => Str; g : AGender; n : Number};
linref linref

View File

@@ -57,5 +57,12 @@ lin
youPolPl_Pron = youPol_Pron ; youPolPl_Pron = youPol_Pron ;
youPolPlFem_Pron = youPlFem_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
} ;
} }

View File

@@ -118,7 +118,7 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
N = ResSom.Noun ; N = ResSom.Noun ;
N2 = ResSom.Noun2 ; N2 = ResSom.Noun2 ;
N3 = ResSom.Noun3 ; 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. Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb.

View File

@@ -16,4 +16,11 @@ lin
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep -- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep -- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
-- FocusAP : AP -> NP -> Utt ; -- green was the tree -- 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
} ;
} ; } ;

View File

@@ -100,4 +100,10 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
cop = serCopula cop = serCopula
} ; } ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
} ; } ;

View File

@@ -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 -> { InflectionA, InflectionA2 = \adj -> {
t = "a" ; t = "a" ;
s1 = heading1 "Adjektiv" ; s1 = heading1 "Adjektiv" ;

View File

@@ -393,4 +393,10 @@ lin UseDAPMasc, UseDAPFem = \dap ->
lin CardCNCard card cn = lin CardCNCard card cn =
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ; {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
} ;
} }

View File

@@ -71,6 +71,6 @@ concrete CatTha of Cat = CommonX ** open ResTha, Prelude in {
N = ResTha.Noun ; N = ResTha.Noun ;
N2 = ResTha.Noun ** {c2 : Str} ; N2 = ResTha.Noun ** {c2 : Str} ;
N3 = ResTha.Noun ** {c2,c3 : Str} ; N3 = ResTha.Noun ** {c2,c3 : Str} ;
PN = ResTha.NP ; GN, SN, PN = ResTha.NP ;
} }

View File

@@ -49,7 +49,16 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
N = Noun ; N = Noun ;
N2 = Noun ** {c : Prep} ; N2 = Noun ** {c : Prep} ;
N3 = Noun ** {c1,c2 : Prep} ; N3 = Noun ** {c1,c2 : Prep} ;
PN = Noun ; GN, SN = {
s : Case => Str ;
h : Harmony
} ;
PN = {
s : Case => Str ;
h : Harmony ;
n : Number
} ;
linref linref
V = \v -> v.s ! VInfinitive ; V = \v -> v.s ! VInfinitive ;

View File

@@ -7,4 +7,11 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in {
a = {n=num.n; p=P3} ; 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
} ;
} }

View File

@@ -19,9 +19,9 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude
UsePron p = p ; UsePron p = p ;
UsePN pn = { UsePN pn = {
s = \\c => pn.s ! Sg ! c; s = \\c => pn.s ! c;
h = pn.h; h = pn.h;
a = {n = Sg; p = P3} a = {n = pn.n; p = P3}
} ; } ;
PossPron p = {s = []; useGen = YesGen p.a} ; PossPron p = {s = []; useGen = YesGen p.a} ;

View File

@@ -155,7 +155,7 @@ resource ParadigmsTur = open
-- digits can be seen as proper noun, but we need an additional harmony argument -- digits can be seen as proper noun, but we need an additional harmony argument
-- since harmony information can not be extracted from digit string. -- 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) -- Link two nouns, e.g. zeytin (olive) + yağ (oil) -> zeytinyağı (olive oil)
linkNoun : (tere,yag : N) -> Species -> Contiguity -> N ; linkNoun : (tere,yag : N) -> Species -> Contiguity -> N ;
@@ -393,12 +393,11 @@ resource ParadigmsTur = open
regPN sn = makePN sn sn ; regPN sn = makePN sn sn ;
makeHarPN sn sy har = makeHarNoun sn sy har =
let bn = sn + "'" ; let bn = sn + "'" ;
by = sy + "'" ; by = sy + "'" ;
pln = add_number Pl bn har.vow ; pln = add_number Pl bn har.vow
in in mkNoun sn
mkNoun sn
(addSuffix by har accSuffix) (addSuffix by har accSuffix)
(addSuffix by har datSuffix) (addSuffix by har datSuffix)
(addSuffix by har genSuffix) (addSuffix by har genSuffix)
@@ -410,7 +409,12 @@ resource ParadigmsTur = open
pln pln
har ; 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 = linkNoun n1 n2 lt ct =
let n1sn = n1.s ! Sg ! Nom ;--tere let n1sn = n1.s ! Sg ! Nom ;--tere
@@ -570,8 +574,8 @@ resource ParadigmsTur = open
in in
{ {
s = table { s = table {
NCard => (makeHarPN card card harCard).s ; NCard => (makeHarNoun card card harCard).s ;
NOrd => (makeHarPN ordi ordi harOrd).s NOrd => (makeHarNoun ordi ordi harOrd).s
} ; } ;
n = num n = num
} ; } ;

View File

@@ -3,7 +3,7 @@
concrete SymbolTur of Symbol = CatTur ** open Prelude, ResTur, HarmonyTur in { concrete SymbolTur of Symbol = CatTur ** open Prelude, ResTur, HarmonyTur in {
lin 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! {- TODO!
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ; IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;