forked from GitHub/gf-rgl
now the Documentation module contains a category Definition which is used to generate definitions and examples for words in the App.
This commit is contained in:
@@ -5,6 +5,7 @@ abstract Documentation = Cat ** {
|
|||||||
|
|
||||||
cat
|
cat
|
||||||
Inflection ; -- inflection table
|
Inflection ; -- inflection table
|
||||||
|
Definition ;
|
||||||
Document ;
|
Document ;
|
||||||
Tag ;
|
Tag ;
|
||||||
|
|
||||||
@@ -29,7 +30,12 @@ fun
|
|||||||
InflectionPrep : Prep -> Inflection ;
|
InflectionPrep : Prep -> Inflection ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
MkDocument : String -> Inflection -> String -> Document ;
|
NoDefinition : Definition ;
|
||||||
|
MkDefinition : String -> Definition ;
|
||||||
|
MkDefinitionEx : String -> String -> Definition ;
|
||||||
|
|
||||||
|
fun
|
||||||
|
MkDocument : Definition -> Inflection -> String -> Document ;
|
||||||
MkTag : Inflection -> Tag ;
|
MkTag : Inflection -> Tag ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2,s3 : Str} ;
|
Inflection = {t : Str; s1,s2,s3 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -390,7 +391,12 @@ oper
|
|||||||
pp : Str -> Str = \s -> "<"+s+">";
|
pp : Str -> Str = \s -> "<"+s+">";
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = {s = i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ i.s3 ++ e.s} ;
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Дефиниция:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Дефиниция:</b>"++d.s++"</p><p><b>Пример:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ;
|
||||||
MkTag i = {s = i.t} ;
|
MkTag i = {s = i.t} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -132,7 +133,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definició:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definició:</b>"++d.s++"</p><p><b>Exemple:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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 ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -124,7 +125,12 @@ oper
|
|||||||
pp : Str -> Str = \s -> "<"+s+">" ;
|
pp : Str -> Str = \s -> "<"+s+">" ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = {s=i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s} ;
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>定义:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>定义:</b>"++d.s++"</p><p><b>例子:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkDocument d i e = {s=i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ;
|
||||||
MkTag i = {s=i.t} ;
|
MkTag i = {s=i.t} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -140,7 +141,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definitie:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definitie:</b>"++d.s++"</p><p><b>Voorbeeld:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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 ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ concrete DocumentationEng of Documentation = CatEng ** open
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -178,7 +179,12 @@ oper
|
|||||||
pp : Str -> Str = \s -> "<"+s+">";
|
pp : Str -> Str = \s -> "<"+s+">";
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = {s = i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s} ;
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definition:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definition:</b>"++d.s++"</p><p><b>Example:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ;
|
||||||
MkTag i = {s = i.t} ;
|
MkTag i = {s = i.t} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -263,6 +264,11 @@ oper
|
|||||||
tr (th (heading instructive_Parameter) ++ td (nouns (NCase Sg Termin)) ++ td (nouns (NCase Pl Termin))
|
tr (th (heading instructive_Parameter) ++ td (nouns (NCase Sg Termin)) ++ td (nouns (NCase Pl Termin))
|
||||||
)) ;
|
)) ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definitsioon:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definitsioon:</b>"++d.s++"</p><p><b>Eeskuju:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
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) ;
|
MkTag i = ss (i.t) ;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -290,7 +291,12 @@ oper
|
|||||||
) ;
|
) ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Rajaus:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Rajaus:</b>"++d.s++"</p><p><b>Esimerkki:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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) ;
|
MkTag i = ss (i.t) ;
|
||||||
|
|
||||||
{- --# notpresent
|
{- --# notpresent
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -132,7 +133,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Définition:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Définition:</b>"++d.s++"</p><p><b>Exemple:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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 ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -144,7 +145,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definierung:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definierung:</b>"++d.s++"</p><p><b>Beispiel:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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 ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ in {
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -120,7 +121,12 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkDocument b i e = {s = i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s} ;
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>परिभाषा:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>परिभाषा:</b>"++d.s++"</p><p><b>नमूना:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ;
|
||||||
MkTag i = {s = i.t} ;
|
MkTag i = {s = i.t} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -132,7 +133,13 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definizione:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definizione:</b>"++d.s++"</p><p><b>Esempio:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
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 ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ flags coding=utf8 ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -132,6 +133,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definición:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definición:</b>"++d.s++"</p><p><b>Ejemplo:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
lin
|
||||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||||
MkTag i = ss i.t ;
|
MkTag i = ss i.t ;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ in {
|
|||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
lincat
|
lincat
|
||||||
Inflection = {t : Str; s1,s2 : Str} ;
|
Inflection = {t : Str; s1,s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
Document = {s : Str} ;
|
Document = {s : Str} ;
|
||||||
Tag = {s : Str} ;
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
@@ -178,7 +179,12 @@ lin
|
|||||||
s2 = inflVerb v
|
s2 = inflVerb v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkDocument b i e = {s = i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s} ; -- explanation appended in a new paragraph
|
lin
|
||||||
|
NoDefinition = {s=""};
|
||||||
|
MkDefinition d = {s="<p><b>Definition:</b>"++d.s++"</p>"};
|
||||||
|
MkDefinitionEx d e = {s="<p><b>Definition:</b>"++d.s++"</p><p><b>Exempel:</b>"++e.s++"</p>"};
|
||||||
|
|
||||||
|
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ; -- explanation appended in a new paragraph
|
||||||
MkTag i = {s = i.t} ;
|
MkTag i = {s = i.t} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
Reference in New Issue
Block a user