mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
Added Interrogative adverbs abd Pronouns. Not working Properly.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete CatCgg of Cat = CommonX -[Adv]**
|
||||
open (Res=ResCgg), Prelude, (Px=ParamX) in {
|
||||
concrete CatCgg of Cat = CommonX -[Adv,IAdv]**
|
||||
open (Res=ResCgg), Prelude, (Px=ParamX), Predef in {
|
||||
|
||||
lincat
|
||||
|
||||
@@ -66,7 +66,13 @@ lincat
|
||||
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
|
||||
Ord = {s :Res.Agreement=>Str; position1:Res.Position1} ;
|
||||
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
|
||||
IP = {s :Str ; n : Res.Number; isVerbSuffix: Bool; requiresIPPrefix: Bool; aux:Str};
|
||||
IAdv = {s :Str ; requiresSubjPrefix: Bool};
|
||||
--VV =
|
||||
|
||||
linref
|
||||
Cl, QCl =\cl -> cl.s ++ Res.mkSubjClitic cl.subjAgr ++ cl.root ++ BIND ++ cl.pres;
|
||||
VP =\vp -> vp.s ++ BIND ++ vp.pres;
|
||||
{-
|
||||
--1 Cat: the Category System
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ concrete GrammarCgg of Grammar =
|
||||
RelativeCgg,
|
||||
ConjunctionCgg,
|
||||
PhraseCgg,
|
||||
TextX -[Adv],
|
||||
TextX -[Adv, IAdv],
|
||||
StructuralCgg,
|
||||
IdiomCgg,
|
||||
TenseX -[Adv]
|
||||
TenseX -[Adv,IAdv]
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
@@ -121,7 +121,7 @@ lin
|
||||
sleep_V = mkV "nyama" ; --: V ;--Kugwejegyera, kubyama
|
||||
swim_V = mkV "og"; --: V ;
|
||||
travel_V = mkV "gyend";--: V ;
|
||||
walk_V = mkV "tabur"; --: V ; or kuribata
|
||||
walk_V = mkV "ribá" "ta" "si"; --: V ; or kuribata Runynakore it is different
|
||||
|
||||
--Verbs that have a noun Phrase complement and a verb phrase complement (V2V)
|
||||
--beg_V2V : V2V ;
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
|
||||
concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
||||
--1 Question: Questions and Interrogative Pronouns
|
||||
-- A question can be formed from a clause ('yes-no question') or
|
||||
-- with an interrogative.
|
||||
|
||||
lin
|
||||
--QuestCl : Cl -> QCl ; -- does John walk
|
||||
QuestCl cl = cl;
|
||||
--QuestVP : IP -> VP -> QCl ; -- who walks
|
||||
--QuestSlash : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
--QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
|
||||
--QuestIComp : IComp -> NP -> QCl ; -- where is John
|
||||
{-
|
||||
--1 Question: Questions and Interrogative Pronouns
|
||||
|
||||
|
||||
@@ -793,6 +793,39 @@ oper
|
||||
}
|
||||
};
|
||||
|
||||
mkIPPref : Agreement =>Str = table{
|
||||
AgMUBAP1 Sg => mkClitic "o";
|
||||
AgMUBAP1 Pl => mkClitic "ba" ;
|
||||
AgMUBAP2 Sg => mkClitic "o";
|
||||
AgMUBAP2 Pl => mkClitic "ba" ;
|
||||
AgP3 Sg MU_BA => mkClitic "o";
|
||||
AgP3 Pl MU_BA => mkClitic "ba" ;
|
||||
AgP3 Pl ZERO_BU => mkClitic "bu" ;
|
||||
AgP3 Sg BU_MA => mkClitic "bu" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => mkClitic "bu" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "bi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "ga";
|
||||
AgP3 (Sg ) HA => mkClitic "ha" ; -- of place HA
|
||||
AgP3 (Sg ) MU => mkClitic "ha" ; -- of place MU
|
||||
AgP3 (Sg ) KU => mkClitic "e" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "ri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "ka" ;
|
||||
AgP3 Sg KI_BI => mkClitic "ki" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "ku" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "gu" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "ru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "tu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "e" ;
|
||||
AgP3 Pl ZERO_MI =>mkClitic "e" ;
|
||||
AgP3 Pl MU_MI => mkClitic "e";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "zi" ;
|
||||
AgP3 Sg GU_GA => mkClitic "gu" ;
|
||||
AgP3 Pl GU_GA => mkClitic "ga" ;
|
||||
_ => mkClitic "XXXThat" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
|
||||
|
||||
mkRObjV2 : Agreement=> Str =table {
|
||||
AgMUBAP1 Sg => mkClitic "ou";
|
||||
AgMUBAP1 Pl => mkClitic "abi" ; --note: abu or abi is used. GF does not allow free variation. However, abu is more natural
|
||||
@@ -944,8 +977,16 @@ oper
|
||||
be_GVerb : GVerb = {
|
||||
s= table{True => "ri"; False =>"b" };
|
||||
morphs = \\form, morphs =>[];
|
||||
|
||||
|
||||
isAux = True};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--be1_Verb: Verb = {s="b"; pres = "e"; perf="a"; morphs = mkVerbMorphs};
|
||||
--be2_Verb: Verb = {s="ri"; pres = "e"; perf="a"; morphs = mkVerbMorphs};
|
||||
{-
|
||||
--copulative conjugations of ni and ri as used for adjectives
|
||||
|
||||
@@ -1102,6 +1143,8 @@ oper
|
||||
s : Str ; --subject
|
||||
subjAgr : Agreement;
|
||||
root : Str;
|
||||
pres: Str;
|
||||
perf: Str;
|
||||
morphs : VFormMini => VerbMorphPos =>Str;
|
||||
{-
|
||||
inf : Str;
|
||||
|
||||
@@ -33,12 +33,15 @@ lin
|
||||
ant!TAMarker ++ root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
|
||||
}; --: Temp -> Pol -> QCl -> QS ; -- has John walked
|
||||
|
||||
UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked
|
||||
QuestCl cl = cl; --: Cl -> QCl ; -- does John (not) walk
|
||||
PredVP np vp = case vp.isCompApStem of{
|
||||
UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked
|
||||
QuestCl cl = cl; --: Cl -> QCl ; -- does John (not) walk
|
||||
|
||||
PredVP np vp = case vp.isCompApStem of{
|
||||
False => {
|
||||
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||
subjAgr = np.agr;
|
||||
pres = vp.pres;
|
||||
perf = vp.perf;
|
||||
root = vp.s;
|
||||
morphs = vp.morphs;
|
||||
{-
|
||||
@@ -54,6 +57,8 @@ PredVP np vp = case vp.isCompApStem of{
|
||||
True => {
|
||||
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||
subjAgr = np.agr;
|
||||
pres = vp.pres;
|
||||
perf = vp.perf;
|
||||
root = vp.s;
|
||||
morphs = vp.morphs;
|
||||
{-
|
||||
@@ -67,11 +72,15 @@ PredVP np vp = case vp.isCompApStem of{
|
||||
compl = mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
|
||||
}
|
||||
};--: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||
{-
|
||||
|
||||
|
||||
|
||||
{-
|
||||
Note: It seems mkSubjClitic comes with a Predef.BIND already
|
||||
prepared for the next token to bind.
|
||||
Reason: When I add a BIND command, I get two bind tokens in the linearizations
|
||||
-}
|
||||
|
||||
ImpVP vp = {
|
||||
s =table{
|
||||
True=> vp.s ++ Predef.BIND ++ vp.morphs!VFInf!RestOfVerb ++ vp.comp;
|
||||
@@ -102,6 +111,9 @@ PredVP np vp = case vp.isCompApStem of{
|
||||
--SlashVS : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{-
|
||||
--1 Sentence: Sentences, Clauses, and Imperatives
|
||||
|
||||
|
||||
@@ -156,11 +156,15 @@ lin
|
||||
|
||||
{-End of verb-phrase-complement verb -}
|
||||
|
||||
{-Beggining of Interrogative Pronoun-}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
whatPl_IP = { s= "ki"; n = Pl; isVerbSuffix = True; requiresIPPrefix = False; aux=[]} ; -- what (plural)
|
||||
whatSg_IP = { s= "ki"; n = Sg; isVerbSuffix = True; requiresIPPrefix = False; aux=[]} ; --: IP ; -- what (singular)
|
||||
whoPl_IP = { s= "ha"; n = Pl; isVerbSuffix = True; requiresIPPrefix = False; aux="ni"} ;--: IP ; -- who (plural)
|
||||
whoSg_IP = { s= "ha"; n = Sg; isVerbSuffix = True; requiresIPPrefix = False; aux=[]} ; --: IP ; -- who (singular)
|
||||
--You may need to use booleans to indicate that you need these tables rather than carrying them.
|
||||
how_IAdv = {s ="ta"; requiresSubjPrefix = True}; --: IAdv ;
|
||||
--how8much_IAdv = {s ="kwiga"; s2requireSubjPrefix = True};--: IAdv ;
|
||||
{-
|
||||
--1 Structural: Structural Words
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user