diff --git a/src/api/TryGre.gf b/src/api/TryGre.gf index affe6335b..7c1f7fd31 100644 --- a/src/api/TryGre.gf +++ b/src/api/TryGre.gf @@ -1,17 +1,21 @@ --# -path=.:../greek:../common:../abstract:../prelude -resource TryGre = SyntaxGre, LexiconGre, ParadigmsGre ; - -{- --[mkAdv, mkDet,mkQuant]** +resource TryGre = SyntaxGre-[mkAdN,mkVoc], LexiconGre, ParadigmsGre - [mkAdN,mkAdv,mkVoc] ** open (P = ParadigmsGre) in { - oper - +oper mkAdv = overload SyntaxGre { mkAdv : Str -> Adv = P.mkAdv ; } ; -} + mkVoc = overload { + mkVoc : NP -> Voc = SyntaxGre.mkVoc ; + mkVoc : Str -> Voc = P.mkVoc ; + } ; --} \ No newline at end of file + mkAdN = overload { + mkAdN : CAdv -> AdN = SyntaxGre.mkAdN ; + mkAdN : Str -> AdN = P.mkAdN ; + } ; + +} diff --git a/src/greek/CatGre.gf b/src/greek/CatGre.gf index 7b49c7b1d..a5108c497 100644 --- a/src/greek/CatGre.gf +++ b/src/greek/CatGre.gf @@ -91,7 +91,6 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in { A = ResGre.Adj ; --{s : Degree => Gender => Number => Case => Str } ; A2 = {s :Degree => Gender => Number => Case => Str ; adv : Degree => Str ;c2 : Compl } ; - N = Noun; @@ -100,5 +99,7 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in { N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Compl} ; PN = PName ; + + LN, GN, SN = {s : Str} ; } diff --git a/src/greek/DocumentationGre.gf b/src/greek/DocumentationGre.gf new file mode 100644 index 000000000..8b041a662 --- /dev/null +++ b/src/greek/DocumentationGre.gf @@ -0,0 +1,124 @@ +--# -path=.:../abstract:../common + +concrete DocumentationGre of Documentation = CatGre ** open + ResGre, HTML, Prelude +in { + +lincat + Inflection = {t : Str; s1,s2 : Str} ; + Definition = {s : Str} ; + Document = {s : Str} ; + Tag = {s : Str} ; + +lin + InflectionN, InflectionN2, InflectionN3 = \noun -> { + t = "ο" ; + s1 = heading1 "Ουσιαστικό" ; + s2 = inflNoun noun.s + } ; + + InflectionPN = \pn -> { + t = "ό" ; + s1 = heading1 "Όνομα" ; + s2 = inflNoun pn.s + } ; + + InflectionLN ln = { + t = "ό" ; + s1 = heading1 "Όνομα" ; + s2 = paragraph ln.s + } ; + + InflectionGN gn = { + t = "ό" ; + s1 = heading1 "Όνομα" ; + s2 = paragraph gn.s + } ; + + InflectionSN sn = { + t = "ό" ; + s1 = heading1 "Όνομα" ; + s2 = paragraph sn.s + } ; + + InflectionA, InflectionA2 = \adj -> { + t = "ε" ; + s1 = heading1 "Επίθετο" ; + s2 = inflAdj (adj.s ! Posit) ++ + inflAdj (adj.s ! Compar) ++ + inflAdj (adj.s ! Superl) + } ; + + InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> { + t = "επίρ" ; + s1 = heading1 "Επίρρημα" ; + s2 = paragraph adv.s + } ; + + InflectionPrep p = { + t = "πρ" ; + s1 = heading1 "Πρόθεση" ; + s2 = paragraph p.s + } ; + + InflectionV,InflectionV2,InflectionV3,InflectionV2V,InflectionV2S,InflectionV2Q,InflectionV2A,InflectionVV,InflectionVS,InflectionVQ,InflectionVA = \v -> { + t = "ρ" ; + s1 = heading1 "ρήμα" ; + s2 = inflVerb v.s + } ; + +oper + inflNoun : (Number => Case => Str) -> Str = \n -> + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "ονομαστική" ++ td (n ! Sg ! Nom) ++ td (n ! Pl ! Nom)) ++ + tr (th "γενική" ++ td (n ! Sg ! Gen) ++ td (n ! Pl ! Gen)) ++ + tr (th "αιτιατική" ++ td (n ! Sg ! Acc) ++ td (n ! Pl ! Acc)) ++ + tr (th "κλητική" ++ td (n ! Sg ! Vocative) ++ td (n ! Pl ! Vocative)) + ) ; + + inflAdj : (Gender => Number => Case => Str) -> Str = \n -> + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "ονομαστική" ++ td (n ! Masc ! Sg ! Nom) ++ td (n ! Masc ! Pl ! Nom) ++ td (n ! Fem ! Sg ! Nom) ++ td (n ! Fem ! Pl ! Nom) ++ td (n ! Neut ! Sg ! Nom) ++ td (n ! Neut ! Pl ! Nom)) ++ + tr (th "γενική" ++ td (n ! Masc ! Sg ! Gen) ++ td (n ! Masc ! Pl ! Gen) ++ td (n ! Fem ! Sg ! Gen) ++ td (n ! Fem ! Pl ! Gen) ++ td (n ! Neut ! Sg ! Gen) ++ td (n ! Neut ! Pl ! Gen)) ++ + tr (th "αιτιατική" ++ td (n ! Masc ! Sg ! Acc) ++ td (n ! Masc ! Pl ! Acc) ++ td (n ! Fem ! Sg ! Acc) ++ td (n ! Fem ! Pl ! Acc) ++ td (n ! Neut ! Sg ! Acc) ++ td (n ! Neut ! Pl ! Acc)) ++ + tr (th "κλητική" ++ td (n ! Masc ! Sg ! Vocative) ++ td (n ! Masc ! Pl ! Vocative) ++ td (n ! Fem ! Sg ! Vocative) ++ td (n ! Fem ! Pl ! Vocative) ++ td (n ! Neut ! Sg ! Vocative) ++ td (n ! Neut ! Pl ! Vocative)) + ) ; + + inflVerb : (VForm => Str) -> Str = \v -> v ! VPres Ind Sg P1 Active Imperf {- + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Imperf) ++ td (v ! VPres Ind Pl P1 Active Imperf)) ++ + tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Imperf) ++ td (v ! VPres Ind Pl P2 Active Imperf)) ++ + tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Imperf) ++ td (v ! VPres Ind Pl P3 Active Imperf)) + ) ++ + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Imperf) ++ td (v ! VPast Ind Pl P1 Active Imperf)) ++ + tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Imperf) ++ td (v ! VPast Ind Pl P2 Active Imperf)) ++ + tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Imperf) ++ td (v ! VPast Ind Pl P3 Active Imperf)) + ) ++ + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Perf) ++ td (v ! VPres Ind Pl P1 Active Perf)) ++ + tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Perf) ++ td (v ! VPres Ind Pl P2 Active Perf)) ++ + tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Perf) ++ td (v ! VPres Ind Pl P3 Active Perf)) + ) ++ + frameTable ( + tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++ + tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Perf) ++ td (v ! VPast Ind Pl P1 Active Perf)) ++ + tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Perf) ++ td (v ! VPast Ind Pl P2 Active Perf)) ++ + tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Perf) ++ td (v ! VPast Ind Pl P3 Active Perf)) + ) -} ; + +lin + NoDefinition t = {s=t.s}; + MkDefinition t d = {s="

Παράδειγμα: "++t.s++d.s++"

"}; + MkDefinitionEx t d e = {s="

Παράδειγμα: "++t.s++d.s++"

"++e.s++"

"}; + +lin + MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph + MkTag i = ss (i.t) ; + +} diff --git a/src/greek/LangGre.gf b/src/greek/LangGre.gf index aa113632a..755d7b5fc 100644 --- a/src/greek/LangGre.gf +++ b/src/greek/LangGre.gf @@ -1,4 +1,5 @@ concrete LangGre of Lang = GrammarGre, LexiconGre + , DocumentationGre --# notpresent ; diff --git a/src/greek/ParadigmsGre.gf b/src/greek/ParadigmsGre.gf index 06053249c..7950767c3 100644 --- a/src/greek/ParadigmsGre.gf +++ b/src/greek/ParadigmsGre.gf @@ -72,6 +72,11 @@ oper = \ nm,gm,am,vm,pn,pa, g -> lin PN (mkName nm gm am vm pn pa g) ; } ; + mkLN = overload { + mkLN : Str -> LN + = \s -> lin LN {s=s} ; + } ; + makeNP = overload { makeNP : (_,_,_: Str) -> Number -> Gender -> NP = mkpanta; makeNP : Str -> Number -> Gender ->Bool -> NP = mkkati @@ -310,7 +315,13 @@ oper - - + mkGN : Str -> GN = \s -> lin GN {s = s} ; + mkSN : Str -> SN = \s -> lin SN {s = s} ; + mkAdv : Str -> Adv = \s -> lin Adv {s = s} ; + mkAdV : Str -> AdV = \s -> lin AdV {s = s} ; + mkAdA : Str -> AdA = \s -> lin AdA {s = s} ; + mkAdN : Str -> AdN = \s -> lin AdN {s = s} ; + mkInterj : Str -> Interj = \s -> lin Interj {s = s} ; + mkVoc : Str -> Voc = \s -> lin Voc {s = s} ; - } +}