completed Documentation modules for English, Swedish, Bulgarian, German, Finnish, French. The examples for Finnish, German and French could still be improved. The old parsing grammars are now restored. The new Translation grammar still don't have statistical model.

This commit is contained in:
kr.angelov
2014-02-21 16:31:50 +00:00
parent 014f4e1e11
commit dc19edc05d
15 changed files with 1037 additions and 477 deletions

View File

@@ -6,6 +6,7 @@ abstract Documentation = Cat ** {
cat cat
Inflection ; -- inflection table Inflection ; -- inflection table
Document ; Document ;
Tag ;
fun fun
InflectionN : N -> Inflection ; InflectionN : N -> Inflection ;
@@ -29,5 +30,6 @@ fun
fun fun
MkDocument : String -> Inflection -> String -> Document ; MkDocument : String -> Inflection -> String -> Document ;
MkTag : Inflection -> Tag ;
} }

View File

@@ -1,15 +1,16 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
concrete DocumentationBul of Documentation = CatBul ** open concrete DocumentationBul of Documentation = CatBul ** open
ResBul, ResBul,
SyntaxBul,
HTML in { HTML in {
lincat lincat
Inflection = {s1,s2,s3 : Str} ; Inflection = {t : Str; s1,s2,s3 : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ;
lin lin
InflectionN n = { InflectionN n = {
t = "същ" ;
s1= heading1 ("Съществително"++ s1= heading1 ("Съществително"++
case n.g of { case n.g of {
AMasc Human => "(м.р.л.)" ; AMasc Human => "(м.р.л.)" ;
@@ -49,6 +50,7 @@ lin
} ; } ;
InflectionN2,InflectionN3 = \n -> { InflectionN2,InflectionN3 = \n -> {
t = "същ" ;
s1= heading1 ("Съществително "++ s1= heading1 ("Съществително "++
case n.g of { case n.g of {
AMasc Human => "(м.р.л.)" ; AMasc Human => "(м.р.л.)" ;
@@ -71,6 +73,7 @@ lin
} ; } ;
InflectionA, InflectionA2 = \a -> { InflectionA, InflectionA2 = \a -> {
t = "пр" ;
s1= heading1 ("Прилагателно") ; s1= heading1 ("Прилагателно") ;
s2= frameTable ( s2= frameTable (
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++ tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
@@ -93,20 +96,23 @@ lin
} ; } ;
InflectionAdv = \adv -> { InflectionAdv = \adv -> {
t = "нар" ;
s1= heading1 ("Наречие") ; s1= heading1 ("Наречие") ;
s2= paragraph (adv.s) ; s2= paragraph (adv.s) ;
s3= "" s3= ""
} ; } ;
InflectionPrep = \prep -> { InflectionPrep = \prep -> {
t = "пр" ;
s1= heading1 ("Предлог") ; s1= heading1 ("Предлог") ;
s2= paragraph (prep.s) ; s2= paragraph (prep.s) ;
s3= "" s3= ""
} ; } ;
InflectionV v = { InflectionV v = {
t = "гл" ;
s1= heading1 ("Глагол") ++ s1= heading1 ("Глагол") ++
"<подлог>" ++ pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -117,8 +123,9 @@ lin
} ; } ;
InflectionV2 v = { InflectionV2 v = {
t = "гл" ;
s1= heading1 ("Глагол") ++ s1= heading1 ("Глагол") ++
"<подлог>" ++ pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -126,14 +133,15 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<допълнение>"; pp "допълнение";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionV3 v = { InflectionV3 v = {
t = "гл" ;
s1= heading1 ("Глагол") ++ s1= heading1 ("Глагол") ++
"<подлог>" ++ pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -141,15 +149,16 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<арг1>"++ pp "арг1"++
v.c3.s ++ v.c3.s ++
"<арг2>"; pp "арг2";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionV2V v = { InflectionV2V v = {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -157,15 +166,16 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<допълнение>"++ pp "допълнение"++
v.c3.s ++ v.c3.s ++
"да" ++ "<глагол>"; "да" ++ pp "глагол";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionV2S v = { InflectionV2S v = {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -173,15 +183,16 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<допълнение>"++ pp "допълнение"++
v.c3.s ++ v.c3.s ++
"че" ++ "<изречение>"; "че" ++ pp "изречение";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionV2Q v = { InflectionV2Q v = {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -189,15 +200,16 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<допълнение>"++ pp "допълнение"++
v.c3.s ++ v.c3.s ++
"<въпрос>"; pp "въпрос";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionV2A v = { InflectionV2A v = {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -205,14 +217,15 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++ v.c2.s ++
"<допълнение>"++ pp "допълнение"++
"<прилагателно>"; pp "прилагателно";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionVV = \v -> { InflectionVV = \v -> {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
@@ -220,48 +233,51 @@ lin
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
case v.typ of { case v.typ of {
VVInf => "да" ++ "<глагол>"; VVInf => "да" ++ pp "глагол";
VVGerund => "<деепричастие>" VVGerund => pp "деепричастие"
}; };
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionVS = \v -> { InflectionVS = \v -> {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics ! c ! GSg Masc ! P3
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
"че" ++ "<изречение>"; "че" ++ pp "изречение";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionVQ = \v -> { InflectionVQ = \v -> {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics ! c ! GSg Masc ! P3
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
"<въпрос>"; pp "въпрос";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
InflectionVA = \v -> { InflectionVA = \v -> {
s1= "<подлог>" ++ t = "гл" ;
s1= pp "подлог" ++
case v.vtype of { case v.vtype of {
VNormal => "" ; VNormal => "" ;
VMedial c => reflClitics ! c ; VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics ! c ! GSg Masc ! P3 VPhrasal c => personalClitics ! c ! GSg Masc ! P3
} ++ } ++
v.s ! Imperf ! VPres Sg P3 ++ v.s ! Imperf ! VPres Sg P3 ++
"<прилагателно>"; pp "прилагателно";
s2= inflVerb v ; s2= inflVerb v ;
s3= "" s3= ""
} ; } ;
@@ -367,9 +383,12 @@ oper
td (v.s ! aspect ! f (APl Def))) td (v.s ! aspect ! f (APl Def)))
) ; ) ;
} ; } ;
pp : Str -> Str = \s -> "&lt;"+s+"&gt;";
lin lin
MkDocument b i e = {s = i.s1 ++ b.s ++ i.s2 ++ i.s3 ++ e.s} ; MkDocument b i e = {s = i.s1 ++ b.s ++ i.s2 ++ i.s3 ++ e.s} ;
MkTag i = {s = i.t} ;
} }

View File

@@ -1,4 +1,4 @@
--# -path=alltenses:../english:../abstract --# -path=alltenses:../english:../translator:../abstract
concrete ParseBul of ParseEngAbs = concrete ParseBul of ParseEngAbs =
TenseX - [IAdv, CAdv], TenseX - [IAdv, CAdv],
CatBul, CatBul,
@@ -19,8 +19,8 @@ concrete ParseBul of ParseEngAbs =
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ComplSlashPartLast, ComplSlashPartLast,
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DocumentationBul,
DictEngBul ** DictionaryBul **
open ResBul, Prelude in { open ResBul, Prelude in {
flags flags

View File

@@ -1,7 +1,184 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
concrete DocumentationEng of Documentation = CatEng ** open
ResEng,
HTML in {
-- documentation of English in English: the default introduced in LangEng lincat
Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
concrete DocumentationEng of Documentation = CatEng ** lin
DocumentationEngFunctor with (Terminology = TerminologyEng) ; InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "n" ;
s1 = heading1 ("Noun" ++ case noun.g of {
Neutr => "";
Masc => "(masc)";
Fem => "(fem)"
}) ;
s2 = frameTable (
tr (th "" ++ th "nom" ++ th "gen") ++
tr (th "sg" ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Sg ! Gen)) ++
tr (th "pl" ++ td (noun.s ! Pl ! Nom) ++ td (noun.s ! Pl ! Gen))
)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjective" ;
s2 = frameTable (
tr (th "" ++ th "nom" ++ th "gen") ++
tr (th "posit" ++ td (adj.s ! AAdj Posit Nom) ++ td (adj.s ! AAdj Posit Gen)) ++
tr (th "compar" ++ td (adj.s ! AAdj Compar Nom) ++ td (adj.s ! AAdj Compar Gen)) ++
tr (th "superl" ++ td (adj.s ! AAdj Superl Nom) ++ td (adj.s ! AAdj Superl Gen))
) ++
heading1 "Adverb" ++
paragraph (adj.s ! AAdv)
} ;
InflectionAdv = \adv -> {
t = "adv" ;
s1= heading1 "Adverb" ;
s2= paragraph (adv.s) ;
s3= ""
} ;
InflectionPrep = \prep -> {
t = "prep" ;
s1= heading1 "Preposition" ;
s2= paragraph (prep.s) ;
s3= ""
} ;
InflectionV v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++ v.s ! VInf ++ v.p) ;
s2= inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++ v.c2 ++
pp "object") ;
s2= inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "arg1" ++
v.c3 ++ pp "arg2") ;
s2= inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
v.c3 ++ case v.typ of {
VVAux => pp "verb" ;
VVInf => "to" ++ pp "verb" ;
VVPresPart => pp "verb+ing"
}) ;
s2= inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
"that" ++ pp "sentence") ;
s2= inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "question") ;
s2= inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
v.c2 ++ pp "object" ++
pp "adjective") ;
s2= inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VVF VInf ++ v.p ++
case v.typ of {
VVAux => pp "verb" ;
VVInf => "to" ++ pp "verb" ;
VVPresPart => pp "verb+ing"
}) ;
s2= frameTable (
tr (th "infitive" ++ td (v.s ! VVF VInf)) ++
tr (th "present" ++ td (v.s ! VVF VPres ++ "&#160;" ++ v.s ! VVPresNeg)) ++
tr (th "past" ++ td (v.s ! VVF VPast ++ "&#160;" ++ v.s ! VVPastNeg)) ++ --# notpresent
tr (th "past part." ++ td (v.s ! VVF VPPart)) ++
tr (th "present part." ++ td (v.s ! VVF VPresPart))
)
} ;
InflectionVS v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
"that" ++ pp "sentence") ;
s2= inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "question") ;
s2= inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1= heading1 "Verb" ++
paragraph (pp "subject" ++
v.s ! VInf ++ v.p ++
pp "adjective") ;
s2= inflVerb v
} ;
oper
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th "infitive" ++ td (verb.s ! VInf)) ++
tr (th "present" ++ td (verb.s ! VPres)) ++
tr (th "past" ++ td (verb.s ! VPast)) ++ --# notpresent
tr (th "past part." ++ td (verb.s ! VPPart)) ++
tr (th "present part." ++ td (verb.s ! VPresPart))
) ;
pp : Str -> Str = \s -> "&lt;"+s+"&gt;";
lin
MkDocument b i e = {s = i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s} ;
MkTag i = {s = i.t} ;
}

View File

@@ -1,4 +1,4 @@
--# -path=.:../abstract --# -path=.:../abstract:../translator
concrete ParseEng of ParseEngAbs = concrete ParseEng of ParseEngAbs =
TenseX - [Pol, PNeg, PPos], TenseX - [Pol, PNeg, PPos],
@@ -23,7 +23,7 @@ concrete ParseEng of ParseEngAbs =
ComplSlashPartLast, ComplSlashPartLast,
ClSlash, RCl, EmptyRelSlash, VS, V2S, ComplBareVS, SlashBareV2S], ClSlash, RCl, EmptyRelSlash, VS, V2S, ComplBareVS, SlashBareV2S],
DictEng ** DictionaryEng **
open MorphoEng, ResEng, ParadigmsEng, (S = SentenceEng), (E = ExtraEng), Prelude in { open MorphoEng, ResEng, ParadigmsEng, (S = SentenceEng), (E = ExtraEng), Prelude in {
flags flags
@@ -156,68 +156,4 @@ lin
PPos = {s = [] ; p = CPos} ; PPos = {s = [] ; p = CPos} ;
PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ; PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ;
lincat
Feat = Str;
lin FeatN, FeatN2 = \n ->
case n.g of {
Neutr => "";
Masc => "(masc)";
Fem => "(fem)"
};
FeatV = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ;
FeatV2 = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++ v.c2 ++
"<object>";
FeatV3 = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
v.c2 ++ "<arg1>" ++
v.c3 ++ "<arg2>";
FeatV2V = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
v.c2 ++ "<object>" ++
v.c3 ++ case v.typ of {
VVAux => "<verb>" ;
VVInf => "to" ++ "<verb>" ;
VVPresPart => "<verb+ing>"
};
FeatV2S = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
v.c2 ++ "<object>" ++
"that" ++ "<sentence>";
FeatV2Q = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
v.c2 ++ "<object>" ++
"that" ++ "<question>";
FeatV2A = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
v.c2 ++ "<object>" ++
"<adjective>";
FeatVV = \v ->
"<subject>" ++
v.s ! VVF VInf ++ v.p ++
case v.typ of {
VVAux => "<verb>" ;
VVInf => "to" ++ "<verb>" ;
VVPresPart => "<verb+ing>"
};
FeatVS = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
"that" ++ "<sentence>";
FeatVQ = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
"<question>";
FeatVA = \v ->
"<subject>" ++
v.s ! VInf ++ v.p ++
"<adjective>";
} }

View File

@@ -19,7 +19,7 @@ abstract ParseEngAbs =
Temp, Tense, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP, Temp, Tense, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
VPI, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, ComplSlashPartLast, VPI, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, ComplSlashPartLast,
ClSlash, RCl, EmptyRelSlash, VS, V2S, ComplBareVS, SlashBareV2S], ClSlash, RCl, EmptyRelSlash, VS, V2S, ComplBareVS, SlashBareV2S],
DictEngAbs ** { Dictionary ** {
flags flags
startcat=Phr; startcat=Phr;

View File

@@ -14,165 +14,280 @@ in {
lincat lincat
Inflection = {s : Str} ; Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ;
oper oper
tdf : Str -> Str = \s -> td (intag "i" s) ;
tdf2 : Str -> Str = \s -> intagAttr "td" "rowspan=2" (intag "i" s) ;
heading : N -> Str = \n -> (nounHeading n).s ; heading : N -> Str = \n -> (nounHeading n).s ;
inflectionN : (NForm -> Str) -> Str = \nouns ->
frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
tr (th (heading nominative_Parameter) ++ tdf (nouns (NCase Sg Nom)) ++ tdf (nouns (NCase Pl Nom))) ++
tr (th (heading genitive_Parameter) ++ tdf (nouns (NCase Sg Gen)) ++ tdf (nouns (NCase Pl Gen))) ++
tr (th (heading partitive_Parameter) ++ tdf (nouns (NCase Sg Part)) ++ tdf (nouns (NCase Pl Part))) ++
tr (th (heading translative_Parameter) ++ tdf (nouns (NCase Sg Transl)) ++ tdf (nouns (NCase Pl Transl))) ++
tr (th (heading essive_Parameter) ++ tdf (nouns (NCase Sg Ess)) ++ tdf (nouns (NCase Pl Ess))) ++
tr (th (heading inessive_Parameter) ++ tdf (nouns (NCase Sg Iness)) ++ tdf (nouns (NCase Pl Iness))) ++
tr (th (heading elative_Parameter) ++ tdf (nouns (NCase Sg Elat)) ++ tdf (nouns (NCase Pl Elat))) ++
tr (th (heading illative_Parameter) ++ tdf (nouns (NCase Sg Illat)) ++ tdf (nouns (NCase Pl Illat))) ++
tr (th (heading adessive_Parameter) ++ tdf (nouns (NCase Sg Adess)) ++ tdf (nouns (NCase Pl Adess))) ++
tr (th (heading ablative_Parameter) ++ tdf (nouns (NCase Sg Ablat)) ++ tdf (nouns (NCase Pl Ablat))) ++
tr (th (heading allative_Parameter) ++ tdf (nouns (NCase Sg Allat)) ++ tdf (nouns (NCase Pl Allat))) ++
tr (th (heading abessive_Parameter) ++ tdf (nouns (NCase Sg Abess)) ++ tdf (nouns (NCase Pl Abess))) ++
tr (th (heading comitative_Parameter) ++ tdf "" ++ tdf (nouns (NComit))) ++
tr (th (heading instructive_Parameter) ++ tdf "" ++ tdf (nouns (NInstruct)))
) ;
lin lin
InflectionN noun = { InflectionN, InflectionN2, InflectionN3 = \noun -> {
s = heading1 (heading noun_Category) ++ t = "s" ;
inflectionN (\nf -> (snoun2nounSep noun).s ! nf) s1 = heading1 (heading noun_Category) ;
s2 = inflNoun (\nf -> (snoun2nounSep noun).s ! nf)
} ; } ;
InflectionA adj = { InflectionA, InflectionA2 = \adj -> {
s = heading1 (heading adjective_Category) ++ t = "a" ;
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Posit ! sAN f ; h = adj.h}).s ! nf) ++ s1 = heading1 (heading adjective_Category) ;
heading2 (heading comparative_Parameter) ++ s2 = inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Posit ! sAN f ; h = adj.h}).s ! nf) ++
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Compar ! sAN f ; h = adj.h}).s ! nf) ++ heading2 (heading comparative_Parameter) ++
heading2 (heading superlative_Parameter) ++ inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Compar ! sAN f ; h = adj.h}).s ! nf) ++
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Superl ! sAN f ; h = adj.h}).s ! nf) heading2 (heading superlative_Parameter) ++
inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Superl ! sAN f ; h = adj.h}).s ! nf)
} ; } ;
InflectionAdv adv = {
t = "adv" ;
s1 = heading1 (heading adverb_Category) ;
s2 = paragraph adv.s
} ;
InflectionV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V v))) v ; InflectionPrep p = {
InflectionV2 v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP)) (lin V v) ; t = "prep" ;
InflectionVV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ; s1 = heading1 (heading preposition_Category) ;
InflectionV2V v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ; s2 = paragraph ((S.mkAdv (lin Prep p) S.it_NP).s ++ ";" ++ (S.mkAdv (lin Prep p) S.we_NP).s)
} ;
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph InflectionV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin S (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin QS (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP L.beautiful_A)) ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin S (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin QS (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v L.beautiful_A)) ;
s2 = inflVerb v
} ;
oper oper
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ; verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
inflectionVerb : Str -> CatFin.V -> {s : Str} = \ex,verb0 -> inflVerb : CatFin.V -> Str = \verb0 ->
let let
verb = sverb2verbSep verb0 ; verb = sverb2verbSep verb0 ;
vfin : ResFin.VForm -> Str = \f -> vfin : ResFin.VForm -> Str = \f ->
verb.s ! f ; verb.s ! f ;
gforms : Number -> Person -> Str = \n,p ->
tdf (vfin (Presn n p)) nounNounHeading : Parameter -> Parameter -> Str = \n1,n2 ->
++ tdf (vfin (Impf n p)) --# notpresent (S.mkUtt (G.PossNP (S.mkCN n1) (S.mkNP (snoun2nounSep n2)))).s ;
++ tdf (vfin (Condit n p)) --# notpresent in
++ tdf (vfin (Potent n p)) --# notpresent heading3 (nounNounHeading present_Parameter indicative_Parameter) ++
;
in {
s =
heading1 (heading verb_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ++
heading2 (nounPluralHeading finite_form_ParameterType).s ++
frameTable ( frameTable (
tr (intagAttr "th" "rowspan=2 colspan=2" "" ++ tr (th "" ++
intagAttr "th" "colspan=2" (heading indicative_Parameter) ++ th (heading singular_Parameter) ++
th (heading conditional_Parameter) ++ th (heading potential_Parameter) ++ th (heading plural_Parameter)
th (heading imperative_Parameter)) ++ ++ th (heading passive_Parameter) --# notpresent
tr ( th (heading present_Parameter) ++ th (heading past_Parameter) ++ ) ++
th (heading present_Parameter) ++ th (heading present_Parameter) ++ tr (th "1.p" ++ td (vfin (Presn Sg P1)) ++ td (vfin (Presn Pl P1))
th (heading present_Parameter)) ++ ++ intagAttr "td" "rowspan=3" (vfin (PassPresn True)) --# notpresent
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ ) ++
th "1.p" ++ gforms Sg P1 ++ tdf "") ++ tr (th "2.p" ++ td (vfin (Presn Sg P2)) ++ td (vfin (Presn Pl P2))) ++
tr (th "2.p" ++ gforms Sg P2 ++ tdf (vfin (Imper Sg))) ++ tr (th "3.p" ++ td (vfin (Presn Sg P3)) ++ td (vfin (Presn Pl P3))) ++
tr (th "3.p" ++ gforms Sg P3 ++ tdf (vfin (ImperP3 Sg))) ++ tr (th (heading negative_Parameter) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ intagAttr "td" "colspan=2 align=center" (vfin (Imper Sg)) ++ td (vfin (PassPresn False)))
th "1.p" ++ gforms Pl P1 ++ tdf (vfin (ImperP1Pl))) ++ ) ++
tr (th "2.p" ++ gforms Pl P2 ++ tdf (vfin (Imper Pl))) ++ heading3 (nounNounHeading past_Parameter indicative_Parameter) ++
tr (th "3.p" ++ gforms Pl P3 ++ tdf (vfin (ImperP3 Pl))) ++ frameTable (
tr (intagAttr "th" "colspan=2" (heading passive_Parameter) tr (th "" ++
++ tdf (vfin (PassPresn True)) ++ tdf (vfin (PassImpf True)) ++ --# notpresent th (heading singular_Parameter) ++
tdf (vfin (PassCondit True)) ++ tdf (vfin (PassPotent True)) ++ tdf (vfin (PassImper True)) --# notpresent th (heading plural_Parameter)
) ++ ++ th (heading passive_Parameter) --# notpresent
tr (intagAttr "th" "rowspan=3" (heading negative_Parameter) ++ ) ++
tr (th "1.p" ++ td (vfin (Impf Sg P1)) ++ td (vfin (Impf Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassImpf True))) ++
tr (th "2.p" ++ td (vfin (Impf Sg P2)) ++ td (vfin (Impf Pl P2))) ++
tr (th "3.p" ++ td (vfin (Impf Sg P3)) ++ td (vfin (Impf Pl P3))) ++
tr (th (heading negative_Parameter) ++
td (vfin (PastPartAct (AN (NCase Sg Nom)))) ++
td (vfin (PastPartAct (AN (NCase Pl Nom)))) ++
td (vfin (PassImpf False)))
) ++
heading3 (nounNounHeading present_Parameter conditional_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Condit Sg P1)) ++ td (vfin (Condit Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassCondit True)) --# notpresent
) ++
tr (th "2.p" ++ td (vfin (Condit Sg P2)) ++ td (vfin (Condit Pl P2))) ++
tr (th "3.p" ++ td (vfin (Condit Sg P3)) ++ td (vfin (Condit Pl P3))) ++
tr (th (heading negative_Parameter) ++
intagAttr "td" "colspan=2 align=center" (vfin (Condit Sg P3)) ++ td (vfin (PassCondit False)))
) ++
heading3 (nounNounHeading present_Parameter potential_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Potent Sg P1)) ++ td (vfin (Potent Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassPotent True)) --# notpresent
) ++
tr (th "2.p" ++ td (vfin (Potent Sg P2)) ++ td (vfin (Potent Pl P2))) ++
tr (th "3.p" ++ td (vfin (Potent Sg P3)) ++ td (vfin (Potent Pl P3))) ++
tr (th (heading negative_Parameter) ++
intagAttr "td" "colspan=2 align=center" (vfin PotentNeg) ++ td (vfin (PassPotent False)))
) ++
heading3 (nounNounHeading present_Parameter imperative_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td "" ++ td (vfin ImperP1Pl)
++ intagAttr "td" "rowspan=3" (vfin (PassImper True))) ++
tr (th "2.p" ++ td (vfin (Imper Sg)) ++ td (vfin (Imper Pl))) ++
tr (th "3.p" ++ td (vfin (ImperP3 Sg)) ++ td (vfin (ImperP3 Pl))) ++
tr (th (heading negative_Parameter) ++
td (vfin (Imper Sg)) ++
td (vfin ImpNegPl) ++
td (vfin (PassImper False)))
) ++
heading2 (nounPluralHeading nominal_form_ParameterType).s ++
heading3 (heading infinitive_Parameter) ++
frameTable (
tr (intagAttr "th" "rowspan=2" "1" ++
th (heading short_Parameter) ++ ---
td (vfin (Inf Inf1))) ++
tr (th (heading long_Parameter) ++ ---
td (vfin (Inf Inf1Long) ++ BIND ++ "(ni)")) ++
tr (intagAttr "th" "rowspan=2" ("2." ++ heading active_Parameter) ++
th (heading inessive_Parameter) ++
td (vfin (Inf Inf2Iness))) ++
tr (th (heading instructive_Parameter) ++
td (vfin (Inf Inf2Instr))) ++
tr (th ("2." ++ heading passive_Parameter) ++
th (heading inessive_Parameter) ++
td (vfin (Inf Inf2InessPass))) ++
th (heading singular_Parameter) tr (intagAttr "th" "rowspan=7" "3." ++
++ tdf2 (vfin (Imper Sg)) ++ tdf (vfin (PastPartAct (AN (NCase Sg Nom)))) th (heading inessive_Parameter) ++ td (vfin (Inf Inf3Iness))) ++
++ tdf2 (vfin (Condit Sg P3)) ++ tdf2 (vfin (PotentNeg)) ++ tdf (vfin (Imper Sg)) --# notpresent tr (th (heading elative_Parameter) ++ td (vfin (Inf Inf3Elat))) ++
) ++ tr (th (heading illative_Parameter) ++ td (vfin (Inf Inf3Illat))) ++
tr ( th (heading plural_Parameter) ++ tdf (vfin (PastPartAct (AN (NCase Pl Nom)))) ++ tr (th (heading adessive_Parameter) ++ td (vfin (Inf Inf3Adess))) ++
tdf (vfin (ImpNegPl))) ++ tr (th (heading abessive_Parameter) ++ td (vfin (Inf Inf3Abess))) ++
tr ( th (heading passive_Parameter) ++ tdf (vfin (PassPresn False)) tr (th (heading instructive_Parameter) ++ td (vfin (Inf Inf3Instr))) ++
++ tdf (vfin (PassImpf False)) ++ tdf (vfin (PassCondit False)) ++ tdf (vfin (PassPotent False))--# notpresent tr (th (heading instructive_Parameter ++ "pass.") ++ td (vfin (Inf Inf3InstrPass))) ++
++ tdf (vfin (PassImper False)))
)
++
heading2 (nounPluralHeading nominal_form_ParameterType).s ++ ---
frameTable (
tr (intagAttr "th" "rowspan=15" (heading infinitive_Parameter) ++
intagAttr "th" "rowspan=2" "1" ++
th (heading short_Parameter) ++ ---
tdf (vfin (Inf Inf1))) ++
tr (th (heading long_Parameter) ++ ---
tdf (vfin (Inf Inf1Long) ++ BIND ++ "(ni)")) ++
tr (intagAttr "th" "rowspan=2" ("2." ++ heading active_Parameter) ++
th (heading inessive_Parameter) ++
tdf (vfin (Inf Inf2Iness))) ++
tr (th (heading instructive_Parameter) ++
tdf (vfin (Inf Inf2Instr))) ++
tr (th ("2." ++ heading passive_Parameter) ++
th (heading inessive_Parameter) ++
tdf (vfin (Inf Inf2InessPass))) ++
tr (intagAttr "th" "rowspan=7" "3." ++ tr (intagAttr "th" "rowspan=2" "4." ++
th (heading inessive_Parameter) ++ tdf (vfin (Inf Inf3Iness))) ++ th (heading nominative_Parameter) ++ td (vfin (Inf Inf4Nom))) ++
tr (th (heading elative_Parameter) ++ tdf (vfin (Inf Inf3Elat))) ++ tr (th (heading partitive_Parameter) ++ td (vfin (Inf Inf4Part))) ++
tr (th (heading illative_Parameter) ++ tdf (vfin (Inf Inf3Illat))) ++
tr (th (heading adessive_Parameter) ++ tdf (vfin (Inf Inf3Adess))) ++
tr (th (heading abessive_Parameter) ++ tdf (vfin (Inf Inf3Abess))) ++
tr (th (heading instructive_Parameter) ++ tdf (vfin (Inf Inf3Instr))) ++
tr (th (heading instructive_Parameter ++ "pass.") ++ tdf (vfin (Inf Inf3InstrPass))) ++
tr (intagAttr "th" "rowspan=2" "4." ++ tr (intagAttr "th" "colspan=2" "5." ++ td (vfin (Inf Inf5) ++ BIND ++ "(ni)"))
th (heading nominative_Parameter) ++ tdf (vfin (Inf Inf4Nom))) ++ ) ++
tr (th (heading partitive_Parameter) ++ tdf (vfin (Inf Inf4Part))) ++ heading3 (heading participle_Parameter) ++
frameTable (
tr (intagAttr "th" "rowspan=2" (heading present_Parameter) ++
th (heading active_Parameter) ++
td (vfin (PresPartAct (AN (NCase Sg Nom))))) ++
tr (th (heading passive_Parameter) ++
td (vfin (PresPartPass (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "colspan=2" "5." ++ tdf (vfin (Inf Inf5) ++ BIND ++ "(ni)")) ++ tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++
th (heading active_Parameter) ++
td (vfin (PastPartAct (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "rowspan=5" (heading participle_Parameter) ++ tr (th (heading passive_Parameter) ++
intagAttr "th" "rowspan=2" (heading present_Parameter) ++ td (vfin (PastPartPass (AN (NCase Sg Nom))))) ++
th (heading active_Parameter) ++
tdf (vfin (PresPartAct (AN (NCase Sg Nom))))) ++
tr (th (heading passive_Parameter) ++
tdf (vfin (PresPartPass (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++ tr (intagAttr "th" "colspan=2" (heading agent_Parameter) ++
th (heading active_Parameter) ++ td (vfin (AgentPart (AN (NCase Sg Nom)))))
tdf (vfin (PastPartAct (AN (NCase Sg Nom))))) ++ ) ;
tr (th (heading passive_Parameter) ++ inflNoun : (NForm -> Str) -> Str = \nouns ->
tdf (vfin (PastPartPass (AN (NCase Sg Nom))))) ++ frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
tr (intagAttr "th" "colspan=2" (heading agent_Parameter) ++ tr (th (heading nominative_Parameter) ++ td (nouns (NCase Sg Nom)) ++ td (nouns (NCase Pl Nom))) ++
tdf (vfin (AgentPart (AN (NCase Sg Nom))))) tr (th (heading genitive_Parameter) ++ td (nouns (NCase Sg Gen)) ++ td (nouns (NCase Pl Gen))) ++
tr (th (heading partitive_Parameter) ++ td (nouns (NCase Sg Part)) ++ td (nouns (NCase Pl Part))) ++
) tr (th (heading translative_Parameter) ++ td (nouns (NCase Sg Transl)) ++ td (nouns (NCase Pl Transl))) ++
tr (th (heading essive_Parameter) ++ td (nouns (NCase Sg Ess)) ++ td (nouns (NCase Pl Ess))) ++
} ; tr (th (heading inessive_Parameter) ++ td (nouns (NCase Sg Iness)) ++ td (nouns (NCase Pl Iness))) ++
tr (th (heading elative_Parameter) ++ td (nouns (NCase Sg Elat)) ++ td (nouns (NCase Pl Elat))) ++
tr (th (heading illative_Parameter) ++ td (nouns (NCase Sg Illat)) ++ td (nouns (NCase Pl Illat))) ++
tr (th (heading adessive_Parameter) ++ td (nouns (NCase Sg Adess)) ++ td (nouns (NCase Pl Adess))) ++
tr (th (heading ablative_Parameter) ++ td (nouns (NCase Sg Ablat)) ++ td (nouns (NCase Pl Ablat))) ++
tr (th (heading allative_Parameter) ++ td (nouns (NCase Sg Allat)) ++ td (nouns (NCase Pl Allat))) ++
tr (th (heading abessive_Parameter) ++ td (nouns (NCase Sg Abess)) ++ td (nouns (NCase Pl Abess))) ++
tr (th (heading comitative_Parameter) ++ td "" ++ td (nouns (NComit))) ++
tr (th (heading instructive_Parameter) ++ td "" ++ td (nouns (NInstruct)))
) ;
lin lin
InflectionPrep p = { MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
s = heading1 (heading preposition_Category) ++ MkTag i = ss (i.t) ;
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

@@ -93,4 +93,4 @@ lin
formGF_N = mkN "muoto" ; formGF_N = mkN "muoto" ;
exampleGr_N = mkN "esimerkki" ; exampleGr_N = mkN "esimerkki" ;
} }

View File

@@ -1,4 +1,4 @@
--# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus --# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus:../../translator
concrete ParseFin of ParseEngAbs = concrete ParseFin of ParseEngAbs =
TenseX, ---- TODO add potential forms TenseX, ---- TODO add potential forms
@@ -23,7 +23,7 @@ concrete ParseFin of ParseEngAbs =
ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash, ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV] VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
, DictEngFin , DictionaryFin
** **
open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = GrammarFin), Prelude in { open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = GrammarFin), Prelude in {
@@ -38,7 +38,7 @@ lin
---------------------- ----------------------
lin lin
ComplVV v ant pol vp = {- ComplVV v ant pol vp =
insertObj insertObj
(\\_,b,a => infVPGen pol.p v.sc b a vp v.vi) (\\_,b,a => infVPGen pol.p v.sc b a vp v.vi)
(predSV {s = v.s ; (predSV {s = v.s ;
@@ -49,7 +49,7 @@ lin
h = v.h ; p = v.p h = v.h ; p = v.p
} }
) ; ) ;
-}
---- what is this... ---- what is this...
myself_NP = mkPronounGen False "itse" "itsen" "itseä" "itsenä" "itseen" Sg P1 ** {isPron = True ; isNeg = False} ; myself_NP = mkPronounGen False "itse" "itsen" "itseä" "itsenä" "itseen" Sg P1 ** {isPron = True ; isNeg = False} ;
@@ -104,10 +104,10 @@ lin
isNeg = quant.isNeg isNeg = quant.isNeg
} ; } ;
SlashV2V v ant p vp = {- SlashV2V v ant p vp =
insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; ---- insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; ----
---- insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; ---- insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ;
-}
CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013 CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013
CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp
@@ -134,32 +134,14 @@ lin
SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ; SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ;
insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ; insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ;
VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ? {- VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ?
insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) ** insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) **
{c2 = {c = NPCase Gen ; s = \\_ => [] ; h = Back ; isPre = True}} ; {c2 = {c = NPCase Gen ; s = \\_ => [] ; h = Back ; isPre = True}} ;
-}
-- SlashSlashV2V v ant pol vps = -- : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng so far -- SlashSlashV2V v ant pol vps = -- : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng so far
-- insertObj (\\_,b,a => infVPGen pol.p v.sc b a vps v.vi) (predSV v) ** {c2 = v.c2} ; --- or vps.c2 ?? -- insertObj (\\_,b,a => infVPGen pol.p v.sc b a vps v.vi) (predSV v) ** {c2 = v.c2} ; --- or vps.c2 ??
--in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash --in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash
---- these will be obsolete
lincat
NDisplay = {s : NForm => Str} ;
ADisplay = {s : Degree => NForm => Str} ;
VDisplay = {s : VForm => Str} ;
lin
DisplayN n = snoun2nounSep n ;
DisplayA a = {
s = table {
Posit => (snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s ;
Compar => (snoun2nounSep {s = \\f => a.s ! Compar ! sAN f ; h = a.h}).s ;
Superl => (snoun2nounSep {s = \\f => a.s ! Superl ! sAN f ; h = a.h}).s
}
} ;
DisplayV v = sverb2verbSep v ;
} }

View File

@@ -14,43 +14,122 @@ in {
lincat lincat
Inflection = {s : Str} ; Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ;
oper oper
tdf : Str -> Str = \s -> td (intag "i" s) ;
heading : N -> Str = \n -> (nounHeading n).s ; heading : N -> Str = \n -> (nounHeading n).s ;
nounGender : CatFre.N -> Parameter = \n -> case n.g of {
Masc => masculine_Parameter ;
Fem => feminine_Parameter
} ;
lin lin
InflectionN noun = { InflectionN, InflectionN3, InflectionN3 = \noun -> {
s = heading1 (heading noun_Category) ++ t = "n" ;
paragraph (intag "b" (heading (gender_ParameterType)) ++ ":" ++ heading (nounGender noun)) ++ s1 = heading1 (heading noun_Category ++
paragraph (frameTable ( case noun.g of {
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++ Masc => "("+heading masculine_Parameter+")" ;
tr (tdf (noun.s ! Sg) ++ tdf (noun.s ! Pl)) Fem => "("+heading feminine_Parameter+")"
)) }) ;
} ; s2 = frameTable (
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
)
} ;
InflectionA adj = { InflectionA, InflectionA2 = \adj -> {
s = heading1 (nounHeading adjective_Category).s ++ t = "a" ;
frameTable ( s1 = heading1 (nounHeading adjective_Category).s ;
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ s2 = frameTable (
tr (th (heading masculine_Parameter) ++ tdf (adj.s ! Posit ! (AF Masc Sg)) ++ tdf (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading feminine_Parameter) ++ tdf (adj.s ! Posit ! (AF Fem Sg)) ++ tdf (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl)))
) )
} ; } ;
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) ;
MkDocument b i e = ss (paragraph e.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph InflectionAdv adv = {
t = "adv" ;
s1 = heading1 "Adverbe" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 "Préposition" ;
s2 = paragraph p.s
} ;
InflectionV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 "Verb" ;
s2 = inflVerb v
} ;
MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ;
oper oper
verbExample : CatFre.Cl -> Str = \cl -> verbExample : CatFre.Cl -> Str = \cl ->
@@ -58,64 +137,76 @@ oper
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent ++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
; ;
inflectionVerb : Str -> CatFre.V -> {s : Str} = \ex,verb -> inflVerb : Verb -> Str = \verb ->
let let
vfin : CommonRomance.VF -> Str = \f -> vfin : CommonRomance.VF -> Str = \f ->
verb.s ! f ; verb.s ! f ;
gforms : Number -> Person -> Str = \n,p -> ttable : TMood -> Str = \tense ->
tdf (vfin (VFin (VPres Indic) n p)) ++ frameTable (
tdf (vfin (VFin (VPres Conjunct) n p)) tr (th "" ++
++ tdf (vfin (VFin (VImperf Indic) n p)) --# notpresent th (heading singular_Parameter) ++
++ tdf (vfin (VFin (VImperf Conjunct) n p)) --# notpresent th (heading plural_Parameter)) ++
; tr (th "1.p" ++
td (vfin (VFin tense Sg P1)) ++
td (vfin (VFin tense Pl P1))) ++
tr (th "2.p" ++
td (vfin (VFin tense Sg P2)) ++
td (vfin (VFin tense Pl P2))) ++
tr (th "3.p" ++
td (vfin (VFin tense Sg P3)) ++
td (vfin (VFin tense Pl P3)))
) ;
gforms2 : Number -> Person -> Str = \n,p -> --# notpresent ttable2 : (Mood -> TMood) -> Str = \f ->
tdf (vfin (VFin VPasse n p)) ++ --# notpresent frameTable (
tdf (vfin (VFin VFut n p)) ++ --# notpresent tr (intagAttr "th" "colspan=2" "" ++
tdf (vfin (VFin VCondit n p)) --# notpresent th (heading indicative_Parameter) ++
; --# notpresent th (heading conjunctive_Parameter)) ++
ttable : (Number -> Person -> Str) -> Str -> Str = \forms, theadings ->
paragraph (frameTable (
theadings ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++ forms Sg P1) ++ th "1.p" ++
tr (th "2.p" ++ forms Sg P2) ++ td (vfin (VFin (f Indic) Sg P1)) ++
tr (th "3.p" ++ forms Sg P3) ++ td (vfin (VFin (f Conjunct) Sg P1))) ++
tr (th "2.p" ++
td (vfin (VFin (f Indic) Sg P2)) ++
td (vfin (VFin (f Conjunct) Sg P2))) ++
tr (th "3.p" ++
td (vfin (VFin (f Indic) Sg P3)) ++
td (vfin (VFin (f Conjunct) Sg P3))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++ forms Pl P1) ++ th "1.p" ++
tr (th "2.p" ++ forms Pl P2) ++ td (vfin (VFin (f Indic) Pl P1)) ++
tr (th "3.p" ++ forms Pl P3) td (vfin (VFin (f Conjunct) Pl P1))) ++
)) ; tr (th "2.p" ++
td (vfin (VFin (f Indic) Pl P2)) ++
td (vfin (VFin (f Conjunct) Pl P2))) ++
tr (th "3.p" ++
td (vfin (VFin (f Indic) Pl P3)) ++
td (vfin (VFin (f Conjunct) Pl P3)))
) ;
in { in heading2 (heading present_Parameter) ++
s = ttable2 VPres ++
heading1 (heading verb_Category) heading2 (heading imperfect_Parameter) ++
++ paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ttable2 VImperf
++ ttable gforms ++ heading2 (heading simple_past_Parameter) ++ --# notpresent
(tr (intagAttr "th" "colspan=2 rowspan=2" "" ttable VPasse --# notpresent
++ intagAttr "th" "colspan=2" (heading present_Parameter) ++ heading2 (heading future_Parameter) ++ --# notpresent
++ intagAttr "th" "colspan=2" (heading imperfect_Parameter) ttable VFut --# notpresent
) ++ ++ heading2 (heading conditional_Parameter) ++ --# notpresent
tr ( th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter) ttable VCondit --# notpresent
++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter) ++ heading2 (heading infinitive_Parameter) ++
) paragraph (vfin (VInfin False)) ++
) heading2 (heading imperative_Parameter) ++
++ ttable gforms2 --# notpresent frameTable (
(tr (intagAttr "th" "colspan=2" "" ++ th (heading simple_past_Parameter) ++ --# notpresent tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++
th (heading future_Parameter) ++ th (heading conditional_Parameter))) --# notpresent tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++
tr (th "pl.2.p" ++ td (vfin (VImper PlP2)))
++ paragraph (frameTable ( ) ++
tr (intagAttr "th" "colspan=2" (heading infinitive_Parameter) ++ (tdf (vfin (VInfin False)))) ++ heading2 (heading participle_Parameter) ++
tr (intagAttr "th" "rowspan=3" (heading imperative_Parameter) ++ th "sg.2.p" ++ (tdf (vfin (VImper SgP2)))) ++ frameTable (
tr ( th "pl.1.p" ++ (tdf (vfin (VImper PlP1)))) ++ tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++
tr ( th "pl.2.p" ++ (tdf (vfin (VImper PlP2)))) ++ tr (th (heading present_Parameter) ++ td (vfin VGer))
tr (intagAttr "th" "rowspan=2" (heading participle_Parameter) ++ ) ;
th (heading past_Parameter) ++ (tdf (vfin (VPart Masc Sg)))) ++
tr ( th (heading present_Parameter) ++ (tdf (vfin VGer)))
)
)
} ;
} }

View File

@@ -1,4 +1,4 @@
--# -path=.:../english/:../abstract:../romance:alltenses --# -path=.:../english/:../abstract:../romance:alltenses:../translator
concrete ParseFre of ParseEngAbs = concrete ParseFre of ParseEngAbs =
TenseFre, TenseFre,
-- CatFre, -- CatFre,
@@ -21,7 +21,7 @@ concrete ParseFre of ParseEngAbs =
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DictEngFre ** DictionaryFre **
open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in { open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {
flags flags

View File

@@ -13,39 +13,38 @@ in {
lincat lincat
Inflection = {s : Str} ; Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ;
oper oper
tdf : Str -> Str = \s -> td (intag "i" s) ; heading : N -> Str = \n -> (nounHeading n).s ;
heading : N -> Str = \n -> (nounHeading n).s ;
nounGender : CatGer.N -> Parameter = \n -> case n.g of {
Masc => masculine_Parameter ;
Fem => feminine_Parameter ;
Neutr => neuter_Parameter
} ;
lin lin
InflectionN noun = { InflectionN, InflectionN2, InflectionN3 = \noun -> {
s = heading1 (heading noun_Category) ++ t = "s" ;
paragraph (intag "b" (heading (gender_ParameterType)) ++ ":" ++ heading (nounGender noun)) ++ s1 = heading1 (heading noun_Category ++
frameTable ( case noun.g of {
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++ Masc => "("+heading masculine_Parameter+")" ;
tr (th (heading nominative_Parameter) ++ tdf (noun.s ! Sg ! Nom) ++ tdf (noun.s ! Pl ! Nom)) ++ Fem => "("+heading feminine_Parameter+")" ;
tr (th (heading genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen)) ++ Neutr => "("+heading neuter_Parameter+")"
tr (th (heading dative_Parameter) ++ tdf (noun.s ! Sg ! Dat) ++ tdf (noun.s ! Pl ! Dat)) ++ }) ;
tr (th (heading accusative_Parameter) ++ tdf (noun.s ! Sg ! Acc) ++ tdf (noun.s ! Pl ! Acc)) s2 = frameTable (
) tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
} ; tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++
tr (th (heading dative_Parameter) ++ td (noun.s ! Sg ! Dat) ++ td (noun.s ! Pl ! Dat)) ++
tr (th (heading accusative_Parameter) ++ td (noun.s ! Sg ! Acc) ++ td (noun.s ! Pl ! Acc))
)
} ;
InflectionA adj = InflectionA, InflectionA2 = \adj ->
let let
gforms : Degree -> ResGer.Case -> Str = \d,c -> gforms : Degree -> ResGer.Case -> Str = \d,c ->
tdf (adj.s ! d ! (AMod (GSg Masc) c)) ++ td (adj.s ! d ! (AMod (GSg Masc) c)) ++
tdf (adj.s ! d ! (AMod (GSg Fem) c)) ++ td (adj.s ! d ! (AMod (GSg Fem) c)) ++
tdf (adj.s ! d ! (AMod (GSg Neutr) c)) ++ td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
tdf (adj.s ! d ! (AMod GPl c)) ; td (adj.s ! d ! (AMod GPl c)) ;
dtable : Parameter -> Degree -> Str = \s,d -> dtable : Parameter -> Degree -> Str = \s,d ->
paragraph (heading2 (heading s) ++ frameTable ( paragraph (heading2 (heading s) ++ frameTable (
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++ tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
@@ -54,24 +53,98 @@ lin
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++ tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
tr (th (heading dative_Parameter) ++ gforms d Dat) ++ tr (th (heading dative_Parameter) ++ gforms d Dat) ++
tr (th (heading accusative_Parameter) ++ gforms d Acc) ++ tr (th (heading accusative_Parameter) ++ gforms d Acc) ++
tr (th (heading predicative_Parameter) ++ intagAttr "td" "colspan=4" (intag "i" (adj.s ! d ! APred))) tr (th (heading predicative_Parameter) ++ intagAttr "td" "colspan=4" (adj.s ! d ! APred))
)) ))
in { in { t = "a" ;
s = heading1 (nounHeading adjective_Category).s ++ s1 = heading1 (nounHeading adjective_Category).s ;
dtable positive_Parameter Posit ++ dtable comparative_Parameter Compar ++ dtable superlative_Parameter Superl ; s2 = dtable positive_Parameter Posit ++ dtable comparative_Parameter Compar ++ dtable superlative_Parameter Superl
} ; } ;
InflectionV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V v))) v ; InflectionAdv adv = {
InflectionV2 v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP)) (lin V v) ; t = "adverb" ;
InflectionVV v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ; s1 = heading1 (heading preposition_Category) ;
InflectionV2V v = inflectionVerb (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ; s2 = paragraph adv.s
InflectionPrep p = {
s = heading1 (heading preposition_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s)
} ; } ;
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph InflectionPrep p = {
t = "präp" ;
s1 = heading1 (heading preposition_Category) ;
s2 = paragraph (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s
} ;
InflectionV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ;
s2 = inflVerb v
} ;
MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ;
oper oper
verbExample : CatGer.Cl -> Str = \cl -> verbExample : CatGer.Cl -> Str = \cl ->
@@ -79,40 +152,34 @@ oper
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent ++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
; ;
inflectionVerb : Str -> CatGer.V -> {s : Str} = \ex,verb -> inflVerb : Verb -> Str = \verb ->
let let
vfin : VForm -> Str = \f -> vfin : VForm -> Str = \f ->
verb.s ! f ++ verb.prefix ; verb.s ! f ++ verb.prefix ;
gforms : Number -> Person -> Str = \n,p -> gforms : Number -> Person -> Str = \n,p ->
tdf (vfin (VFin False (VPresInd n p))) ++ td (vfin (VFin False (VPresInd n p))) ++
tdf (vfin (VFin False (VPresSubj n p))) td (vfin (VFin False (VPresSubj n p)))
++ tdf (vfin (VFin False (VImpfInd n p))) --# notpresent ++ td (vfin (VFin False (VImpfInd n p))) --# notpresent
++ tdf (vfin (VFin False (VImpfSubj n p))) --# notpresent ++ td (vfin (VFin False (VImpfSubj n p))) --# notpresent
; ;
in { in frameTable (
s = tr (th "" ++ intagAttr "th" "colspan=2" (heading present_Parameter) ++ intagAttr "th" "colspan=2" (heading past_Parameter)) ++
heading1 (heading verb_Category) ++ tr (th "" ++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "I") ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "II")) ++
paragraph (frameTable ( tr (th "Sg.1" ++ gforms Sg P1) ++
tr (th "" ++ intagAttr "th" "colspan=2" (heading present_Parameter) ++ intagAttr "th" "colspan=2" (heading past_Parameter)) ++ tr (th "Sg.2" ++ gforms Sg P2) ++
tr (th "" ++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "I") ++ tr (th "Sg.3" ++ gforms Sg P3) ++
th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "II")) ++ tr (th "Pl.1" ++ gforms Pl P1) ++
tr (th "Sg.1" ++ gforms Sg P1) ++ tr (th "Pl.2" ++ gforms Pl P2) ++
tr (th "Sg.2" ++ gforms Sg P2) ++ tr (th "Pl.3" ++ gforms Pl P3)
tr (th "Sg.3" ++ gforms Sg P3) ++ ) ++
tr (th "Pl.1" ++ gforms Pl P1) ++ frameTable (
tr (th "Pl.2" ++ gforms Pl P2) ++ tr (th (heading imperative_Parameter ++ "Sg.2") ++ td (vfin (VImper Sg))) ++
tr (th "Pl.3" ++ gforms Pl P3) tr (th (heading imperative_Parameter ++ "Pl.2") ++ td (vfin (VImper Pl))) ++
)) ++ tr (th (heading infinitive_Parameter) ++ td (verb.s ! (VInf False))) ++
paragraph ( tr (th (heading present_Parameter ++ heading participle_Parameter) ++ td (verb.s ! (VPresPart APred))) ++
frameTable ( tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! (VPastPart APred))) ++
tr (th (heading imperative_Parameter ++ "Sg.2") ++ tdf (vfin (VImper Sg))) ++ tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHaben => "haben" ; VSein => "sein"}))
tr (th (heading imperative_Parameter ++ "Pl.2") ++ tdf (vfin (VImper Pl))) ++ ) ;
tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! (VInf False))) ++
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! (VPresPart APred))) ++
tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! (VPastPart APred))) ++
tr (th (heading aux_verb_Parameter) ++ td (intag "i" (case verb.aux of {VHaben => "haben" ; VSein => "sein"})))
))
} ;
} }

View File

@@ -1,4 +1,4 @@
--# -path=alltenses:.:../english:../abstract --# -path=alltenses:.:../english:../abstract:../translator
concrete ParseGer of ParseEngAbs = concrete ParseGer of ParseEngAbs =
TenseGer, TenseGer,
NounGer - [PPartNP], NounGer - [PPartNP],
@@ -20,7 +20,7 @@ concrete ParseGer of ParseEngAbs =
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DictEngGer ** DictionaryGer **
open MorphoGer, ResGer, ParadigmsGer, SyntaxGer, Prelude, HTML in { open MorphoGer, ResGer, ParadigmsGer, SyntaxGer, Prelude, HTML in {
flags literal=Symb ; coding = utf8 ; flags literal=Symb ; coding = utf8 ;

View File

@@ -1,6 +1,233 @@
--# -path=.:../abstract:../common concrete DocumentationSwe of Documentation = CatSwe ** open
ResSwe,
CommonScand,
HTML
in {
-- documentation of Swedish in Swedish: the default introduced in LangSwe lincat
Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
concrete DocumentationSwe of Documentation = CatSwe ** lin
DocumentationSweFunctor with (Terminology = TerminologySwe) ; InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "s" ;
s1 = heading1 ("Substantiv" ++ case noun.g of {
Utr => "(utr)" ;
Neutr => "(neutr)"
}) ;
s2 = frameTable (
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
tr (intagAttr "th" "rowspan=2" "nom" ++
th "sg" ++ td (noun.s ! Sg ! Indef ! Nom) ++ td (noun.s ! Sg ! Def ! Nom)) ++
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Nom) ++ td (noun.s ! Pl ! Def ! Nom)) ++
tr (intagAttr "th" "rowspan=2" "gen" ++
th "sg" ++ td (noun.s ! Sg ! Indef ! Gen) ++ td (noun.s ! Sg ! Def ! Gen)) ++
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Gen) ++ td (noun.s ! Pl ! Def ! Gen))
)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjektiv" ;
s2 = frameTable (
tr (intagAttr "th" "colspan=5" "nominativ") ++
tr (intagAttr "th" "colspan=2" "posit" ++
th "posit" ++
th "kompar" ++
th "superl") ++
caseInfl Nom ++
tr (intagAttr "th" "colspan=5" "genitiv") ++
caseInfl Nom
)
} where {
caseInfl : Case -> Str = \c ->
tr (intagAttr "th" "rowspan=3" "obest" ++
th "utr" ++
td (adj.s ! (AF (APosit (Strong (GSg Utr))) c)) ++
intagAttr "td" "rowspan=5" (adj.s ! (AF ACompar c)) ++
intagAttr "td" "rowspan=3" (adj.s ! (AF (ASuperl SupStrong) c))) ++
tr (th "neut" ++
td (adj.s ! (AF (APosit (Strong (GSg Neutr))) c))) ++
tr (th "pl" ++
td (adj.s ! (AF (APosit (Strong GPl)) c))) ++
tr (intagAttr "th" "rowspan=2" "best" ++
th "sg" ++
td (adj.s ! (AF (APosit (Weak Sg)) c)) ++
intagAttr "td" "rowspan=2" (adj.s ! (AF (ASuperl SupWeak) c))) ++
tr (th "pl" ++
td (adj.s ! (AF (APosit (Weak Pl)) c))) ;
} ;
InflectionAdv adv = {
t = "adv" ;
s1 = heading1 "Adverb" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 "Preposition" ;
s2 = paragraph p.s
} ;
InflectionV v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part);
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++ v.c2.s ++
pp "objekt") ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "arg1" ++
v.c3.s ++ pp "arg2") ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
v.c3.s ++ pp "verb") ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
conjThat ++ pp "mening") ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
pp "fråga") ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
pp "adjektiv") ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "verb") ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
conjThat ++ pp "mening") ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "fråga") ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "adjektiv") ;
s2 = inflVerb v
} ;
MkDocument b i e = {s = i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s} ; -- explanation appended in a new paragraph
MkTag i = {s = i.t} ;
oper
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th "" ++ th "active" ++ th "passive") ++
tr (th "infitiv" ++ td (verb.s ! VI (VInfin Act)) ++ td (verb.s ! VI (VInfin Pass))) ++
tr (th "presens" ++ td (verb.s ! VF (VPres Act)) ++ td (verb.s ! VF (VPres Pass))) ++
tr (th "preteritum" ++ td (verb.s ! VF (VPret Act)) ++ td (verb.s ! VF (VPret Pass))) ++
tr (th "supinum" ++ td (verb.s ! VI (VSupin Act)) ++ td (verb.s ! VI (VSupin Pass))) ++
tr (th "imperativ" ++ td (verb.s ! VF (VImper Act)) ++ td (verb.s ! VF (VImper Pass)))
) ++
heading2 "Particip Presens" ++
frameTable (
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
tr (intagAttr "th" "rowspan=2" "nom" ++
th "sg" ++
td (verb.s ! VI (VPtPres Sg Indef Nom)) ++
td (verb.s ! VI (VPtPres Sg Def Nom))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPres Pl Indef Nom)) ++
td (verb.s ! VI (VPtPres Pl Def Nom))) ++
tr (intagAttr "th" "rowspan=2" "gen" ++
th "sg" ++
td (verb.s ! VI (VPtPres Sg Indef Gen)) ++
td (verb.s ! VI (VPtPres Sg Def Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPres Pl Indef Gen)) ++
td (verb.s ! VI (VPtPres Pl Def Gen)))
) ++
heading2 "Particip Perfekt" ++
frameTable (
tr (intagAttr "th" "colspan=2" "" ++
th "nom" ++
th "gen") ++
tr (intagAttr "th" "rowspan=3" "obest" ++
th "utr" ++
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Nom)) ++
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Gen))) ++
tr (th "neut" ++
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Nom)) ++
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPret (Strong GPl) Nom)) ++
td (verb.s ! VI (VPtPret (Strong GPl) Gen))) ++
tr (intagAttr "th" "rowspan=2" "best" ++
th "sg" ++
td (verb.s ! VI (VPtPret (Weak Sg) Nom)) ++
td (verb.s ! VI (VPtPret (Weak Sg) Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPret (Weak Pl) Nom)) ++
td (verb.s ! VI (VPtPret (Weak Pl) Gen)))
) ;
pp : Str -> Str = \s -> "&lt;"+s+"&gt;";
}

View File

@@ -1,4 +1,4 @@
--# -path=.:../english/:../scandinavian:alltenses:../abstract --# -path=.:../english/:../scandinavian:alltenses:../abstract:../translator
concrete ParseSwe of ParseEngAbs = concrete ParseSwe of ParseEngAbs =
TenseSwe, TenseSwe,
NounSwe - [PPartNP], NounSwe - [PPartNP],
@@ -20,7 +20,7 @@ concrete ParseSwe of ParseEngAbs =
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DictEngSwe ** DictionarySwe **
open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in { open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in {
flags flags
@@ -123,60 +123,4 @@ lin
AdAdV = cc2 ; AdAdV = cc2 ;
UttAdV adv = adv; UttAdV adv = adv;
lincat
Feat = Str;
lin FeatN2, FeatN = \n ->
case n.g of {
Utr => "(utr)" ;
Neutr => "(neutr)"
} ;
FeatV = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ;
FeatV2 = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++ v.c2.s ++
"<object>";
FeatV3 = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ "<arg1>" ++
v.c3.s ++ "<arg2>";
FeatV2V = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ "<object>" ++
v.c3.s ++ "<verb>";
FeatV2S = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ "<object>" ++
"that" ++ "<sentence>";
FeatV2Q = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ "<object>" ++
"that" ++ "<question>";
FeatV2A = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ "<object>" ++
"<adjective>";
FeatVV = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
"<verb>" ;
FeatVS = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
"that" ++ "<sentence>";
FeatVQ = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
"<question>";
FeatVA = \v ->
"<subject>" ++
v.s ! VI (VInfin Act) ++ v.part ++
"<adjective>";
} }