mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-23 10:11:10 -06:00
the names API in more languages
This commit is contained in:
@@ -88,7 +88,7 @@ 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 = {s : Species => Str; c : Preposition; gn : GenNum} ;
|
||||
LN = {s : Species => Str; onPrep : Bool; gn : GenNum} ;
|
||||
PN = {s : Str; gn : GenNum} ;
|
||||
|
||||
lindef
|
||||
|
||||
@@ -103,7 +103,11 @@ lin
|
||||
}) ;
|
||||
s2 = paragraph (n.s ! Indef) ++
|
||||
heading1 ("Наречие") ++
|
||||
paragraph (n.c.s ++ linCase n.c.c Pos ++ n.s ! Def) ;
|
||||
paragraph (case n.onPrep of {
|
||||
True => linCase Dat Pos ;
|
||||
False => vyv_Str
|
||||
} ++
|
||||
n.s ! Def) ;
|
||||
s3 = ""
|
||||
} ;
|
||||
|
||||
@@ -160,7 +164,7 @@ lin
|
||||
} ;
|
||||
|
||||
InflectionPrep = \prep -> {
|
||||
t = "пр" ;
|
||||
t = "пред" ;
|
||||
s1= heading1 ("Предлог") ;
|
||||
s2= paragraph (prep.s) ;
|
||||
s3= ""
|
||||
|
||||
@@ -292,16 +292,16 @@ oper
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg Masc} ;
|
||||
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; onPrep = False; gn = GSg Masc} ;
|
||||
mkLN : Str -> Gender -> LN =
|
||||
\s,g -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg g} ;
|
||||
\s,g -> lin LN {s = \\_ => s; onPrep = False; gn = GSg g} ;
|
||||
mkLN : Str -> GenNum -> LN =
|
||||
\s,gn -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = gn} ;
|
||||
\s,gn -> lin LN {s = \\_ => s; onPrep = False; 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} ;
|
||||
\s1,s2,gn -> lin LN {s = table Species [s2; s1]; onPrep = False; gn = gn} ;
|
||||
} ;
|
||||
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {c = p} ;
|
||||
onLN : LN -> LN = \n -> n ** {onPrep = True} ;
|
||||
|
||||
--2 IAdv
|
||||
--
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete NamesBul of Names = CatBul ** open ResBul in {
|
||||
concrete NamesBul of Names = CatBul ** open ResBul, Prelude in {
|
||||
|
||||
lin GivenName = \n -> {
|
||||
s = table { RObj c => linCase c Pos ++ n.s;
|
||||
@@ -44,7 +44,13 @@ lin UseLN, PlainLN = \n -> {
|
||||
p = NounP3 Pos
|
||||
} ;
|
||||
|
||||
InLN n = {s = n.c.s ++ linCase n.c.c Pos ++ n.s ! Def} ;
|
||||
InLN n = {
|
||||
s = case n.onPrep of {
|
||||
True => linCase Dat Pos ;
|
||||
False => vyv_Str
|
||||
} ++
|
||||
n.s ! Def
|
||||
} ;
|
||||
|
||||
AdjLN ap n = n ** {
|
||||
s = \\sp => case ap.isPre of {
|
||||
|
||||
@@ -47,7 +47,6 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
|
||||
param
|
||||
Gender = Masc | Fem | Neut ;
|
||||
Sex = Male | Female ;
|
||||
|
||||
Species = Indef | Def ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user