mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-25 19:16:28 -06:00
added GN & SN categories for constructing names
This commit is contained in:
@@ -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} ;
|
||||
|
||||
|
||||
@@ -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" ;
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user