mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -06:00
a new abstract syntax in Documentation.gf which allows a more compact definition of the corresponding concrete syntax. The new strategy is so far used only in DocumentationEng and the new DocumentationBul.
This commit is contained in:
@@ -5,12 +5,14 @@ abstract Documentation = Cat ** {
|
|||||||
|
|
||||||
cat
|
cat
|
||||||
Inflection ; -- inflection table
|
Inflection ; -- inflection table
|
||||||
|
Document ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
InflectionN : N -> Inflection ;
|
InflectionN : N -> Inflection ;
|
||||||
InflectionN2 : N2 -> Inflection ;
|
InflectionN2 : N2 -> Inflection ;
|
||||||
InflectionN3 : N3 -> Inflection ;
|
InflectionN3 : N3 -> Inflection ;
|
||||||
InflectionA : A -> Inflection ;
|
InflectionA : A -> Inflection ;
|
||||||
|
InflectionA2 : A2 -> Inflection ;
|
||||||
InflectionV : V -> Inflection ;
|
InflectionV : V -> Inflection ;
|
||||||
InflectionV2 : V2 -> Inflection ;
|
InflectionV2 : V2 -> Inflection ;
|
||||||
InflectionVV : VV -> Inflection ;
|
InflectionVV : VV -> Inflection ;
|
||||||
@@ -25,7 +27,7 @@ fun
|
|||||||
InflectionAdv : Adv -> Inflection ;
|
InflectionAdv : Adv -> Inflection ;
|
||||||
InflectionPrep : Prep -> Inflection ;
|
InflectionPrep : Prep -> Inflection ;
|
||||||
|
|
||||||
ExplainInflection : String -> Inflection -> Inflection ;
|
fun
|
||||||
|
MkDocument : String -> Inflection -> String -> Document ;
|
||||||
|
|
||||||
}
|
}
|
||||||
375
lib/src/bulgarian/DocumentationBul.gf
Normal file
375
lib/src/bulgarian/DocumentationBul.gf
Normal file
@@ -0,0 +1,375 @@
|
|||||||
|
--# -path=.:../abstract:../common
|
||||||
|
concrete DocumentationBul of Documentation = CatBul ** open
|
||||||
|
ResBul,
|
||||||
|
SyntaxBul,
|
||||||
|
HTML in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Inflection = {s1,s2,s3 : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
InflectionN n = {
|
||||||
|
s1= heading1 ("Съществително"++
|
||||||
|
case n.g of {
|
||||||
|
AMasc Human => "(м.р.л.)" ;
|
||||||
|
AMasc NonHuman => "(м.р.)" ;
|
||||||
|
AFem => "(ж.р.)" ;
|
||||||
|
ANeut => "(ср.р.)"
|
||||||
|
}) ;
|
||||||
|
s2= frameTable (
|
||||||
|
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)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++ td (n.s ! (NF Pl Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (n.s ! (NF Pl Def))) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\"" "звателна форма" ++ td (n.s ! NFVocative)) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td (n.s ! NFPlCount))
|
||||||
|
) ;
|
||||||
|
s3= heading1 ("Прилагателно") ++
|
||||||
|
frameTable (
|
||||||
|
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
|
||||||
|
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (n.rel ! (ASg Masc Indef))) ++
|
||||||
|
tr (th "непълен член" ++ td (n.rel ! (ASg Masc Def))) ++
|
||||||
|
tr (th "пълен член" ++ td (n.rel ! ASgMascDefNom)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
|
||||||
|
th "нечленувано" ++ td (n.rel ! (ASg Fem Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (n.rel ! (ASg Fem Def))) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
|
||||||
|
th "нечленувано" ++ td (n.rel ! (ASg Neut Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (n.rel ! (ASg Neut Def))) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++ td (n.rel ! (APl Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (n.rel ! (APl Def)))
|
||||||
|
)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionN2,InflectionN3 = \n -> {
|
||||||
|
s1= heading1 ("Съществително "++
|
||||||
|
case n.g of {
|
||||||
|
AMasc Human => "(м.р.л.)" ;
|
||||||
|
AMasc NonHuman => "(м.р.)" ;
|
||||||
|
AFem => "(ж.р.)" ;
|
||||||
|
ANeut => "(ср.р.)"
|
||||||
|
}) ;
|
||||||
|
s2= frameTable (
|
||||||
|
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)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++ td (n.s ! (NF Pl Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (n.s ! (NF Pl Def))) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\"" "звателна форма" ++ td (n.s ! NFVocative)) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td (n.s ! NFPlCount))
|
||||||
|
) ;
|
||||||
|
s3 = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionA, InflectionA2 = \a -> {
|
||||||
|
s1= heading1 ("Прилагателно") ;
|
||||||
|
s2= frameTable (
|
||||||
|
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
|
||||||
|
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (a.s ! (ASg Masc Indef))) ++
|
||||||
|
tr (th "непълен член" ++ td (a.s ! (ASg Masc Def))) ++
|
||||||
|
tr (th "пълен член" ++ td (a.s ! ASgMascDefNom)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
|
||||||
|
th "нечленувано" ++ td (a.s ! (ASg Fem Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (a.s ! (ASg Fem Def))) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
|
||||||
|
th "нечленувано" ++ td (a.s ! (ASg Neut Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (a.s ! (ASg Neut Def))) ++
|
||||||
|
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++ td (a.s ! (APl Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (a.s ! (APl Def)))
|
||||||
|
) ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionAdv = \adv -> {
|
||||||
|
s1= heading1 ("Наречие") ;
|
||||||
|
s2= paragraph (adv.s) ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionPrep = \prep -> {
|
||||||
|
s1= heading1 ("Предлог") ;
|
||||||
|
s2= paragraph (prep.s) ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV v = {
|
||||||
|
s1= heading1 ("Глагол") ++
|
||||||
|
"<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++ v.s ! Imperf ! VPres Sg P3 ;
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2 v = {
|
||||||
|
s1= heading1 ("Глагол") ++
|
||||||
|
"<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<допълнение>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV3 v = {
|
||||||
|
s1= heading1 ("Глагол") ++
|
||||||
|
"<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<арг1>"++
|
||||||
|
v.c3.s ++
|
||||||
|
"<арг2>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2V v = {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<допълнение>"++
|
||||||
|
v.c3.s ++
|
||||||
|
"да" ++ "<глагол>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2S v = {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<допълнение>"++
|
||||||
|
v.c3.s ++
|
||||||
|
"че" ++ "<изречение>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2Q v = {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<допълнение>"++
|
||||||
|
v.c3.s ++
|
||||||
|
"<въпрос>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2A v = {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
v.c2.s ++
|
||||||
|
"<допълнение>"++
|
||||||
|
"<прилагателно>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionVV = \v -> {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
case v.typ of {
|
||||||
|
VVInf => "да" ++ "<глагол>";
|
||||||
|
VVGerund => "<деепричастие>"
|
||||||
|
};
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionVS = \v -> {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
"че" ++ "<изречение>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionVQ = \v -> {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
"<въпрос>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionVA = \v -> {
|
||||||
|
s1= "<подлог>" ++
|
||||||
|
case v.vtype of {
|
||||||
|
VNormal => "" ;
|
||||||
|
VMedial c => reflClitics ! c ;
|
||||||
|
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
||||||
|
} ++
|
||||||
|
v.s ! Imperf ! VPres Sg P3 ++
|
||||||
|
"<прилагателно>";
|
||||||
|
s2= inflVerb v ;
|
||||||
|
s3= ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
inflVerb : Verb -> Str = \v ->
|
||||||
|
(heading2 ("Несвършен вид") ++
|
||||||
|
heading3 ("Изявително наклонение") ++
|
||||||
|
heading4 ("Сегашно време") ++
|
||||||
|
finite Imperf VPres ++
|
||||||
|
heading4 ("Минало свършено време (аорист)") ++
|
||||||
|
finite Imperf VAorist ++
|
||||||
|
heading4 ("Минало несвършено време (имперфект)") ++
|
||||||
|
finite Imperf VImperfect ++
|
||||||
|
heading3 ("Повелително наклонение") ++
|
||||||
|
imperative Imperf ++
|
||||||
|
heading3 ("Причастия (отглаголни прилагателни)") ++
|
||||||
|
heading4 ("Минало страдателно причастие") ++
|
||||||
|
participle Imperf VPassive ++
|
||||||
|
heading4 ("Минало свършено деятелно причастие") ++
|
||||||
|
participle Imperf VPerfect ++
|
||||||
|
heading4 ("Минало несвършено деятелно причастие") ++
|
||||||
|
participle Imperf VPluPerfect ++
|
||||||
|
heading4 ("Сегашно деятелно причастие") ++
|
||||||
|
participle Imperf VPresPart ++
|
||||||
|
heading2 ("Свършен вид") ++
|
||||||
|
heading3 ("Изявително наклонение") ++
|
||||||
|
heading4 ("Сегашно време") ++
|
||||||
|
finite Perf VPres ++
|
||||||
|
heading4 ("Минало свършено време (аорист)") ++
|
||||||
|
finite Perf VAorist ++
|
||||||
|
heading4 ("Минало несвършено време (имперфект)") ++
|
||||||
|
finite Perf VImperfect ++
|
||||||
|
heading3 ("Повелително наклонение") ++
|
||||||
|
imperative Perf ++
|
||||||
|
heading3 ("Причастия (отглаголни прилагателни)") ++
|
||||||
|
heading4 ("Минало страдателно причастие") ++
|
||||||
|
participle Perf VPassive ++
|
||||||
|
heading4 ("Минало свършено деятелно причастие") ++
|
||||||
|
participle Perf VPerfect ++
|
||||||
|
heading4 ("Минало несвършено деятелно причастие") ++
|
||||||
|
participle Perf VPluPerfect ++
|
||||||
|
heading1 ("Отглаголно съществително") ++
|
||||||
|
frameTable (
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ед.ч." ++
|
||||||
|
th "нечленувано" ++ td (v.s ! Imperf ! VNoun (NF Sg Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (v.s ! Imperf ! VNoun (NF Sg Def))) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++ td (v.s ! Imperf ! VNoun (NF Pl Indef))) ++
|
||||||
|
tr (th "членувано" ++ td (v.s ! Imperf ! VNoun (NF Pl Def)))
|
||||||
|
) ++
|
||||||
|
heading1 ("Деепричастие (отглаголно наречие)") ++
|
||||||
|
paragraph (v.s ! Imperf ! VGerund))
|
||||||
|
where {
|
||||||
|
finite : Aspect -> (Number -> Person -> VForm) -> Str = \aspect,f ->
|
||||||
|
frameTable (
|
||||||
|
tr (th "" ++
|
||||||
|
th "ед.ч." ++
|
||||||
|
th "мн.ч.") ++
|
||||||
|
tr (th "1 л." ++
|
||||||
|
td (v.s ! aspect ! f Sg P1) ++
|
||||||
|
td (v.s ! aspect ! f Pl P1)) ++
|
||||||
|
tr (th "2 л." ++
|
||||||
|
td (v.s ! aspect ! f Sg P2) ++
|
||||||
|
td (v.s ! aspect ! f Pl P2)) ++
|
||||||
|
tr (th "3 л." ++
|
||||||
|
td (v.s ! aspect ! f Sg P3) ++
|
||||||
|
td (v.s ! aspect ! f Pl P3))
|
||||||
|
) ;
|
||||||
|
|
||||||
|
imperative : Aspect -> Str = \aspect ->
|
||||||
|
frameTable (
|
||||||
|
tr (th "ед.ч." ++
|
||||||
|
th "мн.ч.") ++
|
||||||
|
tr (td (v.s ! aspect ! VImperative Sg) ++
|
||||||
|
td (v.s ! aspect ! VImperative Pl))
|
||||||
|
) ;
|
||||||
|
|
||||||
|
participle : Aspect -> (AForm -> VForm) -> Str = \aspect,f ->
|
||||||
|
frameTable (
|
||||||
|
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
|
||||||
|
intagAttr "th" "rowspan=\"3\"" "м.р." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Masc Indef))) ++
|
||||||
|
tr (th "непълен член" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Masc Def))) ++
|
||||||
|
tr (th "пълен член" ++
|
||||||
|
td (v.s ! aspect ! f ASgMascDefNom)) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Fem Indef))) ++
|
||||||
|
tr (th "членувано" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Fem Def))) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Neut Indef))) ++
|
||||||
|
tr (th "членувано" ++
|
||||||
|
td (v.s ! aspect ! f (ASg Neut Def))) ++
|
||||||
|
tr (intagAttr "th" "rowspan=\"2\" colspan=\"2\"" "мн.ч." ++
|
||||||
|
th "нечленувано" ++
|
||||||
|
td (v.s ! aspect ! f (APl Indef))) ++
|
||||||
|
tr (th "членувано" ++
|
||||||
|
td (v.s ! aspect ! f (APl Def)))
|
||||||
|
) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkDocument b i e = {s = i.s1 ++ b.s ++ i.s2 ++ i.s3 ++ e.s} ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -162,129 +162,4 @@ lin
|
|||||||
|
|
||||||
UttAdV adv = adv;
|
UttAdV adv = adv;
|
||||||
|
|
||||||
lincat
|
|
||||||
Feat = Str;
|
|
||||||
lin FeatN2, FeatN = \n ->
|
|
||||||
case n.g of {
|
|
||||||
AMasc Human => "(м.р.л.)" ;
|
|
||||||
AMasc NonHuman => "(м.р.)" ;
|
|
||||||
AFem => "(ж.р.)" ;
|
|
||||||
ANeut => "(ср.р.)"
|
|
||||||
} ;
|
|
||||||
FeatV = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ;
|
|
||||||
FeatV2 = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<допълнение>";
|
|
||||||
FeatV3 = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<арг1>"++
|
|
||||||
v.c3.s ++
|
|
||||||
"<арг2>";
|
|
||||||
FeatV2V = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<допълнение>"++
|
|
||||||
v.c3.s ++
|
|
||||||
"да" ++ "<глагол>";
|
|
||||||
FeatV2S = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<допълнение>"++
|
|
||||||
v.c3.s ++
|
|
||||||
"че" ++ "<изречение>";
|
|
||||||
FeatV2Q = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<допълнение>"++
|
|
||||||
v.c3.s ++
|
|
||||||
"<въпрос>";
|
|
||||||
FeatV2A = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
v.c2.s ++
|
|
||||||
"<допълнение>"++
|
|
||||||
"<прилагателно>";
|
|
||||||
FeatVV = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
case v.typ of {
|
|
||||||
VVInf => "да" ++ "<глагол>";
|
|
||||||
VVGerund => "<деепричастие>"
|
|
||||||
};
|
|
||||||
FeatVS = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
"че" ++ "<изречение>";
|
|
||||||
FeatVQ = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
"<въпрос>";
|
|
||||||
FeatVA = \v ->
|
|
||||||
"<подлог>" ++
|
|
||||||
case v.vtype of {
|
|
||||||
VNormal => "" ;
|
|
||||||
VMedial c => reflClitics ! c ;
|
|
||||||
VPhrasal c => personalClitics ! c ! GSg Masc ! P3
|
|
||||||
} ++
|
|
||||||
v.s ! Imperf ! VPres Sg P3 ++
|
|
||||||
"<прилагателно>";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,14 +15,16 @@ in {
|
|||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {s : Str} ;
|
Inflection = {s1,s2 : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||||
lin
|
lin
|
||||||
InflectionN noun = {
|
InflectionN noun = {
|
||||||
s = heading1 (heading noun_Category) ++ frameTable (
|
s1 = heading1 (heading noun_Category) ;
|
||||||
|
s2 = frameTable (
|
||||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
||||||
tr (th (heading nominative_Parameter) ++ tdf (noun.s ! Sg ! Nom) ++ tdf (noun.s ! Pl ! Nom)) ++
|
tr (th (heading nominative_Parameter) ++ tdf (noun.s ! Sg ! Nom) ++ tdf (noun.s ! Pl ! Nom)) ++
|
||||||
tr (th (heading genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
|
tr (th (heading genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
|
||||||
@@ -30,8 +32,8 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionA adj = {
|
InflectionA adj = {
|
||||||
s = heading1 (heading adjective_Category) ++
|
s1 = heading1 (heading adjective_Category) ;
|
||||||
frameTable (
|
s2 = frameTable (
|
||||||
tr (th (heading positive_Parameter) ++ tdf (adj.s ! AAdj Posit Nom)) ++
|
tr (th (heading positive_Parameter) ++ tdf (adj.s ! AAdj Posit Nom)) ++
|
||||||
tr (th (heading comparative_Parameter) ++ tdf (adj.s ! AAdj Compar Nom)) ++
|
tr (th (heading comparative_Parameter) ++ tdf (adj.s ! AAdj Compar Nom)) ++
|
||||||
tr (th (heading superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
|
tr (th (heading superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
|
||||||
@@ -39,26 +41,38 @@ lin
|
|||||||
)
|
)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V v))) v ;
|
InflectionV v = {
|
||||||
InflectionV2 v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP)) (lin V v) ;
|
s1= heading1 (heading verb_Category) ++
|
||||||
--- InflectionVV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V v)))) ;
|
||||||
InflectionV2V v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
|
s2= inflVerb v
|
||||||
|
} ;
|
||||||
|
|
||||||
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
InflectionV2 v = {
|
||||||
|
s1= heading1 (heading verb_Category) ++
|
||||||
|
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP))) ;
|
||||||
|
s2= inflVerb v
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV2V v = {
|
||||||
|
s1= heading1 (heading verb_Category) ++
|
||||||
|
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V))))) ;
|
||||||
|
s2= inflVerb v
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--- InflectionVV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
||||||
|
|
||||||
|
MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
verbExample : CatEng.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
verbExample : CatEng.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
||||||
|
|
||||||
inflectionVerb : Str -> CatEng.V -> {s : Str} = \ex,verb -> {
|
inflVerb : Verb -> Str = \verb ->
|
||||||
s = heading1 (heading verb_Category) ++
|
|
||||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ++
|
|
||||||
frameTable (
|
frameTable (
|
||||||
tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! VInf)) ++
|
tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! VInf)) ++
|
||||||
tr (th (heading present_Parameter) ++ tdf (verb.s ! VPres)) ++
|
tr (th (heading present_Parameter) ++ tdf (verb.s ! VPres)) ++
|
||||||
tr (th (heading past_Parameter) ++ tdf (verb.s ! VPast)) ++ --# notpresent
|
tr (th (heading past_Parameter) ++ tdf (verb.s ! VPast)) ++ --# notpresent
|
||||||
tr (th (heading past_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPPart)) ++
|
tr (th (heading past_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPPart)) ++
|
||||||
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
|
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
|
||||||
)
|
) ;
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -73,42 +73,4 @@ fun CompoundCN : Num -> N -> CN -> CN ;
|
|||||||
|
|
||||||
UttAdV : AdV -> Utt;
|
UttAdV : AdV -> Utt;
|
||||||
|
|
||||||
cat Feat;
|
|
||||||
fun FeatN : N -> Feat;
|
|
||||||
FeatN2 : N2 -> Feat;
|
|
||||||
FeatV : V -> Feat;
|
|
||||||
FeatV2 : V2 -> Feat;
|
|
||||||
FeatV3 : V3 -> Feat;
|
|
||||||
FeatV2V : V2V -> Feat;
|
|
||||||
FeatV2S : V2S -> Feat;
|
|
||||||
FeatV2Q : V2Q -> Feat;
|
|
||||||
FeatV2A : V2A -> Feat;
|
|
||||||
FeatVV : VV -> Feat;
|
|
||||||
FeatVS : VS -> Feat;
|
|
||||||
FeatVQ : VQ -> Feat;
|
|
||||||
FeatVA : VA -> Feat;
|
|
||||||
|
|
||||||
|
|
||||||
-- for displaying inflection tables ---- TODO soon obsolete
|
|
||||||
|
|
||||||
cat
|
|
||||||
NDisplay ; ADisplay ; VDisplay ;
|
|
||||||
fun
|
|
||||||
DisplayN : N -> NDisplay ;
|
|
||||||
DisplayN2 : N2 -> NDisplay ;
|
|
||||||
DisplayN3 : N3 -> NDisplay ;
|
|
||||||
DisplayA : A -> ADisplay ;
|
|
||||||
DisplayA2 : A2 -> ADisplay ;
|
|
||||||
DisplayV : V -> VDisplay ;
|
|
||||||
DisplayV2 : V2 -> VDisplay ;
|
|
||||||
DisplayV3 : V3 -> VDisplay ;
|
|
||||||
DisplayVA : VA -> VDisplay ;
|
|
||||||
DisplayVQ : VQ -> VDisplay ;
|
|
||||||
DisplayVS : VS -> VDisplay ;
|
|
||||||
DisplayVV : VV -> VDisplay ;
|
|
||||||
DisplayV2A : V2A -> VDisplay ;
|
|
||||||
DisplayV2Q : V2Q -> VDisplay ;
|
|
||||||
DisplayV2S : V2S -> VDisplay ;
|
|
||||||
DisplayV2V : V2V -> VDisplay ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {s : Str} ;
|
Inflection = {s : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||||
@@ -61,7 +62,7 @@ lin
|
|||||||
InflectionVV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
InflectionVV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
||||||
InflectionV2V v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
|
InflectionV2V v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
|
||||||
|
|
||||||
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||||
|
|
||||||
oper
|
oper
|
||||||
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {s : Str} ;
|
Inflection = {s : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||||
@@ -49,7 +50,7 @@ lin
|
|||||||
InflectionVV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
InflectionVV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
|
||||||
InflectionV2V v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
|
InflectionV2V v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
|
||||||
|
|
||||||
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
MkDocument b i e = ss (paragraph e.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||||
|
|
||||||
oper
|
oper
|
||||||
verbExample : CatFre.Cl -> Str = \cl ->
|
verbExample : CatFre.Cl -> Str = \cl ->
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {s : Str} ;
|
Inflection = {s : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||||
@@ -71,7 +71,7 @@ lin
|
|||||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s)
|
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||||
|
|
||||||
oper
|
oper
|
||||||
verbExample : CatGer.Cl -> Str = \cl ->
|
verbExample : CatGer.Cl -> Str = \cl ->
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ resource HTML = open Prelude in {
|
|||||||
heading1 : Str -> Str = intag "h1" ;
|
heading1 : Str -> Str = intag "h1" ;
|
||||||
heading2 : Str -> Str = intag "h2" ;
|
heading2 : Str -> Str = intag "h2" ;
|
||||||
heading3 : Str -> Str = intag "h3" ;
|
heading3 : Str -> Str = intag "h3" ;
|
||||||
|
heading4 : Str -> Str = intag "h4" ;
|
||||||
|
|
||||||
-- for building tables
|
-- for building tables
|
||||||
frameTable : Str -> Str = intagAttr "table" ("rules=all border=yes") ;
|
frameTable : Str -> Str = intagAttr "table" ("rules=all border=yes") ;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {s : Str} ;
|
Inflection = {s : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||||
@@ -84,7 +85,7 @@ lin
|
|||||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s)
|
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
MkDocument b i e = ss (paragraph e.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||||
|
|
||||||
oper
|
oper
|
||||||
verbExample : Cl -> Str = \cl ->
|
verbExample : Cl -> Str = \cl ->
|
||||||
|
|||||||
Reference in New Issue
Block a user