mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-13 05:02:50 -06:00
Maltese: new reduced verb implementation, using binding for pronominal suffixes
Also include some syntax stuff adapted from Angelo Zammit's dissertation.
These sections in the code are marked with [AZ]
The old verbs implementation can still be found at this point in the GitHub repo:
7b3f4a049d
This commit is contained in:
@@ -12,22 +12,17 @@ concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {
|
||||
lin
|
||||
-- Det -> CN -> NP
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ++ cn.s ! numnum2nounnum det.n ! NRegular ;
|
||||
s = \\c => det.s ++ cn.s ! numnum2nounnum det.n ;
|
||||
a = case (numnum2nounnum det.n) of {
|
||||
Singular _ => AgP3Sg cn.g ;
|
||||
_ => AgP3Pl
|
||||
}
|
||||
-- s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ;
|
||||
-- a = agrgP3 det.n cn.g
|
||||
Singular _ => mkAgr cn.g Sg P3 ;
|
||||
_ => mkAgr cn.g Pl P3
|
||||
} ;
|
||||
isPron = False ;
|
||||
} ;
|
||||
|
||||
-- Quant -> Num -> Det
|
||||
DetQuant quant num = {
|
||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! NumNominative;
|
||||
-- sp = \\c => case num.hasCard of {
|
||||
-- False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ;
|
||||
-- True => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! npcase2case c
|
||||
-- } ;
|
||||
n = num.n ;
|
||||
hasNum = num.hasCard
|
||||
} ;
|
||||
@@ -35,18 +30,37 @@ concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {
|
||||
-- Quant
|
||||
DefArt = {
|
||||
s = \\hasCard,n => artDef ;
|
||||
-- sp = \\hasCard,n => case <n,hasCard> of {
|
||||
-- <Sg,False> => table { NCase Gen => "its"; _ => "it" } ;
|
||||
-- <Pl,False> => table { NCase Nom => "they"; NPAcc => "them"; NCase Gen => "theirs" } ;
|
||||
-- _ => \\c => artDef
|
||||
-- }
|
||||
} ;
|
||||
IndefArt = {
|
||||
s = \\hasCard,n => artIndef ;
|
||||
} ;
|
||||
|
||||
-- PN -> NP
|
||||
UsePN pn = {
|
||||
s = \\c => pn.s ;
|
||||
a = pn.a ;
|
||||
isPron = False ;
|
||||
} ;
|
||||
|
||||
-- Pron -> NP
|
||||
UsePron p = {
|
||||
-- s = \\npcase => (p.s ! Personal).c1 ;
|
||||
s = table {
|
||||
Nom => (p.s ! Personal).c1 ;
|
||||
CPrep => (p.s ! Suffixed Acc).c1
|
||||
} ;
|
||||
a = p.a ;
|
||||
isPron = True ;
|
||||
} ;
|
||||
|
||||
-- Num
|
||||
NumSg = {s = \\c => []; n = Num_Sg ; hasCard = False} ;
|
||||
NumPl = {s = \\c => []; n = Num_Pl ; hasCard = False} ;
|
||||
|
||||
-- N -> CN
|
||||
UseN n = n ;
|
||||
|
||||
-- N2 -> CN
|
||||
UseN2 n = n ;
|
||||
|
||||
-- Card
|
||||
|
||||
Reference in New Issue
Block a user