1
0
forked from GitHub/gf-rgl

why did you go

This commit is contained in:
Meowyam
2022-01-03 14:00:43 +08:00
parent c61fe0c314
commit 6459c07548
6 changed files with 27 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
concrete CatMay of Cat = CommonX ** open ResMay, Prelude in {
concrete CatMay of Cat = CommonX - [IAdv] ** open ResMay, Prelude in {
flags optimize=all_subs ;
@@ -27,6 +27,7 @@ concrete CatMay of Cat = CommonX ** open ResMay, Prelude in {
IDet = ResMay.Determiner ; -- interrogative determiner e.g. "how many"
IQuant = ResMay.IQuant ; -- interrogative quantifier e.g. "which"
IP = ResMay.IPhrase ; -- interrogative pronoun e.g. "who"
IAdv = ResMay.IAdv ;
--2 Subord clauses and pronouns

View File

@@ -9,10 +9,10 @@ concrete GrammarMay of Grammar =
RelativeMay,
ConjunctionMay,
PhraseMay,
TextX,
TextX - [IAdv],
StructuralMay,
IdiomMay,
TenseX - [AAnter, TFut, TCond]
TenseX - [AAnter, TFut, TCond, IAdv]
** open ParamX in {
flags startcat = Phr ;

View File

@@ -50,10 +50,16 @@ lin
-- : IAdv -> Cl -> QCl ; -- why does John walk
QuestIAdv iadv cls = {
pred = \\vf,pol => cls.pred ! Root ! pol ++ iadv.s;
subj = cls.subj ;
subj = case iadv.isPre of {
True => iadv.s ++ cls.subj ; False => cls.subj
} ;
pred = \\vf,pol => case iadv.isPre of {
True => cls.pred ! Root ! pol ;
False => cls.pred ! Root ! pol ++ iadv.s
} ;
} ;
-- \\vf,pol,posadv =>
-- {
-- pred = \\vf,pol => ip.s ++ vp.s ! vf ! pol;
-- } ;

View File

@@ -222,7 +222,13 @@ oper
------------------
-- Adv
Adverb : Type = SS ;
Adverb : Type = {
s : Str;
} ;
IAdv : Type = Adverb ** {
isPre : Bool ;
} ;
------------------
-- VP

View File

@@ -20,9 +20,10 @@ lin how_IAdv = ss "" :
lin how8much_IAdv = ss "" ;
lin when_IAdv = ss "" ;
-}
lin where_IAdv = ss "mana" ;
lin where_IAdv = { s = "mana"; isPre = False } ;
lin why_IAdv = {s = "mengapa"; isPre = True } ;
{-
lin why_IAdv = ss "" :
lin always_AdV = ss "" ;

View File

@@ -32,4 +32,8 @@ LangMay: kucing apa mengajar dia
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv where_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V)))
LangEng: where did you go
LangMay: awak pergi mana
LangMay: awak pergi mana
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V)))
LangEng: why did you go
LangMay: mengapa awak pergi