refinementsUrdPhrbook-2011-05-12

This commit is contained in:
virk.shafqat
2011-05-12 16:24:00 +00:00
parent 9a31b52556
commit 17d5a3ffbb
17 changed files with 112 additions and 74 deletions

View File

@@ -247,6 +247,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} ;

View File

@@ -4,12 +4,12 @@ incomplete concrete ExtraHindustani of ExtraHindustaniAbs = CatHindustani **
open CommonHindustani,Coordination,ResHindustani, ParamX in {
lin
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
GenNP np = {s = table {
case <g,n,c> of {
<Masc,_,_> => np.s ! NPC Obl ++ "كا" ;
<Fem,_,_> => np.s ! NPC Obl ++ "كی"
};
GenNP np = {s = \\n,g,c =>
case <n,g,c> of {
<_,Masc,_> => np.s ! NPC Obl ++ "كا" ;
<_,Fem,_> => np.s ! NPC Obl ++ "كی"
};
a = np.a} ;
each_Det = mkDet "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Sg ;

View File

@@ -7,7 +7,9 @@ flags coding = utf8 ;
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
GenNP np = {s = \\n,g,c =>
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 ++ "كی"
};

View File

@@ -173,13 +173,13 @@ oper
IDeterminer = {s:Gender => Case => Str ; n : Number};
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
s = table {
Sg => table {
Masc => s1 ;
Fem => s2
Sg => table {
Masc => table {_ => s1} ;
Fem => table {_ => s2}
} ;
Pl => table {
Masc => s3 ;
Fem => s4
Masc => table { _ => s3} ;
Fem => table {_ => s4}
}
} ;

View File

@@ -75,6 +75,10 @@ oper
} ;
mkA2 : A -> Str -> 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
@@ -108,8 +112,12 @@ oper
----2 Adverbs
mkAdv = overload {
mkAdv : Str -> Adv -- e.g yhaN
= \str -> {s = \\_ => str ; lock_Adv = <>};
mkAdv : Str -> Str -> Adv
= \m,f -> {s = table {Masc => m ; Fem => f} ; lock_Adv = <>};
};
----2 Prepositions

View File

@@ -44,7 +44,7 @@ param
Preposition = {s : Gender => Str};
DemPronForm = {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
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 {
-- 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 ;
NPObj => dt.s ! nn ! cn.g ++ cn.s ! nn ! Dir ;
NPErg => dt.s ! nn ! cn.g ++ cn.s ! nn ! Obl ++ "نے"
NPC c => dt.s ! nn ! cn.g ! c ++ cn.s ! nn ! c ;
NPObj => dt.s ! nn ! cn.g ! Dir ++ cn.s ! nn ! Dir ;
NPErg => dt.s ! nn ! cn.g ! Obl ++ cn.s ! nn ! Obl ++ "نے"
} ;
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
NPC c => dt.s ! Sg ! Masc ;
NPObj => dt.s ! Sg ! Masc ;
NPErg => dt.s ! Sg ! Masc ++ "نے"
NPC c => dt.s ! Sg ! Masc ! c ;
NPObj => dt.s ! Sg ! Masc ! Dir ;
NPErg => dt.s ! Sg ! Masc ! Obl ++ "نے"
} ;
------------------------------------------

View File

@@ -111,7 +111,7 @@ concrete StructuralUrd of Structural = CatUrd **
yes_Utt = ss "ہاں" ;
youSg_Pron = personalPN "تو" "تو" "تو" "تیرا" "تیری" "تیرے" "تیری" Sg 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 " كوی نہیں" "كوی نہیں" "كوی نہیں" ;
not_Predet = {s="نہیں"} ;
if_then_Conj = sd2 "اگر" "تو" ** {n = Sg} ;

View File

@@ -7,7 +7,9 @@ flags coding = utf8 ;
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
GenNP np = {s = \\n,g,c =>
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"
};

View File

@@ -173,13 +173,13 @@ oper
IDeterminer = {s:Gender => Case => Str ; n : Number};
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
s = table {
Sg => table {
Masc => s1 ;
Fem => s2
Sg => table {
Masc => table {_ => s1} ;
Fem => table {_ => s2}
} ;
Pl => table {
Masc => s3 ;
Fem => s4
Masc => table { _ => s3} ;
Fem => table {_ => s4}
}
} ;

View File

@@ -111,7 +111,7 @@ concrete StructuralUrd of Structural = CatUrd **
yes_Utt = ss "haN" ;
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 ;
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" ;
not_Predet = {s="nhyN"} ;
if_then_Conj = sd2 "agr" "tw" ** {n = Sg} ;