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"
N2 ; -- relational noun e.g. "son"
N3 ; -- three-place relational noun e.g. "connection"
GN ; -- given name e.g. "George"
SN ; -- second name e.g. "Washington"
PN ; -- proper name e.g. "Paris"
-- DEPRECATED: QuantSg, QuantPl

View File

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

View File

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

View File

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

View File

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

View File

@@ -28,6 +28,18 @@ lin
s2 = paragraph (pn.s ! NPNom)
} ;
InflectionGN = \pn -> {
t = "vnm" ;
s1 = heading1 "Voornaam" ;
s2 = paragraph (pn.s ! NPNom)
} ;
InflectionSN = \pn -> {
t = "van" ;
s1 = heading1 "Van" ;
s2 = paragraph (pn.s ! NPNom)
} ;
InflectionA, InflectionA2 = \adj ->
let
gforms : AForm -> Str = \a ->

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

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} ;
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
GN, SN = {s : Str; g : Gender} ;
PN = {s : Str; gn : GenNum} ;
lindef

View File

@@ -92,6 +92,30 @@ lin
s3 = ""
} ;
InflectionGN = \pn -> {
t = "същ.с.л." ;
s1= heading1 ("Собствено Име"++
case pn.g of {
Masc => "(м.р.)" ;
Fem => "(ж.р.)" ;
Neut => "(ср.р.)"
}) ;
s2 = pn.s ;
s3 = ""
} ;
InflectionSN = \pn -> {
t = "същ.с.ф." ;
s1= heading1 ("Фамилно Име"++
case pn.g of {
Masc => "(м.р.)" ;
Fem => "(ж.р.)" ;
Neut => "(ср.р.)"
}) ;
s2 = pn.s ;
s3 = ""
} ;
InflectionA, InflectionA2 = \a -> {
t = "пр" ;
s1= heading1 ("Прилагателно") ;

View File

@@ -300,5 +300,14 @@ lin UseDAP dap = {
p = NounP3 dap.p
} ;
lin GivenName, Surname = \n -> {
s = n.s ;
gn = GSg n.g
} ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
gn = GSg gn.g
} ;
}

View File

@@ -271,6 +271,15 @@ oper
feminine : Gender = Fem ;
neutr : Gender = Neut ;
mkGN : Str -> Gender -> GN =
\s,g -> lin GN {s = s; g = g} ;
mkSN = overload {
mkSN : Str -> SN =
\s -> lin SN {s = s; g = Masc} ;
mkSN : Str -> Gender -> SN =
\s,g -> lin SN {s = s; g = g} ;
} ;
mkPN = overload {
mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ;
mkPN : Str -> Gender -> PN =

View File

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

View File

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

View File

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

View File

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

View File

@@ -115,4 +115,9 @@ lin
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} ;
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
PN = {s : Case => Str ; g : Gender} ;
GN, SN, PN = {s : Case => Str ; g : Gender} ;
lindef
SSlash = \s -> {s = s; c2 = ""} ;

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 -> {
t = "a" ;
s1 = heading1 "Adjective" ;

View File

@@ -471,4 +471,11 @@ lin UseDAPFem dap = {
lin CardCNCard card cn =
{s,sp = \\d,c => card.s ! d ! Nom ++ cn.s ! card.n ! c ; n = Pl} ;
lin GivenName gn = gn ;
lin Surname sn = sn ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c ;
g = gn.g
} ;
}

View File

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

View File

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

View File

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

View File

@@ -37,6 +37,18 @@ lin
s2 = inflPN (\c -> pn.s ! c)
} ;
InflectionGN = \pn -> {
t = "s" ;
s1 = heading1 "Etunimi" ;
s2 = inflPN (\c -> pn.s ! c)
} ;
InflectionSN = \pn -> {
t = "s" ;
s1 = heading1 "Sukunimi" ;
s2 = inflPN (\c -> pn.s ! c)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 (heading adjective_Category) ;

View File

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

View File

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

View File

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

View File

@@ -140,5 +140,11 @@ lin
(Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! NPC c ;
n = Pl
} ;
lin GivenName, Surname = \n -> n ** { n = Sg } ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c ;
g = gn.g ;
n = Sg
} ;
}

View File

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

View File

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

View File

@@ -8,4 +8,11 @@ concrete ExtendKor of Extend = CatKor
lin
-- : NP -> NP -> NP
ApposNP np1 np2 = np1 ** {s = \\nf => np1.s ! nf ++ np2.s ! nf} ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = \\nf => gn.s ! nf ++ sn.s ! nf ;
p = gn.p
} ;
} ;

View File

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

View File

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

View File

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

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 -> {
t = "a" ;
s1 = heading1 "Przymiotnik" ;

View File

@@ -37,4 +37,13 @@ oper
p = P3
};
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
nom = gn.nom ++ sn.nom ;
voc = gn.nom ++ sn.voc ;
dep = \\c => gn.nom ++ sn.dep ! c ;
gn = gn.gn ;
p = gn.p
} ;
}

View File

@@ -116,4 +116,10 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
g = gn.g
} ;
} ;

View File

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

View File

@@ -131,7 +131,7 @@ concrete CatRon of Cat =
N3 = Noun ** {c2,c3 : Compl} ;
PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ;
GN, SN, PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ;
Comp = {s : Agr => Str} ;

View File

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

View File

@@ -216,4 +216,27 @@ lin
oper
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude?
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
snom = gn.snom ++ sn.snom ;
sgen = gn.snom ++ sn.sgen ;
sdat = gn.snom ++ sn.sdat ;
sacc = gn.snom ++ sn.sacc ;
sins = gn.snom ++ sn.sins ;
sprep = gn.snom ++ sn.sprep ;
sloc = gn.snom ++ sn.sloc ;
sptv = gn.snom ++ sn.sptv ;
svoc = gn.snom ++ sn.svoc ;
pnom = gn.snom ++ sn.pnom ;
pgen = gn.snom ++ sn.pgen ;
pdat = gn.snom ++ sn.pdat ;
pacc = gn.snom ++ sn.pacc ;
pins = gn.snom ++ sn.pins ;
pprep = gn.snom ++ sn.pprep ;
g = gn.g ;
mayben = gn.mayben ;
anim = gn.anim
} ;
} ;

View File

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

View File

@@ -56,6 +56,7 @@ lincat
N2 = {s : Case => Number => Str; g : AGender; c : Prep} ;
N3 = {s : Case => Number => Str; g : AGender; c : Prep} ;
GN, SN = {s : Case => Str; g : AGender};
PN = {s : Case => Str; g : AGender; n : Number};
linref

View File

@@ -57,5 +57,12 @@ lin
youPolPl_Pron = youPol_Pron ;
youPolPlFem_Pron = youPlFem_Pron ;
lin GivenName, Surname = \n -> n ** {n = Sg} ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c ;
g = gn.g ;
n = Sg
} ;
}

View File

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

View File

@@ -16,4 +16,11 @@ lin
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
-- FocusAP : AP -> NP -> Utt ; -- green was the tree
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = gn.s ++ sn.s ;
a = gn.a
} ;
} ;

View File

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

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 -> {
t = "a" ;
s1 = heading1 "Adjektiv" ;

View File

@@ -392,5 +392,11 @@ lin UseDAPMasc, UseDAPFem = \dap ->
lin CardCNCard card cn =
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ;
lin GivenName, Surname = \n -> n ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c ;
g = gn.g
} ;
}

View File

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

View File

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

View File

@@ -7,4 +7,11 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in {
a = {n=num.n; p=P3} ;
} ;
lin GivenName, Surname = \n -> n ** {n = Sg};
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! c ;
h = sn.h ;
n = Sg
} ;
}

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
concrete SymbolTur of Symbol = CatTur ** open Prelude, ResTur, HarmonyTur in {
lin
SymbPN i = {s,gen = \\_,_ => i.s ; h = {vow=I_Har; con=SCon Soft}} ; -- just a placeholder, probably wrong
SymbPN i = {s = \\_ => i.s ; h = {vow=I_Har; con=SCon Soft}; n = Sg} ; -- just a placeholder, probably wrong
{- TODO!
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;