mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
=Made changes so that I can have one parameter for Position. Also modified Adjectives according to the unofficial notion of Degree i.e Postive, Comparative and Superative
This commit is contained in:
@@ -5,22 +5,25 @@ concrete AdjectiveCgg of Adjective = CatCgg **
|
||||
|
||||
lin
|
||||
|
||||
PositA a = {s=\\_=> a.s; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep};
|
||||
PositA a = {s=\\_=> a.s; position= a.position; isProper = a.isProper; isPrep = a.isPrep};
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
--AdjOrd : Ord -> AP ; -- warmest
|
||||
AdjOrd ord = {s= \\agr => ord.s!agr ; position1= ord.position1; isProper = False; isPrep = False};
|
||||
AdjOrd ord = {s= \\agr => ord.s!agr ; position= ord.position; isProper = False; isPrep = False};
|
||||
-- UseComparA : A -> AP ; -- warmer
|
||||
UseComparA a ={s =\\_ => a.s ++ BIND ++ "ho" ++ "kukira"; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep};
|
||||
|
||||
-- note: using ho means a little bigger.
|
||||
--UseComparA a ={s =\\_ => a.s ++ BIND ++ "ho" ++ "kukira"; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep};
|
||||
UseComparA a ={s =\\_ => a.s ++ "kukira"; position= a.position; isProper = a.isProper; isPrep = a.isPrep};
|
||||
|
||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||
{-NOTE: AdA is an adjective modifying adverb-}
|
||||
--AdAP : AdA -> AP -> AP ; -- very warm
|
||||
|
||||
AdAP ada ap = case ada.position1 of {
|
||||
Pre => {s = \\agr => ada.s ++ ap.s!agr ; position1= ap.position1; isProper = ap.isProper; isPrep = ap.isPrep};
|
||||
Post => {s = \\agr => ap.s ! agr ++ ada.s; position1= ap.position1; isProper = ap.isProper; isPrep = ap.isPrep}
|
||||
AdAP ada ap = case ada.position of {
|
||||
Pre => {s = \\agr => ada.s ++ ap.s!agr ; position= ap.position; isProper = ap.isProper; isPrep = ap.isPrep};
|
||||
Post => {s = \\agr => ap.s ! agr ++ ada.s; position= ap.position; isProper = ap.isProper; isPrep = ap.isPrep}
|
||||
|
||||
};
|
||||
{-
|
||||
|
||||
@@ -44,7 +44,7 @@ lincat
|
||||
Det = Res.Determiner ; -- determiner phrase e.g. "those seven"
|
||||
Quant = {s : Res.Pronoun; s2 :Res.Agreement => Str; doesAgree : Bool; isPron: Bool} ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||
Num = Res.Numer ; -- number determining element e.g. "seven"
|
||||
AP = {s :Res.Agreement=> Str ; position1 : Res.Position1; isProper : Bool; isPrep: Bool};--Res.AdjectivalPhrase;
|
||||
AP = {s :Res.Agreement=> Str ; position : Res.Position; isProper : Bool; isPrep: Bool};--Res.AdjectivalPhrase;
|
||||
A = Res.Adjective;
|
||||
Comp = Res.Comp; -- complement of copula, such as AP e.g. "very warm"
|
||||
|
||||
@@ -86,7 +86,7 @@ lincat
|
||||
} ;
|
||||
Numeral = {s : Res.CardOrd=>Res.Agreement=> Str ; g : Res.Gender; n: Res.Number} ;
|
||||
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
|
||||
Ord = {s :Res.Agreement=>Str; position1:Res.Position1} ;
|
||||
Ord = {s :Res.Agreement=>Str; position:Res.Position} ;
|
||||
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
|
||||
|
||||
DAP = Res.Determiner ;
|
||||
@@ -94,7 +94,7 @@ lincat
|
||||
Prep = Res.Preposition; -- preposition, or just case e.g. "in"
|
||||
N3 = N2 ** {c3 : Res.Agreement =>Str};
|
||||
VV = Res.Verb ** {inf:Str; whenUsed: Res.VVMood}; --inf is the other verb
|
||||
AdA = {s:Str; position1:Res.Position1};
|
||||
AdA = {s:Str; position:Res.Position};
|
||||
linref
|
||||
|
||||
Cl =\cl -> cl.s ++ Res.mkSubjClitic cl.subjAgr ++ cl.root ++ BIND ++ cl.pres ++ cl.compl;
|
||||
|
||||
@@ -8,7 +8,7 @@ concrete ConjunctionCgg of Conjunction = CatCgg **
|
||||
lincat
|
||||
[NP] = {s1,s2 :Case => Str ; agr : Agreement};
|
||||
[CN] = {s1,s2 : Number => NounState => Str; gender:Gender};
|
||||
[AP] = {s1,s2 : Agreement=> Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||
[AP] = {s1,s2 : Agreement=> Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
[RS] = {s1,s2 : RForm => Str};
|
||||
--[IAdv] = {s1,s2 : Str} ;
|
||||
{-
|
||||
|
||||
@@ -32,9 +32,9 @@ lin
|
||||
--AdjCN ap cn = {s=\\ntype, num=>cn.s!ntype!num ++ ap.s!AgP3 num cn.nc; nc=cn.nc};
|
||||
--AdjCN : AP -> CN -> CN ; -- big house
|
||||
AdjCN ap cn =
|
||||
case <ap.position1, ap.isProper, > of {
|
||||
case <ap.position, ap.isProper, > of {
|
||||
<Pre, True> => {
|
||||
s = \\ num, ns =>ap.s ! AgP3 Sg KI_BI ++ cn.s ! num ! ns ;
|
||||
s = \\ num, ns =>ap.s ! AgP3 num cn.gender ++ cn.s ! num ! ns ;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
};
|
||||
<Post, False> => case ap.isPrep of {
|
||||
@@ -51,11 +51,11 @@ lin
|
||||
};
|
||||
<Pre, False> => {
|
||||
s = \\ num, ns => mkAdjPronIVClitic (AgP3 num cn.gender)
|
||||
++ ap.s ! AgP3 Sg KI_BI ++ (cn.s ! num ! ns) ;
|
||||
++ ap.s ! AgP3 num cn.gender ++ (cn.s ! num ! ns) ;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
};
|
||||
<Post, True> => {
|
||||
s = \\ num, ns => (cn.s ! num ! ns) ++ ap.s ! AgP3 Sg KI_BI;
|
||||
s = \\ num, ns => (cn.s ! num ! ns) ++ ap.s ! AgP3 num cn.gender;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ lin
|
||||
-- quantifier and an optional numeral can be discerned.
|
||||
--DetQuant : Quant -> Num -> Det ; -- these five
|
||||
DetQuant quant num = case quant.isPron of {
|
||||
True => {s=[]; s2 = quant.s2; ntype = Incomplete; num = num.n; pos=PreDeterminer; doesAgree = quant.doesAgree};
|
||||
False => {s= quant.s.s ! Nom; s2 =\\_ =>[]; ntype = Incomplete; num = num.n; pos=PreDeterminer; doesAgree = quant.doesAgree} --
|
||||
True => {s=[]; s2 = quant.s2; ntype = Incomplete; num = num.n; pos=Pre; doesAgree = quant.doesAgree};
|
||||
False => {s= quant.s.s ! Nom; s2 =\\_ =>[]; ntype = Complete; num = num.n; pos=Pre; doesAgree = quant.doesAgree} --
|
||||
};
|
||||
|
||||
--DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
||||
@@ -105,7 +105,7 @@ lin
|
||||
s2 =\\agr => mkThis!agr ++ quant.s2 ! agr ++ ord.s!agr;
|
||||
ntype = Complete;
|
||||
num = num.n;
|
||||
pos = PreDeterminer;
|
||||
pos = Pre;
|
||||
doesAgree = True
|
||||
};
|
||||
|
||||
@@ -122,16 +122,16 @@ lin
|
||||
--NumNumeral : Numeral -> Card ; -- fifty-one
|
||||
NumNumeral numeral = {s=numeral.s!NCard; n=numeral.n};
|
||||
--OrdDigits : Digits -> Ord ; -- 51st
|
||||
OrdDigits dig ={s=dig.s!NOrd ; position1 = Post};
|
||||
OrdDigits dig ={s=dig.s!NOrd ; position = Post};
|
||||
|
||||
--OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
OrdNumeral numeral ={s=numeral.s!NOrd; position1 = Post};
|
||||
OrdNumeral numeral ={s=numeral.s!NOrd; position = Post};
|
||||
--OrdSuperl : A -> Ord ; -- warmest
|
||||
--Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||
OrdSuperl a = {s= \\c => "okukirayo" ++ (mkAdjPronIVClitic c) ++ "obu" ++ BIND ++ a.s; position1 = a.position1} ;--{s= \\c => "okukirayo" ++ (mkAdjPronIVClitic c) ++ a.s ++ ++ BIND ++ "ona"; position1 = a.position1};
|
||||
--Adjective : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
OrdSuperl a = {s= \\c => (mkAdjPronIVClitic c) ++ BIND ++ "kukirayo" ++ "obu" ++ BIND ++ a.s; position= a.position} ;--{s= \\c => "okukirayo" ++ (mkAdjPronIVClitic c) ++ a.s ++ ++ BIND ++ "ona"; position = a.position};
|
||||
-- One can combine a numeral and a superlative.
|
||||
--OrdNumeralSuperl : Numeral -> A -> Ord ; -- third largest
|
||||
OrdNumeralSuperl numeral a = {s= \\c => numeral.s !NOrd !c ++ "omu" ++ "kukirayo" ++ "obu" ++ BIND ++ a.s; position1 = a.position1};
|
||||
OrdNumeralSuperl numeral a = {s= \\c => numeral.s !NOrd !c ++ "omu" ++ "kukirayo" ++ "obu" ++ BIND ++ a.s; position = a.position};
|
||||
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||
AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s; gender=cn.gender; nounCat = cn.nounCat};
|
||||
-- Pronouns have possessive forms. Genitives of other kinds
|
||||
|
||||
@@ -27,7 +27,7 @@ lin
|
||||
Neg => (mkSubjClitic (AgMUBAP2 Pl)) ++ imp.s!ImpNeg
|
||||
}
|
||||
};
|
||||
|
||||
UttImpPol = UttImpPl;
|
||||
--UttAdv : Adv -> Utt ; -- here
|
||||
UttAdv adv = {s= adv.s};
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ param
|
||||
AgrConj = AConj ConjArg;
|
||||
Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number | NONE; --Default is AgP3 Sg KI_BI
|
||||
AgrExist = AgrNo | AgrYes Agreement;
|
||||
Position = PostDeterminer | PreDeterminer ;
|
||||
Position1 = Post | Pre;
|
||||
--Position = PostDeterminer | PreDeterminer ;
|
||||
Position = Post | Pre;
|
||||
Variants = V1|V2;
|
||||
--Functional forms of the regular verb
|
||||
Mood = Infinitive | Imperative | Subjunctive | Perfective;
|
||||
@@ -510,11 +510,11 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
||||
using arne's technique
|
||||
-}
|
||||
--AdjectivalPhrase : Type {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;
|
||||
AdjectivalPhrase : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||
AdjectivalPhrase : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
--Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
||||
Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||
mkAdjective: Str -> Position1 -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep ->
|
||||
{ s = a ; position1 = pos ; isPre = True; isProper = isProper; isPrep = isPrep};
|
||||
Adjective : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
mkAdjective: Str -> Position -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep ->
|
||||
{ s = a ; position = pos ; isPre = True; isProper = isProper; isPrep = isPrep};
|
||||
|
||||
{-
|
||||
TO DO:
|
||||
@@ -1015,7 +1015,15 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
||||
};
|
||||
|
||||
-- type for Determier necessary for catCgg.gf
|
||||
Determiner : Type = {s : Str ; s2: Agreement=>Str; ntype : NounState ; num : Number ; pos : Position; doesAgree: Bool };
|
||||
{-
|
||||
Determiners are of several types:
|
||||
1. Definite and Idefinite Articles
|
||||
2. Dmonstratives
|
||||
3. Quantifiers
|
||||
4. Cardinal numbers
|
||||
6. Ordinal numbers
|
||||
-}
|
||||
Determiner : Type = {s : Str ; s2: Agreement=>Str; ntype : NounState ; num : Number ; pos : Position; doesAgree: Bool};
|
||||
mkDet : Str -> NounState -> Number -> Position -> Determiner
|
||||
= \ det, ns, num,pos ->
|
||||
{
|
||||
@@ -1037,7 +1045,7 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
||||
Pronoun : Type ={s : Case => Str; third:Agreement => Case=>Str; agr:AgrExist} ;
|
||||
{-
|
||||
mkPron : Str -> Str ->Pronoun =\nom,acc, ->
|
||||
{
|
||||
|
||||
s = table {Nom => nom; Acc => acc};
|
||||
agr = a;
|
||||
};
|
||||
|
||||
@@ -15,13 +15,13 @@ concrete StructuralCgg of Structural = CatCgg **
|
||||
|
||||
lin
|
||||
--Determiner : Type = {s : Str ; s2: Agreement=>Str; ntype : NounState ; num : Number ; pos : Position; doesAgree: Bool };
|
||||
a_Det = {s =[] ; s2 = \\_ => []; ntype = Complete; num = Sg; pos = PreDeterminer; doesAgree = False}; --: Det ; indefinite singular ---s
|
||||
aPl_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Pl; pos = PreDeterminer; doesAgree = False}; -- : Det ;indefinite plural ---s
|
||||
the_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Sg; pos = PreDeterminer; doesAgree = False}; --: Det ; -- definite singular ---s thePl_Det = {s =[]; ntype = Complete; num = Pl; pos = PreDeterminer}; --: Det ;definite plural ---s
|
||||
a_Det = {s =[] ; s2 = \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False}; --: Det ; indefinite singular ---s
|
||||
aPl_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Pl; pos = Pre; doesAgree = False}; -- : Det ;indefinite plural ---s
|
||||
the_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False}; --: Det ; -- definite singular ---s thePl_Det = {s =[]; ntype = Complete; num = Pl; pos = PreDeterminer}; --: Det ;definite plural ---s
|
||||
|
||||
every_Det = {s ="buri"; s2 = \\_ => []; ntype=Incomplete; num=Sg; pos=PreDeterminer; doesAgree = False} ;
|
||||
few_Det = {s="kye"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=PostDeterminer; doesAgree = False} ;
|
||||
many_Det ={s="ingi"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=PostDeterminer; doesAgree = False} ;
|
||||
every_Det = {s ="buri"; s2 = \\_ => []; ntype=Incomplete; num=Sg; pos=Pre; doesAgree = False} ;
|
||||
few_Det = {s="kye"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=Post; doesAgree = False} ;
|
||||
many_Det ={s="ingi"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=Post; doesAgree = False} ;
|
||||
|
||||
i_Pron = {s = table{Gen => glueGen (AgMUBAP1 Sg); _=> mkSStand (AgMUBAP1 Sg)}; third = \\_,_=>[]; agr = AgrYes (AgMUBAP1 Sg)};--mkPron "nyowe" "nyowe" (AgMUBAP1 Sg);
|
||||
youSg_Pron = {s = table{Gen => glueGen (AgMUBAP2 Sg); _=>mkSStand (AgMUBAP2 Sg)}; third = \\_,_=>[]; agr = AgrYes(AgMUBAP2 Sg)};--mkPron "iwe" "we" (AgMUBAP2 Sg);
|
||||
@@ -190,7 +190,7 @@ lin
|
||||
s2 =\\agr => mkSubjCliticTableSg ! agr ++ BIND++ "mwe";
|
||||
ntype = Complete;
|
||||
num = Sg;
|
||||
pos = PreDeterminer;
|
||||
pos = Pre;
|
||||
doesAgree = True
|
||||
};
|
||||
somePl_Det =
|
||||
@@ -199,7 +199,7 @@ lin
|
||||
s2 =\\agr => mkSubjCliticTablePl ! agr ++ BIND++ "mwe";
|
||||
ntype = Complete;
|
||||
num = Pl;
|
||||
pos = PreDeterminer;
|
||||
pos = Pre;
|
||||
doesAgree = True
|
||||
};--: Det ;
|
||||
|
||||
@@ -216,11 +216,11 @@ lin
|
||||
that_Subj = ss "ngu" ;
|
||||
|
||||
--Adjective modifying Adverbs
|
||||
almost_AdA = {s="haihi"; position1=Pre}; --: AdA ;
|
||||
almost_AdA = {s="haihi"; position=Pre}; --: AdA ;
|
||||
--quite_Adv ss "kimwe"; --: AdA ; used in the pr
|
||||
so_AdA = {s="munônga"; position1=Post};--: AdA ;
|
||||
too_AdA = {s="munônga"; position1=Post}; --: AdA ;
|
||||
very_AdA = {s="munônga"; position1=Post}; --: AdA ;
|
||||
so_AdA = {s="munônga"; position=Post};--: AdA ;
|
||||
too_AdA = {s="munônga"; position=Post}; --: AdA ;
|
||||
very_AdA = {s="munônga"; position=Post}; --: AdA ;
|
||||
|
||||
please_Voc = ss ", nyabura we"; --: Voc ;
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ lin
|
||||
pres =v3.pres;
|
||||
perf = v3.perf;
|
||||
morphs = v3.morphs;
|
||||
comp = [];
|
||||
comp2 = np.s ! Acc;
|
||||
comp = np.s ! Acc;
|
||||
comp2 = np.s ! Acc; -- what is the meaning of this function?
|
||||
ap = [];
|
||||
isRegular = v3.isRegular;
|
||||
adv = [];
|
||||
|
||||
Reference in New Issue
Block a user