forked from GitHub/gf-rgl
Implemented all the remaining lin functions which required a change in the ResCgg.gf. This change may not be needed now as I have not used it
This commit is contained in:
@@ -59,6 +59,8 @@ lin
|
|||||||
|
|
||||||
}; -- big house
|
}; -- big house
|
||||||
|
|
||||||
|
--RelCN : CN -> RS -> CN ; -- house that John bought
|
||||||
|
RelCN cn rs = {s=\\n,ns => cn.s !n ! ns ++ rs.s; gender = cn.gender };
|
||||||
|
|
||||||
{-
|
{-
|
||||||
A predeterminer is any word that modifies a noun Phrase.
|
A predeterminer is any word that modifies a noun Phrase.
|
||||||
@@ -102,9 +104,10 @@ lin
|
|||||||
doesAgree = True
|
doesAgree = True
|
||||||
};
|
};
|
||||||
|
|
||||||
NumSg = {s=[]; n=Sg}; --Num
|
NumSg = {s=\\_=>[]; n=Sg}; --Num
|
||||||
NumPl = {s=[]; n=Pl}; --Num
|
NumPl = {s=\\_=>[]; n=Pl}; --Num
|
||||||
-- NumCard card = {...};
|
--NumCard : Card -> Num ; -- one/five [explicit numeral]
|
||||||
|
NumCard card = {s =\\agr =>card.s ! agr; n=card.n };
|
||||||
--Quant = {s : Res.Pronoun; s2 :Res.Agreement => Str; doesAgree : Bool; isPron: Bool} ;
|
--Quant = {s : Res.Pronoun; s2 :Res.Agreement => Str; doesAgree : Bool; isPron: Bool} ;
|
||||||
IndefArt = {s={s=\\_=>[]; third = \\_,_=>[];agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron=False};
|
IndefArt = {s={s=\\_=>[]; third = \\_,_=>[];agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron=False};
|
||||||
DefArt = {s={s =\\_=>[]; third = \\_,_=>[]; agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron = False}; -- noun with initial vowel
|
DefArt = {s={s =\\_=>[]; third = \\_,_=>[]; agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron = False}; -- noun with initial vowel
|
||||||
@@ -120,7 +123,10 @@ lin
|
|||||||
OrdNumeral numeral ={s=numeral.s!NOrd; position1 = Post};
|
OrdNumeral numeral ={s=numeral.s!NOrd; position1 = Post};
|
||||||
--OrdSuperl : A -> Ord ; -- warmest
|
--OrdSuperl : A -> Ord ; -- warmest
|
||||||
--Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
--Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||||
OrdSuperl a = {s= \\c => a.s ++ "kukira" ++ (mkAdjPronIVClitic c) ++ BIND ++ "ona"; position1 = a.position1};
|
OrdSuperl a = {s= \\c => "okukirayo" ++ a.s ++ (mkAdjPronIVClitic c) ++ BIND ++ "ona"; position1 = a.position1};
|
||||||
|
-- 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};
|
||||||
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||||
AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s; gender=cn.gender};
|
AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s; gender=cn.gender};
|
||||||
-- Pronouns have possessive forms. Genitives of other kinds
|
-- Pronouns have possessive forms. Genitives of other kinds
|
||||||
@@ -196,6 +202,13 @@ SentCN cn sc = {s = \\ n, ns => cn.s!n!ns ++ sc.s; gender = cn.gender};
|
|||||||
Use2N3 n3 = {s = n3.s; gender = n3.gender; c2 = n3.c2};
|
Use2N3 n3 = {s = n3.s; gender = n3.gender; c2 = n3.c2};
|
||||||
--Use3N3 : N3 -> N2 ; -- distance (to Paris)
|
--Use3N3 : N3 -> N2 ; -- distance (to Paris)
|
||||||
Use3N3 n3 = {s = n3.s; gender = n3.gender; c2 = n3.c3};
|
Use3N3 n3 = {s = n3.s; gender = n3.gender; c2 = n3.c3};
|
||||||
|
|
||||||
|
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
|
||||||
|
|
||||||
|
--PossNP : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||||
|
PossNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender};
|
||||||
|
--PartNP : CN -> NP -> CN ; -- glass of wine
|
||||||
|
PartNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender};
|
||||||
{-
|
{-
|
||||||
--1 Noun: Nouns, noun phrases, and determiners
|
--1 Noun: Nouns, noun phrases, and determiners
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ param
|
|||||||
MU | KU | ZERO_BU | ZERO_BI | ZERO_MA |
|
MU | KU | ZERO_BU | ZERO_BI | ZERO_MA |
|
||||||
ZERO_MI | ZERO_TU | ZERO_N | I_ZERO |
|
ZERO_MI | ZERO_TU | ZERO_N | I_ZERO |
|
||||||
RI_ZERO | KU_ZERO | MU_ZERO | RU_ZERO |
|
RI_ZERO | KU_ZERO | MU_ZERO | RU_ZERO |
|
||||||
KA_ZERO |ZERO_BAA | N_ZERO | KI_ZERO;
|
KA_ZERO |ZERO_BAA | N_ZERO | KI_ZERO | Null;
|
||||||
Case = Acc | Nom |Gen; -- we need to include Gen because we shall need it with Gen Pronouns
|
Case = Acc | Nom |Gen; -- we need to include Gen because we shall need it with Gen Pronouns
|
||||||
RCase = RSuj | RObj;
|
RCase = RSubj | RObj;
|
||||||
PersonalPronounType = SubjM | Obj | RelSubj | RelObj |
|
PersonalPronounType = SubjM | Obj | RelSubj | RelObj |
|
||||||
AdjPron2 | -- aAdjectival Prefixes with initial vowel with the semantics of "the" e.g. -- omuntu o-mu-rungi
|
AdjPron2 | -- aAdjectival Prefixes with initial vowel with the semantics of "the" e.g. -- omuntu o-mu-rungi
|
||||||
AdjPron | -- without initial vowel i.e. -- omuntu mu-rungi
|
AdjPron | -- without initial vowel i.e. -- omuntu mu-rungi
|
||||||
@@ -1280,7 +1280,7 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
|||||||
glueGen: Agreement ->Str = \ a -> mkGenPrepNoIVClitic a ++ BIND ++ mkGenAdjSuffix a;
|
glueGen: Agreement ->Str = \ a -> mkGenPrepNoIVClitic a ++ BIND ++ mkGenAdjSuffix a;
|
||||||
|
|
||||||
--Number determining element
|
--Number determining element
|
||||||
Numer : Type = { s: Str ; n : Number};
|
Numer : Type = { s: Agreement => Str ; n : Number};
|
||||||
|
|
||||||
--VPSlash : Type = VerbPhrase ** { c : Str };
|
--VPSlash : Type = VerbPhrase ** { c : Str };
|
||||||
VPSlash : Type = {s:Str; pres:Str; perf:Str; morphs: VMorphs; comp: Str; comp2:Str; isRegular:Bool}; --comp is empty
|
VPSlash : Type = {s:Str; pres:Str; perf:Str; morphs: VMorphs; comp: Str; comp2:Str; isRegular:Bool}; --comp is empty
|
||||||
@@ -1348,4 +1348,12 @@ oper
|
|||||||
isOrdDifferent = isOrdDifferent
|
isOrdDifferent = isOrdDifferent
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
getGender : Agreement -> Gender =\agr ->
|
||||||
|
case agr of {
|
||||||
|
(AgP3 n g) => g;
|
||||||
|
(AgMUBAP1 n) => MU_BA;
|
||||||
|
(AgMUBAP2 n) => MU_BA;
|
||||||
|
NONE => Null
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user