move UseDAP, UseDAPMasc, UseDAPFem to the RGL and implement it for several new languages

This commit is contained in:
krangelov
2021-04-27 18:00:54 +02:00
parent 156e193d47
commit 9d657a6f24
17 changed files with 182 additions and 7 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX)
Pron = ResPol.Pron;
Det = Determiner;
Det, DAP = Determiner;
Predet = {s : AForm => Str; np:NounPhrase; adj:Bool };
-- 'all', 'most' and 'only' belong in Polish to three completly different parts of speach
Quant = {s,sp : AForm => Str};
+16
View File
@@ -21,4 +21,20 @@ lin ProDrop p = {
gn = p.gn ;
} ;
lin
UseDAP = dap2np Neut ;
UseDAPMasc = dap2np (Masc Personal) ;
UseDAPFem = dap2np Fem ;
oper
dap2np : Gender -> DAP -> NP ;
dap2np g dap = lin NP {
nom = dap.sp ! Nom ! g;
voc = dap.sp ! VocP ! g;
dep = \\cc => let c = extract_case ! cc
in dap.sp ! c ! g;
gn = accom_gennum ! <dap.a, g, dap.n>;
p = P3
};
}
+3
View File
@@ -205,4 +205,7 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol, Mor
s= \\n,c=> cn.s!n!c ++ sc.s;
g= cn.g
};
DetDAP d = d ;
}