From 8717ad2eb9d095a372e813c616d0503132dbb6b2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 10 Apr 2019 13:09:23 +0200 Subject: [PATCH 1/2] (Ara) Add {Base,Cons,Conj}CN --- src/arabic/ConjunctionAra.gf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/arabic/ConjunctionAra.gf b/src/arabic/ConjunctionAra.gf index dc330d1a5..0487e1b3c 100644 --- a/src/arabic/ConjunctionAra.gf +++ b/src/arabic/ConjunctionAra.gf @@ -6,6 +6,7 @@ lincat [S] = {s1,s2 : Order => Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : Case => Str ; a : Agr ; empty : Str; isHeavy : Bool} ; + [CN] = {s1,s2 : NTable ; g : Gender ; h : Species ; isDual : Bool ; np : Case => Str ; isHeavy : Bool} ; [AP] = {s1,s2 : Species => Gender => Number => State => Case => Str} ; lin @@ -34,8 +35,17 @@ lin ConsAP = consrTable5 Species Gender Number State Case comma ; ConjAP = conjunctDistrTable5 Species Gender Number State Case ; + BaseCN cn1 cn2 = leanCN cn1 ** twoTable3 Number State Case (leanCN cn1) (leanCN cn2) ; + ConsCN cn cns = leanCN cn ** consrTable3 Number State Case comma (leanCN cn) cns ; + ConjCN conj cns = cns ** conjunctDistrTable3 Number State Case conj cns ; + oper + leanCN : CN -> CN = \cn -> cn ** { + np = \\_ => [] ; + s = \\n,s,c => cn2str cn n s c + } ; + conjAgr : Agr -> Agr -> Agr = \a,b -> { isPron = False ; pgn = let gnA = pgn2gn a.pgn ; gnB = pgn2gn b.pgn in From 0a4b42b61016480d60be2f92898241a5e1a12354 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 10 Apr 2019 14:18:44 +0200 Subject: [PATCH 2/2] (Pes) Add {Base,Cons,Conj}CN --- src/persian/ConjunctionPes.gf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/persian/ConjunctionPes.gf b/src/persian/ConjunctionPes.gf index a970570f4..1aa4a2e35 100644 --- a/src/persian/ConjunctionPes.gf +++ b/src/persian/ConjunctionPes.gf @@ -35,11 +35,25 @@ concrete ConjunctionPes of Conjunction = BaseAP x y = y ** twoTable Mod x y ; ConsAP xs x = xs ** consrTable Mod comma xs x ; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ; + BaseCN cn1 cn2 = leanCN cn1 ** twoTable2 Number Mod (leanCN cn1) (leanCN cn2) ; + ConsCN cn cns = leanCN cn ** consrTable2 Number Mod comma (leanCN cn) cns ; + ConjCN conj cns = cns ** conjunctDistrTable2 Number Mod conj cns ; + lincat [S] = {s1,s2 : VVForm => Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : Mod => Str} ** BaseNP ; + [CN] = {s1,s2 : Number => Mod => Str ; + animacy : Animacy ; + isCmpd : CmpdStatus; + hasAdj : Bool ; + compl : Number => Str} ; [AP] = {s1,s2 : Mod => Str ; adv : Str ; isPre : Bool} ; [RS] = {s1,s2 : Agr => Str ; rp : RelPron => Str} ; +oper + leanCN : CN -> CN = \cn -> cn ** { + compl = \\n => [] ; + s = \\n,m => cn.s ! n ! m ++ cn.compl ! n ; + } ; }