1
0
forked from GitHub/gf-core

implementation of few more functions in ParseHin,Urd and new entries in DictUrd2

This commit is contained in:
virk.shafqat
2013-04-09 13:48:04 +00:00
parent 0667311adf
commit 029d90adc8
11 changed files with 78 additions and 12 deletions

View File

@@ -29,6 +29,7 @@ oper
nahen = "नहीं" ;
xayad = "शायद" ;
kya = "क्या" ;
mein = "में" ;
oper
copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g ->

View File

@@ -35,7 +35,8 @@ lin
itself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Near }; --regNP "itself" singular ;
ourself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers1 }; --regNP "ourself" plural ;
yourselfPl_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers2_Respect }; --regNP "yourself" plural ;
themself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
themselves_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
themself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Distant }; --regNP "themself" plural ;
CompoundCN num noun cn = {
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
@@ -135,17 +136,16 @@ lin
UncNeg = {s = [] ; p = Neg} ;
VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
{-
PastPartRS ant pol vps = {
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
c = npNom
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
c = Dir
} ;
PresPartRS ant pol vp = {
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
c = npNom
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
c = Dir
} ;
-}
ApposNP np1 np2 = {
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;

View File

@@ -29,6 +29,7 @@ oper
nahen = "nahi:m." ;
xayad = "s*a:yd" ;
kya = "kX,ya:" ;
mein = "me:m." ;
oper
copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g ->

View File

@@ -2,6 +2,7 @@ incomplete concrete AdverbHindustani of Adverb = CatHindustani ** open CommonHin
lin
PositAdvAdj a = {s = \\g => a.s ! Sg ! g ! Obl ! Posit} ;
PositAdAAdj a = {s = a.s ! Sg ! Masc ! Obl ! Posit} ;
ComparAdvAdj cadv a np = {
s = \\g => np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit;
} ;

View File

@@ -22,6 +22,7 @@ interface DiffHindustani = open Prelude in {
indfArt : Str ;
nE : Str ;
hE : Str ;
mein : Str ;
na : Str ;
nahen : Str ;

View File

@@ -11,6 +11,12 @@ incomplete concrete ExtraHindustani of ExtraHindustaniAbs = CatHindustani **
};
a = np.a} ;
EmptyRelSlash slash = {
s = \\t,p,o,_ => slash.s ! t ! p ! o ++ slash.c2.s ;
c = Obl
} ;
each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
have_V = mkV "rakh'na";

View File

@@ -31,7 +31,7 @@ incomplete concrete NounHindustani of Noun =
AdvNP np adv = {
-- s = \\c => np.s ! c ++ adv.s ! (fromAgr np.a).g ; -- jan ka bh'ay so order is changed
s = \\c => adv.s ! (fromAgr np.a).g ++ np.s ! c ;
a = np.a
a = np.a
} ;
DetQuantOrd quant num ord = {
@@ -149,4 +149,9 @@ incomplete concrete NounHindustani of Noun =
Fem => cn.s ! n ! c ++ ky ++ np.s ! NPC Dir } ;
g = cn.g} ;
CountNP det np = {
s = \\c => np.s ! NPC Obl ++ mein ++ sE ++ det.s ! (giveNumber np.a) ! (giveGender np.a) ! Dir ;
a = agrP3 (giveGender np.a) det.n
} ;
}

View File

@@ -30023,6 +30023,7 @@ lin zoology_N = mkN "حیوانیات" ; -- from DictUrd
lin zoom_N = mkN "تیزی سے آنا" ;
lin zoom_V = compoundV "سیدھا" (mkV "اوپر چڑھنا") ; -- from DictUrd
-- Structural
lin
of_Prep = mkPrep "کا" "کی" ;
@@ -30219,4 +30220,27 @@ lin should_VV = mkV "چاہنا" ** { isAux = True} ; --this need to be fixed
lin must_VV = (mkV "ضرور چاہنا") ** { isAux = True} ; -- this need to be fixed
lin half_Predet = ss "آدھا" ;
lin till_Prep = mkPrep "جب تک" "جب تک" ;
--added 2013/04/09
lin unit_3_N = mkN ["یونٹ تھری"];
lin minneapolis_PN = mkPN "مینیاپولیس" ;
lin pretty_AdA = ss "کافی" ;
lin upon_Prep = mkPrep "پر" "پر" ;
lin anyPl_Det = mkDet "کوئی" "کوئی" "کوئی" "کوئی" Pl ;
--lin as_Prep = mkPrep "جیسا" "جیسی" ;
lin also_AdV = ss "بھی" ;
lin even_AdA = ss "چاھے" ;
lin such_Predet = ss "ایسی" ;
lin outside_Prep = mkPrep "باہر" "باہر" ;
lin another_Quant = demoPN "کوئی اور" "کوئی اور" "کوئی اور";
lin japaneseMasc_N = mkN "جاپانی" ;
lin in_addition_Adv = mkAdv "مزید" ;
lin for_starters_Adv = mkAdv "آغاز کرنے والوں کیلئے" ;
lin never_AdV = ss "کھبی نہیں" ;
lin among_Prep = mkPrep "میں سے" "میں سے" ;
lin throughout_Prep = mkPrep "مکمل" "مکمل" ;
lin further_AdV = ss "مزید" ;
lin for_instance_Adv = mkAdv "مثال کے طور پر" ;
}

View File

@@ -26,6 +26,7 @@ conjThat = "کہ" ;
comma = "," ;
indfArt = "" ;
kwd = "خود" ;
mein = "میں" ;
na = "نا" ;
nahen = "نہیں" ;

View File

@@ -1,4 +1,4 @@
--# -path=.:alltenses:../abstract:../english
--# -path=.:alltenses:../abstract:../english:../hindustani
concrete ParseUrd of ParseEngAbs =
TenseX - [AdN,Adv,SC,PPos,PNeg],
-- TextX - [AdN,Adv,SC],
@@ -25,6 +25,7 @@ open MorphoUrd, ResUrd, ParadigmsUrd,CommonX, CommonHindustani, Prelude in {
flags
literal=Symb ;
coding=utf8 ;
lin
myself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers1 };
@@ -34,7 +35,8 @@ lin
itself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Near }; --regNP "itself" singular ;
ourself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers1 }; --regNP "ourself" plural ;
yourselfPl_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers2_Respect }; --regNP "yourself" plural ;
themself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
themselves_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
themself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Distant }; --regNP "themself" plural ;
CompoundCN num noun cn = {
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
@@ -117,7 +119,7 @@ CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP False vp a} ; -- check for vp.isAux
that_RP = {
s = \\_,_ => "kh" ;
s = \\_,_ => "کہ" ;
a = RNoAg
} ;
--no_RP = {
@@ -125,12 +127,35 @@ CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
-- a = RNoAg
-- } ;
CompS s = {s = \\_ => "kh" ++ s.s} ;
CompS s = {s = \\_ => "کہ" ++ s.s} ;
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
lin
PPos = {s = [] ; p = Pos} ;
PNeg = {s = [] ; p = Neg} ; -- contracted: don't
UncNeg = {s = [] ; p = Neg} ;
--VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
PastPartRS ant pol vps = {
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
c = Dir
} ;
PresPartRS ant pol vp = {
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
c = Dir
} ;
ApposNP np1 np2 = {
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;
a = np2.a
} ;
AdAdV = cc2 ;
UttAdV adv = adv;
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
}

View File

@@ -26,6 +26,7 @@ conjThat = "kh" ;
comma = "," ;
indfArt = "" ;
kwd = "Kwd" ;
mein = "myN" ;
na = "na" ;
nahen = "nhyN" ;