From d8aaeeb6827846aa3ed236a537167f97014770a7 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Thu, 5 Dec 2024 18:23:28 +0100 Subject: [PATCH] support linking clitic --- src/albanian/DocumentationSqi.gf | 22 +++++++++------ src/albanian/MorphoSqi.gf | 47 +++++++++++++++++++++----------- src/albanian/ResSqi.gf | 47 ++++++++++++++++++++++++++++---- 3 files changed, 87 insertions(+), 29 deletions(-) diff --git a/src/albanian/DocumentationSqi.gf b/src/albanian/DocumentationSqi.gf index 60607c1f..125140ca 100644 --- a/src/albanian/DocumentationSqi.gf +++ b/src/albanian/DocumentationSqi.gf @@ -27,15 +27,21 @@ lin InflectionA = \x -> { s1="" ; s2=frameTable ( tr (intagAttr "th" "colspan=\"2\"" "" ++ th "Sg" ++ th "Pl") ++ - tr (intagAttr "th" "rowspan=\"2\"" "Nom" ++ th "Masc" ++ td (x.s ! Nom ! Masc ! Sg) ++ td (x.s ! Nom ! Masc ! Pl)) ++ - tr (th "Fem" ++ td (x.s ! Nom ! Fem ! Sg) ++ td (x.s ! Nom ! Fem ! Pl)) ++ - tr (intagAttr "th" "rowspan=\"2\"" "Acc" ++ th "Masc" ++ td (x.s ! Acc ! Masc ! Sg) ++ td (x.s ! Acc ! Masc ! Pl)) ++ - tr (th "Fem" ++ td (x.s ! Acc ! Fem ! Sg) ++ td (x.s ! Acc ! Fem ! Pl)) ++ - tr (intagAttr "th" "rowspan=\"2\"" "Dat" ++ th "Masc" ++ td (x.s ! Dat ! Masc ! Sg) ++ td (x.s ! Dat ! Masc ! Pl)) ++ - tr (th "Fem" ++ td (x.s ! Dat ! Fem ! Sg) ++ td (x.s ! Dat ! Fem ! Pl)) ++ - tr (intagAttr "th" "rowspan=\"2\"" "Ablat" ++ th "Masc" ++ td (x.s ! Ablat ! Masc ! Sg) ++ td (x.s ! Ablat ! Masc ! Pl)) ++ - tr (th "Fem" ++ td (x.s ! Ablat ! Fem ! Sg) ++ td (x.s ! Ablat ! Fem ! Pl))) ; + tr (intagAttr "th" "rowspan=\"2\"" "Nom" ++ th "Masc" ++ td (y ! Nom ! Masc ! Sg) ++ td (y ! Nom ! Masc ! Pl)) ++ + tr (th "Fem" ++ td (y ! Nom ! Fem ! Sg) ++ td (y ! Nom ! Fem ! Pl)) ++ + tr (intagAttr "th" "rowspan=\"2\"" "Acc" ++ th "Masc" ++ td (y ! Acc ! Masc ! Sg) ++ td (y ! Acc ! Masc ! Pl)) ++ + tr (th "Fem" ++ td (y ! Acc ! Fem ! Sg) ++ td (y ! Acc ! Fem ! Pl)) ++ + tr (intagAttr "th" "rowspan=\"2\"" "Dat" ++ th "Masc" ++ td (y ! Dat ! Masc ! Sg) ++ td (y ! Dat ! Masc ! Pl)) ++ + tr (th "Fem" ++ td (y ! Dat ! Fem ! Sg) ++ td (y ! Dat ! Fem ! Pl)) ++ + tr (intagAttr "th" "rowspan=\"2\"" "Ablat" ++ th "Masc" ++ td (y ! Ablat ! Masc ! Sg) ++ td (y ! Ablat ! Masc ! Pl)) ++ + tr (th "Fem" ++ td (y ! Ablat ! Fem ! Sg) ++ td (y ! Ablat ! Fem ! Pl))) ; s3=[] + } where { + y : Case => Gender => Number => Str = + \\c,g,n => case x.clit of { + True => link_clitic ! Indef ! c ! g ! n ++ x.s ! c ! g ! n ; + False => x.s ! c ! g ! n + } ; } ; lin InflectionV = \x -> { t="verb" ; diff --git a/src/albanian/MorphoSqi.gf b/src/albanian/MorphoSqi.gf index e25d0a50..420e6e33 100644 --- a/src/albanian/MorphoSqi.gf +++ b/src/albanian/MorphoSqi.gf @@ -1,4 +1,4 @@ -resource MorphoSqi = open CatSqi, ResSqi, Predef in { +resource MorphoSqi = open CatSqi, ResSqi, Predef, Prelude in { oper @@ -25544,7 +25544,8 @@ mkA001 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkA002 : Str -> A ; @@ -25591,7 +25592,8 @@ mkA002 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkA003 : Str -> A ; @@ -25638,7 +25640,8 @@ mkA003 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkA004 : Str -> A ; @@ -25686,7 +25689,8 @@ mkA004 base = Pl => base_1+"ak" } } - } + } ; + clit = False }; _ => error "Can't apply paradigm mkA004" } ; @@ -25735,7 +25739,8 @@ mkA005 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkA006 : Str -> A ; @@ -25783,7 +25788,8 @@ mkA006 base = Pl => base_1+"e"+base_2 } } - } + } ; + clit = True }; _ => error "Can't apply paradigm mkA006" } ; @@ -25832,7 +25838,8 @@ mkA007 base_1 = Pl => base_1+"e" } } - } + } ; + clit = True } ; mkA008 : Str -> A ; @@ -25879,7 +25886,8 @@ mkA008 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkA009 : Str -> A ; @@ -25927,7 +25935,8 @@ mkA009 base = Pl => base_1+"a"+base_2 } } - } + } ; + clit = True }; _ => error "Can't apply paradigm mkA009" } ; @@ -25977,7 +25986,8 @@ mkA010 base = Pl => "t"+base_1+"a" } } - } + } ; + clit = False }; _ => error "Can't apply paradigm mkA010" } ; @@ -26027,7 +26037,8 @@ mkA011 base = Pl => "to"+base_1+"a" } } - } + } ; + clit = False }; _ => error "Can't apply paradigm mkA011" } ; @@ -26077,7 +26088,8 @@ mkA012 base = Pl => base_1+"ë" } } - } + } ; + clit = True }; _ => error "Can't apply paradigm mkA012" } ; @@ -26126,7 +26138,8 @@ mkA013 base_1 = Pl => base_1 } } - } + } ; + clit = False } ; mkA014 : Str -> A ; @@ -26174,7 +26187,8 @@ mkA014 base = Pl => base_1+"u"+base_2+"r" } } - } + } ; + clit = True }; _ => error "Can't apply paradigm mkA014" } ; @@ -26223,7 +26237,8 @@ mkA015 base_1 = Pl => base_1 } } - } + } ; + clit = True } ; mkV001 : Str -> V ; diff --git a/src/albanian/ResSqi.gf b/src/albanian/ResSqi.gf index 3346ab9c..08bf87f0 100644 --- a/src/albanian/ResSqi.gf +++ b/src/albanian/ResSqi.gf @@ -1,4 +1,4 @@ -resource ResSqi = ParamX-[Tense,Past,Pres] ** { +resource ResSqi = ParamX-[Tense,Past,Pres] ** open Prelude in { oper Compl = {s : Str} ; @@ -50,9 +50,9 @@ oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun = } ; -oper Adj = {s: Case => Gender => Number => Str} ; -- 462 -oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Adj = - \f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16 -> +oper Adj = {s: Case => Gender => Number => Str; clit: Bool} ; -- 462 +oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Bool -> Adj = + \f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,clit -> { s = table { Nom => table { Masc => table { @@ -94,7 +94,8 @@ oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Adj = Pl => f16 } } - } + } ; + clit = clit } ; @@ -207,4 +208,40 @@ oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ } } ; +oper link_clitic : Species => Case => Gender => Number => Str = + table { + Indef => table { + Nom => table { + Masc => table { + Sg => "i" ; + Pl => "të" + } ; + Fem => table { + Sg => "e" ; + Pl => "të" + } + } ; + _ => \\_,_ => "të" + } ; + Def => table { + Nom => table { + Masc => table { + Sg => "i" ; + Pl => "e" + } ; + Fem => table { + Sg => "e" ; + Pl => "e" + } + } ; + Acc => \\_,_ => "e" ; + _ => table { + Masc => \\_ => "të" ; + Fem => table { + Sg => "së" ; + Pl => "të" + } + } + } + } ; }