1
0
forked from GitHub/gf-core

Maltese RG: refactor participles, add Idiom.Self* lins

This commit is contained in:
john
2013-12-23 09:16:11 +00:00
parent ba191fb438
commit 60c981d414
7 changed files with 170 additions and 176 deletions

View File

@@ -62,7 +62,7 @@ concrete AdjectiveMlt of Adjective = CatMlt ** open ResMlt, Prelude in {
-- A2 -> AP -- A2 -> AP
-- married to itself -- married to itself
ReflA2 a2 = { ReflA2 a2 = {
s = \\gn => a2.s ! APosit gn ++ a2.c2.s ! Definite ++ reflPron ! (toVAgr gn) ; s = \\gn => a2.s ! APosit gn ++ a2.c2.s ! Definite ++ prep_lil.enclitic ! (toAgr gn) ++ reflPron ! (toVAgr gn) ;
isPre = False isPre = False
} ; } ;

View File

@@ -4,7 +4,7 @@
-- John J. Camilleri 2011 -- 2013 -- John J. Camilleri 2011 -- 2013
-- Licensed under LGPL -- Licensed under LGPL
concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in { concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt, Maybe in {
flags flags
coding=utf8; coding=utf8;
@@ -70,8 +70,8 @@ concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in {
-- be sleeping -- be sleeping
ProgrVP vp = { ProgrVP vp = {
v = CopulaVP.v ; v = CopulaVP.v ;
s2 = \\agr => case vp.v.hasPresPart of { s2 = \\agr => case exists Participle vp.v.presPart of {
True => (vp.v.s ! VPresPart (toGenNum agr)).s1 ; True => (fromJust Participle vp.v.presPart) ! (toGenNum agr) ;
False => (vp.v.s ! VImpf (toVAgr agr)).s1 False => (vp.v.s ! VImpf (toVAgr agr)).s1
} ; } ;
dir = NullAgr ; dir = NullAgr ;
@@ -95,4 +95,21 @@ concrete IdiomMlt of Idiom = CatMlt ** open Prelude, ResMlt in {
} }
} ; } ;
-- VP -> VP
-- is at home himself
SelfAdvVP vp = insertObj (\\agr => reflPron ! (toVAgr agr)) vp ;
-- VP -> VP
-- is himself at home
SelfAdVVP vp = insertObjPre (\\agr => reflPron ! (toVAgr agr)) vp ;
-- NP -> NP
-- the president himself (is at home)
SelfNP np = {
s = \\c => np.s ! c ++ "stess" ;
a = np.a ;
isPron = np.isPron ;
isDefn = np.isDefn ;
} ;
} }

View File

@@ -659,9 +659,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
conjFormII_quad : VerbInfo -> (VForm => Str) = \i -> conjFormII_quad : VerbInfo -> (VForm => Str) = \i ->
@@ -746,9 +744,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
{- ~~~ Form III verbs ~~~ -} {- ~~~ Form III verbs ~~~ -}
@@ -788,9 +784,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
{- ~~~ Form VII and VIII verbs ~~~ -} {- ~~~ Form VII and VIII verbs ~~~ -}
@@ -859,9 +853,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
{- ~~~ Form IX verbs ~~~ -} {- ~~~ Form IX verbs ~~~ -}
@@ -895,9 +887,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
{- ~~~ Form X verbs ~~~ -} {- ~~~ Form X verbs ~~~ -}
@@ -989,9 +979,7 @@ resource MorphoMlt = ResMlt ** open Prelude in {
in table { in table {
VPerf agr => perf ! agr ; VPerf agr => perf ! agr ;
VImpf agr => impf ! agr ; VImpf agr => impf ! agr ;
VImp num => imp ! num ; VImp num => imp ! num
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
} }

View File

@@ -5,7 +5,7 @@
-- Angelo Zammit 2012 -- Angelo Zammit 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in { concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude, Maybe in {
flags flags
optimize=noexpand ; optimize=noexpand ;
@@ -161,8 +161,8 @@ concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {
-- NP -> V2 -> NP -- NP -> V2 -> NP
-- the man seen -- the man seen
PPartNP np v2 = case v2.hasPastPart of { PPartNP np v2 = case exists Participle v2.pastPart of {
True => overwriteNPs np (\\c => np.s ! c ++ (v2.s ! VPastPart (toGenNum np.a)).s1) ; -- raġel rieqed True => overwriteNPs np (\\c => np.s ! c ++ (fromJust Participle v2.pastPart ! (toGenNum np.a))) ; -- raġel rieqed
False => overwriteNPs np (\\c => np.s ! c ++ (v2.s ! VImpf (toVAgr np.a)).s1) -- mara tisma' False => overwriteNPs np (\\c => np.s ! c ++ (v2.s ! VImpf (toVAgr np.a)).s1) -- mara tisma'
} ; } ;

View File

@@ -8,11 +8,8 @@
--# -path=.:../abstract:../../prelude:../common --# -path=.:../abstract:../../prelude:../common
resource ParadigmsMlt = open resource ParadigmsMlt = open
Predef, Predef, Prelude, Maybe,
Prelude, MorphoMlt, ResMlt, CatMlt
MorphoMlt,
ResMlt,
CatMlt
in { in {
flags flags
@@ -579,16 +576,14 @@ resource ParadigmsMlt = open
VImpf (AgP2 Pl) => impfP2Pl ; VImpf (AgP2 Pl) => impfP2Pl ;
VImpf (AgP3Pl) => impfP3Pl ; VImpf (AgP3Pl) => impfP3Pl ;
VImp (Pl) => impSg ; VImp (Pl) => impSg ;
VImp (Sg) => impPl ; VImp (Sg) => impPl
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo class form root vseq impSg ; info : VerbInfo = mkVerbInfo class form root vseq impSg ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
} ; --end of mkV overload } ; --end of mkV overload
@@ -636,8 +631,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormII newinfo) ; s = stemVariantsTbl (conjFormII newinfo) ;
i = newinfo ; i = newinfo ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- Make a Quadri-Consonantal Form II verb -- Make a Quadri-Consonantal Form II verb
@@ -651,8 +646,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormII_quad newinfo) ; s = stemVariantsTbl (conjFormII_quad newinfo) ;
i = newinfo ; i = newinfo ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
derivedV_QuadII : Str -> Str -> Root -> V = \mammaII, imp, root -> derivedV_QuadII : Str -> Str -> Root -> V = \mammaII, imp, root ->
let let
@@ -662,8 +657,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormII_quad newinfo) ; s = stemVariantsTbl (conjFormII_quad newinfo) ;
i = newinfo ; i = newinfo ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
} ; } ;
@@ -677,8 +672,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormIII info) ; s = stemVariantsTbl (conjFormIII info) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- No point having a paradigm for Form IV -- No point having a paradigm for Form IV
@@ -702,15 +697,13 @@ resource ParadigmsMlt = open
VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (get (VImpf (AgP1 Pl))))) ; VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (get (VImpf (AgP1 Pl))))) ;
VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (get (VImpf (AgP2 Pl))))) ; VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (get (VImpf (AgP2 Pl))))) ;
VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (get (VImpf (AgP3Pl))))) ; VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (get (VImpf (AgP3Pl))))) ;
VImp num => pfx_T (get (VImp num)) ; VImp num => pfx_T (get (VImp num))
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
in lin V { in lin V {
s = stemVariantsTbl (tbl) ; s = stemVariantsTbl (tbl) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- Make a Form VI verb -- Make a Form VI verb
@@ -731,15 +724,13 @@ resource ParadigmsMlt = open
VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (get (VImpf (AgP1 Pl))))) ; VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (get (VImpf (AgP1 Pl))))) ;
VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (get (VImpf (AgP2 Pl))))) ; VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (get (VImpf (AgP2 Pl))))) ;
VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (get (VImpf (AgP3Pl))))) ; VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (get (VImpf (AgP3Pl))))) ;
VImp num => pfx_T (get (VImp num)) ; VImp num => pfx_T (get (VImp num))
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
in lin V { in lin V {
s = stemVariantsTbl (tbl) ; s = stemVariantsTbl (tbl) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- Make a Form VII verb -- Make a Form VII verb
@@ -760,8 +751,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormVII info c1) ; s = stemVariantsTbl (conjFormVII info c1) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- Make a Form VIII verb -- Make a Form VIII verb
@@ -776,8 +767,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormVII info c1) ; -- note we use conjFormVII ! s = stemVariantsTbl (conjFormVII info c1) ; -- note we use conjFormVII !
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
-- Make a Form IX verb -- Make a Form IX verb
@@ -793,8 +784,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormIX info) ; s = stemVariantsTbl (conjFormIX info) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
_ => Predef.error("I don't know how to make a Form IX verb out of" ++ mammaIX) _ => Predef.error("I don't know how to make a Form IX verb out of" ++ mammaIX)
} ; } ;
@@ -809,8 +800,8 @@ resource ParadigmsMlt = open
in lin V { in lin V {
s = stemVariantsTbl (conjFormX info) ; s = stemVariantsTbl (conjFormX info) ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Strong Verb ~~~ -} {- ~~~ Strong Verb ~~~ -}
@@ -840,16 +831,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjStrongPerf root vseq ) ! agr ; VPerf agr => ( conjStrongPerf root vseq ) ! agr ;
VImpf agr => ( conjStrongImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjStrongImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Strong Regular) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Strong Regular) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
@@ -884,16 +873,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjLiquidMedialPerf root vseq ) ! agr ; VPerf agr => ( conjLiquidMedialPerf root vseq ) ! agr ;
VImpf agr => ( conjLiquidMedialImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjLiquidMedialImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Strong LiquidMedial) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Strong LiquidMedial) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Geminated Verb ~~~ -} {- ~~~ Geminated Verb ~~~ -}
@@ -923,16 +910,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjGeminatedPerf root vseq ) ! agr ; VPerf agr => ( conjGeminatedPerf root vseq ) ! agr ;
VImpf agr => ( conjGeminatedImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjGeminatedImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Strong Geminated) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Strong Geminated) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Assimilative Verb ~~~ -} {- ~~~ Assimilative Verb ~~~ -}
@@ -962,16 +947,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjAssimilativePerf root vseq ) ! agr ; VPerf agr => ( conjAssimilativePerf root vseq ) ! agr ;
VImpf agr => ( conjAssimilativeImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjAssimilativeImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Weak Assimilative) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Weak Assimilative) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Hollow Verb ~~~ -} {- ~~~ Hollow Verb ~~~ -}
@@ -1001,16 +984,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjHollowPerf root vseq ) ! agr ; VPerf agr => ( conjHollowPerf root vseq ) ! agr ;
VImpf agr => ( conjHollowImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjHollowImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Weak Hollow) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Weak Hollow) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Lacking Verb ~~~ -} {- ~~~ Lacking Verb ~~~ -}
@@ -1044,16 +1025,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjLackingPerf root vseq ) ! agr ; VPerf agr => ( conjLackingPerf root vseq ) ! agr ;
VImpf agr => ( conjLackingImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjLackingImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Weak Lacking) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Weak Lacking) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Defective Verb ~~~ -} {- ~~~ Defective Verb ~~~ -}
@@ -1083,16 +1062,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjDefectivePerf root vseq ) ! agr ; VPerf agr => ( conjDefectivePerf root vseq ) ! agr ;
VImpf agr => ( conjDefectiveImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjDefectiveImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Weak Defective) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Weak Defective) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Quadriliteral Verb (Strong) ~~~ -} {- ~~~ Quadriliteral Verb (Strong) ~~~ -}
@@ -1122,16 +1099,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjQuadPerf root vseq ) ! agr ; VPerf agr => ( conjQuadPerf root vseq ) ! agr ;
VImpf agr => ( conjQuadImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjQuadImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Quad QStrong) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Quad QStrong) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Quadriliteral Verb (Weak Final) ~~~ -} {- ~~~ Quadriliteral Verb (Weak Final) ~~~ -}
@@ -1164,16 +1139,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjQuadWeakPerf root vseq (imp ! Sg) ) ! agr ; VPerf agr => ( conjQuadWeakPerf root vseq (imp ! Sg) ) ! agr ;
VImpf agr => ( conjQuadWeakImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjQuadWeakImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Quad QWeak) (FormI) root vseq (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Quad QWeak) (FormI) root vseq (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- ~~~ Irregular verbs ~~~ -} {- ~~~ Irregular verbs ~~~ -}
@@ -1191,16 +1164,14 @@ resource ParadigmsMlt = open
tbl : (VForm => Str) = table { tbl : (VForm => Str) = table {
VPerf agr => ( conjLoanPerf mamma ) ! agr ; VPerf agr => ( conjLoanPerf mamma ) ! agr ;
VImpf agr => ( conjLoanImpf (imp ! Sg) (imp ! Pl) ) ! agr ; VImpf agr => ( conjLoanImpf (imp ! Sg) (imp ! Pl) ) ! agr ;
VImp n => imp ! n ; VImp n => imp ! n
VPresPart _ => nonExist ;
VPastPart _ => nonExist
} ; } ;
info : VerbInfo = mkVerbInfo (Loan) (FormI) (imp ! Sg) ; info : VerbInfo = mkVerbInfo (Loan) (FormI) (imp ! Sg) ;
in lin V { in lin V {
s = stemVariantsTbl tbl ; s = stemVariantsTbl tbl ;
i = info ; i = info ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
{- Verb --------------------------------------------------------------- -} {- Verb --------------------------------------------------------------- -}
@@ -1226,27 +1197,25 @@ resource ParadigmsMlt = open
_ => hiereg+"in" _ => hiereg+"in"
} ; } ;
in lin V { in lin V {
s = \\vform => case vform of { s = v.s ;
VPresPart (GSg Masc) => mkVerbStems m ; i = v.i ;
VPresPart (GSg Fem) => mkVerbStems f ; presPart = Just Participle (table {
VPresPart (GPl) => mkVerbStems p ; GSg Masc => m ;
x => v.s ! x GSg Fem => f ;
} ; GPl => p
i = v.i ; }) ;
hasPresPart = True ; pastPart = v.pastPart ;
hasPastPart = v.hasPastPart ;
} ; } ;
presPartV : Str -> Str -> Str -> V -> V = \hiereg,hierga,hiergin,v -> lin V { presPartV : Str -> Str -> Str -> V -> V = \hiereg,hierga,hiergin,v -> lin V {
s = \\vform => case vform of { s = v.s ;
VPresPart (GSg Masc) => mkVerbStems hiereg ;
VPresPart (GSg Fem) => mkVerbStems hierga ;
VPresPart (GPl) => mkVerbStems hiergin ;
x => v.s ! x
} ;
i = v.i ; i = v.i ;
hasPresPart = True ; presPart = Just Participle (table {
hasPastPart = v.hasPastPart ; GSg Masc => hiereg ;
GSg Fem => hierga ;
GPl => hiergin
}) ;
pastPart = v.pastPart ;
} ; } ;
} ; } ;
@@ -1271,27 +1240,25 @@ resource ParadigmsMlt = open
_ => miktub+"in" _ => miktub+"in"
} ; } ;
in lin V { in lin V {
s = \\vform => case vform of { s = v.s ;
VPastPart (GSg Masc) => mkVerbStems m ; i = v.i ;
VPastPart (GSg Fem) => mkVerbStems f ; presPart = v.presPart ;
VPastPart (GPl) => mkVerbStems p ; pastPart = Just Participle (table {
x => v.s ! x GSg Masc => m ;
} ; GSg Fem => f ;
i = v.i ; GPl => p
hasPresPart = v.hasPresPart ; }) ;
hasPastPart = True ;
} ; } ;
pastPartV : Str -> Str -> Str -> V -> V = \miktub,miktuba,miktubin,v -> lin V { pastPartV : Str -> Str -> Str -> V -> V = \miktub,miktuba,miktubin,v -> lin V {
s = \\vform => case vform of { s = v.s ;
VPastPart (GSg Masc) => mkVerbStems miktub ;
VPastPart (GSg Fem) => mkVerbStems miktuba ;
VPastPart (GPl) => mkVerbStems miktubin ;
x => v.s ! x
} ;
i = v.i ; i = v.i ;
hasPresPart = v.hasPresPart ; presPart = v.presPart ;
hasPastPart = True ; pastPart = Just Participle (table {
GSg Masc => miktub ;
GSg Fem => miktuba ;
GPl => miktubin
}) ;
} ; } ;
} ; } ;

View File

@@ -393,6 +393,24 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
joinsVerb = False ; joinsVerb = False ;
} ; } ;
prep_lil : Preposition = {
s = table {
Indefinite => "lil" ;
Definite => makePreFull "lill-" "lil" "lil"
} ;
enclitic : Agr => Str = \\agr => case toVAgr agr of {
AgP1 Sg => "lili" ;
AgP2 Sg => "lilek" ;
AgP3Sg Masc => "lilu" ;
AgP3Sg Fem => "lilha" ;
AgP1 Pl => "lilna" ;
AgP2 Pl => "lilkom" ;
AgP2Pl => "lilhom"
} ;
takesDet = True ;
joinsVerb = True ;
} ;
{- Pronoun -------------------------------------------------------------- -} {- Pronoun -------------------------------------------------------------- -}
oper oper
@@ -522,17 +540,20 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
\\vf => case vf of { \\vf => case vf of {
VPerf _ => stemVariantsPerf (tbl ! vf) ; VPerf _ => stemVariantsPerf (tbl ! vf) ;
VImpf _ => stemVariantsImpf (tbl ! vf) ; VImpf _ => stemVariantsImpf (tbl ! vf) ;
VImp _ => stemVariantsImpf (tbl ! vf) ; VImp _ => stemVariantsImpf (tbl ! vf)
_ => mkVerbStems (tbl ! vf)
} ; } ;
Verb : Type = { Verb : Type = {
s : VForm => VerbStems ; --- need to store different "stems" already at verb level (ġera/ġerie/ġeri) s : VForm => VerbStems ; --- need to store different "stems" already at verb level (ġera/ġerie/ġeri)
i : VerbInfo ; i : VerbInfo ;
hasPresPart : Bool ; presPart : Maybe Participle ;
hasPastPart : Bool ; pastPart : Maybe Participle ;
} ; } ;
Participle : Type = GenNum => Str ;
noParticiple : Maybe Participle = Nothing Participle (\\_ => nonExist) ;
VerbInfo : Type = { VerbInfo : Type = {
class : VClass ; class : VClass ;
form : VDerivedForm ; form : VDerivedForm ;
@@ -542,13 +563,10 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
} ; } ;
param param
-- Possible verb forms (tense + person)
VForm = VForm =
VPerf VAgr -- Perfect tense in all pronoun cases VPerf VAgr -- Perfect tense in all pronoun cases
| VImpf VAgr -- Imperfect tense in all pronoun cases | VImpf VAgr -- Imperfect tense in all pronoun cases
| VImp Number -- Imperative is always P2, Sg & Pl | VImp Number -- Imperative is always P2, Sg & Pl
| VPresPart GenNum -- Present/active particible, e.g. RIEQED
| VPastPart GenNum -- Passive/past particible, e.g. MAĦBUB
; ;
VDerivedForm = VDerivedForm =
@@ -778,11 +796,12 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
} ; } ;
VerbPhrase : Type = { VerbPhrase : Type = {
v : { v : Verb ;
s : VForm => VerbStems ; -- v : {
hasPresPart : Bool ; -- s : VForm => VerbStems ;
hasPastPart : Bool ; -- presPart : Maybe Participle ;
} ; -- pastPart : Maybe Participle ;
-- } ;
s2 : Agr => Str ; -- complement s2 : Agr => Str ; -- complement
dir : Maybe Agr ; -- direct object clitic dir : Maybe Agr ; -- direct object clitic
ind : Maybe Agr ; -- indirect object clitic ind : Maybe Agr ; -- indirect object clitic
@@ -866,9 +885,7 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
<VImpf (AgP2 Pl), Neg> => "tkunux" ; <VImpf (AgP2 Pl), Neg> => "tkunux" ;
<VImpf (AgP3Pl), Neg> => "jkunux" ; <VImpf (AgP3Pl), Neg> => "jkunux" ;
<VImp (Sg), Neg> => "kunx" ; <VImp (Sg), Neg> => "kunx" ;
<VImp (Pl), Neg> => "kunux" ; <VImp (Pl), Neg> => "kunux"
<VPresPart gn, _> => nonExist ;
<VPastPart gn, _> => nonExist
} }
} ; } ;
@@ -908,13 +925,11 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
VImpf (AgP2 Pl) => mkVerbStems [] "m'intom" ; VImpf (AgP2 Pl) => mkVerbStems [] "m'intom" ;
VImpf (AgP3Pl) => mkVerbStems "huma" "m'humie" ; VImpf (AgP3Pl) => mkVerbStems "huma" "m'humie" ;
VImp (Sg) => mkVerbStems "kun" ; VImp (Sg) => mkVerbStems "kun" ;
VImp (Pl) => mkVerbStems "kunu" ; VImp (Pl) => mkVerbStems "kunu"
VPresPart gn => mkVerbStems nonExist ;
VPastPart gn => mkVerbStems nonExist
} ; } ;
i = mkVerbInfo Irregular FormI ; i = mkVerbInfo Irregular FormI ;
hasPresPart = False ; presPart = noParticiple ;
hasPastPart = False ; pastPart = noParticiple ;
} ; } ;
s2 = \\agr => [] ; s2 = \\agr => [] ;
dir = NullAgr ; dir = NullAgr ;
@@ -949,13 +964,20 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
} ; } ;
reflPron : VAgr => Str = table { reflPron : VAgr => Str = table {
AgP1 Sg => "lili nnifsi" ; -- AgP1 Sg => "lili nnifsi" ;
AgP2 Sg => "lilek innifsek" ; -- AgP2 Sg => "lilek innifsek" ;
AgP3Sg Masc => "lilu nnifsu" ; -- AgP3Sg Masc => "lilu nnifsu" ;
AgP3Sg Fem => "lila nnifisha" ; -- AgP3Sg Fem => "lila nnifisha" ;
AgP1 Pl => "lilna nfusna" ; -- AgP1 Pl => "lilna nfusna" ;
AgP2 Pl => "lilkom infuskom" ; -- AgP2 Pl => "lilkom infuskom" ;
AgP3Pl => "lilhom infushom" -- AgP3Pl => "lilhom infushom"
AgP1 Sg => "nnifsi" ;
AgP2 Sg => "innifsek" ;
AgP3Sg Masc => "nnifsu" ;
AgP3Sg Fem => "nnifisha" ;
AgP1 Pl => "nfusna" ;
AgP2 Pl => "infuskom" ;
AgP3Pl => "infushom"
} ; } ;
huwa : VAgr => Str = table { huwa : VAgr => Str = table {

View File

@@ -5,7 +5,7 @@
-- Angelo Zammit 2012 -- Angelo Zammit 2012
-- Licensed under LGPL -- Licensed under LGPL
concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt in { concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt, Maybe in {
flags optimize=all_subs ; flags optimize=all_subs ;
lin lin
@@ -136,12 +136,12 @@ concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt in {
-- VPSlash -> VP -- VPSlash -> VP
-- love himself -- love himself
ReflVP vpslash = insertObjPre (\\agr => vpslash.s2 ! agr ++ reflPron ! toVAgr agr) vpslash ; ReflVP vpslash = insertObjPre (\\agr => vpslash.s2 ! agr ++ prep_lil.enclitic ! agr ++ reflPron ! toVAgr agr) vpslash ;
-- V2 -> VP -- V2 -> VP
-- be loved -- be loved
PassV2 v2 = case v2.hasPastPart of { PassV2 v2 = case exists Participle v2.pastPart of {
True => insertObj (\\agr => (v2.s ! VPastPart (toGenNum agr)).s1 ++ v2.c2.s ! Definite) CopulaVP ; True => insertObj (\\agr => (fromJust Participle v2.pastPart ! (toGenNum agr)) ++ v2.c2.s ! Definite) CopulaVP ;
False => insertObj (\\agr => (v2.s ! VPerf (toVAgr agr)).s1 ++ v2.c2.s ! Definite) CopulaVP False => insertObj (\\agr => (v2.s ! VPerf (toVAgr agr)).s1 ++ v2.c2.s ! Definite) CopulaVP
} ; } ;