mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
handle the full definitive article with Masc nouns
This commit is contained in:
@@ -89,7 +89,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; onPrep : Bool; gn : GenNum} ;
|
||||
LN = {s : Species => Str; defNom: Str; onPrep : Bool; hasArt : Bool; gn : GenNum} ;
|
||||
PN = {s : Str; gn : GenNum} ;
|
||||
|
||||
lindef
|
||||
|
||||
@@ -69,7 +69,10 @@ lin
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "ед.ч." ++
|
||||
th "нечленувано" ++ td (n.s ! (NF Sg Indef))) ++
|
||||
tr (th "членувано" ++ td (n.s ! (NF Sg Def))) ++
|
||||
tr (th "пълен член" ++ td (n.s ! NFSgDefNom)) ++
|
||||
(case n.g of {
|
||||
AMasc _ => tr (th "пълен член" ++ td (n.s ! NFSgDefNom)) ;
|
||||
_ => ""
|
||||
}) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "мн.ч." ++
|
||||
th "нечленувано" ++ td (n.s ! (NF Pl Indef))) ++
|
||||
tr (th "членувано" ++ td (n.s ! (NF Pl Def))) ++
|
||||
@@ -101,7 +104,16 @@ lin
|
||||
GSg Neut => "(ср.р.)" ;
|
||||
GPl => "(мн.ч.)"
|
||||
}) ;
|
||||
s2 = paragraph (n.s ! Indef) ++
|
||||
s2 = paragraph (case n.hasArt of {
|
||||
True => frameTable (
|
||||
tr (th "нечленувано" ++ td (n.s ! Indef)) ++
|
||||
tr (th "членувано" ++ td (n.s ! Def)) ++
|
||||
(case n.gn of {
|
||||
GSg Masc => tr (th "пълен член" ++ td n.defNom) ;
|
||||
_ => ""
|
||||
})) ;
|
||||
False => n.s ! Indef
|
||||
}) ++
|
||||
heading1 ("Наречие") ++
|
||||
paragraph (case n.onPrep of {
|
||||
True => linCase Dat Pos ;
|
||||
|
||||
@@ -292,13 +292,15 @@ oper
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; onPrep = False; gn = GSg Masc} ;
|
||||
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; defNom=s; onPrep = False; hasArt = False; gn = GSg Masc} ;
|
||||
mkLN : Str -> Gender -> LN =
|
||||
\s,g -> lin LN {s = \\_ => s; onPrep = False; gn = GSg g} ;
|
||||
\s,g -> lin LN {s = \\_ => s; defNom=s; onPrep = False; hasArt = False; gn = GSg g} ;
|
||||
mkLN : Str -> GenNum -> LN =
|
||||
\s,gn -> lin LN {s = \\_ => s; onPrep = False; gn = gn} ;
|
||||
\s,gn -> lin LN {s = \\_ => s; defNom=s; onPrep = False; hasArt = False; gn = gn} ;
|
||||
mkLN : Str -> Str -> GenNum -> LN =
|
||||
\s1,s2,gn -> lin LN {s = table Species [s2; s1]; onPrep = False; gn = gn} ;
|
||||
\s1,s2,gn -> lin LN {s = table Species [s2; s1]; defNom=s2; onPrep = False; hasArt = True; gn = gn} ;
|
||||
mkLN : Str -> Str -> Str -> LN =
|
||||
\s1,s2,s3 -> lin LN {s = table Species [s3; s2]; defNom=s1; onPrep = False; hasArt = True; gn = GSg Masc} ;
|
||||
} ;
|
||||
|
||||
onLN : LN -> LN = \n -> n ** {onPrep = True} ;
|
||||
|
||||
@@ -36,9 +36,18 @@ lin FullName gn sn = {
|
||||
p = NounP3 Pos
|
||||
} ;
|
||||
|
||||
lin UseLN, PlainLN = \n -> {
|
||||
s = table { RObj c => linCase c Pos ++ n.s ! Def ;
|
||||
_ => n.s ! Def
|
||||
lin UseLN = \n -> {
|
||||
s = table { RSubj => n.defNom ;
|
||||
RObj c => linCase c Pos ++ n.s ! Def ;
|
||||
RVoc => n.s ! Indef
|
||||
} ;
|
||||
gn = n.gn ;
|
||||
p = NounP3 Pos
|
||||
} ;
|
||||
|
||||
lin PlainLN = \n -> {
|
||||
s = table { RObj c => linCase c Pos ++ n.s ! Indef ;
|
||||
_ => n.s ! Indef
|
||||
} ;
|
||||
gn = n.gn ;
|
||||
p = NounP3 Pos
|
||||
@@ -53,10 +62,16 @@ lin UseLN, PlainLN = \n -> {
|
||||
} ;
|
||||
|
||||
AdjLN ap n = n ** {
|
||||
s = \\sp => case ap.isPre of {
|
||||
True => ap.s ! aform n.gn sp RSubj ! P3 ++ n.s ! Indef ;
|
||||
False => n.s ! sp ++ ap.s ! aform n.gn sp RSubj ! P3
|
||||
}
|
||||
s = \\sp => case <ap.isPre,n.hasArt> of {
|
||||
<True,True > => ap.s ! aform n.gn sp RSubj ! P3 ++ n.s ! Indef ;
|
||||
<True,False> => ap.s ! aform n.gn Indef RSubj ! P3 ++ n.s ! Indef ;
|
||||
<False,_> => n.s ! sp ++ ap.s ! aform n.gn Indef RSubj ! P3
|
||||
} ;
|
||||
defNom = case <ap.isPre,n.hasArt> of {
|
||||
<True,True > => ap.s ! ASgMascDefNom ! P3 ++ n.s ! Indef ;
|
||||
<True,False> => ap.s ! aform n.gn Indef RSubj ! P3 ++ n.s ! Indef ;
|
||||
<False,_> => n.defNom ++ ap.s ! aform n.gn Indef RSubj ! P3
|
||||
} ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user