mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-27 20:06:29 -06:00
the names API in more languages
This commit is contained in:
+26
-13
@@ -137,17 +137,38 @@ oper
|
||||
-- Proper names need a string and a gender.
|
||||
-- The default gender is feminine for names ending with "a", otherwise masculine.
|
||||
|
||||
mkPN : overload {
|
||||
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
|
||||
mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender
|
||||
mkPN : N -> PN ; -- gender from noun
|
||||
} ;
|
||||
|
||||
mkGN = overload {
|
||||
mkGN : (Anna : Str) -> GN = \s -> lin GN (regPN s) ; -- feminine for "-a", otherwise masculine
|
||||
mkGN : (Pilar : Str) -> Gender -> GN = \s,g -> lin GN (mk2PN s g) ; -- force gender
|
||||
} ;
|
||||
|
||||
mkSN = overload {
|
||||
mkSN : Str -> SN = \s -> lin SN {s = \\_ => s; pl = s} ;
|
||||
mkSN : Str -> Str -> Str -> SN = \male,female,pl -> lin SN {s = table {Masc=>male; Fem=>female}; pl = pl} ;
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s ->
|
||||
lin LN {s = s ;
|
||||
onPrep = False ;
|
||||
art = NoArt ;
|
||||
g = Masc ;
|
||||
num = Sg} ;
|
||||
mkLN : Str -> Gender -> LN = \s,g ->
|
||||
lin LN {s = s ;
|
||||
p = {s = "en"; c = Nom; isDir = True} ;
|
||||
onPrep = False ;
|
||||
art = NoArt ;
|
||||
g = g ;
|
||||
num = Sg} ;
|
||||
|
||||
mkLN : Str -> Gender -> Number -> LN = \s,g,num ->
|
||||
lin LN {s = s ;
|
||||
p = {s = "en"; c = Nom; isDir = True} ;
|
||||
onPrep = False ;
|
||||
art = NoArt ;
|
||||
g = g ;
|
||||
num = num} ;
|
||||
@@ -155,14 +176,6 @@ oper
|
||||
|
||||
|
||||
defLN : LN -> LN = \n -> n ** {art = UseArt} ;
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ;
|
||||
|
||||
mkPN : overload {
|
||||
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
|
||||
mkPN : (Pilar : Str) -> Gender -> PN ; -- force gender
|
||||
mkPN : N -> PN ; -- gender from noun
|
||||
} ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
@@ -350,8 +363,8 @@ oper
|
||||
Gender = MorphoSpa.Gender ;
|
||||
Number = MorphoSpa.Number ;
|
||||
CopulaType = DiffSpa.CopulaType ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
masculine, male = Masc ;
|
||||
feminine, female = Fem ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
serCopula = DiffSpa.serCopula ;
|
||||
|
||||
Reference in New Issue
Block a user