mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-19 01:39:32 -06:00
refinementsUrdPhrbook-2011-05-12
This commit is contained in:
@@ -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} ;
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ incomplete concrete NounHindustani of Noun =
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
-- 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
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
-- 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
|
||||
} ;
|
||||
|
||||
@@ -51,7 +51,12 @@ incomplete concrete NounHindustani of Noun =
|
||||
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} ;
|
||||
NumPl = {s = []; n = Pl} ;
|
||||
|
||||
@@ -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 ++ "nE"
|
||||
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 ++ "nE"
|
||||
} ;
|
||||
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 ++ "nE"
|
||||
NPC c => dt.s ! Sg ! Masc ! c ;
|
||||
NPObj => dt.s ! Sg ! Masc ! Dir ;
|
||||
NPErg => dt.s ! Sg ! Masc ! Obl ++ "nE"
|
||||
} ;
|
||||
|
||||
------------------------------------------
|
||||
|
||||
@@ -15,7 +15,7 @@ incomplete concrete SymbolHindustani of Symbol =
|
||||
a = agrP3 cn.g Sg
|
||||
} ;
|
||||
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
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 ++ "كی"
|
||||
};
|
||||
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 ++ "نے"
|
||||
} ;
|
||||
|
||||
------------------------------------------
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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"
|
||||
};
|
||||
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
Reference in New Issue
Block a user