forked from GitHub/gf-rgl
Correction of all compilation mistatkes
This commit is contained in:
@@ -13,14 +13,13 @@ lincat
|
||||
-}
|
||||
--Temp = {s : Str ; isPres : Bool} ;
|
||||
--cat
|
||||
Imp = {s : Bool => Str} ;
|
||||
|
||||
Imp = {s : Bool => Str} ;
|
||||
QS = {s : Str} ;
|
||||
-- Note: SS is a shorthand for {s:Str}, defined in Prelude.gf
|
||||
-- You must change some of the lincats (e.g., for NP, Det and Pron) so that everything works
|
||||
|
||||
S = SS ; -- declarative sentence e.g. "she lived here"
|
||||
Cl = Res.Clause ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
Cl, QCl = Res.Clause ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
|
||||
V = Res.Verb ; --change to {verb : Str ; comp = []} -- one-place verb e.g. "sleep"
|
||||
VP = Res.VerbPhrase ; -- verb phrase e.g. "is very warm"
|
||||
|
||||
@@ -73,11 +73,11 @@ lin
|
||||
};
|
||||
|
||||
--AdvNP : NP -> Adv -> NP ; -- Paris today
|
||||
AdvNP np adv = {s= table{ Nom => np.s!Nom ++ adv.s; Acc => np.s !Acc ++ adv.s}; agr = np.agr };
|
||||
|
||||
AdvNP np adv = {s= \\c => np.s ! c ++ adv.s; agr = np.agr };
|
||||
--PPartNP : NP -> V2 -> NP ; -- the man seen use the Passive form of the verb see. abantu abarebirwe
|
||||
|
||||
{-What the hell does this mean?-}
|
||||
--ExtAdvNP: NP -> Adv -> NP ; -- boys, such as ..
|
||||
ExtAdvNP np adv = {s= \\c => np.s ! c ++ embedInCommas adv.s; agr = np.agr}; -- how do I do the adverbial clause?
|
||||
-- Determiner: Type = {s:Str; ntype:NounType; num:Number; pos:Position}; -- type for Determier necessary for catCgg.gf
|
||||
{-
|
||||
Need sample quatitifiers in Runynakore. Immediate, Far, Distant. so DetQuant is commented out
|
||||
|
||||
@@ -15,9 +15,9 @@ lin
|
||||
UttNP np = {s= np.s!Acc}; --: NP -> Utt ;
|
||||
UttAdv adv = {s = adv.s}; --: Adv -> Utt ; -- in the house
|
||||
UttImpSg pol imp = {s =
|
||||
case pol.isTrue of {
|
||||
True => imp.s!True;
|
||||
False => (mkSubjClitic (AgMUBAP2 Sg)) ++ imp.s!False
|
||||
case pol.p of {
|
||||
Pos => imp.s!True;
|
||||
Neg => (mkSubjClitic (AgMUBAP2 Sg)) ++ imp.s!False
|
||||
}
|
||||
};--: Pol -> Imp -> Utt ; -- (do not) walk ----s
|
||||
{-
|
||||
|
||||
@@ -442,6 +442,40 @@ oper
|
||||
|
||||
};
|
||||
|
||||
-- TThis is for demonstrative pronouns which can also be use as Quantifiers
|
||||
-- How can it be done without code repeation?
|
||||
mkThisTheseQuantorDem :Agreement -> Str = \a -> case a of {
|
||||
AgMUBAP1 n => mkClitics "ogu" "aba" n;
|
||||
--AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 n => mkClitics "ogu" "aba" n; --probably an error check your grammar book
|
||||
--AgMUBAP2 Pl => "aba" ;
|
||||
AgP3 n MU_BA => mkClitics "ogu" "aba" n;
|
||||
--AgP3 Pl MU_BA => "aba" ;
|
||||
AgP3 Pl ZERO_BU => mkClitic "obu" ;
|
||||
AgP3 Sg BU_MA => mkClitic "bwo" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => mkClitic "bwo" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "byo" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "go";
|
||||
AgP3 (Sg | Pl) HA => mkClitic "ho" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => mkClitic "mwo" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => mkClitic "yo" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "ryo" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "ko" ;
|
||||
AgP3 Sg KI_BI => mkClitic "kyo" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "kwo" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "gwo" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "rwo" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "two" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "yo" ;
|
||||
AgP3 Pl ZERO_MI =>mkClitic "yo" ;
|
||||
AgP3 Pl MU_MI => mkClitic "yo";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "zo" ;
|
||||
AgP3 Sg GU_GA => mkClitic "gwo" ;
|
||||
AgP3 Pl GU_GA => mkClitic "go" ;
|
||||
_ => mkClitic "XXXThis_That" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
|
||||
-- Adjectival Prefixes without initial vowel with the semantics for adjectives used in Imperative negative form
|
||||
mkAdjPronNoIVClitic : Agreement -> Str = \a -> case a of {
|
||||
AgMUBAP1 n => mkClitics "mu" "ba" n;
|
||||
@@ -768,9 +802,26 @@ oper
|
||||
VPSlash : Type = {s:Str; morphs: VMorphs; comp: Str};
|
||||
|
||||
|
||||
Clause : Type = {
|
||||
s : Tense => Anteriority => Polarity => Str
|
||||
} ;
|
||||
{-
|
||||
-- Clause is a combination of a Subject, Verb and Object(s)
|
||||
-- i.e. Subj, verb with polarity and temp features and verb complement
|
||||
-- which is the Objects, NPs PPs APs etc.
|
||||
-}
|
||||
Clause : Type = { -- word order is fixed in S and QS
|
||||
subj : Str ;
|
||||
subjAgr : Agreement;
|
||||
root : Str;
|
||||
morphs : VFormMini => VerbMorphPos =>Str;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl : Str -- after verb: complement, adverbs
|
||||
} ;
|
||||
Comp : Type = {s:Str};
|
||||
|
||||
|
||||
|
||||
@@ -13,23 +13,23 @@ lin
|
||||
UseCl temp pol cl = let
|
||||
subj = cl.subj;
|
||||
clitic = mkSubjClitic cl.subjAgr;
|
||||
simul = cl.morphs ! Pres; --this is not delivering the string
|
||||
ant = cl.morphs ! PastPart; --this is not delivering the string
|
||||
simul = cl.morphs ! VFPres; --this is not delivering the string
|
||||
ant = cl.morphs ! VFPastPart; --this is not delivering the string
|
||||
root = cl.root;
|
||||
presRestOfVerb = cl.morphs ! Pres ! RestOfVerb;
|
||||
pastRestOfVerb = cl.morphs ! PastPart ! RestOfVerb;
|
||||
presRestOfVerb = cl.morphs ! VFPres ! RestOfVerb;
|
||||
pastRestOfVerb = cl.morphs ! VFPastPart ! RestOfVerb;
|
||||
|
||||
compl = cl.compl
|
||||
in
|
||||
case <temp.isPres, pol.isTrue> of {
|
||||
<True, True> => {s = subj ++ clitic ++ --Predef.BIND ++
|
||||
case <temp.a, pol.p> of {
|
||||
<Simul, Pos> => {s = subj ++ clitic ++ --Predef.BIND ++
|
||||
root ++ Predef.BIND ++ presRestOfVerb ++ compl};
|
||||
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
|
||||
<True, False> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
||||
<Simul, Neg> => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
||||
root ++ presRestOfVerb ++ compl};
|
||||
<False, True> => {s = subj ++ clitic ++ --Predef.BIND ++
|
||||
<Anter, Pos> => {s = subj ++ clitic ++ --Predef.BIND ++
|
||||
ant!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl};
|
||||
<False, False> =>{s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
||||
<Anter, Neg> =>{s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ --Predef.BIND ++
|
||||
ant!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||
}; --: Temp -> Pol -> QCl -> QS ; -- has John walked
|
||||
|
||||
@@ -74,12 +74,12 @@ PredVP np vp = case vp.isCompApStem of{
|
||||
-}
|
||||
ImpVP vp = {
|
||||
s =table{
|
||||
True=> vp.s ++ Predef.BIND ++ vp.morphs!Inf!RestOfVerb ++ vp.comp;
|
||||
True=> vp.s ++ Predef.BIND ++ vp.morphs!VFInf!RestOfVerb ++ vp.comp;
|
||||
False => case vp.isCompApStem of { -- How do I make the number dynamic use case?
|
||||
True =>vp.morphs!Pres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
|
||||
vp.morphs!Inf!RestOfVerb ++ (mkAdjPronNoIVClitic (AgMUBAP2 Sg)) ++ vp.comp;
|
||||
False => vp.morphs!Pres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
|
||||
vp.morphs!Inf!RestOfVerb ++ vp.comp
|
||||
True =>vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
|
||||
vp.morphs!VFInf!RestOfVerb ++ (mkAdjPronNoIVClitic (AgMUBAP2 Sg)) ++ vp.comp;
|
||||
False => vp.morphs!VFPres!SecNegM ++ Predef.BIND ++ vp.s ++ Predef.BIND ++
|
||||
vp.morphs!VFInf!RestOfVerb ++ vp.comp
|
||||
}
|
||||
}
|
||||
}; --: VP -> Imp ; -- walk / do not walk
|
||||
|
||||
@@ -118,6 +118,10 @@ everywhere_Adv = {s = "hóòna"; agr = AgrNo}; -- adverb of place.
|
||||
here_Adv = {s = "hanu"; agr = AgrNo};
|
||||
{-End of Adverbs Adverbs-}
|
||||
|
||||
{-Begining of Quantifiers-}
|
||||
|
||||
{-End of Quantifiers-}
|
||||
|
||||
{-variants
|
||||
NOTE: Please add them to the abstract syntax, ask aarne
|
||||
or creat you own abstract Lexicon which inherits from the
|
||||
|
||||
Reference in New Issue
Block a user