forked from GitHub/gf-rgl
=Finished Implementation of PhraseCgg.gf
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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" ;
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user