mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 16:22:52 -06:00
refinements-2010-12-16
This commit is contained in:
@@ -24,8 +24,9 @@ incomplete concrete CatHindustani of Cat =
|
||||
---- Question
|
||||
QCl = {s : CommonHindustani.VPHTense => Polarity => QForm => Str} ;
|
||||
IP = {s: Case => Str ; g : Gender ; n : Number};
|
||||
IDet = {s :Gender => Str ; n : Number} ;
|
||||
IQuant = {s : Number => Str} ;
|
||||
IDet = {s :Gender => Case => Str ; n : Number} ;
|
||||
-- IQuant = {s : Number => Str} ;
|
||||
IQuant = {s : Number => Gender => Case => Str} ;
|
||||
|
||||
---- Relative
|
||||
|
||||
|
||||
@@ -158,12 +158,12 @@ resource CommonHindustani = ParamX ** open Prelude,Predef in {
|
||||
Adjective = { s: Number => Gender => Case => Degree => Str };
|
||||
regAdjective : Str -> Adjective;
|
||||
regAdjective x = case x of {
|
||||
acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sab sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
||||
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y")
|
||||
(acch +"E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
||||
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y");
|
||||
acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sb sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E")
|
||||
(acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y")
|
||||
(acch +"E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E")
|
||||
(acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y");
|
||||
|
||||
_ => mkAdjective x x x x x x x x x
|
||||
_ => mkAdjective x x x x x x x x x
|
||||
x x x x x x x x x
|
||||
x x x x x x x x x
|
||||
x x x x x x x x x
|
||||
@@ -259,6 +259,8 @@ resource CommonHindustani = ParamX ** open Prelude,Predef in {
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = v.s ! VF Subj p n g } ;
|
||||
VPTense VPPerf (Ag g n p) => { fin = [] ; inf = v.s ! Root ++ cka g n } ;
|
||||
VPStem => {fin = [] ; inf = v.s ! Root};
|
||||
VPInf => {fin = v.s ! Inf_Obl ; inf = v.s ! Root}; -- for V2V like sonE ky altja krna , check if it is being used anywhere else
|
||||
VPImp => {fin = v.s ! VF Subj Pers3_Near Pl Masc ; inf = v.s ! Root};
|
||||
_ => {fin = [] ; inf = v.s ! Root}
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
|
||||
@@ -19,7 +19,7 @@ incomplete concrete NounHindustani of Noun =
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = {
|
||||
s = \\c => v2.s ! VF Imperf Pers1 Sg Fem ++ np.s ! c ;
|
||||
s = \\c => v2.s ! VF Perf (fromAgr np.a).p (fromAgr np.a).n (fromAgr np.a).g ++ np.s ! c ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ incomplete concrete PhraseHindustani of Phrase =
|
||||
UttIP ip = {s = ip.s ! Dir} ; --- Acc also
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! NPC Dir} ;
|
||||
UttVP vp = {s = infVP False vp (agrP3 Masc Sg)} ;
|
||||
UttVP vp = {s = vp.ad ++ infVP False vp (agrP3 Masc Sg) ++ vp.embComp} ;
|
||||
UttAdv adv = {s = adv.s ! Masc} ;
|
||||
UttCN cn = {s = cn.s ! Sg ! Dir};
|
||||
UttCard n = n ;
|
||||
|
||||
@@ -19,8 +19,8 @@ incomplete concrete QuestionHindustani of Question =
|
||||
qp1 = qp.s ! Dir;
|
||||
qp2 = qp.s ! Obl ++ nE
|
||||
in { s = \\t,p,o => case t of {
|
||||
VPImpPast => qp2 ++ cl.s ! t ! p ! ODir;
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
VPImpPast => case vp.subj of {VIntrans => qp1 ++ cl.s ! t ! p ! ODir; _ => qp2 ++ cl.s ! t ! p ! ODir};
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
QuestSlash ip slash =
|
||||
@@ -46,7 +46,7 @@ incomplete concrete QuestionHindustani of Question =
|
||||
}
|
||||
};
|
||||
|
||||
PrepIP p ip = {s = ip.s ! Voc ++ p.s ! ip.g} ;
|
||||
PrepIP p ip = {s = ip.s ! Obl ++ p.s ! ip.g} ;
|
||||
|
||||
AdvIP ip adv = {
|
||||
s = \\c => adv.s ! ip.g ++ ip.s ! c ;
|
||||
@@ -55,19 +55,19 @@ incomplete concrete QuestionHindustani of Question =
|
||||
} ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ! cn.g ++ cn.s ! idet.n ! c ;
|
||||
s = \\c => idet.s ! cn.g ! c ++ cn.s ! idet.n ! c ;
|
||||
g = cn.g;
|
||||
n = idet.n;
|
||||
} ;
|
||||
|
||||
IdetIP idet = {
|
||||
s = \\_ => idet.s ! Masc ;
|
||||
s = \\c => idet.s ! Masc ! c ;
|
||||
n = idet.n;
|
||||
g = Masc;
|
||||
} ;
|
||||
|
||||
IdetQuant iqant num = {
|
||||
s = \\g => iqant.s ! num.n ++ num.s ;
|
||||
s = \\g,c => iqant.s ! num.n ! g ! c ++ num.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ incomplete concrete RelativeHindustani of Relative =
|
||||
} ;
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! Dir ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
||||
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
||||
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
|
||||
-- };
|
||||
|
||||
@@ -267,7 +267,7 @@ param
|
||||
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||
VPPerfFutCont => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "Xayd" }
|
||||
|
||||
};
|
||||
|
||||
@@ -337,7 +337,7 @@ param
|
||||
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ; True => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin } ;
|
||||
infV2V : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ++ "ky" ; True => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin ++ "ky"};
|
||||
case isAux of {False => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPInf).fin ++ "ky" ; True => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin ++ "ky"};
|
||||
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
|
||||
@@ -34,7 +34,7 @@ incomplete concrete VerbHindustani of Verb = CatHindustani ** open CommonHindust
|
||||
ReflVP v = insertObjPre (\\_ => RefPron) v ;
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
CompAP ap ={s = \\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit } ;
|
||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPC Dir} ;
|
||||
CompAdv adv = {s = \\a => adv.s ! giveGender a} ;
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Dir} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user