forked from GitHub/gf-rgl
support for compounding nouns
This commit is contained in:
@@ -27,7 +27,22 @@ lin
|
|||||||
tr (intagAttr "th" "colspan=\"2\"" "вокатив" ++ td (n.vocative ! Sg) ++ td (n.vocative ! Pl)) ++
|
tr (intagAttr "th" "colspan=\"2\"" "вокатив" ++ td (n.vocative ! Sg) ++ td (n.vocative ! Pl)) ++
|
||||||
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td [] ++ td n.count_form)
|
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td [] ++ td n.count_form)
|
||||||
) ;
|
) ;
|
||||||
s3= []
|
s3= case n.relType of {
|
||||||
|
Pref => [] ;
|
||||||
|
AdjMod => heading1 ("Придавка") ++
|
||||||
|
frameTable (
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\" colspan=\"2\"" [] ++
|
||||||
|
intagAttr "th" "colspan=\"3\"" "еднина" ++
|
||||||
|
intagAttr "th" "rowspan=\"2\"" "множина") ++
|
||||||
|
tr (th "м.р." ++ th "ж.р." ++ th "с.р.") ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\"" "неопределена" ++ td (n.rel ! Indef ! GSg Masc) ++ td (n.rel ! Indef ! GSg Fem) ++ td (n.rel ! Indef ! GSg Neuter) ++ td (n.rel ! Indef ! GPl)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"3\"" "определеност" ++ td [] ++ td (n.rel ! Def Unspecified ! GSg Masc) ++ td (n.rel ! Def Unspecified ! GSg Fem) ++ td (n.rel ! Def Unspecified ! GSg Neuter) ++ td (n.rel ! Def Unspecified ! GPl)) ++
|
||||||
|
tr (td "одд." ++ td (n.rel ! Def Distal ! GSg Masc) ++ td (n.rel ! Def Distal ! GSg Fem) ++ td (n.rel ! Def Distal ! GSg Neuter) ++ td (n.rel ! Def Distal ! GPl)) ++
|
||||||
|
tr (td "бл." ++ td (n.rel ! Def Proximal ! GSg Masc) ++ td (n.rel ! Def Proximal ! GSg Fem) ++ td (n.rel ! Def Proximal ! GSg Neuter) ++ td (n.rel ! Def Proximal ! GPl))
|
||||||
|
) ;
|
||||||
|
AdvMod => heading1 ("Прилог") ++
|
||||||
|
paragraph (n.rel ! Indef ! GSg Masc)
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionPN = \pn -> {
|
InflectionPN = \pn -> {
|
||||||
@@ -77,7 +92,7 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||||
t = "нар" ;
|
t = "прил" ;
|
||||||
s1= heading1 ("Прилог") ;
|
s1= heading1 ("Прилог") ;
|
||||||
s2= paragraph (adv.s) ;
|
s2= paragraph (adv.s) ;
|
||||||
s3= ""
|
s3= ""
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1534,22 +1534,33 @@ compoundN = overload {
|
|||||||
s = \\spec,num => a.s ! spec ! genNum n.g num ++ n.s ! Indef ! num ;
|
s = \\spec,num => a.s ! spec ! genNum n.g num ++ n.s ! Indef ! num ;
|
||||||
count_form = a.s ! Indef ! genNum n.g Pl ++ n.count_form ;
|
count_form = a.s ! Indef ! genNum n.g Pl ++ n.count_form ;
|
||||||
vocative = \\num => a.s ! Indef ! genNum n.g num ++ n.vocative ! num ;
|
vocative = \\num => a.s ! Indef ! genNum n.g num ++ n.vocative ! num ;
|
||||||
|
rel = \\_,_ => a.s ! Indef ! GSg n.g ++ n.s ! Indef ! Sg ;
|
||||||
|
relType = Pref ;
|
||||||
g = n.g
|
g = n.g
|
||||||
} ;
|
} ;
|
||||||
compoundN : N -> Str -> N = \n,adv -> lin N {
|
compoundN : N -> Str -> N = \n,adv -> lin N {
|
||||||
s = \\spec,num => n.s ! spec ! num ++ adv ;
|
s = \\spec,num => n.s ! spec ! num ++ adv ;
|
||||||
count_form = n.count_form ++ adv ;
|
count_form = n.count_form ++ adv ;
|
||||||
vocative = \\num => n.vocative ! num ++ adv ;
|
vocative = \\num => n.vocative ! num ++ adv ;
|
||||||
|
rel = \\_,_ => n.s ! Indef ! Sg ++ adv ;
|
||||||
|
relType = Pref ;
|
||||||
g = n.g
|
g = n.g
|
||||||
} ;
|
} ;
|
||||||
compoundN : Str -> N -> N = \pref,n -> lin N {
|
compoundN : Str -> N -> N = \pref,n -> lin N {
|
||||||
s = \\spec,num => pref ++ n.s ! spec ! num ;
|
s = \\spec,num => pref ++ n.s ! spec ! num ;
|
||||||
count_form = pref ++ n.count_form ;
|
count_form = pref ++ n.count_form ;
|
||||||
vocative = \\num => pref ++ n.vocative ! num ;
|
vocative = \\num => pref ++ n.vocative ! num ;
|
||||||
|
rel = \\_,_ => pref ++ n.s ! Indef ! Sg ;
|
||||||
|
relType = Pref ;
|
||||||
g = n.g
|
g = n.g
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
dualN = overload {
|
||||||
|
dualN : N -> A -> N = \n,a -> n ** {rel=a.s; relType=AdjMod} ;
|
||||||
|
dualN : N -> Str -> N = \n,adv -> n ** {rel=\\_,_=>adv; relType=AdvMod} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
mkPN : Str -> PN = \s -> lin PN {s=s} ;
|
mkPN : Str -> PN = \s -> lin PN {s=s} ;
|
||||||
mkLN : Str -> LN = \s -> lin LN {s=s} ;
|
mkLN : Str -> LN = \s -> lin LN {s=s} ;
|
||||||
mkGN : Str -> GN = \s -> lin GN {s=s} ;
|
mkGN : Str -> GN = \s -> lin GN {s=s} ;
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ oper Compl = {s : Str} ;
|
|||||||
param Species = Def Distance | Indef ;
|
param Species = Def Distance | Indef ;
|
||||||
param Distance = Distal | Unspecified | Proximal ;
|
param Distance = Distal | Unspecified | Proximal ;
|
||||||
param Number = Sg | Pl ;
|
param Number = Sg | Pl ;
|
||||||
param Gender = Masc | Fem | Neuter ;
|
param NRelType = Pref | AdjMod | AdvMod ;
|
||||||
oper Noun = {s: Species => Number => Str; count_form: Str; vocative: Number => Str; g: Gender} ; -- 24855
|
param Gender = Masc | Fem | Neuter ;
|
||||||
|
oper Noun = {s: Species => Number => Str; count_form: Str; vocative: Number => Str; rel: Species => GenNum => Str; relType : NRelType; g: Gender} ; -- 24855
|
||||||
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
|
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
|
||||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,g ->
|
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,g ->
|
||||||
{ s = table {
|
{ s = table {
|
||||||
@@ -32,6 +33,8 @@ oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
|
|||||||
Sg => f10 ;
|
Sg => f10 ;
|
||||||
Pl => f11
|
Pl => f11
|
||||||
} ;
|
} ;
|
||||||
|
rel = \\_,_ => f1 ;
|
||||||
|
relType = Pref ;
|
||||||
g = g
|
g = g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user