mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -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 = {
|
||||
|
||||
Reference in New Issue
Block a user