extensions by Codex
This commit is contained in:
1 parent
f74ee6660b
commit
933045a138
33 files changed
+718
-161
No files matched your search
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
concrete AllUrd of AllUrdAbs =
|
||||
LangUrd,
|
||||
ExtendUrd
|
||||
ExtendUrd --# notpresent
|
||||
** open ExtraUrd in {} ;
|
||||
+56
-40
@@ -1,27 +1,28 @@
|
||||
--# -path=.:../abstract
|
||||
|
||||
concrete ConstructionUrd of Construction = CatUrd **
|
||||
open SyntaxUrd, SymbolicUrd, ParadigmsUrd, (L = LexiconUrd), (E = ExtraUrd), (G = GrammarUrd), (R = ResUrd), (S = StructuralUrd), Prelude in {
|
||||
open SyntaxUrd, SymbolicUrd, ParadigmsUrd, CommonHindustani,
|
||||
(L = LexiconUrd), (E = ExtraUrd), (G = GrammarUrd), (R = ResUrd), (S = StructuralUrd), Prelude in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
lin
|
||||
{-
|
||||
hungry_VP = mkVP (mkA "भूखा") ;
|
||||
thirsty_VP = mkVP (mkA "प्यासा") ;
|
||||
-- tired_VP = mkVP (mkCompoundA "थका" "हुआ") ;
|
||||
-- scared_VP = mkVP (mkCompoundA "डरा" "हुआ") ;
|
||||
ill_VP = mkVP (mkA "बीमार") ;
|
||||
ready_VP = mkVP (mkA "तैयार") ;
|
||||
-}
|
||||
---- has_age_VP card = mkVP (mkNP <card : Card> (mkCN (mmodN L.year_N))) ;
|
||||
hungry_VP = mkVP (mkA "بھوکا") ;
|
||||
thirsty_VP = mkVP (mkA "پیاسا") ;
|
||||
ill_VP = mkVP (mkA "بیمار") ;
|
||||
ready_VP = mkVP (mkA "تیار") ;
|
||||
|
||||
has_age_VP card = mkVP (mkNP <card : Card> (mkCN (mmodN L.year_N))) ;
|
||||
|
||||
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
|
||||
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) ;
|
||||
|
||||
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
|
||||
---- how_old_QCl x = mkQCl (lin IAdv {s = "कितनी"}) (mkNP (E.GenNP x) (mkN "उम्र" "उम्र" "उम्र" "उम्र" "उम्र" "उम्र" feminine)) ;
|
||||
how_far_QCl x = mkQCl (E.IAdvAdv (ParadigmsUrd.mkAdv "दूर")) (lin NP x) ;
|
||||
how_old_QCl x = mkQCl (lin IAdv {s = "کتنی"}) (mkNP (E.GenNP x) (mkN "عمر" feminine)) ;
|
||||
how_far_QCl x = mkQCl (E.IAdvAdv (ParadigmsUrd.mkAdv "دور")) (lin NP x) ;
|
||||
|
||||
oper
|
||||
mmodN : N -> N = \noun -> lin N {s = \\n,c => noun.s ! n ! c ++ "کا" ; g = noun.g} ;
|
||||
|
||||
---- oper
|
||||
---- mmodN : N -> N = \noun -> lin N {s = \\n,c =>noun.s!n!c++"का" ; g =noun.g} ;
|
||||
@@ -32,11 +33,22 @@ lin
|
||||
---- is_right_VP = mkVP (ParadigmsUrd.mkA "right") ;
|
||||
---- is_wrong_VP = mkVP (ParadigmsUrd.mkA "wrong") ;
|
||||
|
||||
---- n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
||||
lin
|
||||
n_units_AP card cn a = {
|
||||
s = \\n,g,c,d => card.s ++ cn.s ! Pl ! Dir ++ a.s ! n ! g ! c ! d
|
||||
} ;
|
||||
|
||||
n_units_of_NP card cn np = {
|
||||
s = \\c => np.s ! NPC Obl ++ "کے" ++ card.s ++ cn.s ! Pl ! constructionCase c ;
|
||||
a = agrP3 cn.g card.n
|
||||
} ;
|
||||
|
||||
|
||||
---- bottle_of_CN np = mkCN (lin N2 (mkN2 "bottle")) (lin NP np) ;
|
||||
---- cup_of_CN np = mkCN (lin N2 (mkN2 "cup")) (lin NP np) ;
|
||||
cup_of_CN np = {
|
||||
s = \\n,c => np.s ! NPC Obl ++ "کا" ++ (mkN "پیالہ").s ! n ! c ;
|
||||
g = Masc
|
||||
} ;
|
||||
---- glass_of_CN np = mkCN (lin N2 (mkN2 "glass")) (lin NP np) ;
|
||||
|
||||
{-
|
||||
@@ -66,14 +78,14 @@ lincat
|
||||
Year = NP ;
|
||||
|
||||
lin
|
||||
{- ----
|
||||
weekdayPunctualAdv w = SyntaxUrd.mkAdv on_Prep (mkNP w) ; -- on Sunday
|
||||
weekdayHabitualAdv w = SyntaxUrd.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays
|
||||
weekdayNextAdv w = SyntaxUrd.mkAdv (mkPrep "next") (mkNP w) ; -- next Sunday
|
||||
weekdayLastAdv w = SyntaxUrd.mkAdv (mkPrep "last") (mkNP w) ; -- last Sunday
|
||||
weekdayPunctualAdv w = {s = \\_ => w.s ! Sg ! Dir ++ "کو"} ;
|
||||
weekdayHabitualAdv w = {s = \\_ => "ہر" ++ w.s ! Sg ! Dir ++ "کو"} ;
|
||||
weekdayNextAdv w = {s = \\_ => "اگلے" ++ w.s ! Sg ! Dir ++ "کو"} ;
|
||||
weekdayLastAdv w = {s = \\_ => "پچھلے" ++ w.s ! Sg ! Dir ++ "کو"} ;
|
||||
|
||||
monthAdv m = SyntaxUrd.mkAdv in_Prep (mkNP m) ;
|
||||
yearAdv y = SyntaxUrd.mkAdv in_Prep y ;
|
||||
monthAdv m = {s = \\_ => m.s ! Sg ! Dir ++ "میں"} ;
|
||||
yearAdv y = {s = \\_ => y.s ! NPC Dir ++ "میں"} ;
|
||||
{- ----
|
||||
dayMonthAdv d m = ParadigmsUrd.mkAdv ("on" ++ d.s ! R.NPAcc ++ m.s ! R.Sg ! R.Nom) ; -- on 17 May
|
||||
monthYearAdv m y = SyntaxUrd.mkAdv in_Prep (mkNP (mkCN m y)) ; -- in May 2012
|
||||
dayMonthYearAdv d m y = ParadigmsUrd.mkAdv ("on" ++ d.s ! R.NPAcc ++ m.s ! R.Sg ! R.Nom ++ y.s ! R.NPAcc) ; -- on 17 May 2013
|
||||
@@ -96,29 +108,33 @@ lin
|
||||
|
||||
oper mkLanguage : Str -> PN = \s -> mkPN s ;
|
||||
|
||||
oper constructionCase : NPCase -> Case = \c -> case c of {
|
||||
NPC x => x ; NPObj => Obl ; NPErg => Obl
|
||||
} ;
|
||||
|
||||
----------------------------------------------
|
||||
---- lexicon of special names
|
||||
|
||||
lin monday_Weekday = mkN "सोमवार" ;
|
||||
lin tuesday_Weekday = mkN "मंगलवार" ;
|
||||
lin wednesday_Weekday = mkN "बुधवार" ;
|
||||
lin thursday_Weekday = mkN "गुरुवार" ;
|
||||
lin friday_Weekday = mkN "शुक्रवार" ;
|
||||
lin saturday_Weekday = mkN "शनिवार" ;
|
||||
lin sunday_Weekday = mkN "रविवार" ;
|
||||
lin monday_Weekday = mkN "پیر" ;
|
||||
lin tuesday_Weekday = mkN "منگل" ;
|
||||
lin wednesday_Weekday = mkN "بدھ" ;
|
||||
lin thursday_Weekday = mkN "جمعرات" ;
|
||||
lin friday_Weekday = mkN "جمعہ" ;
|
||||
lin saturday_Weekday = mkN "ہفتہ" ;
|
||||
lin sunday_Weekday = mkN "اتوار" ;
|
||||
|
||||
lin january_Month = mkN "जनवरी" ;
|
||||
lin february_Month = mkN "फ़रवरी" ;
|
||||
lin march_Month = mkN "मार्च" ;
|
||||
lin april_Month = mkN "अप्रैल" ;
|
||||
lin may_Month = mkN "मई" ;
|
||||
lin june_Month = mkN "जून" ;
|
||||
lin july_Month = mkN "जुलाई" ;
|
||||
lin august_Month = mkN "अगस्त" ;
|
||||
lin september_Month = mkN "सितम्बर" ;
|
||||
lin october_Month = mkN "अक्टूबर" ;
|
||||
lin november_Month = mkN "नवम्बर" ;
|
||||
lin december_Month = mkN "दिसम्बर" ;
|
||||
lin january_Month = mkN "جنوری" ;
|
||||
lin february_Month = mkN "فروری" ;
|
||||
lin march_Month = mkN "مارچ" ;
|
||||
lin april_Month = mkN "اپریل" ;
|
||||
lin may_Month = mkN "مئی" ;
|
||||
lin june_Month = mkN "جون" ;
|
||||
lin july_Month = mkN "جولائی" ;
|
||||
lin august_Month = mkN "اگست" ;
|
||||
lin september_Month = mkN "ستمبر" ;
|
||||
lin october_Month = mkN "اکتوبر" ;
|
||||
lin november_Month = mkN "نومبر" ;
|
||||
lin december_Month = mkN "دسمبر" ;
|
||||
|
||||
lin afrikaans_Language = mkLanguage "Afrikaans" ;
|
||||
lin amharic_Language = mkLanguage "Amharic" ;
|
||||
|
||||
@@ -5,6 +5,11 @@ flags coding = utf8 ;
|
||||
oper
|
||||
|
||||
addErgative s1 s2 = s1 ++ s2 ;
|
||||
ergativePron ppf a = case a of {
|
||||
Ag _ Pl Pers3_Distant => "انہوں نے" ;
|
||||
Ag _ _ (Pers3_Near | Pers3_Distant) => addErgative (ppf ! Obl) nE ;
|
||||
_ => addErgative (ppf ! Dir) nE
|
||||
} ;
|
||||
conjThat = "کہ" ;
|
||||
insertSubj : UPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "واں" ; _ => s ++ "ے"}; -- check with prasad for vn~
|
||||
@@ -13,6 +18,8 @@ conjThat = "کہ" ;
|
||||
awr = "اور" ;
|
||||
ky = "کی" ;
|
||||
ka = "کا" ;
|
||||
kE = "کے" ;
|
||||
rh = "رہ" ;
|
||||
jn = "جن" ;
|
||||
js = "جس" ;
|
||||
jw = "جو" ;
|
||||
|
||||
+146
-3
@@ -3,9 +3,152 @@
|
||||
concrete ExtendUrd of Extend =
|
||||
CatUrd ** ExtendFunctor -
|
||||
[
|
||||
ComplDirectVQ, ComplDirectVS
|
||||
]
|
||||
ComplDirectVQ, ComplDirectVS,
|
||||
BaseVPS, ConsVPS, MkVPS, ConjVPS, PredVPS,
|
||||
BaseVPI, ConsVPI, MkVPI, ConjVPI, ComplVPIVV,
|
||||
BaseComp, ConsComp, ConjComp, BaseImp, ConsImp, ConjImp,
|
||||
PresPartAP, PastPartAP, PastPartAgentAP,
|
||||
PassVPSlash, PassAgentVPSlash, ProgrVPSlash,
|
||||
ReflRNP, ReflPron, ReflPoss, PredetRNP,
|
||||
AdvRNP, AdvRVP, AdvRAP, ReflA2RNP, PossPronRNP,
|
||||
CompoundN, CompoundAP, GerundCN, GerundNP, GerundAdv,
|
||||
WithoutVP, ByVP, InOrderToVP, ApposNP, PositAdVAdj,
|
||||
UseDAP, UseDAPMasc, UseDAPFem
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarUrd) ** {
|
||||
(Grammar = GrammarUrd) **
|
||||
open Prelude, CommonHindustani, ResUrd, ParadigmsUrd, Coordination,
|
||||
(G = GrammarUrd) in {
|
||||
{-
|
||||
-} --# notpresent
|
||||
|
||||
lincat
|
||||
VPS = {s : Agr => Str ; c : NPCase} ;
|
||||
[VPS] = {s1,s2 : Agr => Str ; c : NPCase} ;
|
||||
VPI = {s : Agr => Str} ;
|
||||
[VPI] = {s1,s2 : Agr => Str} ;
|
||||
[Comp] = {s1,s2 : Agr => Str} ;
|
||||
[Imp] = {s1,s2 : CPolarity => ImpForm => Str} ;
|
||||
|
||||
lin
|
||||
MkVPS temp pol vp = {
|
||||
s = \\a => (mkSClause [] a vp).s ! tenseOf temp ! pol.p ! ODir ;
|
||||
c = case <temp.t,temp.a,vp.subj> of {
|
||||
<Past,Simul,VTrans> => NPErg ;
|
||||
<Past,Simul,VTransPost> => NPErg ;
|
||||
_ => NPC Dir
|
||||
}
|
||||
} ;
|
||||
BaseVPS x y = twoTable Agr x y ** {c = x.c} ;
|
||||
ConsVPS x xs = consrTable Agr comma x xs ** {c = xs.c} ;
|
||||
ConjVPS conj xs = conjunctDistrTable Agr conj xs ** {c = xs.c} ;
|
||||
PredVPS np vps = {s = np.s ! vps.c ++ vps.s ! np.a} ;
|
||||
|
||||
MkVPI vp = {s = \\a => infVP False vp a} ;
|
||||
BaseVPI = twoTable Agr ;
|
||||
ConsVPI = consrTable Agr comma ;
|
||||
ConjVPI = conjunctDistrTable Agr ;
|
||||
ComplVPIVV vv vpi = insertObj (\\a => vpi.s ! a) (predV vv) ;
|
||||
|
||||
BaseComp = twoTable Agr ;
|
||||
ConsComp = consrTable Agr comma ;
|
||||
ConjComp = conjunctDistrTable Agr ;
|
||||
BaseImp = twoTable2 CPolarity ImpForm ;
|
||||
ConsImp = consrTable2 CPolarity ImpForm comma ;
|
||||
ConjImp = conjunctDistrTable2 CPolarity ImpForm ;
|
||||
|
||||
PresPartAP vp = partAP vp ;
|
||||
PastPartAP vp = pastAP vp [] ;
|
||||
PastPartAgentAP vp np = pastAP vp (np.s ! NPC Obl ++ "کے ذریعے") ;
|
||||
PassVPSlash vp = passiveVP vp ;
|
||||
PassAgentVPSlash vp np = insertAdV (np.s ! NPC Obl ++ "کے ذریعے") (passiveVP vp) ;
|
||||
ProgrVPSlash vp = predProg vp ** {c2 = vp.c2} ;
|
||||
|
||||
ReflRNP vp rnp = insertObject rnp vp ;
|
||||
ReflPron = {s = \\_ => "خود" ; a = defaultAgr ; lock_NP = <>} ;
|
||||
ReflPoss num cn = {
|
||||
s = \\c => reflPoss ! num.n ! cn.g ! npcase2case c ++ cn.s ! num.n ! npcase2case c ;
|
||||
a = agrP3 cn.g num.n ; lock_NP = <>
|
||||
} ;
|
||||
PredetRNP pred np = {s = \\c => pred.s ++ np.s ! c ; a = np.a ; lock_NP = <>} ;
|
||||
AdvRNP np prep rnp = {
|
||||
s = \\c => rnp.s ! NPC Obl ++ prep.s ! giveGender rnp.a ++ np.s ! c ;
|
||||
a = np.a ; lock_NP = <>
|
||||
} ;
|
||||
AdvRVP vp prep rnp = insertAdV (rnp.s ! NPC Obl ++ prep.s ! giveGender rnp.a) vp ;
|
||||
AdvRAP ap prep rnp = {s = \\n,g,c,d => rnp.s ! NPC Obl ++ prep.s ! giveGender rnp.a ++ ap.s ! n ! g ! c ! d} ;
|
||||
ReflA2RNP a rnp = {s = \\n,g,c,d => rnp.s ! NPC Obl ++ a.c2 ++ a.s ! n ! g ! c ! d} ;
|
||||
PossPronRNP pron num cn rnp = {
|
||||
s = \\c => pron.ps ! num.n ! cn.g ++ cn.s ! num.n ! npcase2case c ++
|
||||
rnp.s ! NPC Obl ++ genPost ! num.n ! cn.g ;
|
||||
a = agrP3 cn.g num.n
|
||||
} ;
|
||||
|
||||
CompoundN modifier head = {s = \\n,c => modifier.s ! Sg ! Dir ++ head.s ! n ! c ; g = head.g} ;
|
||||
CompoundAP noun adj = {s = \\n,g,c,d => noun.s ! Sg ! Dir ++ adj.s ! n ! g ! c ! d} ;
|
||||
GerundCN vp = {
|
||||
s = \\_,c => vp.obj.s ++ vp.ad ++ vp.comp ! defaultAgr ++ vp.cvp ++
|
||||
case c of {Dir => vp.inf ; _ => (vp.s ! VPInf).fin} ;
|
||||
g = Masc
|
||||
} ;
|
||||
GerundNP vp = {s = \\_ => infVP False vp defaultAgr ; a = defaultAgr} ;
|
||||
GerundAdv vp = {s = \\_ => vp.obj.s ++ vp.ad ++ vp.comp ! defaultAgr ++ vp.cvp ++ conjunctive vp} ;
|
||||
WithoutVP vp = {s = \\_ => infVP False vp defaultAgr ++ "کے بغیر"} ;
|
||||
ByVP vp = {s = \\_ => vp.obj.s ++ vp.ad ++ vp.comp ! defaultAgr ++ vp.cvp ++ conjunctive vp} ;
|
||||
InOrderToVP vp = {s = \\_ => infVP False vp defaultAgr ++ "کے لیے"} ;
|
||||
ApposNP x y = {s = \\c => x.s ! c ++ comma ++ y.s ! c ; a = x.a} ;
|
||||
PositAdVAdj a = {s = a.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||
UseDAP dap = dapNP Masc dap ;
|
||||
UseDAPMasc dap = dapNP Masc dap ;
|
||||
UseDAPFem dap = dapNP Fem dap ;
|
||||
|
||||
oper
|
||||
tenseOf : Temp -> VPHTense = \temp -> case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => VPGenPres ; <Pres,Anter> => VPPerfPres ;
|
||||
<Past,Simul> => VPImpPast ; <Past,Anter> => VPPerfPast ;
|
||||
<Fut,Simul> => VPFut ; <Fut,Anter> => VPPerfFut ;
|
||||
<Cond,Simul> => VPFut ; <Cond,Anter> => VPSubj
|
||||
} ;
|
||||
npcase2case : NPCase -> Case = \c -> case c of {NPC x => x ; NPObj => Obl ; NPErg => Obl} ;
|
||||
reflPoss : Number => Gender => Case => Str = table {
|
||||
Sg => table {Masc => table {Dir => "اپنا" ; _ => "اپنے"} ; Fem => table {_ => "اپنی"}} ;
|
||||
Pl => table {Masc => table {_ => "اپنے"} ; Fem => table {_ => "اپنی"}}
|
||||
} ;
|
||||
genPost : Number => Gender => Str = table {
|
||||
Sg => table {Masc => "کا" ; Fem => "کی"} ;
|
||||
Pl => table {Masc => "کے" ; Fem => "کی"}
|
||||
} ;
|
||||
partAP : VPH -> AP = \vp -> {
|
||||
s = \\n,g,_,_ => let a = agrP3 g n in vp.obj.s ++ vp.ad ++ vp.comp ! a ++ vp.cvp ++
|
||||
(vp.s ! VPTense VPPres a).inf ++ hwa a ;
|
||||
lock_AP = <>
|
||||
} ;
|
||||
conjunctive : VPH -> Str = \vp -> (vp.s ! VPStem).inf ++ "کے" ;
|
||||
pastAP : VPHSlash -> Str -> AP = \vp,agent -> {
|
||||
s = \\n,g,_,_ => vp.obj.s ++ vp.ad ++ vp.comp ! (agrP3 g n) ++ agent ++ vp.cvp ++
|
||||
(vp.s ! VPTense VPPast (agrP3 g n)).inf ;
|
||||
lock_AP = <>
|
||||
} ;
|
||||
passiveVP : VPHSlash -> VPH = \vp ->
|
||||
let aux = predV (mkV "جانا") in {
|
||||
s = table {
|
||||
VPTense tense agr => {
|
||||
inf = (vp.s ! VPTense VPPast agr).inf ++ (aux.s ! VPTense tense agr).inf ;
|
||||
fin = (aux.s ! VPTense tense agr).fin
|
||||
} ;
|
||||
form => {
|
||||
inf = (vp.s ! VPTense VPPast defaultAgr).inf ++ (aux.s ! form).inf ;
|
||||
fin = (aux.s ! form).fin
|
||||
}
|
||||
} ;
|
||||
obj = vp.obj ; subj = VIntrans ; inf = vp.inf ++ "جانا" ;
|
||||
ad = vp.ad ; embComp = vp.embComp ; prog = vp.prog ; comp = vp.comp ; cvp = vp.cvp
|
||||
} ;
|
||||
dapNP : Gender -> DAP -> CommonHindustani.NP = \g,dap -> {
|
||||
s = \\c => dap.s ! dap.n ! g ! npcase2case c ; a = agrP3 g dap.n
|
||||
} ;
|
||||
|
||||
{- --# notpresent
|
||||
-}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,8 @@
|
||||
-- TextX - [Adv,AdN],
|
||||
StructuralUrd,
|
||||
TenseX - [Adv,AdN,SC],
|
||||
IdiomUrd
|
||||
IdiomUrd,
|
||||
NamesUrd
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
@@ -27,6 +27,20 @@ concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd,ParamX,Common
|
||||
}
|
||||
};
|
||||
|
||||
ExistNPAdv np adv =
|
||||
mkSClause "" np.a
|
||||
(insertAdV (adv.s ! giveGender np.a)
|
||||
(insertObj (\\_ => np.s ! NPC Dir) (predAux auxBe))) ;
|
||||
|
||||
ExistIPAdv ip adv =
|
||||
let cl = mkSClause (ip.s ! Dir) (agrP3 ip.g ip.n)
|
||||
(insertAdV (adv.s ! ip.g) (predAux auxBe))
|
||||
in {s = \\t,p,_ => cl.s ! t ! p ! ODir} ;
|
||||
|
||||
SelfAdvVP vp = insertAdV "خود" vp ;
|
||||
SelfAdVVP vp = insertAdV "خود" vp ;
|
||||
SelfNP np = {s = \\c => np.s ! c ++ "خود" ; a = np.a} ;
|
||||
|
||||
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
||||
ProgrVP vp = (predProg vp) ;
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../abstract:../common:../hindustani
|
||||
|
||||
concrete NamesUrd of Names = CatUrd ** open ResUrd, CommonHindustani in {
|
||||
lin
|
||||
GivenName name = {s = \\_ => name.s ; a = agrP3 Masc Sg} ;
|
||||
MaleSurname name = {s = \\_ => name.s ; a = agrP3 Masc Sg} ;
|
||||
FemaleSurname name = {s = \\_ => name.s ; a = agrP3 Fem Sg} ;
|
||||
PlSurname name = {s = \\_ => name.s ; a = agrP3 Masc Pl} ;
|
||||
FullName given surname = {s = \\_ => given.s ++ surname.s ; a = agrP3 Masc Sg} ;
|
||||
UseLN name = {s = \\_ => name.s ; a = agrP3 Masc Sg} ;
|
||||
PlainLN name = {s = \\_ => name.s ; a = agrP3 Masc Sg} ;
|
||||
InLN name = {s = \\_ => name.s ++ "میں"} ;
|
||||
AdjLN ap name = {s = ap.s ! Sg ! Masc ! Dir ! Posit ++ name.s} ;
|
||||
}
|
||||
+17
-1
@@ -18,6 +18,8 @@ lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
||||
lincat Sub1000000 = { s : Str ; n : Number } ;
|
||||
lincat Sub1000000000 = {s : Str ; n : Number} ;
|
||||
lincat Sub1000000000000 = {s : Str ; n : Number} ;
|
||||
|
||||
lin num x0 =
|
||||
{s = table {
|
||||
@@ -82,6 +84,7 @@ lin pot1 d = {s = d.s ! ten ; size = less100 ; n = Pl} ; --changed from d.n
|
||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = Pl} ; --changed from d.n
|
||||
|
||||
lin pot1as2 n = {s = n.s ; s2 = "دمی" ; size = n.size ; n = n.n} ;
|
||||
lin pot21 = {s = "سو" ; s2 = "ایک لاکھ" ; size = more100 ; n = Pl} ;
|
||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
||||
s2 = d.s ! unit ++ "لاکھ" ; size = more100 ; n = Pl} ; --changed from d.n
|
||||
lin pot2plus d e =
|
||||
@@ -90,6 +93,7 @@ lin pot2plus d e =
|
||||
size = more100 ; n = Pl} ;
|
||||
|
||||
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
||||
lin pot31 = {s = "ایک ہزار" ; n = Pl} ;
|
||||
lin pot3 n = {s = table { singl => ekhazar ;
|
||||
less100 => n.s ++ "ہزار" ;
|
||||
more100 => n.s2 } ! n.size ; n = Pl} ; --changed from d.n
|
||||
@@ -98,6 +102,18 @@ lin pot3plus n m =
|
||||
less100 => n.s ++ "ہزار" ;
|
||||
more100 => n.s2 } ! n.size ++ m.s ; n = Pl} ; --changed from d.n
|
||||
|
||||
lin pot3as4 n = n ;
|
||||
lin pot3decimal n = {s = n.s ! NCard ++ "ہزار" ; n = Pl} ;
|
||||
lin pot41 = {s = "دس لاکھ" ; n = Pl} ;
|
||||
lin pot4 n = {s = n.s ++ "دس لاکھ" ; n = Pl} ;
|
||||
lin pot4plus n m = {s = n.s ++ "دس لاکھ" ++ m.s ; n = Pl} ;
|
||||
lin pot4as5 n = n ;
|
||||
lin pot4decimal n = {s = n.s ! NCard ++ "دس لاکھ" ; n = Pl} ;
|
||||
lin pot51 = {s = "ایک ارب" ; n = Pl} ;
|
||||
lin pot5 n = {s = n.s ++ "ارب" ; n = Pl} ;
|
||||
lin pot5plus n m = {s = n.s ++ "ارب" ++ m.s ; n = Pl} ;
|
||||
lin pot5decimal n = {s = n.s ! NCard ++ "ارب" ; n = Pl} ;
|
||||
|
||||
lin D_0 = { s = "۰" ; n = Sg};
|
||||
lin D_1 = { s = "۱" ; n = Sg};
|
||||
lin D_2 = { s = "۲" ; n = Pl};
|
||||
@@ -109,7 +125,7 @@ lin D_7 = { s = "۷" ; n = Pl};
|
||||
lin D_8 = { s = "۸" ; n = Pl};
|
||||
lin D_9 = { s = "۹" ; n = Pl};
|
||||
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
||||
lin IIDig d dg = { s = \\df => Prelude.glue (dg.s ! df) d.s ; n = Pl };
|
||||
lin IIDig d dg = {s = \\df => Prelude.glue d.s (dg.s ! df) ; n = Pl} ;
|
||||
lin PosDecimal d = d ** {hasDot=False} ;
|
||||
lin NegDecimal d = {
|
||||
s = \\df => Prelude.glue "-" (d.s ! df) ;
|
||||
|
||||
@@ -78,8 +78,8 @@ oper
|
||||
mkA : Str -> Str -> A2 -- e.g sE Xady krna
|
||||
= \a,c -> let n = regAdjective a in {s = n.s; c2 = c} ** {lock_A2 = <>} ;
|
||||
} ;
|
||||
mkA2 : A -> Str -> A2 ;
|
||||
mkA2 a str = a ** {c2=str ; lock_A2 = <>} ;
|
||||
mkA2 : A -> Prep -> A2 ;
|
||||
mkA2 a prep = a ** {c2 = prep.s ! Masc ; lock_A2 = <>} ;
|
||||
|
||||
-- compound Adjectives
|
||||
mkCompoundA : Str -> Str -> A ; -- e.g dra hwa
|
||||
|
||||
@@ -48,6 +48,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
||||
more_CAdv = {s = "زیادہ" ; p = "سے" } ;
|
||||
most_Predet = ss "زیادہ تر" ;
|
||||
much_Det = mkDet "بہت" "بہت" "بہت" "بہت" Sg ;
|
||||
must_VV = mkVV (mkV "پڑنا") ;
|
||||
-- must_VV = {
|
||||
-- s = table {
|
||||
-- VVF VInf => ["ہاvع تo"] ;
|
||||
@@ -71,7 +72,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
||||
please_Voc = ss "مہربانی" ;
|
||||
possess_Prep = mkPrep "کا" "کی" ;
|
||||
quite_Adv = ss "خاموش" ;
|
||||
she_Pron = personalPN "وہ" "اس" "وہ" ["اس کی"] ["اس کی"] ["اس کے"] ["اس کی"] Sg Fem Pers3_Distant ;
|
||||
she_Pron = personalPN "وہ" "اس" "وہ" ["اس کا"] ["اس کی"] ["اس کے"] ["اس کی"] Sg Fem Pers3_Distant ;
|
||||
so_AdA = ss "اس لیے" ;
|
||||
somebody_NP = MassNP (UseN (ParadigmsUrd.mkN "کوی" "کوی" "کوی" "کوی" "کوی" "کوی" Masc ));
|
||||
someSg_Det = mkDet "کچھ" "کچھ" "کچھ" "کچھ" Sg ;
|
||||
@@ -84,7 +85,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
||||
there7to_Adv = mkAdv ["وہاں پر"] ;
|
||||
there7from_Adv = mkAdv ["وہاں سے"] ;
|
||||
therefore_PConj = ss "اس لیے" ;
|
||||
they_Pron = personalPN "وہ" "وہ" "وہ" ["ان کا"] ["ان کی"] ["ان کے"] ["ان کی"] Pl Masc Pers3_Distant ; ----
|
||||
they_Pron = personalPN "وہ" "ان" "وہ" ["ان کا"] ["ان کی"] ["ان کے"] ["ان کی"] Pl Masc Pers3_Distant ; ----
|
||||
this_Quant = demoPN "یہ" "اس" "ان";
|
||||
through_Prep = mkPrep ["میں سے"] ["میں سے"] ;
|
||||
too_AdA = ss "بہت" ;
|
||||
|
||||
@@ -5,6 +5,11 @@ flags coding = utf8 ;
|
||||
oper
|
||||
|
||||
addErgative s1 s2 = s1 ++ s2 ;
|
||||
ergativePron ppf a = case a of {
|
||||
Ag _ Pl Pers3_Distant => "anhwN nE" ;
|
||||
Ag _ _ (Pers3_Near | Pers3_Distant) => addErgative (ppf ! Obl) nE ;
|
||||
_ => addErgative (ppf ! Dir) nE
|
||||
} ;
|
||||
conjThat = "kh" ;
|
||||
insertSubj : UPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "waN" ; _ => s ++ "E"}; -- check with prasad for vn~
|
||||
@@ -13,6 +18,8 @@ conjThat = "kh" ;
|
||||
awr = "awr" ;
|
||||
ky = "ky" ;
|
||||
ka = "ka" ;
|
||||
kE = "kE" ;
|
||||
rh = "rh" ;
|
||||
jn = "jn" ;
|
||||
js = "js" ;
|
||||
jw = "jw" ;
|
||||
|
||||
@@ -71,7 +71,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
||||
please_Voc = ss "mhrbany" ;
|
||||
possess_Prep = mkPrep "ka" "ky" ;
|
||||
quite_Adv = ss "KamwX" ;
|
||||
she_Pron = personalPN "wh" "as" "wh" ["as ky"] ["as ky"] ["as kE"] ["as ky"] Sg Fem Pers3_Distant ;
|
||||
she_Pron = personalPN "wh" "as" "wh" ["as ka"] ["as ky"] ["as kE"] ["as ky"] Sg Fem Pers3_Distant ;
|
||||
so_AdA = ss "as lyE" ;
|
||||
somebody_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy" "kwy" "kwy" "kwy" "kwy" "kwy" Masc ));
|
||||
someSg_Det = mkDet "kch'" "kch'" "kch'" "kch'" Sg ;
|
||||
@@ -84,7 +84,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
||||
there7to_Adv = mkAdv ["whaN pr"] ;
|
||||
there7from_Adv = mkAdv ["whaN sE"] ;
|
||||
therefore_PConj = ss "as lyE" ;
|
||||
they_Pron = personalPN "wh" "wh" "wh" ["an ka"] ["an ky"] ["an kE"] ["an ky"] Pl Masc Pers3_Distant ; ----
|
||||
they_Pron = personalPN "wh" "an" "wh" ["an ka"] ["an ky"] ["an kE"] ["an ky"] Pl Masc Pers3_Distant ; ----
|
||||
this_Quant = demoPN "yh" "as" "an";
|
||||
through_Prep = mkPrep ["myN sE"] ["myN sE"] ;
|
||||
too_AdA = ss "bht" ;
|
||||
|
||||
Reference in new issue
Block a user