forked from GitHub/gf-rgl
new gender
This commit is contained in:
@@ -21,7 +21,7 @@ incomplete concrete AdjectiveBantu of Adjective =
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\g,n => a.s !AComp g n ++ a.c2 ++ np.s ! NPAcc;
|
s = \\g,n => a.s !AComp g n ++ a.c2 ++ np.s ! NCase Nom;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
ReflA2 a ={
|
ReflA2 a ={
|
||||||
|
|||||||
@@ -13,9 +13,8 @@ incomplete concrete AdverbBantu of Adverb =
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PrepNP prep np = let agr = complAgr np.a
|
PrepNP prep np = let agr = complAgr np.a
|
||||||
in {s = prep.s!agr.n!agr.g ++ (np.s ! NPAcc) } ; --s = preOrPost prep.isPre prep.s (np.s ! NPAcc)
|
in {s = prep.s!agr.n!agr.g ++ (np.s ! NCase Loc ) } ;
|
||||||
|
AdAdv = cc2 ;
|
||||||
AdAdv = cc2 ;
|
|
||||||
PositAdAAdj a = {s = a.s !AAdj G1 Sg } ;
|
PositAdAAdj a = {s = a.s !AAdj G1 Sg } ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ resource CommonBantu = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
Case = Nom | Loc ;
|
Case = Nom | Loc ;
|
||||||
NPCase = NCase Case | NPAcc | NPNomPoss ;
|
NPCase = NCase Case | NPoss ;
|
||||||
CardOrd = NCard | NOrd ;
|
CardOrd = NCard | NOrd ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
interface DiffBantu = open CommonBantu, Prelude in {
|
interface DiffBantu = open CommonBantu, Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
-- HL: everything depending on Gender is not common, so it must not
|
|
||||||
-- be in CommonBantu, but here in DiffBantu.
|
|
||||||
oper
|
oper
|
||||||
Gender : PType ;
|
Gender : PType ;
|
||||||
firstGender : Gender ; -- G1
|
firstGender : Gender ;
|
||||||
secondGender : Gender ; -- G2
|
secondGender : Gender ; -- G2
|
||||||
|
|
||||||
Noun : Type = {s : Number => Case => Str ; g : Gender};
|
Noun : Type = {s : Number => Case => Str ; g : Gender};
|
||||||
@@ -38,7 +37,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> case a of {
|
verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> case a of {
|
||||||
Ag g n p => {g = g ; n = n ; p = p}
|
Ag g n p => {g = g ; n = n ; p = p}
|
||||||
} ; -- verbAgr = agrFeatures, why both? HL
|
} ; --
|
||||||
|
|
||||||
detAgr : Agr -> {g : Gender ; p : Person} = \a -> case a of {
|
detAgr : Agr -> {g : Gender ; p : Person} = \a -> case a of {
|
||||||
Ag g _ p => {g = g; p = p}
|
Ag g _ p => {g = g; p = p}
|
||||||
@@ -70,7 +69,6 @@ param
|
|||||||
PronForm= Pers | Poss Number Gender;
|
PronForm= Pers | Poss Number Gender;
|
||||||
DetForm = Sub | Obj Gender ;
|
DetForm = Sub | Obj Gender ;
|
||||||
|
|
||||||
-- HL: the above is material removed from CommonBantu and adapted --
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
conjThan : Str ; --one of them in bantu
|
conjThan : Str ; --one of them in bantu
|
||||||
@@ -84,8 +82,8 @@ param
|
|||||||
DForm ;
|
DForm ;
|
||||||
AForm;
|
AForm;
|
||||||
oper
|
oper
|
||||||
ProunSgprefix : Gender -> Str ; -- added, HL
|
ProunSgprefix : Gender -> Str ;
|
||||||
ProunPlprefix : Gender -> Str ; -- added, HL
|
ProunPlprefix : Gender -> Str ;
|
||||||
Cardoneprefix : Gender -> Str;
|
Cardoneprefix : Gender -> Str;
|
||||||
Cardtwoprefix : Gender -> Str;
|
Cardtwoprefix : Gender -> Str;
|
||||||
Allpredetprefix : Gender -> Str;
|
Allpredetprefix : Gender -> Str;
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ lin
|
|||||||
n=agr.n; g=agr.g
|
n=agr.n; g=agr.g
|
||||||
in {s = table {
|
in {s = table {
|
||||||
NCase c => pron.s!Pers ;
|
NCase c => pron.s!Pers ;
|
||||||
NPAcc => pron.s!Pers ;
|
NPoss => pron.s!Poss n g };
|
||||||
NPNomPoss => pron.s!Poss n g };
|
|
||||||
a = Ag agr.g agr.n agr.p;
|
a = Ag agr.g agr.n agr.p;
|
||||||
} ;
|
} ;
|
||||||
-- Predet -> NP -> NP
|
-- Predet -> NP -> NP
|
||||||
@@ -141,11 +140,11 @@ lin
|
|||||||
-- PossNP : CN -> NP -> CN
|
-- PossNP : CN -> NP -> CN
|
||||||
-- e.g. 'house of Paris', 'house of mine'
|
-- e.g. 'house of Paris', 'house of mine'
|
||||||
PossNP cn np =let agr = detAgr np.a in
|
PossNP cn np =let agr = detAgr np.a in
|
||||||
{s = \\n,c => cn.s ! n ! Nom ++ possess_Prep.s! n!cn.g ++ np.s ! NPNomPoss;
|
{s = \\n,c => cn.s ! n ! Nom ++ possess_Prep.s! n!cn.g ++ np.s ! NPoss;
|
||||||
s2 =\\n => []; g = cn.g} ;
|
s2 =\\n => []; g = cn.g} ;
|
||||||
-- PartNP : CN -> NP -> CN
|
-- PartNP : CN -> NP -> CN
|
||||||
-- e.g. 'glass of wine'
|
-- e.g. 'glass of wine'
|
||||||
PartNP cn np = {s = \\n,c => cn.s ! n ! Nom ++ part_Prep.s! n!cn.g ++ np.s ! NPAcc ; s2 =\\n => []; g = cn.g} ;
|
PartNP cn np = {s = \\n,c => cn.s ! n ! Nom ++ part_Prep.s! n!cn.g ++ np.s ! NCase Nom ; s2 =\\n => []; g = cn.g} ;
|
||||||
|
|
||||||
-- CountNP : Det -> NP -> NP
|
-- CountNP : Det -> NP -> NP
|
||||||
-- e.g. 'three of them', 'some of the boys'
|
-- e.g. 'three of them', 'some of the boys'
|
||||||
@@ -162,8 +161,8 @@ lin
|
|||||||
|
|
||||||
DetDAP d = { s=d.s; n=d.n };
|
DetDAP d = { s=d.s; n=d.n };
|
||||||
|
|
||||||
ApposCN cn np = let agr = complAgr np.a in
|
-- ApposCN cn np = let agr = complAgr np.a in
|
||||||
{s = \\n,c => np.s ! NCase Nom --++ possess_Prep.s!n!agr.g
|
-- {s = \\n,c => np.s ! NCase Nom --++ possess_Prep.s!n!agr.g
|
||||||
++ cn.s !n ! Nom ; s2 =\\n => ""; g = cn.g} ;
|
-- ++ cn.s !n ! Nom ; s2 =\\n => ""; g = cn.g} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ oper
|
|||||||
{s : NPCase => Str ; a : Agr} = \i,my,g,n,p ->
|
{s : NPCase => Str ; a : Agr} = \i,my,g,n,p ->
|
||||||
{ s = table {
|
{ s = table {
|
||||||
NCase Nom => i ;
|
NCase Nom => i ;
|
||||||
NPAcc => my ;
|
NCase Loc | NPoss => my -- works for normal genitives, "whose", etc.
|
||||||
NCase Loc | NPNomPoss => my -- works for normal genitives, "whose", etc.
|
|
||||||
} ;
|
} ;
|
||||||
a = Ag g n p ;
|
a = Ag g n p ;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user