mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-27 11:56:29 -06:00
progress on the Names API
This commit is contained in:
@@ -32,16 +32,18 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
InflectionLN = \n -> {
|
||||
t = "nm" ;
|
||||
s1 = heading1 ("Namn" ++ case pn.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s1 = heading1 ("Platsnamn" ++ case n.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (pn.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (pn.s ! Gen))
|
||||
)
|
||||
tr (th "nom" ++ td (n.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (n.s ! Gen))
|
||||
) ++
|
||||
heading1 ("Adverb") ++
|
||||
paragraph (n.c.s ++ n.s ! caseNP accusative) ;
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
|
||||
@@ -11,4 +11,12 @@ lin FullName gn sn = {
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
UseLN, PlainLN = \n -> {
|
||||
s = \\c => n.s ! caseNP c ;
|
||||
a = agrP3 n.g n.n ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
InLN n = {s = n.c.s ++ n.s ! caseNP accusative} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -154,6 +154,14 @@ oper
|
||||
|
||||
geoPN : Str -> PN ; -- neuter, with identical genitive if ends in a vowel
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN (regPN s) ** {c={s="i";hasPrep=True}; n=Sg}; -- default gender utrum
|
||||
mkLN : Str -> Gender -> LN = \s,g -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=Sg} ; -- set other gender
|
||||
mkLN : Str -> Gender -> Number -> LN = \s,g,n -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=n} ; -- set other gender
|
||||
} ;
|
||||
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {c = mkComplement p.s} ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Adjectives need one to seven forms.
|
||||
|
||||
Reference in New Issue
Block a user