forked from GitHub/gf-rgl
added GN & SN categories for constructing names
This commit is contained in:
@@ -49,7 +49,16 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
||||
N = Noun ;
|
||||
N2 = Noun ** {c : Prep} ;
|
||||
N3 = Noun ** {c1,c2 : Prep} ;
|
||||
PN = Noun ;
|
||||
GN, SN = {
|
||||
s : Case => Str ;
|
||||
h : Harmony
|
||||
} ;
|
||||
PN = {
|
||||
s : Case => Str ;
|
||||
h : Harmony ;
|
||||
n : Number
|
||||
} ;
|
||||
|
||||
|
||||
linref
|
||||
V = \v -> v.s ! VInfinitive ;
|
||||
|
||||
@@ -7,4 +7,11 @@ concrete ExtendTur of Extend = CatTur ** open ResTur in {
|
||||
a = {n=num.n; p=P3} ;
|
||||
} ;
|
||||
|
||||
lin GivenName, Surname = \n -> n ** {n = Sg};
|
||||
lin FullName gn sn = {
|
||||
s = \\c => gn.s ! Nom ++ sn.s ! c ;
|
||||
h = sn.h ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude
|
||||
UsePron p = p ;
|
||||
|
||||
UsePN pn = {
|
||||
s = \\c => pn.s ! Sg ! c;
|
||||
s = \\c => pn.s ! c;
|
||||
h = pn.h;
|
||||
a = {n = Sg; p = P3}
|
||||
a = {n = pn.n; p = P3}
|
||||
} ;
|
||||
|
||||
PossPron p = {s = []; useGen = YesGen p.a} ;
|
||||
|
||||
@@ -155,7 +155,7 @@ resource ParadigmsTur = open
|
||||
|
||||
-- digits can be seen as proper noun, but we need an additional harmony argument
|
||||
-- since harmony information can not be extracted from digit string.
|
||||
makeHarPN : Str -> Str -> Harmony -> Noun ;
|
||||
makeHarNoun : Str -> Str -> Harmony -> Noun ;
|
||||
|
||||
-- Link two nouns, e.g. zeytin (olive) + yağ (oil) -> zeytinyağı (olive oil)
|
||||
linkNoun : (tere,yag : N) -> Species -> Contiguity -> N ;
|
||||
@@ -393,24 +393,28 @@ resource ParadigmsTur = open
|
||||
|
||||
regPN sn = makePN sn sn ;
|
||||
|
||||
makeHarPN sn sy har =
|
||||
makeHarNoun sn sy har =
|
||||
let bn = sn + "'" ;
|
||||
by = sy + "'" ;
|
||||
pln = add_number Pl bn har.vow ;
|
||||
in
|
||||
mkNoun sn
|
||||
(addSuffix by har accSuffix)
|
||||
(addSuffix by har datSuffix)
|
||||
(addSuffix by har genSuffix)
|
||||
(addSuffix bn har locSuffix)
|
||||
(addSuffix bn har ablatSuffix)
|
||||
(addSuffix bn har abessPosSuffix)
|
||||
(addSuffix bn har abessNegSuffix)
|
||||
by
|
||||
pln
|
||||
har ;
|
||||
pln = add_number Pl bn har.vow
|
||||
in mkNoun sn
|
||||
(addSuffix by har accSuffix)
|
||||
(addSuffix by har datSuffix)
|
||||
(addSuffix by har genSuffix)
|
||||
(addSuffix bn har locSuffix)
|
||||
(addSuffix bn har ablatSuffix)
|
||||
(addSuffix bn har abessPosSuffix)
|
||||
(addSuffix bn har abessNegSuffix)
|
||||
by
|
||||
pln
|
||||
har ;
|
||||
|
||||
makePN sn sy = lin PN (makeHarPN sn sy (getHarmony sn)) ;
|
||||
makePN sn sy =
|
||||
let noun = makeHarNoun sn sy (getHarmony sn)
|
||||
in lin PN { s = \\c => noun.s ! Sg ! c ;
|
||||
h = noun.h ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
linkNoun n1 n2 lt ct =
|
||||
let n1sn = n1.s ! Sg ! Nom ;--tere
|
||||
@@ -570,8 +574,8 @@ resource ParadigmsTur = open
|
||||
in
|
||||
{
|
||||
s = table {
|
||||
NCard => (makeHarPN card card harCard).s ;
|
||||
NOrd => (makeHarPN ordi ordi harOrd).s
|
||||
NCard => (makeHarNoun card card harCard).s ;
|
||||
NOrd => (makeHarNoun ordi ordi harOrd).s
|
||||
} ;
|
||||
n = num
|
||||
} ;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
concrete SymbolTur of Symbol = CatTur ** open Prelude, ResTur, HarmonyTur in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s,gen = \\_,_ => i.s ; h = {vow=I_Har; con=SCon Soft}} ; -- just a placeholder, probably wrong
|
||||
SymbPN i = {s = \\_ => i.s ; h = {vow=I_Har; con=SCon Soft}; n = Sg} ; -- just a placeholder, probably wrong
|
||||
|
||||
{- TODO!
|
||||
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
||||
|
||||
Reference in New Issue
Block a user