forked from GitHub/gf-rgl
refinementsUrdPhrbook-2011-05-12
This commit is contained in:
@@ -248,6 +248,10 @@ resource CommonHindustani = ParamX ** open Prelude,Predef in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ;
|
||||||
|
mkCompoundAdj : Adjective -> Adjective -> Adjective ;
|
||||||
|
mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ;
|
||||||
|
|
||||||
Verb : Type = {s : VerbForm => Str} ;
|
Verb : Type = {s : VerbForm => Str} ;
|
||||||
|
|
||||||
predV : Verb -> VPH ;
|
predV : Verb -> VPH ;
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ incomplete concrete NounHindustani of Noun =
|
|||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
-- s = \\ c => detquant2det quant.s num.s c ++ ord.s ;
|
-- s = \\ c => detquant2det quant.s num.s c ++ ord.s ;
|
||||||
s = \\n,g => quant.s!n!g!Dir ++ num.s ++ ord.s ;
|
s = \\n,g,c => quant.s!n!g!c ++ num.s ++ ord.s ;
|
||||||
n = num.n
|
n = num.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuant quant num = {
|
DetQuant quant num = {
|
||||||
-- s = \\c => detquant2det quant.s num.s c;
|
-- s = \\c => detquant2det quant.s num.s c;
|
||||||
s = \\n,g => quant.s!n!g!Dir ++ num.s;
|
s = \\n,g,c => quant.s!n!g!c ++ num.s;
|
||||||
n = num.n
|
n = num.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -51,7 +51,12 @@ incomplete concrete NounHindustani of Noun =
|
|||||||
a = agrP3 Masc Sg
|
a = agrP3 Masc Sg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron p = {s = \\n,g,_ => p.ps ! n ! g ; a = p.a} ;
|
-- 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 ;
|
||||||
|
_ => p.ps ! n ! g
|
||||||
|
};
|
||||||
|
a = p.a} ;
|
||||||
|
|
||||||
NumSg = {s = []; n = Sg} ;
|
NumSg = {s = []; n = Sg} ;
|
||||||
NumPl = {s = []; n = Pl} ;
|
NumPl = {s = []; n = Pl} ;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ param
|
|||||||
Preposition = {s : Gender => Str};
|
Preposition = {s : Gender => Str};
|
||||||
DemPronForm = {s : Number => Gender => Case => Str};
|
DemPronForm = {s : Number => Gender => Case => Str};
|
||||||
PossPronForm = {s : Number => Gender => Case => Str};
|
PossPronForm = {s : Number => Gender => Case => Str};
|
||||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
Determiner = {s : Number => Gender => Case => Str ; n : Number};
|
||||||
|
|
||||||
-- a useful oper
|
-- a useful oper
|
||||||
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
||||||
@@ -64,14 +64,14 @@ param
|
|||||||
} ;
|
} ;
|
||||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
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 ! 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 ++ cn.s ! nn ! c ;
|
NPC c => dt.s ! nn ! cn.g ! c ++ cn.s ! nn ! c ;
|
||||||
NPObj => dt.s ! nn ! cn.g ++ cn.s ! nn ! Dir ;
|
NPObj => dt.s ! nn ! cn.g ! Dir ++ cn.s ! nn ! Dir ;
|
||||||
NPErg => dt.s ! nn ! cn.g ++ cn.s ! nn ! Obl ++ "nE"
|
NPErg => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Obl ++ "nE"
|
||||||
} ;
|
} ;
|
||||||
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
||||||
NPC c => dt.s ! Sg ! Masc ;
|
NPC c => dt.s ! Sg ! Masc ! c ;
|
||||||
NPObj => dt.s ! Sg ! Masc ;
|
NPObj => dt.s ! Sg ! Masc ! Dir ;
|
||||||
NPErg => dt.s ! Sg ! Masc ++ "nE"
|
NPErg => dt.s ! Sg ! Masc ! Obl ++ "nE"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ incomplete concrete SymbolHindustani of Symbol =
|
|||||||
a = agrP3 cn.g Sg
|
a = agrP3 cn.g Sg
|
||||||
} ;
|
} ;
|
||||||
CNSymbNP det cn xs = {
|
CNSymbNP det cn xs = {
|
||||||
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
s = \\c => det.s ! det.n ! Masc ! Dir ++ cn.s ! det.n ! Dir ++ xs.s ; -- may be need to refine it i.e instead of using \\c should use table and then corresponding forms from det
|
||||||
a = agrP3 cn.g det.n
|
a = agrP3 cn.g det.n
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
|
|||||||
@@ -248,6 +248,10 @@ resource CommonHindustani = ParamX ** open Prelude,Predef in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ;
|
||||||
|
mkCompoundAdj : Adjective -> Adjective -> Adjective ;
|
||||||
|
mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ;
|
||||||
|
|
||||||
Verb : Type = {s : VerbForm => Str} ;
|
Verb : Type = {s : VerbForm => Str} ;
|
||||||
|
|
||||||
predV : Verb -> VPH ;
|
predV : Verb -> VPH ;
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ incomplete concrete ExtraHindustani of ExtraHindustaniAbs = CatHindustani **
|
|||||||
open CommonHindustani,Coordination,ResHindustani, ParamX in {
|
open CommonHindustani,Coordination,ResHindustani, ParamX in {
|
||||||
lin
|
lin
|
||||||
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
|
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
|
||||||
GenNP np = {s = table {
|
GenNP np = {s = \\n,g,c =>
|
||||||
case <g,n,c> of {
|
case <n,g,c> of {
|
||||||
<Masc,_,_> => np.s ! NPC Obl ++ "كا" ;
|
<_,Masc,_> => np.s ! NPC Obl ++ "كا" ;
|
||||||
<Fem,_,_> => np.s ! NPC Obl ++ "كی"
|
<_,Fem,_> => np.s ! NPC Obl ++ "كی"
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
a = np.a} ;
|
a = np.a} ;
|
||||||
|
|
||||||
each_Det = mkDet "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Sg ;
|
each_Det = mkDet "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Sg ;
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ flags coding = utf8 ;
|
|||||||
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
|
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
|
||||||
GenNP np = {s = \\n,g,c =>
|
GenNP np = {s = \\n,g,c =>
|
||||||
case <n,g,c> of {
|
case <n,g,c> of {
|
||||||
<_,Masc,_> => np.s ! NPC Obl ++ "كا" ;
|
<Sg,Masc,Obl> => np.s ! NPC Obl ++ "كے" ;
|
||||||
|
<Sg,Masc,_> => np.s ! NPC Obl ++ "كا" ;
|
||||||
|
<Pl,Masc,_> => np.s ! NPC Obl ++ "كے" ;
|
||||||
<_,Fem,_> => np.s ! NPC Obl ++ "كی"
|
<_,Fem,_> => np.s ! NPC Obl ++ "كی"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ oper
|
|||||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Masc => s1 ;
|
Masc => table {_ => s1} ;
|
||||||
Fem => s2
|
Fem => table {_ => s2}
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Masc => s3 ;
|
Masc => table { _ => s3} ;
|
||||||
Fem => s4
|
Fem => table {_ => s4}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,10 @@ oper
|
|||||||
mkA2 : A -> Str -> A2 ;
|
mkA2 : A -> Str -> A2 ;
|
||||||
mkA2 a str = a ** {c2=str ; lock_A2 = <>} ;
|
mkA2 a str = a ** {c2=str ; lock_A2 = <>} ;
|
||||||
|
|
||||||
|
-- compound Adjectives
|
||||||
|
mkCompoundA : Str -> Str -> A ; -- e.g dra hwa
|
||||||
|
mkCompoundA s1 s2 = compoundAdj s1 s2 ;
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
mkV : Str -> V -- regular verbs like swna
|
mkV : Str -> V -- regular verbs like swna
|
||||||
@@ -108,8 +112,12 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
----2 Adverbs
|
----2 Adverbs
|
||||||
|
mkAdv = overload {
|
||||||
mkAdv : Str -> Adv -- e.g yhaN
|
mkAdv : Str -> Adv -- e.g yhaN
|
||||||
= \str -> {s = \\_ => str ; lock_Adv = <>};
|
= \str -> {s = \\_ => str ; lock_Adv = <>};
|
||||||
|
mkAdv : Str -> Str -> Adv
|
||||||
|
= \m,f -> {s = table {Masc => m ; Fem => f} ; lock_Adv = <>};
|
||||||
|
};
|
||||||
|
|
||||||
----2 Prepositions
|
----2 Prepositions
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ param
|
|||||||
Preposition = {s : Gender => Str};
|
Preposition = {s : Gender => Str};
|
||||||
DemPronForm = {s : Number => Gender => Case => Str};
|
DemPronForm = {s : Number => Gender => Case => Str};
|
||||||
PossPronForm = {s : Number => Gender => Case => Str};
|
PossPronForm = {s : Number => Gender => Case => Str};
|
||||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
Determiner = {s : Number => Gender => Case => Str ; n : Number};
|
||||||
|
|
||||||
-- a useful oper
|
-- a useful oper
|
||||||
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
||||||
@@ -64,14 +64,14 @@ param
|
|||||||
} ;
|
} ;
|
||||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
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 ! 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 ++ cn.s ! nn ! c ;
|
NPC c => dt.s ! nn ! cn.g ! c ++ cn.s ! nn ! c ;
|
||||||
NPObj => dt.s ! nn ! cn.g ++ cn.s ! nn ! Dir ;
|
NPObj => dt.s ! nn ! cn.g ! Dir ++ cn.s ! nn ! Dir ;
|
||||||
NPErg => dt.s ! nn ! cn.g ++ cn.s ! nn ! Obl ++ "نے"
|
NPErg => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Obl ++ "نے"
|
||||||
} ;
|
} ;
|
||||||
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
||||||
NPC c => dt.s ! Sg ! Masc ;
|
NPC c => dt.s ! Sg ! Masc ! c ;
|
||||||
NPObj => dt.s ! Sg ! Masc ;
|
NPObj => dt.s ! Sg ! Masc ! Dir ;
|
||||||
NPErg => dt.s ! Sg ! Masc ++ "نے"
|
NPErg => dt.s ! Sg ! Masc ! Obl ++ "نے"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
yes_Utt = ss "ہاں" ;
|
yes_Utt = ss "ہاں" ;
|
||||||
youSg_Pron = personalPN "تو" "تو" "تو" "تیرا" "تیری" "تیرے" "تیری" Sg Masc Pers2_Casual ;
|
youSg_Pron = personalPN "تو" "تو" "تو" "تیرا" "تیری" "تیرے" "تیری" Sg Masc Pers2_Casual ;
|
||||||
youPl_Pron = personalPN "تم" "تم" "تم" "تمھارا" "تمھاری" "تمھارے" "تمھاری" Pl Masc Pers2_Casual ;
|
youPl_Pron = personalPN "تم" "تم" "تم" "تمھارا" "تمھاری" "تمھارے" "تمھاری" Pl Masc Pers2_Casual ;
|
||||||
youPol_Pron = personalPN "آپ" "آپ" "آپ" ["آپ كا"] ["آپ كی"] ["آپ كے"] ["آپ كی"] Sg Masc Pers2_Respect ;
|
youPol_Pron = personalPN "آپ" "آپ" "آپ" ["آپ كا"] ["آپ كی"] ["آپ كے"] ["آپ كی"] Pl Masc Pers2_Respect ;
|
||||||
no_Quant = demoPN " كوی نہیں" "كوی نہیں" "كوی نہیں" ;
|
no_Quant = demoPN " كوی نہیں" "كوی نہیں" "كوی نہیں" ;
|
||||||
not_Predet = {s="نہیں"} ;
|
not_Predet = {s="نہیں"} ;
|
||||||
if_then_Conj = sd2 "اگر" "تو" ** {n = Sg} ;
|
if_then_Conj = sd2 "اگر" "تو" ** {n = Sg} ;
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ flags coding = utf8 ;
|
|||||||
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
||||||
GenNP np = {s = \\n,g,c =>
|
GenNP np = {s = \\n,g,c =>
|
||||||
case <n,g,c> of {
|
case <n,g,c> of {
|
||||||
<_,Masc,_> => np.s ! NPC Obl ++ "ka" ;
|
<Sg,Masc,Obl> => np.s ! NPC Obl ++ "kE" ;
|
||||||
|
<Sg,Masc,_> => np.s ! NPC Obl ++ "ka" ;
|
||||||
|
<Pl,Masc,_> => np.s ! NPC Obl ++ "kE" ;
|
||||||
<_,Fem,_> => np.s ! NPC Obl ++ "ky"
|
<_,Fem,_> => np.s ! NPC Obl ++ "ky"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ oper
|
|||||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Masc => s1 ;
|
Masc => table {_ => s1} ;
|
||||||
Fem => s2
|
Fem => table {_ => s2}
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Masc => s3 ;
|
Masc => table { _ => s3} ;
|
||||||
Fem => s4
|
Fem => table {_ => s4}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
yes_Utt = ss "haN" ;
|
yes_Utt = ss "haN" ;
|
||||||
youSg_Pron = personalPN "tw" "tw" "tw" "tyra" "tyry" "tyrE" "tyry" Sg Masc Pers2_Casual ;
|
youSg_Pron = personalPN "tw" "tw" "tw" "tyra" "tyry" "tyrE" "tyry" Sg Masc Pers2_Casual ;
|
||||||
youPl_Pron = personalPN "tm" "tm" "tm" "tmh'ara" "tmh'ary" "tmh'arE" "tmh'ary" Pl Masc Pers2_Casual ;
|
youPl_Pron = personalPN "tm" "tm" "tm" "tmh'ara" "tmh'ary" "tmh'arE" "tmh'ary" Pl Masc Pers2_Casual ;
|
||||||
youPol_Pron = personalPN "Ap" "Ap" "Ap" ["Ap ka"] ["Ap ky"] ["Ap kE"] ["Ap ky"] Sg Masc Pers2_Respect ;
|
youPol_Pron = personalPN "Ap" "Ap" "Ap" ["Ap ka"] ["Ap ky"] ["Ap kE"] ["Ap ky"] Pl Masc Pers2_Respect ;
|
||||||
no_Quant = demoPN " kwy nhyN" "kwy nhyN" "kwy nhyN" ;
|
no_Quant = demoPN " kwy nhyN" "kwy nhyN" "kwy nhyN" ;
|
||||||
not_Predet = {s="nhyN"} ;
|
not_Predet = {s="nhyN"} ;
|
||||||
if_then_Conj = sd2 "agr" "tw" ** {n = Sg} ;
|
if_then_Conj = sd2 "agr" "tw" ** {n = Sg} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user