extensions by Codex
This commit is contained in:
1 parent
f74ee6660b
commit
933045a138
33 files changed
+718
-161
No files matched your search
@@ -21,7 +21,7 @@ incomplete concrete AdjectiveHindustani of Adjective = CatHindustani ** open Com
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\n,g,c,d => case sc.fromVP of {
|
||||
True => sc.s ++ kw ++ ap.s ! n ! g ! c ! d ;
|
||||
True => sc.s ++ mein ++ ap.s ! n ! g ! c ! d ;
|
||||
False => ap.s ! n ! g ! c ! d ++ sc.s } ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ incomplete concrete AdverbHindustani of Adverb = CatHindustani ** open CommonHin
|
||||
PositAdvAdj a = {s = \\g => a.s ! Sg ! g ! Obl ! Posit} ;
|
||||
PositAdAAdj a = {s = a.s ! Sg ! Masc ! Obl ! Posit} ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = \\g => np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit;
|
||||
s = \\g => np.s ! NPC Obl ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit;
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = \\g => cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit ++ s.s;
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = \\g => np.s ! NPObj ++ prep.s ! g } ;
|
||||
PrepNP prep np = {s = \\g => np.s ! NPC Obl ++ prep.s ! g } ;
|
||||
|
||||
AdAdv ada adv = { s = \\g => ada.s ++ adv.s ! g} ;
|
||||
|
||||
|
||||
@@ -61,10 +61,12 @@ incomplete concrete CatHindustani of Cat =
|
||||
Det = ResHindustani.Determiner ;
|
||||
Predet = {s : Str} ;
|
||||
Num = {s : Str ; n : Number} ;
|
||||
Card = {s : Str; n : Number} ;
|
||||
Ord = {s : Str; n : Number} ;
|
||||
Card = {s : Str; n : Number} ;
|
||||
ACard = {s : Str} ;
|
||||
Ord = {s : Str; n : Number} ;
|
||||
Quant = {s:Number => Gender => Case => Str ; a:Agr};
|
||||
Art = {s : Str} ;
|
||||
Art = {s : Str} ;
|
||||
DAP = {s : Number => Gender => Case => Str ; n : Number} ;
|
||||
|
||||
---- Numeral
|
||||
|
||||
|
||||
@@ -19,7 +19,12 @@ incomplete concrete ConjunctionHindustani of Conjunction =
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable4 Number Gender Case Degree conj ss ;
|
||||
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||
ConjCN conj cns = conjunctDistrTable2 Number Case conj cns ** {g = cns.g} ;
|
||||
ConjAdV conj xs = conjunctDistrSS conj xs ;
|
||||
ConjIAdv conj xs = conjunctDistrSS conj xs ;
|
||||
ConjDet conj xs = conjunctDistrTable3 Number Gender Case conj xs ** {n = conj.n} ;
|
||||
ConjDAP conj xs = conjunctDistrTable3 Number Gender Case conj xs ** {n = conj.n} ;
|
||||
|
||||
---- These fun's are generated from the list cat's.
|
||||
|
||||
@@ -32,13 +37,26 @@ incomplete concrete ConjunctionHindustani of Conjunction =
|
||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
||||
BaseAP x y = twoTable4 Number Gender Case Degree x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable4 Number Gender Case Degree comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||
ConsAP xs x = consrTable4 Number Gender Case Degree comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseCN x y = twoTable2 Number Case x y ** {g = x.g} ;
|
||||
ConsCN xs x = consrTable2 Number Case comma xs x ** {g = xs.g} ;
|
||||
BaseAdV = twoSS ;
|
||||
ConsAdV = consrSS comma ;
|
||||
BaseIAdv = twoSS ;
|
||||
ConsIAdv = consrSS comma ;
|
||||
BaseDet x y = twoTable3 Number Gender Case x y ** {n = conjNumber x.n y.n} ;
|
||||
ConsDet xs x = consrTable3 Number Gender Case comma xs x ** {n = conjNumber xs.n x.n} ;
|
||||
BaseDAP x y = twoTable3 Number Gender Case x y ** {n = conjNumber x.n y.n} ;
|
||||
ConsDAP xs x = consrTable3 Number Gender Case comma xs x ** {n = conjNumber xs.n x.n} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Gender => Str} ;
|
||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : Number => Gender => Case => Degree => Str} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
||||
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
||||
[CN] = {s1,s2 : Number => Case => Str ; g : Gender} ;
|
||||
[AdV], [IAdv] = {s1,s2 : Str} ;
|
||||
[Det], [DAP] = {s1,s2 : Number => Gender => Case => Str ; n : Number} ;
|
||||
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
interface DiffHindustani = open Prelude in {
|
||||
oper
|
||||
addErgative : Str -> Str -> Str ;
|
||||
ergativePron : (Case => Str) -> Agr -> Str ;
|
||||
conjThat : Str ; -- = "kh" ;
|
||||
insertSubj : UPerson -> Str -> Str ;
|
||||
|
||||
kwd : Str ;
|
||||
ky : Str ;
|
||||
ka : Str ;
|
||||
kE : Str ;
|
||||
rh : Str ;
|
||||
agr : Str ;
|
||||
awr : Str ;
|
||||
jn : Str ;
|
||||
@@ -34,4 +37,4 @@ interface DiffHindustani = open Prelude in {
|
||||
cka : Gender -> Number -> Str ;
|
||||
hw : UPerson -> Number -> Str ;
|
||||
hwa : Agr -> Str ;
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,11 @@ incomplete concrete NounHindustani of Noun =
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
ExtAdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ comma ++ adv.s ! (giveGender np.a) ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
-- s = \\ c => detquant2det quant.s num.s c ++ ord.s ;
|
||||
s = \\n,g,c => quant.s!n!g!c ++ num.s ++ ord.s ;
|
||||
@@ -51,6 +56,13 @@ incomplete concrete NounHindustani of Noun =
|
||||
a = agrP3 Masc Sg
|
||||
} ;
|
||||
|
||||
DetDAP det = {s = det.s ; n = det.n} ;
|
||||
|
||||
AdjDAP dap ap = {
|
||||
s = \\n,g,c => dap.s ! n ! g ! c ++ ap.s ! n ! g ! c ! Posit ;
|
||||
n = dap.n
|
||||
} ;
|
||||
|
||||
-- PossPron p = {s = \\n,g,_ => p.ps ! n ! g ; a = p.a} ;
|
||||
PossPron p = {s = \\n,g,c => case c of {
|
||||
Obl => p.ps ! Pl ! g ;
|
||||
@@ -91,6 +103,14 @@ incomplete concrete NounHindustani of Noun =
|
||||
|
||||
MassNP cn = {s = \\c => toNP (cn.s ! Sg) c ; a = agrP3 cn.g Sg} ;
|
||||
|
||||
QuantityNP decimal unit = {
|
||||
s = \\_ => case unit.isPre of {
|
||||
True => unit.s ++ decimal.s ! NCard ;
|
||||
False => decimal.s ! NCard ++ unit.s
|
||||
} ;
|
||||
a = agrP3 Masc decimal.n
|
||||
} ;
|
||||
|
||||
UseN n = n ;
|
||||
UseN2 n = { s = n.s ; g = n.g };
|
||||
|
||||
@@ -144,11 +164,11 @@ incomplete concrete NounHindustani of Noun =
|
||||
|
||||
PossNP cn np = {s = \\n,c => case cn.g of {Masc => cn.s ! n ! c ++ ka ++ np.s ! NPC Dir ;
|
||||
Fem => cn.s ! n ! c ++ ky ++ np.s ! NPC Dir } ;
|
||||
g = cn.g} ;
|
||||
g = cn.g} ;
|
||||
|
||||
PartNP cn np = {s = \\n,c => case cn.g of {Masc => cn.s ! n ! c ++ ka ++ np.s ! NPC Dir ;
|
||||
Fem => cn.s ! n ! c ++ ky ++ np.s ! NPC Dir } ;
|
||||
g = cn.g} ;
|
||||
g = cn.g} ;
|
||||
|
||||
CountNP det np = {
|
||||
s = \\c => np.s ! NPC Obl ++ mein ++ sE ++ det.s ! (giveNumber np.a) ! (giveGender np.a) ! Dir ;
|
||||
|
||||
@@ -65,12 +65,12 @@ param
|
||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||
-- NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! c ; --changed while phrasebook e.g tyry beti where gender of determiner 'tyry' should be dependent on gender of common noum e.g 'beti'
|
||||
NPC c => dt.s ! nn ! cn.g ! c ++ cn.s ! nn ! c ;
|
||||
NPObj => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Dir ;
|
||||
NPObj => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Dir ;
|
||||
NPErg => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Obl ++ nE
|
||||
} ;
|
||||
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
||||
NPC c => dt.s ! Sg ! Masc ! c ;
|
||||
NPObj => dt.s ! Sg ! Masc ! Dir ;
|
||||
NPObj => dt.s ! Sg ! Masc ! Dir ;
|
||||
NPErg => dt.s ! Sg ! Masc ! Obl ++ nE
|
||||
} ;
|
||||
|
||||
@@ -142,7 +142,7 @@ param
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = part } ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
||||
VPStem => {fin = [] ; inf = "rh" };
|
||||
VPStem => {fin = [] ; inf = rh };
|
||||
_ => {fin = part ; inf = [] }
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
@@ -289,10 +289,7 @@ param
|
||||
np2pronCase ppf npc a = case npc of {
|
||||
NPC c => ppf ! c;
|
||||
NPObj => ppf ! Obl ;
|
||||
NPErg =>case (fromAgr a).p of {
|
||||
(Pers3_Near|Pers3_Distant) => addErgative (ppf ! Obl) nE; -- in hindi in case of pronouns nE is tagged to pron rather than a separate word
|
||||
_ => addErgative (ppf ! Dir) nE
|
||||
}
|
||||
NPErg => ergativePron ppf a
|
||||
} ;
|
||||
|
||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
|
||||
@@ -11,11 +11,15 @@ incomplete concrete SentenceHindustani of Sentence =
|
||||
|
||||
PredSCVP sc vp = mkSClause sc.s (defaultAgr) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = Ag Masc (numImp n) Pers2_Casual ;
|
||||
verb = infVP True vp agr ;
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = case n of {
|
||||
ImpF _ True => Ag Masc Pl Pers2_Respect ;
|
||||
ImpF num False => Ag Masc num Pers2_Casual
|
||||
} ;
|
||||
verb = vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vp.cvp ++
|
||||
(vp.s ! VPTense VPFutr agr).inf ;
|
||||
dont = case pol of {
|
||||
CNeg True => mt ;
|
||||
CNeg False => nh ;
|
||||
@@ -28,10 +32,14 @@ incomplete concrete SentenceHindustani of Sentence =
|
||||
SlashVP np vp =
|
||||
mkClause np vp ** {c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,p,o => adv.s ! Masc ++ slash.s ! t ! p ! o ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\p,n => adv.s ! Masc ++ imp.s ! p ! n
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = { s = prep.s ! Masc ; c = VIntrans}} ;
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ incomplete concrete VerbHindustani of Verb = CatHindustani ** open CommonHindust
|
||||
AdvVP vp adv = insertAdV (adv.s ! Masc) vp ;
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
ExtAdvVP vp adv = insertAdV (comma ++ adv.s ! Masc) vp ;
|
||||
|
||||
AdvVPSlash vp adv = insertObj (\\a => adv.s ! giveGender a) vp ** {c2 = vp.c2} ; --need to confirm
|
||||
|
||||
|
||||
Reference in new issue
Block a user