1
0
forked from GitHub/gf-rgl

progress on the Names API

This commit is contained in:
Krasimir Angelov
2023-08-07 21:15:48 +02:00
parent 9fcee982e5
commit 531e2c2dd2
36 changed files with 220 additions and 22 deletions

View File

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

View File

@@ -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" ++

View File

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

View File

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