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:
kr.angelov
2014-02-17 08:45:57 +00:00
parent 769fd9af69
commit a6747eac6b
10 changed files with 444 additions and 212 deletions

View File

@@ -5,12 +5,14 @@ abstract Documentation = Cat ** {
cat
Inflection ; -- inflection table
Document ;
fun
InflectionN : N -> Inflection ;
InflectionN2 : N2 -> Inflection ;
InflectionN3 : N3 -> Inflection ;
InflectionA : A -> Inflection ;
InflectionA2 : A2 -> Inflection ;
InflectionV : V -> Inflection ;
InflectionV2 : V2 -> Inflection ;
InflectionVV : VV -> Inflection ;
@@ -25,7 +27,7 @@ fun
InflectionAdv : Adv -> Inflection ;
InflectionPrep : Prep -> Inflection ;
ExplainInflection : String -> Inflection -> Inflection ;
fun
MkDocument : String -> Inflection -> String -> Document ;
}
}

View 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} ;
}

View File

@@ -162,129 +162,4 @@ lin
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 ++
"<прилагателно>";
}

View File

@@ -15,50 +15,64 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s1,s2 : Str} ;
Document = {s : Str} ;
oper
tdf : Str -> Str = \s -> td (intag "i" s) ;
heading : N -> Str = \n -> (nounHeading n).s ;
lin
InflectionN noun = {
s = heading1 (heading noun_Category) ++ frameTable (
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 genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
)
} ;
InflectionA adj = {
s = heading1 (heading adjective_Category) ++
frameTable (
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 superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
)
s1 = heading1 (heading noun_Category) ;
s2 = frameTable (
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 genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
)
} ;
InflectionV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V v))) v ;
InflectionV2 v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP)) (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) ;
InflectionA adj = {
s1 = heading1 (heading adjective_Category) ;
s2 = frameTable (
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 superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
)
} ;
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
InflectionV v = {
s1= heading1 (heading verb_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V v)))) ;
s2= inflVerb v
} ;
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
verbExample : CatEng.Cl -> Str = \cl -> (S.mkUtt cl).s ;
inflectionVerb : Str -> CatEng.V -> {s : Str} = \ex,verb -> {
s = heading1 (heading verb_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ++
frameTable (
tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! VInf)) ++
tr (th (heading present_Parameter) ++ tdf (verb.s ! VPres)) ++
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 present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
)
} ;
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! VInf)) ++
tr (th (heading present_Parameter) ++ tdf (verb.s ! VPres)) ++
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 present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
) ;
}
}

View File

@@ -72,43 +72,5 @@ fun CompoundCN : Num -> N -> CN -> CN ;
AdAdV : AdA -> AdV -> AdV ;
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 ;
}

View File

@@ -14,7 +14,8 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s : Str} ;
Document = {s : Str} ;
oper
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) ;
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
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
@@ -174,4 +175,4 @@ lin
paragraph (intag "b" (heading exampleGr_N ++ ":") ++
intag "i" ((S.mkAdv (lin Prep p) S.it_NP).s ++ ";" ++ (S.mkAdv (lin Prep p) S.we_NP).s))
} ;
}
}

View File

@@ -14,7 +14,8 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s : Str} ;
Document = {s : Str} ;
oper
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) ;
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
verbExample : CatFre.Cl -> Str = \cl ->
@@ -117,4 +118,4 @@ oper
)
} ;
}
}

View File

@@ -13,8 +13,8 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s : Str} ;
Document = {s : Str} ;
oper
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)
} ;
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
verbExample : CatGer.Cl -> Str = \cl ->
@@ -115,4 +115,4 @@ oper
))
} ;
}
}

View File

@@ -16,6 +16,7 @@ resource HTML = open Prelude in {
heading1 : Str -> Str = intag "h1" ;
heading2 : Str -> Str = intag "h2" ;
heading3 : Str -> Str = intag "h3" ;
heading4 : Str -> Str = intag "h4" ;
-- for building tables
frameTable : Str -> Str = intagAttr "table" ("rules=all border=yes") ;

View File

@@ -16,7 +16,8 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s : Str} ;
Document = {s : Str} ;
oper
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)
} ;
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
verbExample : Cl -> Str = \cl ->
@@ -120,4 +121,4 @@ oper
))
} ;
}
}