mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
Terminology and Documentation for Icelandic; noun tables done
This commit is contained in:
@@ -17,6 +17,10 @@ fun
|
||||
verb_Category : Category ;
|
||||
adverb_Category : Category ;
|
||||
preposition_Category : Category ;
|
||||
numeral_Category : Category ;
|
||||
pronoun_Category : Category ;
|
||||
determiner_Category : Category ;
|
||||
article_Category : Category ;
|
||||
|
||||
number_ParameterType : ParameterType ;
|
||||
gender_ParameterType : ParameterType ;
|
||||
@@ -65,6 +69,7 @@ fun
|
||||
|
||||
active_Parameter : Parameter ;
|
||||
passive_Parameter : Parameter ;
|
||||
middle_Parameter : Parameter ;
|
||||
|
||||
present_Parameter : Parameter ;
|
||||
past_Parameter : Parameter ;
|
||||
@@ -99,6 +104,9 @@ fun
|
||||
short_Parameter : Parameter ; -- short form of e.g. a Fin infinitive
|
||||
long_Parameter : Parameter ;
|
||||
|
||||
strong_Parameter : Parameter ; -- German adjective declensions
|
||||
weak_Parameter : Parameter ;
|
||||
|
||||
finite_Modifier : Modifier ;
|
||||
transitive_Modifier : Modifier ;
|
||||
nominal_Modifier : Modifier ;
|
||||
|
||||
@@ -22,6 +22,10 @@ lin
|
||||
verb_Category = mkN "verb" ;
|
||||
adverb_Category = mkN "adverb" ;
|
||||
preposition_Category = mkN "preposition" ;
|
||||
numeral_Category = mkN "numeral" ;
|
||||
pronoun_Category = mkN "pronoun" ;
|
||||
determiner_Category = mkN "determiner" ;
|
||||
article_Category = mkN "article" ;
|
||||
|
||||
gender_ParameterType = mkN "Gender" ;
|
||||
finite_form_ParameterType = mkN "finite form" ;
|
||||
@@ -55,6 +59,7 @@ lin
|
||||
|
||||
active_Parameter = mkN "active" ;
|
||||
passive_Parameter = mkN "passive" ;
|
||||
middle_Parameter = mkN "middle" ;
|
||||
|
||||
imperative_Parameter = mkN "imperative" ;
|
||||
indicative_Parameter = mkN "indicative" ;
|
||||
@@ -85,9 +90,12 @@ lin
|
||||
predicative_Parameter = mkN "predicative" ;
|
||||
negative_Parameter = mkN "negative" ;
|
||||
|
||||
short_Parameter = mkN "short" ;
|
||||
short_Parameter = mkN "short" ; --- adjective
|
||||
long_Parameter = mkN "long" ;
|
||||
|
||||
strong_Parameter = mkN "strong" ; --- adjective
|
||||
weak_Parameter = mkN "weak" ;
|
||||
|
||||
nounHeading n = ss (n.s ! Sg ! Nom) ;
|
||||
nounPluralHeading n = ss (n.s ! Pl ! Nom) ;
|
||||
|
||||
|
||||
6
src/icelandic/DocumentationIce.gf
Normal file
6
src/icelandic/DocumentationIce.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
-- documentation of Icelandic in Icelandic: the default introduced in LangIce
|
||||
|
||||
concrete DocumentationIce of Documentation = CatIce **
|
||||
DocumentationIceFunctor with (Terminology = TerminologyIce) ;
|
||||
6
src/icelandic/DocumentationIceEng.gf
Normal file
6
src/icelandic/DocumentationIceEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
-- documentation of Icelandic in English
|
||||
|
||||
concrete DocumentationIceEng of Documentation = CatIce **
|
||||
DocumentationIceFunctor with (Terminology = TerminologyEng) ;
|
||||
197
src/icelandic/DocumentationIceFunctor.gf
Normal file
197
src/icelandic/DocumentationIceFunctor.gf
Normal file
@@ -0,0 +1,197 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
incomplete concrete DocumentationIceFunctor of Documentation = CatIce ** open
|
||||
Terminology, -- the interface that generates different documentation languages
|
||||
ResIce,
|
||||
ParadigmsIce,
|
||||
(G = GrammarIce),
|
||||
(S = SyntaxIce),
|
||||
(L = LexiconGer),
|
||||
Prelude,
|
||||
HTML
|
||||
in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
lincat
|
||||
Inflection = {t : Str; s1,s2 : Str} ;
|
||||
Definition = {s : Str} ;
|
||||
Document = {s : Str} ;
|
||||
Tag = {s : Str} ;
|
||||
|
||||
oper
|
||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||
|
||||
lin
|
||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||
t = "s" ;
|
||||
s1 = heading1 (heading noun_Category ++
|
||||
case noun.g of {
|
||||
Masc => "("+heading masculine_Parameter+")" ;
|
||||
Fem => "("+heading feminine_Parameter+")" ;
|
||||
Neutr => "("+heading neuter_Parameter+")"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (intagAttr "th" "rowspan=2" "" ++ intagAttr "th" "colspan=2" (heading singular_Parameter) ++ intagAttr "th" "colspan=2" (heading plural_Parameter)) ++
|
||||
tr ( th (heading indefinite_Parameter) ++ th (heading definite_Parameter) ++ th (heading indefinite_Parameter) ++ th (heading definite_Parameter)) ++
|
||||
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Free ! Nom) ++ td (noun.s ! Sg ! Suffix ! Nom) ++ td (noun.s ! Pl ! Free ! Nom) ++ td (noun.s ! Pl ! Suffix ! Nom)) ++
|
||||
tr (th (heading accusative_Parameter) ++ td (noun.s ! Sg ! Free ! Acc) ++ td (noun.s ! Sg ! Suffix ! Acc) ++ td (noun.s ! Pl ! Free ! Acc) ++ td (noun.s ! Pl ! Suffix ! Acc)) ++
|
||||
tr (th (heading dative_Parameter) ++ td (noun.s ! Sg ! Free ! Dat) ++ td (noun.s ! Sg ! Suffix ! Dat) ++ td (noun.s ! Pl ! Free ! Dat) ++ td (noun.s ! Pl ! Suffix ! Dat)) ++
|
||||
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Free ! Gen) ++ td (noun.s ! Sg ! Suffix ! Gen) ++ td (noun.s ! Pl ! Free ! Gen) ++ td (noun.s ! Pl ! Suffix ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
{-
|
||||
InflectionA, InflectionA2 = \adj ->
|
||||
let
|
||||
gforms : Degree -> ResGer.Case -> Str = \d,c ->
|
||||
td (adj.s ! d ! (AMod (GSg Masc) c)) ++
|
||||
td (adj.s ! d ! (AMod (GSg Fem) c)) ++
|
||||
td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
|
||||
td (adj.s ! d ! (AMod GPl c)) ;
|
||||
dtable : Parameter -> Degree -> Str = \s,d ->
|
||||
paragraph (heading2 (heading s) ++ frameTable (
|
||||
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
||||
th (heading plural_Parameter)) ++
|
||||
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
||||
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
|
||||
tr (th (heading dative_Parameter) ++ gforms d Dat) ++
|
||||
tr (th (heading accusative_Parameter) ++ gforms d Acc) ++
|
||||
tr (th (heading predicative_Parameter) ++ intagAttr "td" "colspan=4" (adj.s ! d ! APred))
|
||||
))
|
||||
in { t = "a" ;
|
||||
s1 = heading1 (nounHeading adjective_Category).s ;
|
||||
s2 = dtable positive_Parameter Posit ++ dtable comparative_Parameter Compar ++ dtable superlative_Parameter Superl
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
t = "adverb" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
} ;
|
||||
|
||||
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
|
||||
} ;
|
||||
-}
|
||||
|
||||
|
||||
lin
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Definierung:</b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Definierung:</b>"++t.s++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 ;
|
||||
|
||||
{-
|
||||
oper
|
||||
verbExample : CatGer.Cl -> Str = \cl ->
|
||||
(S.mkUtt cl).s
|
||||
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
|
||||
;
|
||||
|
||||
inflVerb : Verb -> Str = \verb ->
|
||||
let
|
||||
vfin : VForm -> Str = \f ->
|
||||
verb.s ! f ++ verb.prefix ;
|
||||
gforms : Number -> Person -> Str = \n,p ->
|
||||
td (vfin (VFin False (VPresInd n p))) ++
|
||||
td (vfin (VFin False (VPresSubj n p)))
|
||||
++ td (vfin (VFin False (VImpfInd n p))) --# notpresent
|
||||
++ td (vfin (VFin False (VImpfSubj n p))) --# notpresent
|
||||
;
|
||||
in frameTable (
|
||||
tr (th "" ++ intagAttr "th" "colspan=2" (heading present_Parameter) ++ intagAttr "th" "colspan=2" (heading past_Parameter)) ++
|
||||
tr (th "" ++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "I") ++
|
||||
th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter ++ "II")) ++
|
||||
tr (th "Sg.1" ++ gforms Sg P1) ++
|
||||
tr (th "Sg.2" ++ gforms Sg P2) ++
|
||||
tr (th "Sg.3" ++ gforms Sg P3) ++
|
||||
tr (th "Pl.1" ++ gforms Pl P1) ++
|
||||
tr (th "Pl.2" ++ gforms Pl P2) ++
|
||||
tr (th "Pl.3" ++ gforms Pl P3)
|
||||
) ++
|
||||
frameTable (
|
||||
tr (th (heading imperative_Parameter ++ "Sg.2") ++ td (vfin (VImper Sg))) ++
|
||||
tr (th (heading imperative_Parameter ++ "Pl.2") ++ td (vfin (VImper Pl))) ++
|
||||
tr (th (heading infinitive_Parameter) ++ td (verb.s ! (VInf False))) ++
|
||||
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ td (verb.s ! (VPresPart APred))) ++
|
||||
tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! (VPastPart APred))) ++
|
||||
tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHaben => "haben" ; VSein => "sein"}))
|
||||
) ;
|
||||
-}
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
concrete LangIce of Lang =
|
||||
GrammarIce
|
||||
,LexiconIce
|
||||
,DocumentationIce --# notpresent
|
||||
--,ConstructionIce
|
||||
** {} ;
|
||||
|
||||
110
src/icelandic/TerminologyIce.gf
Normal file
110
src/icelandic/TerminologyIce.gf
Normal file
@@ -0,0 +1,110 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete TerminologyIce of Terminology = CatIce ** open
|
||||
ResIce,
|
||||
ParadigmsIce,
|
||||
(G = GrammarIce),
|
||||
(S = SyntaxIce),
|
||||
(L = LexiconEng),
|
||||
Prelude
|
||||
in {
|
||||
|
||||
|
||||
lincat
|
||||
Category = G.N ;
|
||||
ParameterType = G.N ;
|
||||
Parameter = G.N ;
|
||||
Modifier = G.A ;
|
||||
|
||||
lin
|
||||
noun_Category = mkN "nafnorð" ;
|
||||
adjective_Category = mkN "lýsingarorð" ;
|
||||
verb_Category = mkN "sagnorð" ;
|
||||
adverb_Category = mkN "atviksorð" ;
|
||||
preposition_Category = mkN "preposition" ;
|
||||
numeral_Category = mkN "töluorð" ;
|
||||
pronoun_Category = mkN "persónufornafn" ;
|
||||
determiner_Category = mkN "determiner" ;
|
||||
article_Category = mkN "greinir" ;
|
||||
|
||||
number_ParameterType = mkN "tala" ;
|
||||
gender_ParameterType = mkN "kyn" ;
|
||||
case_ParameterType = mkN "fall" ;
|
||||
person_ParameterType = mkN "persóna" ;
|
||||
tense_ParameterType = mkN "tíð" ;
|
||||
degree_ParameterType = mkN "" ;
|
||||
|
||||
singular_Parameter = mkN "eintala" ;
|
||||
plural_Parameter = mkN "fleirtala" ;
|
||||
|
||||
masculine_Parameter = mkN "karlkyn" ;
|
||||
feminine_Parameter = mkN "kvenkyn" ;
|
||||
neuter_Parameter = mkN "hvorugkyn" ;
|
||||
-- uter_Parameter = mkN "uter" ;
|
||||
|
||||
nominative_Parameter = mkN "nefnifall" ;
|
||||
genitive_Parameter = mkN "eignarfall" ;
|
||||
dative_Parameter = mkN "þágufall" ;
|
||||
accusative_Parameter = mkN "þolfall" ;
|
||||
{-
|
||||
partitive_Parameter = mkN "partitive" ;
|
||||
translative_Parameter = mkN "translative" ;
|
||||
essive_Parameter = mkN "essive" ;
|
||||
inessive_Parameter = mkN "inessive" ;
|
||||
elative_Parameter = mkN "elative" ;
|
||||
illative_Parameter = mkN "illative" ;
|
||||
adessive_Parameter = mkN "adessive" ;
|
||||
ablative_Parameter = mkN "ablative" ;
|
||||
allative_Parameter = mkN "allative" ;
|
||||
abessive_Parameter = mkN "abessive" ;
|
||||
comitative_Parameter = mkN "comitative" ;
|
||||
instructive_Parameter = mkN "instructive" ;
|
||||
-}
|
||||
|
||||
active_Parameter = mkN "germynd" ;
|
||||
passive_Parameter = mkN "miðmynd" ;
|
||||
middle_Parameter = mkN "þolmynd" ;
|
||||
|
||||
imperative_Parameter = mkN "boðháttur" ;
|
||||
indicative_Parameter = mkN "framsöguháttur" ;
|
||||
conjunctive_Parameter = mkN "viðtengingarháttur" ;
|
||||
infinitive_Parameter = mkN "nafnháttur" ;
|
||||
|
||||
definite_Parameter = mkN "ákveðinn" ;
|
||||
indefinite_Parameter = mkN "óákveðinn" ;
|
||||
|
||||
present_Parameter = mkN "nútíð" ;
|
||||
past_Parameter = mkN "þátíð" ;
|
||||
future_Parameter = mkN "future" ;
|
||||
conditional_Parameter = mkN "conditional" ;
|
||||
potential_Parameter = mkN "potential" ;
|
||||
perfect_Parameter = mkN "perfect" ;
|
||||
imperfect_Parameter = mkN "imperfect" ;
|
||||
supine_Parameter = mkN "supine" ;
|
||||
agent_Parameter = mkN "agent" ;
|
||||
simple_past_Parameter = mkN "simple past" ;
|
||||
|
||||
participle_Parameter = mkN "participle" ;
|
||||
aux_verb_Parameter = mkN "auxiliary" ;
|
||||
gerund_Parameter = mkN "Gerund" ;
|
||||
|
||||
positive_Parameter = mkN "frumstig" ;
|
||||
comparative_Parameter = mkN "miðstig" ;
|
||||
superlative_Parameter = mkN "efsta stig" ; ----
|
||||
-- predicative_Parameter = mkN "predicative" ;
|
||||
-- negative_Parameter = mkN "negative" ;
|
||||
|
||||
short_Parameter = mkN "short" ;
|
||||
long_Parameter = mkN "long" ;
|
||||
|
||||
strong_Parameter = mkN "sterk" ; --- sterk beyging
|
||||
weak_Parameter = mkN "veik" ;
|
||||
|
||||
nounHeading n = ss (n.s ! Sg ! Free ! Nom) ;
|
||||
nounPluralHeading n = ss (n.s ! Pl ! Free ! Nom) ;
|
||||
|
||||
exampleGr_N = mkN "example" ;
|
||||
formGr_N = mkN "form" ;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user