1
0
forked from GitHub/gf-rgl

=Finished Implementation of PhraseCgg.gf

This commit is contained in:
David Bamutura
2019-05-19 10:14:10 +02:00
parent 3aef8a9f7e
commit db4126c61f
7 changed files with 41 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ lin
-- The superlative use is covered in $Ord$. -- The superlative use is covered in $Ord$.
--AdjOrd : Ord -> AP ; -- warmest --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 ; position1= ord.position1; isProper = False; isPrep = False};
-- UseComparA : A -> AP ; -- warmer -- UseComparA : A -> AP ; -- warmer
UseComparA a ={s =\\_ => a.s ++ BIND ++ "ho" ++ "kukira"; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep}; UseComparA a ={s =\\_ => a.s ++ BIND ++ "ho" ++ "kukira"; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep};

View File

@@ -75,7 +75,7 @@ lincat
linref linref
Cl =\cl -> cl.s ++ Res.mkSubjClitic cl.subjAgr ++ cl.root ++ BIND ++ cl.pres; Cl =\cl -> cl.s ++ Res.mkSubjClitic cl.subjAgr ++ cl.root ++ BIND ++ cl.pres;
QCl =\qcl -> qcl.s ++ qcl.posibleSubAgr ! (Res.mkAgreement Res.MU_BA Res.P3 Res.Sg) ++ qcl.root ++ BIND ++ qcl.pres; QCl =\qcl -> qcl.s ++ qcl.posibleSubAgr ! (Res.mkAgreement Res.MU_BA Res.P3 Res.Sg) ++ qcl.root ++ BIND ++ qcl.pres;
VP =\vp -> vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2; VP =\vp -> vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap;
VPSlash =\vpslash -> vpslash.s ++ BIND ++ vpslash.pres; VPSlash =\vpslash -> vpslash.s ++ BIND ++ vpslash.pres;

View File

@@ -149,7 +149,7 @@ lin
distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place? distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place?
alas_Interj ={s="ninkasharwe"}; --: Interj ;
oper oper
aboutP = mkPrep "about" ; aboutP = mkPrep "about" ;

View File

@@ -126,7 +126,7 @@ 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 => "okukirayo" ++ a.s ++ (mkAdjPronIVClitic c) ++ BIND ++ "ona"; position1 = a.position1}; 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};
-- One can combine a numeral and a superlative. -- One can combine a numeral and a superlative.
--OrdNumeralSuperl : Numeral -> A -> Ord ; -- third largest --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; position1 = a.position1};

View File

@@ -27,6 +27,41 @@ lin
Neg => (mkSubjClitic (AgMUBAP2 Pl)) ++ imp.s!ImpNeg Neg => (mkSubjClitic (AgMUBAP2 Pl)) ++ imp.s!ImpNeg
} }
}; };
--UttAdv : Adv -> Utt ; -- here
UttAdv adv = {s= adv.s};
--can be improved upon
UttVP vp = {s = vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap };
UttAP ap = {s=ap.s!(AgP3 Sg KI_BI)};
-- There are also 'one-word utterances'. A typical use of them is
-- as answers to questions.
-- *Note*. This list is incomplete. More categories could be covered.
-- Moreover, in many languages e.g. noun phrases in different cases
-- can be used.
--UttIP : IP -> Utt ; -- who
UttIP ip ={s=ip.s};
--UttIAdv : IAdv -> Utt ; -- why
UttIAdv iAdv = case iAdv.requiresSubjPrefix of {
True => {s= mkSubjClitic (AgP3 Sg MU_BA) ++ iAdv.s};
False => {s= iAdv.s}
};
--UttNP : NP -> Utt ; -- this man
--UttNP np = {s= np.s!Nom};
--UttAdv : Adv -> Utt ; -- here
--UttAdv adv ={s = adv.s};
--UttVP : VP -> Utt ; -- to sleep
--UttCN : CN -> Utt ; -- house
UttCN cn ={s=cn.s!Sg!Complete};
--UttCard : Card -> Utt ; -- five
UttCard card ={s = card.s!(AgP3 Sg MU_BA)};
--UttAP : AP -> Utt ; -- fine
--UttInterj : Interj -> Utt ; -- alas
UttInterj interj =interj;
{- {-
--1 Phrase: Phrases and Utterances --1 Phrase: Phrases and Utterances

View File

@@ -86,7 +86,7 @@ lin
ImpPos => vp.s ++ Predef.BIND ++ vp.morphs!VFInf!RestOfVerb ++ vp.comp; ImpPos => vp.s ++ Predef.BIND ++ vp.morphs!VFInf!RestOfVerb ++ vp.comp;
ImpNeg => case vp.isCompApStem of { -- How do I make the number dynamic use case? ImpNeg => case vp.isCompApStem of { -- How do I make the number dynamic use case?
True =>vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++ True =>vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
vp.morphs!VFInf!RestOfVerb ++ (mkAdjPronNoIVClitic (AgMUBAP2 Sg)) ++ vp.comp; vp.morphs!VFInf!RestOfVerb ++ (mkAdjPronNoIVClitic (AgMUBAP2 Sg)) ++ vp.ap;
False => vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++ False => vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
vp.morphs!VFInf!RestOfVerb ++ vp.comp vp.morphs!VFInf!RestOfVerb ++ vp.comp
} }

View File

@@ -222,7 +222,7 @@ lin
--This function requires the remodelling of VP to accomodate two Verbs. --This function requires the remodelling of VP to accomodate two Verbs.
-- --
-} -}
ComplVV vv vp = let vpPres = vp.s ++ BIND ++ vp.pres; ComplVV vv vp = let vpPres = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres;
in case vv.whenUsed of { in case vv.whenUsed of {
VVPerf => { VVPerf => {
s= vv.s ++ BIND ++ vv.perf ++ vpPres; s= vv.s ++ BIND ++ vv.perf ++ vpPres;