mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Hindi and Urdu as refactored to Hindustani by Shafqat
This commit is contained in:
@@ -1,36 +1,2 @@
|
|||||||
concrete AdjectiveHin of Adjective = CatHin ** open ResHin, Prelude in {
|
concrete AdjectiveHin of Adjective = CatHin ** AdjectiveHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
lin
|
|
||||||
|
|
||||||
PositA a = a ;
|
|
||||||
|
|
||||||
-- ComparA a np = {
|
|
||||||
-- s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ;
|
|
||||||
-- isPre = False
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
|
||||||
--
|
|
||||||
-- ComplA2 a np = {
|
|
||||||
-- s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ;
|
|
||||||
-- isPre = False
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- ReflA2 a = {
|
|
||||||
-- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ;
|
|
||||||
-- isPre = False
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- SentAP ap sc = {
|
|
||||||
-- s = \\a => ap.s ! a ++ sc.s ;
|
|
||||||
-- isPre = False
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- AdAP ada ap = {
|
|
||||||
-- s = \\a => ada.s ++ ap.s ! a ;
|
|
||||||
-- isPre = ap.isPre
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- UseA2 a = a ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,20 +1,2 @@
|
|||||||
concrete AdverbHin of Adverb = CatHin ** open ResHin, Prelude in {
|
concrete AdverbHin of Adverb = CatHin ** AdverbHindustani with
|
||||||
--
|
(ResHindustani = ResHin) ;
|
||||||
-- lin
|
|
||||||
-- PositAdvAdj a = {s = a.s ! AAdv} ;
|
|
||||||
-- ComparAdvAdj cadv a np = {
|
|
||||||
-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom
|
|
||||||
-- } ;
|
|
||||||
-- ComparAdvAdjS cadv a s = {
|
|
||||||
-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- PrepNP prep np = {s = prep.s ++ np.s ! Acc} ;
|
|
||||||
--
|
|
||||||
-- AdAdv = cc2 ;
|
|
||||||
--
|
|
||||||
-- SubjS = cc2 ;
|
|
||||||
--
|
|
||||||
-- AdnCAdv cadv = {s = cadv.s ++ "than"} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:../prelude:../hindustani
|
||||||
|
|
||||||
concrete AllHin of AllHinAbs = LangHin ;
|
concrete AllHin of AllHinAbs =
|
||||||
|
LangHin,
|
||||||
|
ExtraHin
|
||||||
|
** {} ;
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
abstract AllHinAbs = Lang ;
|
abstract AllHinAbs =
|
||||||
|
Lang,
|
||||||
|
ExtraHinAbs
|
||||||
|
** {} ;
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
--concrete BackwardHin of Backward = CatHin ** open ResHin in {
|
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
|
||||||
-- lin
|
|
||||||
--
|
|
||||||
---- A repository of obsolete constructs, needed for backward compatibility.
|
|
||||||
---- They create spurious ambiguities if used in combination with Lang.
|
|
||||||
--
|
|
||||||
---- from Verb 19/4/2008
|
|
||||||
--
|
|
||||||
-- ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ;
|
|
||||||
-- ComplV3 v np np2 =
|
|
||||||
-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ;
|
|
||||||
-- ComplV2V v np vp =
|
|
||||||
-- insertObj (\\a => infVP v.isAux vp a)
|
|
||||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
|
||||||
-- ComplV2S v np s =
|
|
||||||
-- insertObj (\\_ => conjThat ++ s.s)
|
|
||||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
|
||||||
-- ComplV2Q v np q =
|
|
||||||
-- insertObj (\\_ => q.s ! QIndir)
|
|
||||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
|
||||||
-- ComplV2A v np ap =
|
|
||||||
-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ;
|
|
||||||
--
|
|
||||||
-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
|
||||||
--
|
|
||||||
---- from Sentence 19/4/2008
|
|
||||||
--
|
|
||||||
-- SlashV2 np v2 =
|
|
||||||
-- mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ;
|
|
||||||
--
|
|
||||||
-- SlashVVV2 np vv v2 =
|
|
||||||
-- mkClause (np.s ! Nom) np.a
|
|
||||||
-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) **
|
|
||||||
-- {c2 = v2.c2} ;
|
|
||||||
--
|
|
||||||
---- from Noun 19/4/2008
|
|
||||||
--
|
|
||||||
-- NumInt n = {s = n.s ; n = Pl} ;
|
|
||||||
-- OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED
|
|
||||||
--
|
|
||||||
-- DetSg quant ord = {
|
|
||||||
-- s = quant.s ! Sg ++ ord.s ;
|
|
||||||
-- n = Sg
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- DetPl quant num ord = {
|
|
||||||
-- s = quant.s ! num.n ++ num.s ++ ord.s ;
|
|
||||||
-- n = num.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- NoNum = {s = []; n = Pl } ;
|
|
||||||
--
|
|
||||||
-- DefArt = {s = \\_ => artDef} ;
|
|
||||||
--
|
|
||||||
-- IndefArt = {
|
|
||||||
-- s = table {
|
|
||||||
-- Sg => artIndef ;
|
|
||||||
-- Pl => []
|
|
||||||
-- }
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- MassDet = {s = \\_ => []} ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--
|
|
||||||
---- from Structural 19/4/2008
|
|
||||||
--
|
|
||||||
-- that_NP = regNP "that" Sg ;
|
|
||||||
-- these_NP = regNP "these" Pl ;
|
|
||||||
-- this_NP = regNP "this" Sg ;
|
|
||||||
-- those_NP = regNP "those" Pl ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
@@ -1,90 +1,2 @@
|
|||||||
concrete CatHin of Cat = CommonX ** open ResHin, Prelude in {
|
concrete CatHin of Cat = CommonX - [Adv,AdN] ** CatHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lincat
|
|
||||||
--
|
|
||||||
---- Tensed/Untensed
|
|
||||||
--
|
|
||||||
-- S = {s : Str} ;
|
|
||||||
-- QS = {s : QForm => Str} ;
|
|
||||||
-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
|
||||||
-- SSlash = {s : Str ; c2 : Str} ;
|
|
||||||
--
|
|
||||||
---- Sentence
|
|
||||||
--
|
|
||||||
Cl = ResHin.Clause ;
|
|
||||||
-- ClSlash = {
|
|
||||||
-- s : ResHin.Tense => Anteriority => CPolarity => Order => Str ;
|
|
||||||
-- c2 : Str
|
|
||||||
-- } ;
|
|
||||||
-- Imp = {s : CPolarity => ImpForm => Str} ;
|
|
||||||
--
|
|
||||||
---- Question
|
|
||||||
--
|
|
||||||
-- QCl = {s : ResHin.Tense => Anteriority => CPolarity => QForm => Str} ;
|
|
||||||
-- IP = {s : Case => Str ; n : Number} ;
|
|
||||||
-- IComp = {s : Str} ;
|
|
||||||
-- IDet = {s : Str ; n : Number} ;
|
|
||||||
-- IQuant = {s : Number => Str} ;
|
|
||||||
--
|
|
||||||
---- Relative
|
|
||||||
--
|
|
||||||
-- RCl = {
|
|
||||||
-- s : ResHin.Tense => Anteriority => CPolarity => Agr => Str ;
|
|
||||||
-- c : Case
|
|
||||||
-- } ;
|
|
||||||
-- RP = {s : RCase => Str ; a : RAgr} ;
|
|
||||||
--
|
|
||||||
---- Verb
|
|
||||||
--
|
|
||||||
VP = ResHin.VPH ;
|
|
||||||
VPSlash = ResHin.VPHSlash ;
|
|
||||||
-- Comp = {s : Agr => Str} ;
|
|
||||||
--
|
|
||||||
---- Adjective
|
|
||||||
--
|
|
||||||
AP = ResHin.Adjective ;
|
|
||||||
--
|
|
||||||
---- Noun
|
|
||||||
--
|
|
||||||
CN = ResHin.Noun ;
|
|
||||||
NP = ResHin.NP ;
|
|
||||||
Pron = {s : PronCase => Str ; a : Agr} ;
|
|
||||||
Det = {s : Gender => Case => Str ; n : Number} ;
|
|
||||||
-- Predet, Ord = {s : Str} ;
|
|
||||||
Num = {s : Str ; n : Number} ;
|
|
||||||
-- Card = {s : Str; n : Number} ;
|
|
||||||
Quant = {s : Number => Gender => Case => Str} ;
|
|
||||||
Art = {s : Str} ;
|
|
||||||
--
|
|
||||||
---- Numeral
|
|
||||||
--
|
|
||||||
-- Numeral = {s : CardOrd => Str ; n : Number} ;
|
|
||||||
-- Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ;
|
|
||||||
--
|
|
||||||
---- Structural
|
|
||||||
--
|
|
||||||
-- Conj = {s1,s2 : Str ; n : Number} ;
|
|
||||||
-----b Conj = {s : Str ; n : Number} ;
|
|
||||||
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
|
||||||
-- Subj = {s : Str} ;
|
|
||||||
-- Prep = {s : Str} ;
|
|
||||||
--
|
|
||||||
---- Open lexical classes, e.g. Lexicon
|
|
||||||
--
|
|
||||||
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
|
||||||
V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ;
|
|
||||||
-- V3 = Verb ** {c2, c3 : Str} ;
|
|
||||||
-- VV = {s : VVForm => Str ; isAux : Bool} ;
|
|
||||||
-- V2V = Verb ** {c2 : Str ; isAux : Bool} ;
|
|
||||||
--
|
|
||||||
A = ResHin.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
|
||||||
-- A2 = {s : AForm => Str ; c2 : Str} ;
|
|
||||||
--
|
|
||||||
N = {s : Number => Case => Str ; g : Gender} ;
|
|
||||||
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
|
||||||
-- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
|
|
||||||
PN = {s : Case => Str ; g : Gender} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,37 +1,2 @@
|
|||||||
concrete ConjunctionHin of Conjunction =
|
concrete ConjunctionHin of Conjunction = CatHin ** ConjunctionHindustani with
|
||||||
CatHin ** open ResHin, Coordination, Prelude in {
|
(ResHindustani = ResHin) ;
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
|
||||||
-- lin
|
|
||||||
--
|
|
||||||
-- ConjS = conjunctDistrSS ;
|
|
||||||
--
|
|
||||||
-- ConjAdv = conjunctDistrSS ;
|
|
||||||
--
|
|
||||||
-- ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
|
||||||
-- a = conjAgr (agrP3 conj.n) ss.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- ConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
|
||||||
-- isPre = ss.isPre
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
---- These fun's are generated from the list cat's.
|
|
||||||
--
|
|
||||||
-- BaseS = twoSS ;
|
|
||||||
-- ConsS = consrSS comma ;
|
|
||||||
-- BaseAdv = twoSS ;
|
|
||||||
-- ConsAdv = consrSS comma ;
|
|
||||||
-- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
|
||||||
-- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
|
||||||
-- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
|
||||||
-- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
|
||||||
--
|
|
||||||
-- lincat
|
|
||||||
-- [S] = {s1,s2 : Str} ;
|
|
||||||
-- [Adv] = {s1,s2 : Str} ;
|
|
||||||
-- [NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
|
||||||
-- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,22 +1,24 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:../prelude:c:/gf_unicoded/hindustani
|
||||||
|
|
||||||
concrete GrammarHin of Grammar =
|
concrete GrammarHin of Grammar =
|
||||||
NounHin,
|
NounHin,
|
||||||
VerbHin,
|
VerbHin,
|
||||||
AdjectiveHin,
|
AdjectiveHin,
|
||||||
AdverbHin,
|
AdverbHin,
|
||||||
NumeralHin,
|
NumeralHin,
|
||||||
SentenceHin,
|
SentenceHin,
|
||||||
QuestionHin,
|
QuestionHin,
|
||||||
RelativeHin,
|
RelativeHin,
|
||||||
ConjunctionHin,
|
ConjunctionHin,
|
||||||
PhraseHin,
|
PhraseHin,
|
||||||
TextX,
|
TextX - [Adv,AdN],
|
||||||
StructuralHin,
|
StructuralHin,
|
||||||
IdiomHin,
|
TenseX - [Adv,AdN],
|
||||||
TenseX
|
IdiomHin
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,39 @@
|
|||||||
concrete IdiomHin of Idiom = CatHin ** open Prelude, ResHin in {
|
concrete IdiomHin of Idiom = CatHin ** open Prelude,Predef, ResHin,ParamX,CommonHindustani in {
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
--
|
flags coding = utf8;
|
||||||
-- lin
|
|
||||||
-- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
lin
|
||||||
-- GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||||
--
|
GenericCl vp = mkSClause "कwय" (agrP3 Masc Sg) vp ;
|
||||||
-- CleftNP np rs = mkClause "it" (agrP3 Sg)
|
|
||||||
-- (insertObj (\\_ => rs.s ! np.a)
|
CleftNP np rs =
|
||||||
-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||||
--
|
in
|
||||||
-- CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||||
-- (insertObj (\\_ => optStr conjThat ++ s.s)
|
|
||||||
-- (insertObj (\\_ => ad.s) (predAux auxBe))) ;
|
-- CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||||
--
|
|
||||||
-- ExistNP np =
|
-- ExistNP np =
|
||||||
-- mkClause "there" (agrP3 (fromAgr np.a).n)
|
-- mkSClause "wहं" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||||
-- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ;
|
-- (insertObj (\\_ => np.s ! NPC Obl) (predAux auxBe)) ;
|
||||||
--
|
|
||||||
-- ExistIP ip =
|
ExistIP ip =
|
||||||
-- mkQuestion (ss (ip.s ! Nom))
|
let cl = mkSClause ("wहं" ++ ip.s ! Dir) (agrP3 ip.g ip.n) (predAux auxBe);
|
||||||
-- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
|
in {
|
||||||
--
|
s = \\t,p,qf => case qf of {
|
||||||
-- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ;
|
QDir => cl.s ! t ! p ! ODir;
|
||||||
--
|
QIndir => cl.s ! t! p ! ODir
|
||||||
-- ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ;
|
}
|
||||||
--
|
};
|
||||||
}
|
|
||||||
|
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
||||||
|
ProgrVP vp = (predProg vp) ;
|
||||||
|
|
||||||
|
|
||||||
|
ImpPl1 vp = {s = "ाw" ++ infVP True vp (agrP1 Masc Pl)} ;
|
||||||
|
ImpP3 np vp = {s = np.s!NPC Dir ++ "कw" ++ (vp.s ! VPImp ).inf ++ "दw"};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,181 +0,0 @@
|
|||||||
----# -path=.:prelude:../abstract:../common
|
|
||||||
--
|
|
||||||
--concrete IrregHin of IrregHinAbs = CatHin ** open ParadigmsHin in {
|
|
||||||
--
|
|
||||||
--flags optimize=values ;
|
|
||||||
--
|
|
||||||
-- lin
|
|
||||||
-- awake_V = irregV "awake" "awoke" "awoken" ;
|
|
||||||
-- bear_V = irregV "bear" "bore" "born" ;
|
|
||||||
-- beat_V = irregV "beat" "beat" "beat" ;
|
|
||||||
-- become_V = irregV "become" "became" "become" ;
|
|
||||||
-- begin_V = irregV "begin" "began" "begun" ;
|
|
||||||
-- bend_V = irregV "bend" "bent" "bent" ;
|
|
||||||
-- beset_V = irregV "beset" "beset" "beset" ;
|
|
||||||
-- bet_V = irregDuplV "bet" "bet" "bet" ;
|
|
||||||
-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
|
|
||||||
-- bind_V = irregV "bind" "bound" "bound" ;
|
|
||||||
-- bite_V = irregV "bite" "bit" "bitten" ;
|
|
||||||
-- bleed_V = irregV "bleed" "bled" "bled" ;
|
|
||||||
-- blow_V = irregV "blow" "blew" "blown" ;
|
|
||||||
-- break_V = irregV "break" "broke" "broken" ;
|
|
||||||
-- breed_V = irregV "breed" "bred" "bred" ;
|
|
||||||
-- bring_V = irregV "bring" "brought" "brought" ;
|
|
||||||
-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
|
|
||||||
-- build_V = irregV "build" "built" "built" ;
|
|
||||||
-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
|
|
||||||
-- burst_V = irregV "burst" "burst" "burst" ;
|
|
||||||
-- buy_V = irregV "buy" "bought" "bought" ;
|
|
||||||
-- cast_V = irregV "cast" "cast" "cast" ;
|
|
||||||
-- catch_V = irregV "catch" "caught" "caught" ;
|
|
||||||
-- choose_V = irregV "choose" "chose" "chosen" ;
|
|
||||||
-- cling_V = irregV "cling" "clung" "clung" ;
|
|
||||||
-- come_V = irregV "come" "came" "come" ;
|
|
||||||
-- cost_V = irregV "cost" "cost" "cost" ;
|
|
||||||
-- creep_V = irregV "creep" "crept" "crept" ;
|
|
||||||
-- cut_V = irregDuplV "cut" "cut" "cut" ;
|
|
||||||
-- deal_V = irregV "deal" "dealt" "dealt" ;
|
|
||||||
-- dig_V = irregDuplV "dig" "dug" "dug" ;
|
|
||||||
-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
|
|
||||||
-- do_V = mk5V "do" "does" "did" "done" "doing" ;
|
|
||||||
-- draw_V = irregV "draw" "drew" "drawn" ;
|
|
||||||
-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
|
|
||||||
-- drive_V = irregV "drive" "drove" "driven" ;
|
|
||||||
-- drink_V = irregV "drink" "drank" "drunk" ;
|
|
||||||
-- eat_V = irregV "eat" "ate" "eaten" ;
|
|
||||||
-- fall_V = irregV "fall" "fell" "fallen" ;
|
|
||||||
-- feed_V = irregV "feed" "fed" "fed" ;
|
|
||||||
-- feel_V = irregV "feel" "felt" "felt" ;
|
|
||||||
-- fight_V = irregV "fight" "fought" "fought" ;
|
|
||||||
-- find_V = irregV "find" "found" "found" ;
|
|
||||||
-- fit_V = irregDuplV "fit" "fit" "fit" ;
|
|
||||||
-- flee_V = irregV "flee" "fled" "fled" ;
|
|
||||||
-- fling_V = irregV "fling" "flung" "flung" ;
|
|
||||||
-- fly_V = irregV "fly" "flew" "flown" ;
|
|
||||||
-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
|
|
||||||
-- forget_V = irregDuplV "forget" "forgot" "forgotten" ;
|
|
||||||
-- forgive_V = irregV "forgive" "forgave" "forgiven" ;
|
|
||||||
-- forsake_V = irregV "forsake" "forsook" "forsaken" ;
|
|
||||||
-- freeze_V = irregV "freeze" "froze" "frozen" ;
|
|
||||||
-- get_V = irregDuplV "get" "got" "gotten" ;
|
|
||||||
-- give_V = irregV "give" "gave" "given" ;
|
|
||||||
-- go_V = mk5V "go" "goes" "went" "gone" "going" ;
|
|
||||||
-- grind_V = irregV "grind" "ground" "ground" ;
|
|
||||||
-- grow_V = irregV "grow" "grew" "grown" ;
|
|
||||||
-- hang_V = irregV "hang" "hung" "hung" ;
|
|
||||||
-- have_V = mk5V "have" "has" "had" "had" "having" ;
|
|
||||||
-- hear_V = irregV "hear" "heard" "heard" ;
|
|
||||||
-- hide_V = irregV "hide" "hid" "hidden" ;
|
|
||||||
-- hit_V = irregDuplV "hit" "hit" "hit" ;
|
|
||||||
-- hold_V = irregV "hold" "held" "held" ;
|
|
||||||
-- hurt_V = irregV "hurt" "hurt" "hurt" ;
|
|
||||||
-- keep_V = irregV "keep" "kept" "kept" ;
|
|
||||||
-- kneel_V = irregV "kneel" "knelt" "knelt" ;
|
|
||||||
-- knit_V = irregDuplV "knit" "knit" "knit" ;
|
|
||||||
-- know_V = irregV "know" "knew" "know" ;
|
|
||||||
-- lay_V = irregV "lay" "laid" "laid" ;
|
|
||||||
-- lead_V = irregV "lead" "led" "led" ;
|
|
||||||
-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
|
|
||||||
-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
|
|
||||||
-- leave_V = irregV "leave" "left" "left" ;
|
|
||||||
-- lend_V = irregV "lend" "lent" "lent" ;
|
|
||||||
-- let_V = irregDuplV "let" "let" "let" ;
|
|
||||||
-- lie_V = irregV "lie" "lay" "lain" ;
|
|
||||||
-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
|
|
||||||
-- lose_V = irregV "lose" "lost" "lost" ;
|
|
||||||
-- make_V = irregV "make" "made" "made" ;
|
|
||||||
-- mean_V = irregV "mean" "meant" "meant" ;
|
|
||||||
-- meet_V = irregV "meet" "met" "met" ;
|
|
||||||
-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
|
|
||||||
-- mistake_V = irregV "mistake" "mistook" "mistaken" ;
|
|
||||||
-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
|
|
||||||
-- overcome_V = irregV "overcome" "overcame" "overcome" ;
|
|
||||||
-- overdo_V = mk5V "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
|
|
||||||
-- overtake_V = irregV "overtake" "overtook" "overtaken" ;
|
|
||||||
-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
|
|
||||||
-- pay_V = irregV "pay" "paid" "paid" ;
|
|
||||||
-- plead_V = irregV "plead" "pled" "pled" ;
|
|
||||||
-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
|
|
||||||
-- put_V = irregDuplV "put" "put" "put" ;
|
|
||||||
-- quit_V = irregDuplV "quit" "quit" "quit" ;
|
|
||||||
-- read_V = irregV "read" "read" "read" ;
|
|
||||||
-- rid_V = irregDuplV "rid" "rid" "rid" ;
|
|
||||||
-- ride_V = irregV "ride" "rode" "ridden" ;
|
|
||||||
-- ring_V = irregV "ring" "rang" "rung" ;
|
|
||||||
-- rise_V = irregV "rise" "rose" "risen" ;
|
|
||||||
-- run_V = irregDuplV "run" "ran" "run" ;
|
|
||||||
-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
|
|
||||||
-- say_V = irregV "say" "said" "said" ;
|
|
||||||
-- see_V = irregV "see" "saw" "seen" ;
|
|
||||||
-- seek_V = irregV "seek" "sought" "sought" ;
|
|
||||||
-- sell_V = irregV "sell" "sold" "sold" ;
|
|
||||||
-- send_V = irregV "send" "sent" "sent" ;
|
|
||||||
-- set_V = irregDuplV "set" "set" "set" ;
|
|
||||||
-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
|
|
||||||
-- shake_V = irregV "shake" "shook" "shaken" ;
|
|
||||||
-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
|
|
||||||
-- shear_V = irregV "shear" "shore" "shorn" ;
|
|
||||||
-- shed_V = irregDuplV "shed" "shed" "shed" ;
|
|
||||||
-- shine_V = irregV "shine" "shone" "shone" ;
|
|
||||||
-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
|
|
||||||
-- shoot_V = irregV "shoot" "shot" "shot" ;
|
|
||||||
-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
|
|
||||||
-- shrink_V = irregV "shrink" "shrank" "shrunk" ;
|
|
||||||
-- shut_V = irregDuplV "shut" "shut" "shut" ;
|
|
||||||
-- sing_V = irregV "sing" "sang" "sung" ;
|
|
||||||
-- sink_V = irregV "sink" "sank" "sunk" ;
|
|
||||||
-- sit_V = irregDuplV "sit" "sat" "sat" ;
|
|
||||||
-- sleep_V = irregV "sleep" "slept" "slept" ;
|
|
||||||
-- slay_V = irregV "slay" "slew" "slain" ;
|
|
||||||
-- slide_V = irregV "slide" "slid" "slid" ;
|
|
||||||
-- sling_V = irregV "sling" "slung" "slung" ;
|
|
||||||
-- slit_V = irregDuplV "slit" "slit" "slit" ;
|
|
||||||
-- smite_V = irregV "smite" "smote" "smitten" ;
|
|
||||||
-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
|
|
||||||
-- speak_V = irregV "speak" "spoke" "spoken" ;
|
|
||||||
-- speed_V = irregV "speed" "sped" "sped" ;
|
|
||||||
-- spend_V = irregV "spend" "spent" "spent" ;
|
|
||||||
-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
|
|
||||||
-- spin_V = irregDuplV "spin" "spun" "spun" ;
|
|
||||||
-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
|
|
||||||
-- split_V = irregDuplV "split" "split" "split" ;
|
|
||||||
-- spread_V = irregV "spread" "spread" "spread" ;
|
|
||||||
-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
|
|
||||||
-- stand_V = irregV "stand" "stood" "stood" ;
|
|
||||||
-- steal_V = irregV "steal" "stole" "stolen" ;
|
|
||||||
-- stick_V = irregV "stick" "stuck" "stuck" ;
|
|
||||||
-- sting_V = irregV "sting" "stung" "stung" ;
|
|
||||||
-- stink_V = irregV "stink" "stank" "stunk" ;
|
|
||||||
-- stride_V = irregV "stride" "strod" "stridden" ;
|
|
||||||
-- strike_V = irregV "strike" "struck" "struck" ;
|
|
||||||
-- string_V = irregV "string" "strung" "strung" ;
|
|
||||||
-- strive_V = irregV "strive" "strove" "striven" ;
|
|
||||||
-- swear_V = irregV "swear" "swore" "sworn" ;
|
|
||||||
-- sweep_V = irregV "sweep" "swept" "swept" ;
|
|
||||||
-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
|
|
||||||
-- swim_V = irregDuplV "swim" "swam" "swum" ;
|
|
||||||
-- swing_V = irregV "swing" "swung" "swung" ;
|
|
||||||
-- take_V = irregV "take" "took" "taken" ;
|
|
||||||
-- teach_V = irregV "teach" "taught" "taught" ;
|
|
||||||
-- tear_V = irregV "tear" "tore" "torn" ;
|
|
||||||
-- tell_V = irregV "tell" "told" "told" ;
|
|
||||||
-- think_V = irregV "think" "thought" "thought" ;
|
|
||||||
-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
|
|
||||||
-- throw_V = irregV "throw" "threw" "thrown" ;
|
|
||||||
-- thrust_V = irregV "thrust" "thrust" "thrust" ;
|
|
||||||
-- tread_V = irregV "tread" "trod" "trodden" ;
|
|
||||||
-- understand_V = irregV "understand" "understood" "understood" ;
|
|
||||||
-- uphold_V = irregV "uphold" "upheld" "upheld" ;
|
|
||||||
-- upset_V = irregDuplV "upset" "upset" "upset" ;
|
|
||||||
-- wake_V = irregV "wake" "woke" "woken" ;
|
|
||||||
-- wear_V = irregV "wear" "wore" "worn" ;
|
|
||||||
-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
|
|
||||||
-- wed_V = irregDuplV "wed" "wed" "wed" ;
|
|
||||||
-- weep_V = irregV "weep" "wept" "wept" ;
|
|
||||||
-- wind_V = irregV "wind" "wound" "wound" ;
|
|
||||||
-- win_V = irregDuplV "win" "won" "won" ;
|
|
||||||
-- withhold_V = irregV "withhold" "withheld" "withheld" ;
|
|
||||||
-- withstand_V = irregV "withstand" "withstood" "withstood" ;
|
|
||||||
-- wring_V = irregV "wring" "wrung" "wrung" ;
|
|
||||||
-- write_V = irregV "write" "wrote" "written" ;
|
|
||||||
--}
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../hindustani
|
||||||
|
|
||||||
concrete LangHin of Lang =
|
concrete LangHin of Lang =
|
||||||
GrammarHin,
|
GrammarHin,
|
||||||
LexiconHin
|
LexiconHin
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
|
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,375 +1,369 @@
|
|||||||
--# -path=.:prelude
|
--# -path=.:prelude
|
||||||
|
|
||||||
concrete LexiconHin of Lexicon = CatHin **
|
concrete LexiconHin of Lexicon = CatHin **
|
||||||
open ParadigmsHin, Prelude in {
|
--open ResHin, Prelude in {
|
||||||
|
open ParadigmsHin, Prelude in {
|
||||||
flags
|
|
||||||
optimize=values ;
|
flags
|
||||||
|
optimize=values ;
|
||||||
lin
|
coding = utf8;
|
||||||
-- airplane_N = regN "airplane" ;
|
|
||||||
-- answer_V2S = mkV2S (regV "answer") toP ;
|
lin
|
||||||
-- apartment_N = regN "apartment" ;
|
airplane_N = mkN "जHज" ;
|
||||||
apple_N = mkN "seb" ;
|
-- answer_V2S = mkV2 (compoundV "जwब" (mkV "दयन")) ;
|
||||||
-- art_N = regN "art" ;
|
-- apartment_N = mkN "कमरह" ;
|
||||||
-- ask_V2Q = mkV2Q (regV "ask") noPrep ;
|
apple_N = mkN "सयब" ;
|
||||||
-- baby_N = regN "baby" ;
|
-- art_N = mkN "fन" ;
|
||||||
-- bad_A = mkADeg "bad" "worse" "worst" "badly" ;
|
ask_V2Q = mkV2 (mkV "पwचHन") ;
|
||||||
-- bank_N = regN "bank" ;
|
-- baby_N = mkN "बचH" ;
|
||||||
-- beautiful_A = compoundADeg (regA "beautiful") ;
|
bad_A = mkA "बर" ;
|
||||||
-- become_VA = mkVA (irregV "become" "became" "become") ;
|
bank_N = mkN "बयनक" ;
|
||||||
-- beer_N = regN "beer" ;
|
beautiful_A = mkA "सनदर" ;
|
||||||
-- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ;
|
become_VA = mkV "बनन";
|
||||||
big_A = mkA "baRA" ;
|
beer_N = mkN "बेेर" ;
|
||||||
-- bike_N = regN "bike" ;
|
-- beg_V2V = mkV2V (compoundV "लतज" (mkV "करन")) "सै" "कह" False;
|
||||||
-- bird_N = regN "bird" ;
|
big_A = mkA "बृ" ;
|
||||||
-- black_A = regADeg "black" ;
|
-- bike_N = mkN "सयचल" feminine ;
|
||||||
-- blue_A = regADeg "blue" ;
|
-- bird_N = mkN "परनदह" ;
|
||||||
-- boat_N = regN "boat" ;
|
black_A = mkA "कल" ;
|
||||||
-- book_N = regN "book" ;
|
blue_A = mkA "नयल" ;
|
||||||
-- boot_N = regN "boot" ;
|
boat_N = mkN "नw" ;
|
||||||
-- boss_N = mkN human (regN "boss") ;
|
book_N = mkN "कतब" feminine ;
|
||||||
boy_N = mkN "lar.kA" ;
|
-- boot_N = mkN "जwत" ;
|
||||||
bread_N = mkN "rot.I" ;
|
boss_N = mkN "मलक" ;
|
||||||
-- break_V2 = dirV2 (irregV "break" "broke" "broken") ;
|
boy_N = mkN "लृक" ;
|
||||||
-- broad_A = regADeg "broad" ;
|
bread_N = mkN "रwतय" ;
|
||||||
-- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ;
|
break_V2 = mkV2 (mkV "तwृन") ;
|
||||||
-- brown_A = regADeg "brown" ;
|
broad_A = mkA "चwृ" ;
|
||||||
-- butter_N = regN "butter" ;
|
brother_N2 = mkN2 (mkN "बHय") (mkPrep "क" "क") "कै" ; --not correct
|
||||||
-- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ;
|
brown_A = mkA "बHwर" ;
|
||||||
-- camera_N = regN "camera" ;
|
-- butter_N = mkN "मकh-न" ;
|
||||||
-- cap_N = regN "cap" ;
|
buy_V2 = mkV2 (mkV "खरयदन");
|
||||||
-- car_N = regN "car" ;
|
camera_N = mkN "कयमरH" ;
|
||||||
-- carpet_N = regN "carpet" ;
|
cap_N = mkN "तwपय" ;
|
||||||
-- cat_N = regN "cat" ;
|
car_N = mkN "कर" ;
|
||||||
-- ceiling_N = regN "ceiling" ;
|
-- carpet_N = mkN "तपy^य" ;
|
||||||
-- chair_N = regN "chair" ;
|
cat_N = mkN "बलय" feminine;
|
||||||
-- cheese_N = regN "cheese" ;
|
-- ceiling_N = mkN "चh-त" feminine ;
|
||||||
-- child_N = mk2N "child" "children" ;
|
chair_N = mkN "करसय" ;
|
||||||
-- church_N = regN "church" ;
|
-- cheese_N = mkN "पनयर" feminine ;
|
||||||
-- city_N = regN "city" ;
|
child_N = mkN "बचH" ;
|
||||||
-- clean_A = regADeg "clean" ;
|
church_N = mkN "गरज" ;
|
||||||
-- clever_A = regADeg "clever" ;
|
city_N = mkN "XHर" ;
|
||||||
-- close_V2 = dirV2 (regV "close") ;
|
clean_A = mkA "सf" ;
|
||||||
-- coat_N = regN "coat" ;
|
clever_A = mkA "चतर" ;
|
||||||
-- cold_A = regADeg "cold" ;
|
close_V2 = mkV2 (compoundV "बनद" do_V2);
|
||||||
-- come_V = (irregV "come" "came" "come") ;
|
coat_N = mkN "कwथ" ;
|
||||||
-- computer_N = regN "computer" ;
|
cold_A = mkA "सरद" ;
|
||||||
-- country_N = regN "country" ;
|
come_V = mkV "ान" ;
|
||||||
-- cousin_N = mkN human (regN "cousin") ;
|
computer_N = mkN "कमपयwथर" ;
|
||||||
-- cow_N = regN "cow" ;
|
country_N = mkN "दयX" ;
|
||||||
-- die_V = (regV "die") ;
|
-- cousin_N = mkCmpdNoun "चच" (mkN "ज़द") ; -- a compund noun made of two nouns
|
||||||
-- dirty_A = regADeg "dirty" ;
|
cow_N = mkN "गै" feminine ;
|
||||||
-- distance_N3 = mkN3 (regN "distance") fromP toP ;
|
die_V = mkV "मरन" ;
|
||||||
-- doctor_N = mkN human (regN "doctor") ;
|
dirty_A = mkA "गनद" ;
|
||||||
-- dog_N = regN "dog" ;
|
-- distance_N3 = mkN3 (mkN "fशलह") (mkPrep "क") "कै" "सै" ;
|
||||||
-- door_N = regN "door" ;
|
doctor_N = mkN "दकतर" ;
|
||||||
-- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ;
|
dog_N = mkN "कत" ;
|
||||||
-- easy_A2V = mkA2V (regA "easy") forP ;
|
door_N = mkN "दरwज़" ;
|
||||||
eat_V2 = mkV2 "KA" ;
|
drink_V2 = mkV2 (mkV "पयन");
|
||||||
-- empty_A = regADeg "empty" ;
|
easy_A2V = mkA "ासन" "" ; -- chek for A or a
|
||||||
-- enemy_N = regN "enemy" ;
|
eat_V2 = mkV2 (mkV "कHन") "" ;
|
||||||
-- factory_N = regN "factory" ;
|
empty_A = mkA "खलय" ;
|
||||||
-- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ;
|
enemy_N = mkN "दXमन" ;
|
||||||
-- fear_VS = mkVS (regV "fear") ;
|
factory_N = mkN "करखन" ;
|
||||||
-- find_V2 = dirV2 (irregV "find" "found" "found") ;
|
-- father_N2 = mkN2 (mkN "पत" irregular) (mkPrep "क") "कै" ;
|
||||||
-- fish_N = mk2N "fish" "fish" ;
|
fear_VS = mkV "दृन";
|
||||||
-- floor_N = regN "floor" ;
|
find_V2 = mkV2 (mkV "दHwनद") ;
|
||||||
-- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ;
|
fish_N = mkN "मचHलय" ;
|
||||||
-- fridge_N = regN "fridge" ;
|
floor_N = mkN "fरX" ;
|
||||||
-- friend_N = mkN human (regN "friend") ;
|
forget_V2 = mkV2 (mkV "बHwलन") ;
|
||||||
-- fruit_N = regN "fruit" ;
|
-- fridge_N = mkN "fरयग" ;
|
||||||
-- fun_AV = mkAV (regA "fun") ;
|
friend_N = mkN "दwसत" masculine ;
|
||||||
-- garden_N = regN "garden" ;
|
fruit_N = mkN "पHल" ;
|
||||||
girl_N = mkN "lar.kI" ;
|
-- fun_AV = mkAV (regA "fुन") ;
|
||||||
-- glove_N = regN "glove" ;
|
garden_N = mkN "बघ" ; -- chek for G
|
||||||
-- gold_N = regN "gold" ;
|
girl_N = mkN "लृकय" ;
|
||||||
good_A = mkA "a-cCA" ;
|
glove_N = mkN "दसतन" ;
|
||||||
go_V = mkV "cal" ;
|
gold_N = mkN "सwन" ;
|
||||||
-- green_A = regADeg "green" ;
|
good_A = mkA "चH" ;
|
||||||
-- harbour_N = regN "harbour" ;
|
go_V = mkV "जन" ;
|
||||||
-- hate_V2 = dirV2 (regV "hate") ;
|
green_A = mkA "Hर" ;
|
||||||
-- hat_N = regN "hat" ;
|
-- harbour_N = mkCmpdNoun "बनदर" (mkN "गह") ;
|
||||||
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
hate_V2 = mkV2 (compoundV "नfरत" do_V2) ;
|
||||||
-- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ;
|
hat_N = mkN "थwपय" ;
|
||||||
-- hill_N = regN "hill" ;
|
-- have_V2 = dirV2 (mk5V "हवे" "हस" "हद" "हद" "हविनग") ;
|
||||||
-- hope_VS = mkVS (regV "hope") ;
|
hear_V2 = mkV2 (mkV "सनन") ;
|
||||||
-- horse_N = regN "horse" ;
|
-- hill_N = mkN "पहृय" ;
|
||||||
-- hot_A = duplADeg "hot" ;
|
-- hope_VS = (compoundV "मयद" do_V2);
|
||||||
-- house_N = regN "house" ;
|
horse_N = mkN "गHwृ" ;
|
||||||
-- important_A = compoundADeg (regA "important") ;
|
hot_A = mkA "गरम" ;
|
||||||
-- industry_N = regN "industry" ;
|
house_N = mkN "गHर" ;
|
||||||
-- iron_N = regN "iron" ;
|
important_A = mkA "ज़रwरय" ; -- check about z
|
||||||
-- king_N = mkN masculine (regN "king") ;
|
-- industry_N = mkN "शनेत" feminine ;
|
||||||
-- know_V2 = dirV2 (irregV "know" "knew" "known") ;
|
iron_N = mkN "लwH" ;
|
||||||
-- lake_N = regN "lake" ;
|
king_N = mkN "रज" ;
|
||||||
-- lamp_N = regN "lamp" ;
|
know_V2 = mkV2 (mkV "जनन") ;
|
||||||
-- learn_V2 = dirV2 (regV "learn") ;
|
know_VS = mkV "जनन";
|
||||||
-- leather_N = regN "leather" ;
|
-- lake_N = mkN "जh-यल" feminine ;
|
||||||
-- leave_V2 = dirV2 (irregV "leave" "left" "left") ;
|
lamp_N = mkN "दय" ;
|
||||||
-- like_V2 = dirV2 (regV "like") ;
|
learn_V2 = mkV2 (mkV "सयकHन") ;
|
||||||
-- listen_V2 = prepV2 (regV "listen") toP ;
|
-- leather_N = mkN "चमृ" ;
|
||||||
live_V = mkV "CU" ; ---- touch
|
leave_V2 = mkV2 (mkV "चलन") ;
|
||||||
-- long_A = regADeg "long" ;
|
like_V2 = mkV2 (compoundV "पसनद" do_V2);
|
||||||
-- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ;
|
listen_V2 = mkV2 (mkV "सनन") ;
|
||||||
-- love_N = regN "love" ;
|
live_V = mkV "रहन" ; ---- touch
|
||||||
-- love_V2 = dirV2 (regV "love") ;
|
long_A = mkA "लमब" ;
|
||||||
-- man_N = mkN masculine (mk2N "man" "men") ;
|
lose_V2 = mkV2 (compoundV "कHw" do_V2) ;
|
||||||
-- married_A2 = mkA2 (regA "married") toP ;
|
love_N = mkN "परयम" ;
|
||||||
-- meat_N = regN "meat" ;
|
love_V2 = mkV2 (compoundV "पयर" do_V2) "कw";
|
||||||
-- milk_N = regN "milk" ;
|
man_N = mkN "ादमय" ;
|
||||||
-- moon_N = regN "moon" ;
|
-- married_A2 = mkA "Xदय " "सै" ;
|
||||||
-- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ;
|
meat_N = mkN "मस" ;
|
||||||
-- mountain_N = regN "mountain" ;
|
milk_N = mkN "दwदH" ;
|
||||||
-- music_N = regN "music" ;
|
moon_N = mkN "चनद" ;
|
||||||
-- narrow_A = regADeg "narrow" ;
|
mother_N2 = mkN2 (mkN "मत" feminine) (mkPrep "कय" "कय") "कै"; -- not covered need to be discussed
|
||||||
-- new_A = regADeg "new" ;
|
-- mountain_N = mkN "पहृय" ;
|
||||||
-- newspaper_N = regN "newspaper" ;
|
music_N = mkN "सनगयत" ;
|
||||||
-- oil_N = regN "oil" ;
|
-- narrow_A = mkA "बरयक" ;
|
||||||
-- old_A = regADeg "old" ;
|
new_A = mkA "नय" ;
|
||||||
-- open_V2 = dirV2 (regV "open") ;
|
newspaper_N = mkN "खबर" ;
|
||||||
-- paint_V2A = mkV2A (regV "paint") noPrep ;
|
oil_N = mkN "तयल" ;
|
||||||
-- paper_N = regN "paper" ;
|
old_A = mkA "बwृH" ;
|
||||||
-- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ;
|
open_V2 = mkV2 (mkV "कHwलन") ;
|
||||||
-- peace_N = regN "peace" ;
|
-- paint_V2A = mkV2 (compoundV "रनग" do_V2) ;
|
||||||
-- pen_N = regN "pen" ;
|
paper_N = mkN "कघज़" ;
|
||||||
-- planet_N = regN "planet" ;
|
paris_PN = mkPN "पयरस" ;
|
||||||
-- plastic_N = regN "plastic" ;
|
peace_N = mkN "मन" ;
|
||||||
-- play_V2 = dirV2 (regV "play") ;
|
pen_N = mkN "qलम" ;
|
||||||
-- policeman_N = mkN masculine (mkN "policeman" "policemen") ;
|
-- planet_N = mkN "सयरह" ;
|
||||||
-- priest_N = mkN human (regN "priest") ;
|
-- plastic_N = mkN "पलसथक" ;
|
||||||
-- probable_AS = mkAS (regA "probable") ;
|
play_V2 = mkV2 (mkV "कHयलन") ;
|
||||||
-- queen_N = mkN feminine (regN "queen") ;
|
-- policeman_N = mkCmpdNoun "पwलयस" (mkN "wल") ;
|
||||||
-- radio_N = regN "radio" ;
|
-- priest_N = (mkN "पयघमबर") ;
|
||||||
-- rain_V0 = mkV0 (regV "rain") ;
|
-- probable_AS = mkAS (regA "परॉबबले") ;
|
||||||
-- read_V2 = dirV2 (irregV "read" "read" "read") ;
|
-- queen_N = mkN "Xहज़दय" ;
|
||||||
red_A = mkA "lAl" ;
|
-- radio_N = mkN "रयधयw" ;
|
||||||
-- religion_N = regN "religion" ;
|
rain_V0 = compoundV "बरX" (mkV "Hwन" ) ;
|
||||||
-- restaurant_N = regN "restaurant" ;
|
read_V2 = mkV2 (mkV "पृHन");
|
||||||
-- river_N = regN "river" ;
|
red_A = mkA "लल" ;
|
||||||
-- rock_N = regN "rock" ;
|
religion_N = mkN "दHरम" ;
|
||||||
-- roof_N = regN "roof" ;
|
-- restaurant_N = mkN "हwथल" ;
|
||||||
-- rubber_N = regN "rubber" ;
|
river_N = mkN "दरय" masculine ;
|
||||||
-- run_V = (irregDuplV "run" "ran" "run") ;
|
rock_N = mkN "चथन" ;
|
||||||
-- say_VS = mkVS (irregV "say" "said" "said") ;
|
roof_N = mkN "चh-त" masculine ;
|
||||||
-- school_N = regN "school" ;
|
-- rubber_N = mkN "रबृ" ;
|
||||||
-- science_N = regN "science" ;
|
run_V = mkV "दwृन" ;
|
||||||
-- sea_N = regN "sea" ;
|
say_VS = mkV "कHन" ;
|
||||||
-- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ;
|
school_N = mkN "मकतब" ;
|
||||||
-- see_V2 = dirV2 (irregV "see" "saw" "seen") ;
|
-- science_N = mkN "सनस" ; -- vgyan
|
||||||
-- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ;
|
sea_N = mkN "समनदर" ;
|
||||||
-- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ;
|
-- seek_V2 = mkV2 (compoundV "तलX" do_V2) ;
|
||||||
-- sheep_N = mk2N "sheep" "sheep" ;
|
see_V2 = mkV2 (mkV "दयकHन") ;
|
||||||
-- ship_N = regN "ship" ;
|
sell_V3 = mkV3 (mkV "बयचन") "कw" "";
|
||||||
-- shirt_N = regN "shirt" ;
|
send_V3 = mkV3 (mkV "बHयजन") "कw" "";
|
||||||
-- shoe_N = regN "shoe" ;
|
sheep_N = mkN "बHयृ" feminine ;
|
||||||
-- shop_N = regN "shop" ;
|
ship_N = mkN "जHज़" ;
|
||||||
-- short_A = regADeg "short" ;
|
shirt_N = mkN "करत" feminine;
|
||||||
-- silver_N = regN "silver" ;
|
shoe_N = mkN "जwत" ;
|
||||||
-- sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ;
|
shop_N = mkN "दwकन" feminine ;
|
||||||
-- sleep_V = (irregV "sleep" "slept" "slept") ;
|
short_A = mkA "चHwथ" ;
|
||||||
-- small_A = regADeg "small" ;
|
silver_N = mkN "चनदय" ;
|
||||||
-- snake_N = regN "snake" ;
|
sister_N = mkN "बHन" feminine ;
|
||||||
-- sock_N = regN "sock" ;
|
sleep_V = mkV "सwन" ;
|
||||||
-- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ;
|
small_A = mkA "चHwथ" ;
|
||||||
-- star_N = regN "star" ;
|
snake_N = mkN "सनप" ;
|
||||||
-- steel_N = regN "steel" ;
|
-- sock_N = mkN "जरब" feminine ;
|
||||||
-- stone_N = regN "stone" ;
|
speak_V2 = mkV2 (mkV "बwलन") ;
|
||||||
-- stove_N = regN "stove" ;
|
star_N = mkN "तर" ;
|
||||||
-- student_N = mkN human (regN "student") ;
|
-- steel_N = mkN "सतयल" ; -- something like ispat
|
||||||
-- stupid_A = regADeg "stupid" ;
|
stone_N = mkN "पतHर" ;
|
||||||
-- sun_N = regN "sun" ;
|
-- stove_N = mkN "चwलह" ;
|
||||||
-- switch8off_V2 = dirV2 (partV (regV "switch") "off") ;
|
-- student_N = mkCmpdNoun "t-लब" (mkN "ेलम") ; -- something vidrati
|
||||||
-- switch8on_V2 = dirV2 (partV (regV "switch") "on") ;
|
stupid_A = mkA "बैwqwf" ;
|
||||||
-- table_N = regN "table" ;
|
-- sun_N = mkN "सwरज" ; -- swrya
|
||||||
-- talk_V3 = mkV3 (regV "talk") toP aboutP ;
|
switch8off_V2 = mkV2 (compoundV "बनद" do_V2) ;
|
||||||
-- teacher_N = mkN human (regN "teacher") ;
|
switch8on_V2 = mkV2 (mkV "चलन") ;
|
||||||
-- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ;
|
table_N = mkN "मयज़" feminine ;
|
||||||
-- television_N = regN "television" ;
|
talk_V3 = mkV3 (mkV "बwलन") "सै" "कै बरै में";
|
||||||
-- thick_A = regADeg "thick" ;
|
-- teacher_N = mkN "िसतद" ; -- adyapak
|
||||||
-- thin_A = duplADeg "thin" ;
|
teach_V2 = mkV2 (mkV "पृHन") ;
|
||||||
-- train_N = regN "train" ;
|
television_N = mkN "तयwय" ;
|
||||||
-- travel_V = (regDuplV "travel") ;
|
thick_A = mkA "मwथ" ;
|
||||||
-- tree_N = regN "tree" ;
|
thin_A = mkA "पतल" ;
|
||||||
-- ---- trousers_N = regN "trousers" ;
|
train_N = mkN "रयल गृय" ;
|
||||||
-- ugly_A = regADeg "ugly" ;
|
travel_V = (compoundV "सfर" do_V2) ;
|
||||||
-- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ;
|
-- tree_N = mkN "पयृ" masculine ;
|
||||||
-- university_N = regN "university" ;
|
-- ---- trousers_N = mkN "तरॉुसेरस" ;
|
||||||
-- village_N = regN "village" ;
|
ugly_A = mkA "बदसwरत" ;
|
||||||
-- wait_V2 = prepV2 (regV "wait") forP ;
|
understand_V2 = mkV2 (mkV "समजHन") ;
|
||||||
-- walk_V = (regV "walk") ;
|
-- university_N = mkN "यwनयwरसथय" ;
|
||||||
-- warm_A = regADeg "warm" ;
|
village_N = mkN "गwं" ; -- check for n or N
|
||||||
-- war_N = regN "war" ;
|
-- wait_V2 = mkV2 (compoundV "नतz-र" do_V2) "क" ; -- something prtkXa
|
||||||
-- watch_V2 = dirV2 (regV "watch") ;
|
walk_V = mkV "चलन" ;
|
||||||
-- water_N = regN "water" ;
|
-- warm_A = mkA "गरम" ; something gngna
|
||||||
-- white_A = regADeg "white" ;
|
-- war_N = mkN "जनग" ;
|
||||||
-- window_N = regN "window" ;
|
watch_V2 = mkV2 (mkV "दयकHन") ;
|
||||||
-- wine_N = regN "wine" ;
|
-- water_N = mkN "पनय" masculine ; -- not covered masculine ending with y
|
||||||
-- win_V2 = dirV2 (irregDuplV "win" "won" "won") ;
|
white_A = mkA "सfयद" ;
|
||||||
-- woman_N = mkN feminine (mk2N "woman" "women") ;
|
window_N = mkN "रwXनदन" ;
|
||||||
-- wonder_VQ = mkVQ (regV "wonder") ;
|
-- wine_N = mkN "Xरब" feminine ;
|
||||||
-- wood_N = regN "wood" ;
|
win_V2 = mkV2 (mkV "जयतन") ;
|
||||||
-- write_V2 = dirV2 (irregV "write" "wrote" "written") ;
|
woman_N = mkN "ेwरत" feminine ;
|
||||||
-- yellow_A = regADeg "yellow" ;
|
-- wonder_VQ = compoundV "Hेरन" (mkV "हwन") ;
|
||||||
-- young_A = regADeg "young" ;
|
wood_N = mkN "लकृय" ;
|
||||||
--
|
write_V2 = mkV2 (mkV "लकh-न") ;
|
||||||
-- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ;
|
yellow_A = mkA "पयल" ;
|
||||||
-- now_Adv = mkAdv "now" ;
|
young_A = mkA "जwन" ;
|
||||||
-- already_Adv = mkAdv "already" ;
|
do_V2 = mkV2 (mkV "करन") ;
|
||||||
-- song_N = regN "song" ;
|
-- now_Adv = mkAdv "ब" ;
|
||||||
-- add_V3 = dirV3 (regV "add") toP ;
|
-- already_Adv = mkAdv "पहलै हय" ;
|
||||||
-- number_N = regN "number" ;
|
song_N = mkN "गयत" ;
|
||||||
-- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ;
|
add_V3 = mkV3 (compoundV "जमे" do_V2) "" "" ;
|
||||||
-- stop_V = regDuplV "stop" ;
|
-- number_N = mkN "हनदसह" ;
|
||||||
-- jump_V = regV "jump" ;
|
-- put_V2 = mkV2 (mkV "धलन") ;
|
||||||
--
|
stop_V = mkV "रकन" ;
|
||||||
-- left_Ord = ss "left" ;
|
-- jump_V = compoundV "चHलनग" (mkV "लगन") feminine ;
|
||||||
-- right_Ord = ss "right" ;
|
|
||||||
-- far_Adv = mkAdv "far" ;
|
-- left_Ord = {s = "बयं" ; n = singular};
|
||||||
-- correct_A = (regA "correct") ;
|
-- right_Ord = {s= "दयं" ; n = singular};
|
||||||
-- dry_A = regA "dry" ;
|
-- far_Adv = mkAdv "दwर" ;
|
||||||
-- dull_A = regA "dull" ;
|
correct_A = mkA "सयH" ;
|
||||||
-- full_A = regA "full" ;
|
dry_A = mkA "सwकH" ;
|
||||||
-- heavy_A = regA "heavy" ;
|
-- dull_A = mkA "नलिक" ;
|
||||||
-- near_A = regA "near" ;
|
-- full_A = mkA "मकमल" ;
|
||||||
-- rotten_A = (regA "rotten") ;
|
heavy_A = mkA "बHरय" ;
|
||||||
-- round_A = regA "round" ;
|
near_A = mkA "पस" ;
|
||||||
-- sharp_A = regA "sharp" ;
|
-- rotten_A = mkA "खरब" ;
|
||||||
-- smooth_A = regA "smooth" ;
|
round_A = mkA "गwल" ;
|
||||||
-- straight_A = regA "straight" ;
|
sharp_A = mkA "तयज़" ;
|
||||||
-- wet_A = regA "wet" ; ----
|
smooth_A = mkA "चकन" ;
|
||||||
-- wide_A = regA "wide" ;
|
straight_A = mkA "सयदH" ;
|
||||||
-- animal_N = regN "animal" ;
|
wet_A = mkA "गयल" ; ----
|
||||||
-- ashes_N = regN "ash" ; -- FIXME: plural only?
|
wide_A = mkA "चwृ" ;
|
||||||
-- back_N = regN "back" ;
|
animal_N = mkN "जनwर" ;
|
||||||
-- bark_N = regN "bark" ;
|
ashes_N = mkN "रकh-" feminine; -- FIXME: plural only?
|
||||||
-- belly_N = regN "belly" ;
|
-- back_N = mkN "qमर" feminine ;
|
||||||
-- blood_N = regN "blood" ;
|
-- bark_N = mkN "बरक" ;
|
||||||
-- bone_N = regN "bone" ;
|
-- belly_N = mkN "दh-नय" ;
|
||||||
-- breast_N = regN "breast" ;
|
-- blood_N = mkN "खwन" ;
|
||||||
-- cloud_N = regN "cloud" ;
|
bone_N = mkN "Hधय" feminine ;
|
||||||
-- day_N = regN "day" ;
|
-- breast_N = mkN "चh-तय" ; --stan
|
||||||
-- dust_N = regN "dust" ;
|
cloud_N = mkN "बदल" ;
|
||||||
-- ear_N = regN "ear" ;
|
day_N = mkN "दन" ;
|
||||||
-- earth_N = regN "earth" ;
|
dust_N = mkN "दHwल" ;
|
||||||
-- egg_N = regN "egg" ;
|
ear_N = mkN "कन" ;
|
||||||
-- eye_N = regN "eye" ;
|
-- earth_N = mkN "ज़मयन" feminine ;
|
||||||
-- fat_N = regN "fat" ;
|
egg_N = mkN "नधH" ;
|
||||||
-- feather_N = regN "feather" ;
|
eye_N = mkN "ानकH" feminine ;
|
||||||
-- fingernail_N = regN "fingernail" ;
|
fat_N = mkN "मwत" ;
|
||||||
-- fire_N = regN "fire" ;
|
feather_N = mkN "पनकH" ;
|
||||||
-- flower_N = regN "flower" ;
|
-- fingernail_N = mkN "नखन" ;
|
||||||
-- fog_N = regN "fog" ;
|
fire_N = mkN "ाग" feminine ;
|
||||||
-- foot_N = mk2N "foot" "feet" ;
|
flower_N = mkN "पHwल" ;
|
||||||
-- forest_N = regN "forest" ;
|
fog_N = mkN "दHनद" feminine ;
|
||||||
-- grass_N = regN "grass" ;
|
foot_N = mkN "पwं" ; -- not properly covered need to be discussed
|
||||||
-- guts_N = regN "gut" ; -- FIXME: no singular
|
forest_N = mkN "जनगल" ;
|
||||||
-- hair_N = regN "hair" ;
|
grass_N = mkN "गHस" feminine ;
|
||||||
-- hand_N = regN "hand" ;
|
-- guts_N = mkN "गुत" ; -- FIXME: no singular
|
||||||
-- head_N = regN "head" ;
|
hair_N = mkN "बल" ;
|
||||||
-- heart_N = regN "heart" ;
|
hand_N = mkN "HतH" ;
|
||||||
-- horn_N = regN "horn" ;
|
head_N = mkN "सर" ;
|
||||||
-- husband_N = mkN masculine (regN "husband") ;
|
heart_N = mkN "दल" ;
|
||||||
-- ice_N = regN "ice" ;
|
-- horn_N = mkN "गh-नतय" ;
|
||||||
-- knee_N = regN "knee" ;
|
husband_N = mkN "पतय" ;
|
||||||
-- leaf_N = mk2N "leaf" "leaves" ;
|
ice_N = mkN "बरf" feminine ;
|
||||||
-- leg_N = regN "leg" ;
|
knee_N = mkN "गHतनH" ;
|
||||||
-- liver_N = regN "liver" ;
|
leaf_N = mkN "पतH" ;
|
||||||
-- louse_N = mk2N "louse" "lice" ;
|
leg_N = mkN "तनग" feminine ;
|
||||||
-- mouth_N = regN "mouth" ;
|
liver_N = mkN "कलयजH" ;
|
||||||
-- name_N = regN "name" ;
|
-- louse_N = mkN "" ; -- jwN
|
||||||
-- neck_N = regN "neck" ;
|
mouth_N = mkN "मनH" ;
|
||||||
-- night_N = regN "night" ;
|
name_N = mkN "नम" ;
|
||||||
-- nose_N = regN "nose" ;
|
neck_N = mkN "गरदन" feminine ;
|
||||||
-- person_N = mkN human (regN "person") ;
|
night_N = mkN "रत" feminine ;
|
||||||
-- rain_N = regN "rain" ;
|
nose_N = mkN "नक" ;
|
||||||
-- road_N = regN "road" ;
|
-- person_N = mkN "Xखश" ;
|
||||||
-- root_N = regN "root" ;
|
rain_N = mkN "बरX" feminine ;
|
||||||
-- rope_N = regN "rope" ;
|
road_N = mkN "सृक" ;
|
||||||
-- salt_N = regN "salt" ;
|
root_N = mkN "गृ" feminine ;
|
||||||
-- sand_N = regN "sand" ;
|
rope_N = mkN "रसय" ;
|
||||||
-- seed_N = regN "seed" ;
|
salt_N = mkN "नमक" feminine ;
|
||||||
-- skin_N = regN "skin" ;
|
sand_N = mkN "रयत" feminine ;
|
||||||
-- sky_N = regN "sky" ;
|
seed_N = mkN "बयज" ;
|
||||||
-- smoke_N = regN "smoke" ;
|
-- skin_N = mkN "जलद" feminine ; -- crm
|
||||||
-- snow_N = regN "snow" ;
|
sky_N = mkN "मबर" ;
|
||||||
-- stick_N = regN "stick" ;
|
smoke_N = mkN "दHwं"; -- singular masc nouns ending with aN,wN yet to be implemented
|
||||||
-- tail_N = regN "tail" ;
|
snow_N = mkN "बरf" feminine ;
|
||||||
-- tongue_N = regN "tongue" ;
|
stick_N = mkN "सॉथय" ;
|
||||||
-- tooth_N = mk2N "tooth" "teeth" ;
|
tail_N = mkN "दम" ;
|
||||||
-- wife_N = mkN feminine (mk2N "wife" "wives") ;
|
-- tongue_N = mkN "ज़बन" feminine ;
|
||||||
-- wind_N = regN "wind" ;
|
-- tooth_N = mkN "दनत" masculine;
|
||||||
-- wing_N = regN "wing" ;
|
wife_N = mkN "पतनय" ;
|
||||||
-- worm_N = regN "worm" ;
|
wind_N = mkN "Hw" ;
|
||||||
-- year_N = regN "year" ;
|
-- wing_N = mkN "पर" ;
|
||||||
-- blow_V = IrregHin.blow_V ;
|
worm_N = mkN "कयृ" ;
|
||||||
-- breathe_V = dirV2 (regV "breathe") ;
|
year_N = mkN "सल" ;
|
||||||
-- burn_V = IrregHin.burn_V ;
|
-- blow_V = mkV "चलन" ;
|
||||||
-- dig_V = IrregHin.dig_V ;
|
breathe_V = compoundV "सनस" (mkV "लयन" ) ;
|
||||||
-- fall_V = IrregHin.fall_V ;
|
burn_V = mkV "जलन" ;
|
||||||
-- float_V = regV "float" ;
|
dig_V = mkV "कHwदन" ;
|
||||||
-- flow_V = regV "flow" ;
|
fall_V = mkV "गरन" ;
|
||||||
-- fly_V = IrregHin.fly_V ;
|
-- float_V = mkV "तयरन" ;
|
||||||
-- freeze_V = IrregHin.freeze_V ;
|
flow_V = mkV "चलन" ;
|
||||||
-- give_V3 = dirV3 give_V toP ;
|
fly_V = mkV "ृन" ;
|
||||||
-- laugh_V = regV "laugh" ;
|
-- freeze_V = mkV "जमन";
|
||||||
-- lie_V = IrregHin.lie_V ;
|
give_V3 = mkV3 (mkV "दयन") "कw" "";
|
||||||
-- play_V = regV "play" ;
|
laugh_V = mkV "हनसन" ;
|
||||||
sew_V = mkV "sI" ;
|
-- lie_N = mkN "जh-wत" masculine ;
|
||||||
-- sing_V = IrregHin.sing_V ;
|
lie_V = compoundV "जHwत" (mkV "बwलन" );
|
||||||
-- sit_V = IrregHin.sit_V ;
|
play_V = mkV "कHयलन" ;
|
||||||
-- smell_V = regV "smell" ;
|
sew_V = mkV "सयन" ;
|
||||||
-- spit_V = IrregHin.spit_V ;
|
sing_V = mkV "गन" ;
|
||||||
-- stand_V = IrregHin.stand_V ;
|
sit_V = mkV "बयथHन" ;
|
||||||
-- swell_V = IrregHin.swell_V ;
|
smell_V = mkV "सwनगन" ;
|
||||||
-- swim_V = IrregHin.swim_V ;
|
spit_V = mkV "तHwकन" ;
|
||||||
-- think_V = IrregHin.think_V ;
|
stand_V = compoundV "कHृै" (mkV "हwन" ); -- a type of compound verb made of two verbs i.e 'kHRa' also inflects, rather than a string and verb should be fixed
|
||||||
-- turn_V = regV "turn" ;
|
-- swell_V = mkV "सwजh-न" ;
|
||||||
-- vomit_V = regV "vomit" ;
|
swim_V = mkV "तयरन" ;
|
||||||
--
|
think_V = mkV "सwचन" ;
|
||||||
-- bite_V2 = dirV2 IrregHin.bite_V ;
|
turn_V = mkV "मृन";
|
||||||
-- count_V2 = dirV2 (regV "count") ;
|
-- vomit_V = compoundV "लतय" (mkV "करन") feminine ;
|
||||||
-- cut_V2 = dirV2 IrregHin.cut_V ;
|
bite_V2 = mkV2 (mkV "कतन") ;
|
||||||
-- fear_V2 = dirV2 (regV "fear") ;
|
count_V2 = mkV2 (mkV "गनन") ;
|
||||||
-- fight_V2 = dirV2 fight_V ;
|
cut_V2 = mkV2 (mkV "कतन") ;
|
||||||
hit_V2 = mkV2 (mkV "mAr") "ko" ;
|
fear_V2 = mkV2 (mkV "धरन") ;
|
||||||
-- hold_V2 = dirV2 hold_V ;
|
fight_V2 = mkV2 (mkV "लृन") ;
|
||||||
-- hunt_V2 = dirV2 (regV "hunt") ;
|
-- hit_V2 = mkV2 (compoundV "तh-wकर" (mkV "मरन" ));
|
||||||
-- kill_V2 = dirV2 (regV "kill") ;
|
hold_V2 = mkV2 (mkV "पकृन") ;
|
||||||
-- pull_V2 = dirV2 (regV "pull") ;
|
-- hunt_V2 = mkV2 (compoundV "Xकर" do_V2);
|
||||||
-- push_V2 = dirV2 (regV "push") ;
|
kill_V2 = mkV2 (compoundV "मर" (mkV "धलन" )) ;
|
||||||
-- rub_V2 = dirV2 (regDuplV "rub") ;
|
pull_V2 = mkV2 (mkV "कHनचन");
|
||||||
-- scratch_V2 = dirV2 (regV "scratch") ;
|
-- push_V2 = mkV2 (mkV "दh-कयलन") "कw" ;
|
||||||
-- split_V2 = dirV2 split_V ;
|
-- rub_V2 = mkV2 (mkV "रगृन") ;
|
||||||
-- squeeze_V2 = dirV2 (regV "squeeze") ;
|
-- scratch_V2 = mkV2 (mkV "कh-रचन") "कw" ;
|
||||||
-- stab_V2 = dirV2 (regDuplV "stab") ;
|
-- split_V2 = mkV2 (mkV "बनत") "कw" ;
|
||||||
-- suck_V2 = dirV2 (regV "suck") ;
|
-- squeeze_V2 = dirV2 (regV "सqुेेज़े") ;
|
||||||
-- throw_V2 = dirV2 throw_V ;
|
-- stab_V2 = dirV2 (regDuplV "सतब") ;
|
||||||
-- tie_V2 = dirV2 (regV "tie") ;
|
-- suck_V2 = mkV2 (mkV "चwसन") ;
|
||||||
-- wash_V2 = dirV2 (regV "wash") ;
|
throw_V2 = mkV2 (mkV "पHयनकन") ;
|
||||||
-- wipe_V2 = dirV2 (regV "wipe") ;
|
tie_V2 = mkV2 (mkV "बनदHन") ;
|
||||||
--
|
wash_V2 = mkV2 (mkV "दHwन") ;
|
||||||
---- other_A = regA "other" ;
|
wipe_V2 = mkV2 (compoundV "शf" (mkV "करन" ));
|
||||||
--
|
|
||||||
-- grammar_N = regN "grammar" ;
|
---- other_A = regA "ॉतहेर" ;
|
||||||
-- language_N = regN "language" ;
|
|
||||||
-- rule_N = regN "rule" ;
|
-- grammar_N = mkN "गरदन" ;
|
||||||
--
|
-- language_N = mkN "ज़बन" feminine ;
|
||||||
---- added 4/6/2007
|
-- rule_N = mkN "शwल" ;
|
||||||
john_PN = mkPN "jon" ;
|
|
||||||
-- question_N = regN "question" ;
|
---- added 4/6/2007
|
||||||
-- ready_A = regA "ready" ;
|
john_PN = mkPN "जॉन" ;
|
||||||
-- reason_N = regN "reason" ;
|
-- question_N = mkN "सwल" ;
|
||||||
-- today_Adv = mkAdv "today" ;
|
-- ready_A = regA "रेदय" ;
|
||||||
-- uncertain_A = regA "uncertain" ;
|
-- reason_N = mkN "wजह" feminine ;
|
||||||
--
|
-- today_Adv = mkAdv "ाज" ;
|
||||||
--oper
|
-- uncertain_A = mkA ["घयर यqयनय"] ;
|
||||||
-- aboutP = mkPrep "about" ;
|
|
||||||
-- atP = mkPrep "at" ;
|
|
||||||
-- forP = mkPrep "for" ;
|
}
|
||||||
-- fromP = mkPrep "from" ;
|
|
||||||
-- inP = mkPrep "in" ;
|
|
||||||
-- onP = mkPrep "on" ;
|
|
||||||
-- toP = mkPrep "to" ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,196 +1,460 @@
|
|||||||
--# -path=.:../../prelude
|
--# -path=.:../../prelude:../abstract:../common:../../prelude
|
||||||
--
|
--
|
||||||
----1 A Simple Hindi Resource Morphology
|
----1 A Simple Hinu Resource Morphology
|
||||||
----
|
----
|
||||||
---- Aarne Ranta 2002 -- 2005
|
---- Shafqat Virk, Aarne Ranta,2009
|
||||||
----
|
----
|
||||||
---- This resource morphology contains definitions needed in the resource
|
---- This resource morphology contains definitions needed in the resource
|
||||||
---- syntax. To build a lexicon, it is better to use $ParadigmsHin$, which
|
---- syntax. To build a lexicon, it is better to use $ParadigmsHin$, which
|
||||||
---- gives a higher-level access to this module.
|
---- gives a higher-level access to this module.
|
||||||
--
|
--
|
||||||
resource MorphoHin = ResHin ** open Prelude, (Predef=Predef) in {
|
resource MorphoHin = ResHin ** open Prelude,Predef,ParamX,CommonHindustani in {
|
||||||
--
|
flags optimize=all ;
|
||||||
-- flags optimize=all ;
|
coding = utf8;
|
||||||
--
|
|
||||||
----2 Phonology
|
----2 Nouns
|
||||||
----
|
oper
|
||||||
---- To regulate the use of endings for both nouns, adjectives, and verbs:
|
mkNoun : (x1,_,_,_,_,x6 : Str) -> Gender -> Noun =
|
||||||
--
|
\sd,so,sv,pd,po,pv,g -> {
|
||||||
--oper
|
s = table {
|
||||||
-- y2ie : Str -> Str -> Str = \fly,s ->
|
Sg => table {
|
||||||
-- let y = last (init fly) in
|
Dir => sd ;
|
||||||
-- case y of {
|
Obl => so ;
|
||||||
-- "a" => fly + s ;
|
Voc => sv
|
||||||
-- "e" => fly + s ;
|
} ;
|
||||||
-- "o" => fly + s ;
|
Pl => table {
|
||||||
-- "u" => fly + s ;
|
Dir => pd ;
|
||||||
-- _ => init fly + "ie" + s
|
Obl => po ;
|
||||||
-- } ;
|
Voc => pv
|
||||||
--
|
}
|
||||||
--
|
} ;
|
||||||
----2 Nouns
|
|
||||||
----
|
g = g
|
||||||
---- For conciseness and abstraction, we define a worst-case macro for
|
} ;
|
||||||
---- noun inflection. It is used for defining special case that
|
|
||||||
---- only need one string as argument.
|
|
||||||
--
|
|
||||||
--oper
|
regNoun : Str -> Noun ;
|
||||||
-- CommonNoun : Type = {s : Number => Case => Str} ;
|
regNoun s = case s of {
|
||||||
--
|
_ + "य" => mkN05 (s);
|
||||||
-- nounGen : Str -> CommonNoun = \dog -> case last dog of {
|
_ + (""|"े"|"ह") => mkN01 (s);
|
||||||
-- "y" => nounY "dog" ;
|
_ + "य" => mkN03 (s);
|
||||||
-- "s" => nounS (init "dog") ;
|
_ + ("ं"|"wं") => mkN04 (s);
|
||||||
-- _ => nounReg "dog"
|
_ + "w^" => mkN12 (s);
|
||||||
-- } ;
|
_ => regNoun2 (s)
|
||||||
--
|
};
|
||||||
---- These are auxiliaries to $nounGen$.
|
regNoun2 : Str -> Noun;
|
||||||
--
|
regNoun2 s = let c = if_then_else Bool (eq (last s) "" ) True (if_then_else Bool (eq (last s) "ह") True (if_then_else Bool (eq (last s) "े") True False))
|
||||||
-- nounReg : Str -> CommonNoun = \dog ->
|
in case c of {
|
||||||
-- mkNoun dog (dog + "s") (dog + "'s") (dog + "s'");
|
False => mkN02 (s);
|
||||||
-- nounS : Str -> CommonNoun = \kiss ->
|
True => mkN01 (s)
|
||||||
-- mkNoun kiss (kiss + "es") (kiss + "'s") (kiss + "es'") ;
|
};
|
||||||
-- nounY : Str -> CommonNoun = \fl ->
|
|
||||||
-- mkNoun (fl + "y") (fl + "ies") (fl + "y's") (fl + "ies'") ;
|
reggNoun : Str -> Gender -> Noun ;
|
||||||
--
|
reggNoun s g = let c = if_then_else Bool (eq (last s) "" ) True (if_then_else Bool (eq (dp 2 s) "ं") True (if_then_else Bool (eq (dp 2 s) "wं") True False))
|
||||||
--
|
in case <s,g,c> of {
|
||||||
----3 Proper names
|
<_ + "त",Fem,_> => mkN10 (s);
|
||||||
----
|
<_ + "त",Masc,_> => mkN02 (s);
|
||||||
---- Regular proper names are inflected with "'s" in the genitive.
|
<_ + "w",Masc,_> => mkN11 (s);
|
||||||
--
|
<_ + "w",Fem,_> => mkN07 (s);
|
||||||
-- nameReg : Str -> Gender -> {s : Case => Str} = \john,g ->
|
<_ + "य",Fem,_> => mkN05 (s);
|
||||||
-- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ;
|
<_ + "य",Masc,_> => mkN02 (s);
|
||||||
--
|
<_,Fem,False> => mkN08 (s);
|
||||||
----2 Determiners
|
<_,Fem,_> => mkN09 (s)
|
||||||
--
|
|
||||||
-- mkDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s ->
|
};
|
||||||
-- {s = s ; n = n} ;
|
|
||||||
--
|
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
||||||
----2 Pronouns
|
-- Arabic nouns ends with h. also taken as Masc
|
||||||
----
|
|
||||||
---- Here we define personal pronouns.
|
mkN01 : Str -> Noun ;
|
||||||
----
|
mkN01 lRka = let end = last (lRka) ;
|
||||||
---- We record the form "mine" and the gender for later use.
|
lRk = if_then_else Str (eq end "े") lRka (tk 1 lRka)
|
||||||
--
|
in mkNoun (lRka) (lRk+"ै") (lRk+"ै")
|
||||||
-- Pronoun : Type =
|
(lRk+"ै") (lRk+"wं") (lRk+"w")
|
||||||
-- {s : Case => Str ; a : Agr} ;
|
Masc ;
|
||||||
--
|
|
||||||
-- mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun =
|
-- masculine nouns does not end with a, h, e, an
|
||||||
-- \I,me,my,mine,n,p,g ->
|
|
||||||
-- {s = table {Nom => I ; Acc => me ; Gen => my} ;
|
mkN02 : Str -> Noun ;
|
||||||
-- a = toAgr n p g
|
mkN02 mrd = let mrdwN = mrd+"wं" ;
|
||||||
-- } ;
|
mrdw = tk 1 mrdwN
|
||||||
--
|
in mkNoun mrd mrd mrd
|
||||||
-- human : Gender = Masc ; --- doesn't matter
|
mrd mrdwN mrdw
|
||||||
--
|
Masc ;
|
||||||
-- pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ;
|
|
||||||
-- pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK
|
-- feminine Nouns end with y
|
||||||
-- pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ;
|
|
||||||
-- pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ;
|
mkN03 : Str -> Noun ;
|
||||||
-- pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ;
|
mkN03 krsy = let krsyaN = krsy+"ं" ;
|
||||||
--
|
krsywN = krsy+"wं" ;
|
||||||
-- pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ;
|
krsyw = tk 1 krsywN
|
||||||
-- pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ;
|
in mkNoun krsy krsy krsy
|
||||||
-- pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; ---
|
krsyaN krsywN krsyw
|
||||||
--
|
Fem ;
|
||||||
--
|
|
||||||
----2 Adjectives
|
-- feminine nouns end with a, aN, wN
|
||||||
----
|
mkN04 : Str -> Noun ;
|
||||||
---- To form the adjectival and the adverbial forms, two strings are needed
|
mkN04 n = case last n of {
|
||||||
---- in the worst case. (First without degrees.)
|
"" => let bla = n
|
||||||
--
|
in mkNoun bla bla bla
|
||||||
-- Adjective = {s : AForm => Str} ;
|
(bla+"y^यं") (bla+"w^ं") (bla+"w^")
|
||||||
--
|
Fem ;
|
||||||
---- However, most adjectives can be inflected using the final character.
|
_ => let maN = n ; -- ends with aN and wN
|
||||||
---- N.B. this is not correct for "shy", but $mkAdjective$ has to be used.
|
ma = tk 1 maN
|
||||||
--
|
in mkNoun maN maN maN
|
||||||
-- regAdjective : Str -> Adjective = \free ->
|
(ma+"y^यं") (ma+"w^ं") (ma+"w^ं")
|
||||||
-- let
|
Fem
|
||||||
-- e = last free ;
|
|
||||||
-- fre = init free ;
|
};
|
||||||
-- freely = case e of {
|
--feminine nouns end with ya
|
||||||
-- "y" => fre + "ily" ;
|
|
||||||
-- _ => free + "ly"
|
mkN05 : Str -> Noun ;
|
||||||
-- } ;
|
mkN05 gRya = let gRy = (tk 1 gRya)
|
||||||
-- fre = case e of {
|
in mkNoun gRya gRya gRya
|
||||||
-- "e" => fre ;
|
(gRya+"ं") (gRy+"wं") (gRy+"w")
|
||||||
-- "y" => fre + "i" ;
|
Fem ;
|
||||||
-- _ => free
|
|
||||||
-- }
|
-- feminine nouns end with w
|
||||||
-- in
|
|
||||||
-- mkAdjective free (fre + "er") (fre + "est") freely ;
|
mkN07 : Str -> Noun ;
|
||||||
--
|
mkN07 khshbw = mkNoun khshbw khshbw khshbw
|
||||||
---- Many adjectives are 'inflected' by adding a comparison word.
|
(khshbw + "y^यं") (khshbw + "w^ं") (khshbw + "w^")
|
||||||
--
|
Fem ;
|
||||||
-- adjDegrLong : Str -> Adjective = \ridiculous ->
|
|
||||||
-- mkAdjective
|
-- Loan arabic feminine nouns end with t
|
||||||
-- ridiculous
|
-- this is a noun that shows state, condition
|
||||||
-- ("more" ++ ridiculous)
|
|
||||||
-- ("most" ++ ridiculous)
|
mkN10 : Str -> Noun ;
|
||||||
-- ((regAdjective ridiculous).s ! AAdv) ;
|
mkN10 ndamt = mkNoun ndamt ndamt ndamt
|
||||||
--
|
(ndamt+"यं") (ndamt+"wं") (ndamt+"w")
|
||||||
--
|
Fem ;
|
||||||
----3 Verbs
|
-- Worst case function
|
||||||
----
|
mkN : (_,_,_,_,_,_ : Str) -> Gender -> Noun ;
|
||||||
---- The worst case needs five forms. (The verb "be" is treated separately.)
|
mkN sgNom sgObl sgVoc plNom plObl plVoc g =
|
||||||
--
|
mkNoun sgNom sgObl sgVoc plNom plObl plVoc g ;
|
||||||
-- mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone ->
|
|
||||||
-- let going = case last go of {
|
mkN06 : Str -> Noun ;
|
||||||
-- "e" => init go + "ing" ;
|
mkN06 rya = mkNoun rya rya rya
|
||||||
-- _ => go + "ing"
|
(rya+"y^यं") (rya+"w^ं") rya
|
||||||
-- }
|
Fem ;
|
||||||
-- in
|
|
||||||
-- mkVerb go goes went gone going ;
|
-- feminine nouns that do not end with a, N, w, wN
|
||||||
--
|
|
||||||
---- This is what we use to derive the irregular forms in almost all cases
|
mkN08 : Str -> Noun ;
|
||||||
--
|
mkN08 ktab = mkNoun ktab ktab ktab
|
||||||
-- mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten ->
|
(ktab+"यं") (ktab+"wं") (ktab+"w")
|
||||||
-- let bites = case last bite of {
|
Fem ;
|
||||||
-- "y" => y2ie bite "s" ;
|
|
||||||
-- "s" => init bite + "es" ;
|
-- Loan arabic feminine nouns
|
||||||
-- _ => bite + "s"
|
|
||||||
-- }
|
mkN09 : Str -> Noun ;
|
||||||
-- in mkVerb4 bite bites bit bitten ;
|
mkN09 ahsan = mkNoun ahsan ahsan ahsan
|
||||||
--
|
(ahsan+"त") (ahsan+"त") (ahsan+"w")
|
||||||
---- This is used to derive regular forms.
|
Fem ;
|
||||||
--
|
-- (variants{ahsan+"त";ahsan+"wं"})
|
||||||
-- mkVerbReg : Str -> Verb = \soak ->
|
-- Loan persian maculine nouns end with w
|
||||||
-- let
|
|
||||||
-- soaks = case last soak of {
|
mkN11 : Str -> Noun ;
|
||||||
-- "y" => y2ie soak "s" ;
|
mkN11 alw = mkNoun alw alw alw
|
||||||
-- "s" => init soak + "es" ;
|
alw (alw+"w^ं") (alw+"w^")
|
||||||
-- _ => soak + "s"
|
Masc ;
|
||||||
-- } ;
|
|
||||||
-- soaked = case last soak of {
|
|
||||||
-- "e" => init soak + "s" ;
|
-- Loan persian maculine nouns end with w^
|
||||||
-- _ => soak + "ed"
|
|
||||||
-- }
|
mkN12 : Str -> Noun ;
|
||||||
-- in
|
mkN12 bhao = mkNoun (bhao) (bhao) (bhao)
|
||||||
-- mkVerb4 soak soaks soaked soaked ;
|
(bhao) (bhao) (bhao)
|
||||||
--
|
Masc ;
|
||||||
-- verbGen : Str -> Verb = \kill -> case last kill of {
|
----2 Determiners
|
||||||
-- "y" => verbP3y (init kill) ;
|
IDeterminer = {s:Gender => Str ; n : Number};
|
||||||
-- "e" => verbP3e (init kill) ;
|
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||||
-- "s" => verbP3s (init kill) ;
|
s = table {
|
||||||
-- _ => regVerbP3 kill
|
Sg => table {
|
||||||
-- } ;
|
Masc => s1 ;
|
||||||
--
|
Fem => s2
|
||||||
---- These are just auxiliary to $verbGen$.
|
} ;
|
||||||
--
|
Pl => table {
|
||||||
-- regVerbP3 : Str -> Verb = \walk ->
|
Masc => s3 ;
|
||||||
-- mkVerbIrreg walk (walk + "ed") (walk + "ed") ;
|
Fem => s4
|
||||||
-- verbP3s : Str -> Verb = \kiss ->
|
}
|
||||||
-- mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ;
|
} ;
|
||||||
-- verbP3e : Str -> Verb = \love ->
|
|
||||||
-- mkVerb4 love (love + "s") (love + "d") (love + "d") ;
|
n = n
|
||||||
-- verbP3y : Str -> Verb = \cr ->
|
};
|
||||||
-- mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ;
|
|
||||||
--
|
makeIDet : Str -> Str -> Number -> IDeterminer = \s1,s2,n -> {
|
||||||
----- The particle always appears right after the verb.
|
s = table {
|
||||||
--
|
Masc => s1;
|
||||||
-- verbPart : Verb -> Str -> Verb = \v,p ->
|
Fem => s2
|
||||||
-- {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ;
|
};
|
||||||
--
|
n = n
|
||||||
-- verbNoPart : Verb -> Verb = \v -> verbPart v [] ;
|
};
|
||||||
--
|
|
||||||
--
|
-- Proposition
|
||||||
}
|
|
||||||
|
makePrep : Str -> Str -> Preposition = \s1,s2 -> {s = table { Masc => s1 ; Fem => s2 } } ** { lock_Prep = <>};
|
||||||
|
|
||||||
|
----2 Pronouns
|
||||||
|
PronForm = {s:Pronoun => Str};
|
||||||
|
makeDemPron : (x1,x2,x3,x4,x5,x6:Str) -> PronForm =
|
||||||
|
\y1,y2,y3,y4,y5,y6 -> {
|
||||||
|
s = table {
|
||||||
|
P Sg _ Dir _ => y1;
|
||||||
|
P Sg _ Obl _ => y2;
|
||||||
|
P Sg _ Voc _ => y3;
|
||||||
|
P Pl _ Dir _ => y4;
|
||||||
|
P Pl _ Obl _ => y5;
|
||||||
|
P Pl _ Voc _ => y6
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
-- DemonPronForm = {s:DemPronForm => Str};
|
||||||
|
mkDemonPronForm : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12:Str) -> DemPronForm =
|
||||||
|
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12 -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => y1 ;
|
||||||
|
Obl => y2 ;
|
||||||
|
Voc => y3
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => y4 ;
|
||||||
|
Obl => y5 ;
|
||||||
|
Voc => y6
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => y7 ;
|
||||||
|
Obl => y8 ;
|
||||||
|
Voc => y9
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => y10 ;
|
||||||
|
Obl => y11 ;
|
||||||
|
Voc => y12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
makeDemonPronForm : Str -> Str -> Str -> DemPronForm ;
|
||||||
|
makeDemonPronForm yeh is inn = mkDemonPronForm yeh is "" yeh is "" yeh inn "" yeh inn "";
|
||||||
|
-- makePossPronForm myra myry hmara hmary = mkDemonPronForm myra myra myra myry myry myry hmara hmara hmara hmary hmary hmary;
|
||||||
|
|
||||||
|
PersPron = {s: PersPronForm => Str};
|
||||||
|
|
||||||
|
mkPersPron:(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36:Str) -> PersPron =
|
||||||
|
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,y31,y32,y33,y34,y35,y36 -> {
|
||||||
|
s =
|
||||||
|
table {
|
||||||
|
PPF Sg Pers1 Dir => y1;
|
||||||
|
PPF Sg Pers1 Obl => y2;
|
||||||
|
PPF Sg Pers1 Voc => y3;
|
||||||
|
PPF Sg Pers2_Casual Dir => y4;
|
||||||
|
PPF Sg Pers2_Casual Obl => y5;
|
||||||
|
PPF Sg Pers2_Casual Voc => y6;
|
||||||
|
PPF Sg Pers2_Familiar Dir => y7;
|
||||||
|
PPF Sg Pers2_Familiar Obl => y8;
|
||||||
|
PPF Sg Pers2_Familiar Voc => y9;
|
||||||
|
PPF Sg Pers2_Respect Dir => y10;
|
||||||
|
PPF Sg Pers2_Respect Obl => y11;
|
||||||
|
PPF Sg Pers2_Respect Voc => y12;
|
||||||
|
PPF Sg Pers3_Near Dir => y13;
|
||||||
|
PPF Sg Pers3_Near Obl => y14;
|
||||||
|
PPF Sg Pers3_Near Voc => y15;
|
||||||
|
PPF Sg Pers3_Distant Dir => y16;
|
||||||
|
PPF Sg Pers3_Distant Obl => y17;
|
||||||
|
PPF Sg Pers3_Distant Voc => y18;
|
||||||
|
PPF Pl Pers1 Dir => y19;
|
||||||
|
PPF Pl Pers1 Obl => y20;
|
||||||
|
PPF Pl Pers1 Voc => y21;
|
||||||
|
PPF Pl Pers2_Casual Dir => y22;
|
||||||
|
PPF Pl Pers2_Casual Obl => y23;
|
||||||
|
PPF Pl Pers2_Casual Voc => y24;
|
||||||
|
PPF Pl Pers2_Familiar Dir => y25;
|
||||||
|
PPF Pl Pers2_Familiar Obl => y26;
|
||||||
|
PPF Pl Pers2_Familiar Voc => y27;
|
||||||
|
PPF Pl Pers2_Respect Dir => y28;
|
||||||
|
PPF Pl Pers2_Respect Obl => y29;
|
||||||
|
PPF Pl Pers2_Respect Voc => y30;
|
||||||
|
PPF Pl Pers3_Near Dir => y31;
|
||||||
|
PPF Pl Pers3_Near Obl => y32;
|
||||||
|
PPF Pl Pers3_Near Voc => y33;
|
||||||
|
PPF Pl Pers3_Distant Dir => y34;
|
||||||
|
PPF Pl Pers3_Distant Obl => y35;
|
||||||
|
PPF Pl Pers3_Distant Voc => y36
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
makePersPron : PersPron;
|
||||||
|
makePersPron = mkPersPron "m(a)यं" "m(o)j'|ह" "" "t(o)w " "t(o)j|ह" "t(o)w " "t(o)म" "t(o)म" "t(o)म" "ाप" "ाप" "ाप" "y(i)ह" "a(i)स" "" "w(o)ह" "a(o)स" ""
|
||||||
|
"h(a)म" "h(a)म" "" "t(o)म" "t(o)म" "t(o)म" "t(o)म" "t(o)म" "t(o)म" "ाप" "ाप" "ाप" "y(i)ह" "a(i)न" "" "w(o)ह" "a(o)न" "" ;
|
||||||
|
|
||||||
|
mkPron : (x1,x2,x3:Str) -> {s:Case => Str} =
|
||||||
|
\y1,y2,y3 -> { s =
|
||||||
|
table {
|
||||||
|
Dir => y1;
|
||||||
|
Obl => y2;
|
||||||
|
Voc => y3
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
------- PossPronForm yet to be implemented
|
||||||
|
|
||||||
|
-- IntPronForm = {s:InterrPronForm => Str};
|
||||||
|
IntPronForm = {s: Case => Str};
|
||||||
|
mkIntPronForm : (x1,x2,x3:Str) -> IntPronForm =
|
||||||
|
\y1,y2,y3 -> {
|
||||||
|
s =
|
||||||
|
table {
|
||||||
|
Dir => y1;
|
||||||
|
Obl => y2;
|
||||||
|
Voc => y3
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
----2 Adjectives
|
||||||
|
-- defined in ResUrd
|
||||||
|
|
||||||
|
----3 Verbs
|
||||||
|
CommonVF = {s : VTense => UPerson => Number => Gender => Str} ;
|
||||||
|
|
||||||
|
mkVerb : (x1: Str) -> Verb = \inf ->
|
||||||
|
let root = (tk 2 inf); inf_obl = ((tk 1 inf) + "ै"); inf_fem = ((tk 1 inf) + "य")
|
||||||
|
in { s = table {
|
||||||
|
|
||||||
|
VF tense person number gender => (mkCmnVF root tense person number gender).s ;
|
||||||
|
Inf => inf ;
|
||||||
|
Root => root ;
|
||||||
|
Inf_Obl => inf_obl ;
|
||||||
|
Inf_Fem => inf_fem
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
rem_y : Str -> Str;
|
||||||
|
rem_y str = let b = take 1 str; yth = drop 1 str; a1 = take 4 yth; a2 = take 1 yth; th= if_then_else Str (eq a1 "(a)य") (drop 5 str) (drop 2 str); st = if_then_else Str (eq a1 "(a)य") (b ++ "(i)"++th) (if_then_else Str (eq a2 "य") (b ++ th) str)
|
||||||
|
in rt st;
|
||||||
|
rt: Str -> Str;
|
||||||
|
rt r = r;
|
||||||
|
mkCmnVF : Str -> VTense -> UPerson -> Number -> Gender -> {s:Str} =
|
||||||
|
\root,t,p,n,g ->
|
||||||
|
{s =
|
||||||
|
let form1 = case (last root) of {
|
||||||
|
""|"ा"|"w" => root + "w^ं" ;
|
||||||
|
_ => root + "wं"
|
||||||
|
};
|
||||||
|
form2 = case (last root) of {
|
||||||
|
""|"ा"|"w" => root + "y^ं" ;
|
||||||
|
_ => root + "यं"
|
||||||
|
};
|
||||||
|
in
|
||||||
|
case <t,p,n,g> of {
|
||||||
|
<Subj,Pers1,Sg,_> => form1 ;
|
||||||
|
<Subj,Pers1,Pl,_> => form2 ;
|
||||||
|
<Subj,_,_,_> => (mkImpert root p n g).s ;
|
||||||
|
<Perf,_,_,_> => case root of {
|
||||||
|
"हw" => (mkPastInd root p n g).s ;
|
||||||
|
"ज" => (mkPastInd "गय" p n g).s ;
|
||||||
|
"कर" => (mkPastInd "क" p n g).s ;
|
||||||
|
"दै" => (mkPastInd "द" p n g).s ;
|
||||||
|
"लै" => (mkPastInd "ल" p n g).s ;
|
||||||
|
_ => (mkPastInd root p n g).s };
|
||||||
|
<Imperf,Pers2_Familiar,Sg,Masc> => root + "तै";
|
||||||
|
<Imperf,Pers2_Familiar,Sg,Fem> => root + "तय"; --variants{root+"तय" ; root+"तयं"};
|
||||||
|
<Imperf,Pers2_Familiar,Pl,Masc> => root + "तै";
|
||||||
|
<Imperf,Pers2_Familiar,Pl,Fem> => root+"तयं";
|
||||||
|
<Imperf,Pers2_Respect,Sg,Masc> => root + "तै";
|
||||||
|
<Imperf,Pers2_Respect,Sg,Fem> => root + "तय"; --variants{root+"तय" ; root+"तयं"};
|
||||||
|
<Imperf,Pers2_Respect,Pl,Masc> => root + "तै";
|
||||||
|
<Imperf,Pers2_Respect,Pl,Fem> => root+"तयं";
|
||||||
|
<Imperf,_,Sg,Masc> => root+"त";
|
||||||
|
<Imperf,_,Sg,Fem> => root+"तय";
|
||||||
|
<Imperf,_,Pl,Masc> => root+"ते";
|
||||||
|
<Imperf,_,Pl,Fem> => root+"तयं"
|
||||||
|
}
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPastInd : Str -> UPerson -> Number -> Gender -> {s:Str} = \root,p,n,g ->
|
||||||
|
{s = let roo = root ;
|
||||||
|
a = case (last root) of {
|
||||||
|
""|"ा"|"w"|"क" => "य" ;
|
||||||
|
_ => ""
|
||||||
|
} ;
|
||||||
|
y = case (last root) of {
|
||||||
|
""|"ा"|"w" => "y^य" ;
|
||||||
|
_ => "य"
|
||||||
|
} ;
|
||||||
|
e = case (last root) of {
|
||||||
|
""|"ा"|"w"|"क" => "y^ै" ;
|
||||||
|
_ => "ै"
|
||||||
|
} ;
|
||||||
|
yN = case (last root) of {
|
||||||
|
""|"ा"|"w" => "y^यं" ;
|
||||||
|
_ => "यं"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
in
|
||||||
|
case <p,n,g> of {
|
||||||
|
<Pers1,Sg,Masc> => roo+a ;
|
||||||
|
<Pers1,Sg,Fem> => roo+y ;
|
||||||
|
<Pers1,Pl,Masc> => roo+e ;
|
||||||
|
<Pers1,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Casual,Sg,Masc> => roo+a ;
|
||||||
|
<Pers2_Casual,Sg,Fem> => roo+y ;
|
||||||
|
<Pers2_Casual,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Casual,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Familiar,Sg,Masc> => roo+e ;
|
||||||
|
<Pers2_Familiar,Sg,Fem> => roo+y; --variants{roo+y ; roo+yN} ;
|
||||||
|
<Pers2_Familiar,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Familiar,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Respect,Sg,Masc> => roo+e ;
|
||||||
|
<Pers2_Respect,Sg,Fem> => roo+yN; --variants{roo+yN ; roo+y} ;
|
||||||
|
<Pers2_Respect,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Respect,Pl,Fem> => roo+yN ;
|
||||||
|
<_,Sg,Masc> => roo + a;
|
||||||
|
<_,Sg,Fem> => roo+y ;
|
||||||
|
<_,Pl,Masc> => roo + e;
|
||||||
|
<_,Pl,Fem> => roo+yN
|
||||||
|
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkImpert : Str -> UPerson -> Number -> Gender -> {s:Str} = \root,p,n,g ->
|
||||||
|
{s = let roo = root ;
|
||||||
|
w = case (last root) of {
|
||||||
|
""|"ा"|"w" => "w^" ;
|
||||||
|
_ => "w"
|
||||||
|
} ;
|
||||||
|
yN = case (last root) of {
|
||||||
|
""|"ा"|"w" => "y^यं" ;
|
||||||
|
_ => "यं"
|
||||||
|
} ;
|
||||||
|
yE = case (last root) of {
|
||||||
|
""|"ा"|"w" => "y^यै" ;
|
||||||
|
_ => "यै"
|
||||||
|
} ;
|
||||||
|
e = case (last root) of {
|
||||||
|
""|"ा"|"w" => "y^ै" ;
|
||||||
|
_ => "ै"
|
||||||
|
} in
|
||||||
|
case <p,n,g> of {
|
||||||
|
<Pers1,_,_> => ""; --nonExist ;
|
||||||
|
<Pers2_Casual,Sg,_> => root ;
|
||||||
|
<Pers2_Casual,Pl,_> => roo+w ;
|
||||||
|
<Pers2_Familiar,_,_> => roo+w ;
|
||||||
|
<Pers2_Respect,Sg,_> => roo+w; --variants{roo+w; roo+yN; roo+yE} ;
|
||||||
|
<Pers2_Respect,Pl,_> => roo+yN; --variants{roo+yN; roo+yE} ;
|
||||||
|
<_,Sg,_> => roo+e ;
|
||||||
|
<_,Pl,_> => roo+yN
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,121 +1,2 @@
|
|||||||
concrete NounHin of Noun = CatHin ** open ResHin, Prelude in {
|
concrete NounHin of Noun = CatHin ** NounHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
DetCN det cn = {
|
|
||||||
s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ;
|
|
||||||
a = agrP3 cn.g det.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ;
|
|
||||||
UsePron p = {s = \\c => p.s ! np2pronCase c ; a = p.a} ;
|
|
||||||
--
|
|
||||||
-- PredetNP pred np = {
|
|
||||||
-- s = \\c => pred.s ++ np.s ! c ;
|
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- PPartNP np v2 = {
|
|
||||||
-- s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- RelNP np rs = {
|
|
||||||
-- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- AdvNP np adv = {
|
|
||||||
-- s = \\c => np.s ! c ++ adv.s ;
|
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- DetQuantOrd quant num ord = {
|
|
||||||
-- s = quant.s ! num.n ++ num.s ++ ord.s ;
|
|
||||||
-- n = num.n
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
DetQuant quant num = {
|
|
||||||
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- DetNP det = {
|
|
||||||
-- s = \\c => det.s ; ---- case
|
|
||||||
-- a = agrP3 det.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
PossPron p = {s = \\_,_,_ => p.s ! PPoss} ;
|
|
||||||
|
|
||||||
NumSg = {s = []; n = Sg} ;
|
|
||||||
NumPl = {s = []; n = Pl} ;
|
|
||||||
|
|
||||||
-- NumCard n = n ** {hasCard = True} ;
|
|
||||||
--
|
|
||||||
-- NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
|
||||||
-- OrdDigits n = {s = n.s ! NOrd} ;
|
|
||||||
--
|
|
||||||
-- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
|
||||||
-- OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
|
||||||
--
|
|
||||||
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
|
||||||
--
|
|
||||||
-- OrdSuperl a = {s = a.s ! AAdj Superl} ;
|
|
||||||
--
|
|
||||||
-- DetArtOrd art num ord = {
|
|
||||||
-- s = art.s ! num.hasCard ! num.n ++ num.s ++ ord.s ;
|
|
||||||
-- n = num.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- DetArtCard art card = {
|
|
||||||
-- s = art.s ! True ! card.n ++ card.s ;
|
|
||||||
-- n = card.n
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
DefArt = {s = \\_,_,_ => []} ;
|
|
||||||
IndefArt = {s = \\_,_,_ => []} ;
|
|
||||||
|
|
||||||
-- MassNP cn = {
|
|
||||||
-- s = cn.s ! Sg ;
|
|
||||||
-- a = agrP3 Sg
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
UseN n = n ;
|
|
||||||
-- UseN2 n = n ;
|
|
||||||
--
|
|
||||||
-- Use2N3 f = {
|
|
||||||
-- s = \\n,c => f.s ! n ! Nom ;
|
|
||||||
-- g = f.g ;
|
|
||||||
-- c2 = f.c2
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- Use3N3 f = {
|
|
||||||
-- s = \\n,c => f.s ! n ! Nom ;
|
|
||||||
-- g = f.g ;
|
|
||||||
-- c2 = f.c3
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; g = f.g} ;
|
|
||||||
-- ComplN3 f x = {
|
|
||||||
-- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ;
|
|
||||||
-- g = f.g ;
|
|
||||||
-- c2 = f.c3
|
|
||||||
-- } ;
|
|
||||||
|
|
||||||
AdjCN ap cn = {
|
|
||||||
s = \\n,c => ap.s ! cn.g ! n ! c ++ cn.s ! n ! c ;
|
|
||||||
g = cn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- RelCN cn rs = {
|
|
||||||
-- s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ;
|
|
||||||
-- g = cn.g
|
|
||||||
-- } ;
|
|
||||||
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
|
||||||
--
|
|
||||||
-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
|
||||||
--
|
|
||||||
-- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! c ; g = cn.g} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,107 +1,127 @@
|
|||||||
concrete NumeralHin of Numeral = CatHin ** open ResHin in {
|
concrete NumeralHin of Numeral = CatHin ** open ResHin,Prelude,ParamX in {
|
||||||
-- By Harald Hammarström
|
-- By Harald Hammarström
|
||||||
-- flags coding=devanagari ;
|
-- Modification for Hinu Shafqat Virk
|
||||||
--- still old Devanagari coding
|
flags coding=utf8 ;
|
||||||
|
--- still old Devanagari coding
|
||||||
|
|
||||||
param DForm = unit | ten ;
|
|
||||||
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
param DForm = unit | ten ;
|
||||||
param Size = sing | less100 | more100 ;
|
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
||||||
|
param Size = singl | less100 | more100 ;
|
||||||
oper LinDigit = {s : DForm => Str ; size : DSize} ;
|
|
||||||
|
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||||
--lincat Numeral = { s : Str } ;
|
|
||||||
lincat Digit = LinDigit ;
|
|
||||||
lincat Sub10 = {s : DForm => Str ; size : DSize} ;
|
lincat Dig = { s:Str ; n : Number};
|
||||||
lincat Sub100 = {s : Str ; size : Size} ;
|
lincat Digit = LinDigit ;
|
||||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size } ;
|
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||||
lincat Sub1000000 = { s : Str } ;
|
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
||||||
|
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
||||||
lin num x0 =
|
lincat Sub1000000 = { s : Str ; n : Number } ;
|
||||||
{s = "/&" ++ x0.s ++ "&/"} ; -- the Devana:gari environment
|
|
||||||
|
lin num x0 =
|
||||||
|
{s = table {
|
||||||
-- H is for aspiration (h is a sepaarate letter)
|
NCard => x0.s ;
|
||||||
-- M is anusvara
|
NOrd => x0.s ++ "واں" -- need to use mkOrd which will make irregular ordinals but it gives path error
|
||||||
-- ~ is candrabindhu
|
};
|
||||||
-- c is is Eng. ch in e.g chop
|
n = x0.n
|
||||||
-- cH is chH
|
} ;
|
||||||
-- _: is length
|
oper mkOrd : Str -> Str =
|
||||||
-- T, D, R are the retroflexes
|
\s -> case s of {
|
||||||
|
"عك" => "پہلا";
|
||||||
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
"دo" => "دوسرا";
|
||||||
\do -> \bis -> \sz ->
|
"تi:ن" => "تعسرا";
|
||||||
{s = table {unit => do ; ten => bis } ;
|
"چa:ر" => "چوتh-ا";
|
||||||
size = sz } ;
|
("چحاہ"|"چحا"|"چحاi") => "چh-ٹا";
|
||||||
|
_ => s ++ "واں"
|
||||||
-- lin n1 mkNum "ek" "gya:rah" "das"
|
};
|
||||||
lin n2 = mkNum "do" "bi:s" r2 ;
|
-- {s = \\_ => x0.s ; n = x0.n} ;
|
||||||
lin n3 = mkNum "ti:n" "ti:s" r3 ;
|
|
||||||
lin n4 = mkNum "ca:r" "ca:li:s" r4 ;
|
|
||||||
lin n5 = mkNum "pa:~nc" "paca:s" r5 ;
|
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
||||||
lin n6 = mkNum (variants {"cHah" ; "cHa;" ; "cHai"}) "sa:TH" r6 ;
|
\do -> \bis -> \sz ->
|
||||||
lin n7 = mkNum "sa:t" "sattar" r7;
|
{s = table {unit => do ; ten => bis } ;
|
||||||
lin n8 = mkNum "a:TH" "assi:" r8;
|
size = sz ; n = Pl} ;
|
||||||
lin n9 = mkNum "nau" (variants {"navve" ; "nabbe" }) r9 ;
|
|
||||||
|
lin n2 = mkNum "دو" "بیس" r2 ;
|
||||||
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
lin n3 = mkNum "تین" "تیس" r3 ;
|
||||||
sg => a1 + "ah" ;
|
lin n4 = mkNum "چار" "چالیس" r4 ;
|
||||||
r2 => a2 + "i:s" ;
|
lin n5 = mkNum "پانچ" "پچاس" r5 ;
|
||||||
r3 => a3 + "ti:s" ;
|
lin n6 = mkNum "چh-" "ساتh-" r6 ;
|
||||||
r4 => a4 + "a:li:s" ;
|
lin n7 = mkNum "سات" "ستر" r7;
|
||||||
r5 => a5 + "an" ;
|
lin n8 = mkNum "آتh-" "اسی" r8;
|
||||||
r6 => a6 + "saTH" ;
|
lin n9 = mkNum "نو" "نوے" r9 ;
|
||||||
r7 => a7 + "hattar" ;
|
|
||||||
r8 => a8 + "a:si:" ;
|
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
||||||
r9 => a9 + "a:nave"
|
sg => a1 + "اہ" ;
|
||||||
} ;
|
r2 => a2 + "i:س" ;
|
||||||
|
r3 => a3 + "تi:س" ;
|
||||||
oper rows : DSize => DSize => Str = table {
|
r4 => a4 + "a:لi:س" ;
|
||||||
sg => mkR "gya:r" "ikk" "ikat" "ekt" "ikya:v" "ik" "ik" "iky" "iky" ;
|
r5 => a5 + "ان" ;
|
||||||
r2 => mkR "ba:r" "ba:" "bat" "bay" "ba:v" "ba:" "ba" "bay" "b" ;
|
r6 => a6 + "ساٹح" ;
|
||||||
r3 => mkR "ter" "te" "taiM" "taiMt" "tirp" "tir" "ti" "tir" "tir" ;
|
r7 => a7 + "ہاتتار" ;
|
||||||
r4 => mkR "caud" "caub" "cauM" "cav" "caup" "cauM" "cau" "caur" "caur" ;
|
r8 => a8 + "a:سi:" ;
|
||||||
r5 => mkR "paMdr" "pacc" "paiM" "paiMt" "pacp" "paiM" "pac" "pac" "pac" ;
|
r9 => a9 + "a:ناvع"
|
||||||
r6 => mkR "sol" "cHabb" "cHat" "cHiy" "cHapp" "cHiya:" "cHi" "cHiy" "cHiy" ;
|
} ;
|
||||||
r7 => mkR (variants { "sattr" ; "satr"}) "satta:v" "saiM" "saiMt" "satta:" "sar" "sat" (variants {"satt" ; "sat" }) "satt" ;
|
|
||||||
r8 => mkR "aTHa:r" "aTTHa:" "aR" "aRt" "aTTHa:v" "aR" "aTH" (variants { "aTTH" ; "aTH" }) "aTTH" ;
|
oper rows : DSize => DSize => Str = table {
|
||||||
r9 => table {sg => "unni:s" ; r2 => "unati:s" ; r3 => "unata:li:s" ;
|
sg => mkR "گیارہ" "iكك" "iكات" "عكت" "iكیاو" "iك" "iك" "iكی" "iكی" ;
|
||||||
r4 => "unaca:s" ; r5 => "unasaTH" ; r6 => "unahattar" ;
|
r2 => mkR "بارہ" "بای" "بات" "بای" "باو" "با" "با" "بای" "ب" ;
|
||||||
r7 => (variants{"unna:si:" ; "unya:si:"}) ;
|
r3 => mkR "تیر" "تی" "تین" "تنت" "ترپ" "تری" "ت" "تر" "تر" ;
|
||||||
r8 => "nava:si:" ; r9 => "ninya:nave" }
|
r4 => mkR "چود" "چوب" "چون" "چوا" "چوو" "چون" "چوہ" "چور" "چور" ;
|
||||||
} ;
|
r5 => mkR "پند" "پچی" "پین" "پنتا" "پچپ" "پین" "پہ" "پچ" "پچ" ;
|
||||||
|
r6 => mkR "سول" "چh-ب" "چh-ت" "چh-ی" "چh-پ" "چh-یا" "چh-" "چh-ی" "چh-ی" ;
|
||||||
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
r7 => mkR "ستر" "ستا" "سین" "سنت" "ستاو" "ستا" "سر" "ست" "ستا" ;
|
||||||
|
r8 => mkR "اتh-ار" "اتh-ای" "اڑ" "اڑت" "اتh-او" "اڑ" "اتh-" "اتh-" "اتh-" ;
|
||||||
lin pot01 = {s = table {unit => "ek" ; _ => "dummy" } ; size = sg} ;
|
r9 => table {sg => "انیس" ; r2 => "انتیس" ; r3 => "انتالیس" ;
|
||||||
lin pot0 d = d ;
|
r4 => "انچاس" ; r5 => "انستh-" ; r6 => "انہتر" ;
|
||||||
lin pot110 = {s = "das" ; size = less100} ;
|
r7 => "اناسی" ;
|
||||||
lin pot111 = {s = rows ! sg ! sg ; size = less100} ;
|
r8 => "انانوے" ; r9 => "ننانوے" }
|
||||||
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100} ;
|
} ;
|
||||||
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => sing ; _ => less100} ! n.size } ;
|
|
||||||
|
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
||||||
lin pot1 d = {s = d.s ! ten ; size = less100} ;
|
|
||||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100} ;
|
lin pot01 = {s = table {unit => "ایك" ; _ => "دuممی" } ; size = sg ; n = Sg} ;
|
||||||
|
lin pot0 d = d ;
|
||||||
lin pot1as2 n = {s = n.s ; s2 = "dummy" ; size = n.size } ;
|
lin pot110 = {s = "داس" ; size = less100 ; n = Pl} ;
|
||||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
||||||
s2 = d.s ! unit ++ "la:kH" ; size = more100} ;
|
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
||||||
lin pot2plus d e =
|
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => singl ; _ => less100} ! n.size ; n = n.n } ;
|
||||||
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
|
||||||
s2 = (d.s ! unit) ++ "la:kH" ++ (mkhazar e.s e.size) ;
|
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
||||||
size = more100} ;
|
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
||||||
|
|
||||||
lin pot2as3 n = {s = n.s } ;
|
lin pot1as2 n = {s = n.s ; s2 = "دuممی" ; size = n.size ; n = n.n} ;
|
||||||
lin pot3 n = {s = table { sing => ekhazar ;
|
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
||||||
less100 => n.s ++ "haza:r" ;
|
s2 = d.s ! unit ++ "لاكh-" ; size = more100 ; n = d.n} ;
|
||||||
more100 => n.s2 } ! n.size} ;
|
lin pot2plus d e =
|
||||||
lin pot3plus n m =
|
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
||||||
{s = table {sing => ekhazar ;
|
s2 = (d.s ! unit) ++ "لاكh-" ++ (mkhazar e.s e.size) ;
|
||||||
less100 => n.s ++ "haza:r" ;
|
size = more100 ; n = d.n} ;
|
||||||
more100 => n.s2 } ! n.size ++ m.s} ;
|
|
||||||
|
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
||||||
|
lin pot3 n = {s = table { singl => ekhazar ;
|
||||||
oper ekhazar : Str = variants {"haza:r" ; "ek" ++ "haza:r"} ;
|
less100 => n.s ++ "ہزار" ;
|
||||||
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {sing => ekhazar ; _ => s ++ "haza:r"} ! sz ;
|
more100 => n.s2 } ! n.size ; n = n.n} ;
|
||||||
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "sau" ; _ => s ++ "sau"} ! sz ;
|
lin pot3plus n m =
|
||||||
}
|
{s = table {singl => ekhazar ;
|
||||||
|
less100 => n.s ++ "ہزار" ;
|
||||||
|
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
||||||
|
|
||||||
|
lin D_0 = { s = "0" ; n = Sg};
|
||||||
|
lin D_1 = { s = "1" ; n = Sg};
|
||||||
|
lin D_2 = { s = "2" ; n = Pl};
|
||||||
|
lin D_3 = { s = "3" ; n = Pl};
|
||||||
|
lin D_4 = { s = "4" ; n = Pl};
|
||||||
|
lin D_5 = { s = "5" ; n = Pl};
|
||||||
|
lin D_6 = { s = "6" ; n = Pl};
|
||||||
|
lin D_7 = { s = "7" ; n = Pl};
|
||||||
|
lin D_8 = { s = "8" ; n = Pl};
|
||||||
|
lin D_9 = { s = "9" ; n = Pl};
|
||||||
|
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
||||||
|
lin IIDig d dg = { s = \\df => Prelude.glue (dg.s ! df) d.s ; n = Pl };
|
||||||
|
|
||||||
|
oper ekhazar : Str = variants {"ہزار" ; "ایك" ++ "ہزار"} ;
|
||||||
|
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {singl => ekhazar ; _ => s ++ "ہزار"} ! sz ;
|
||||||
|
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "سو" ; _ => s ++ "سو"} ! sz ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,556 +1,170 @@
|
|||||||
--# -path=.:../abstract:../../prelude:../common
|
--# -path=.:../abstract:../../prelude:../common
|
||||||
--
|
--
|
||||||
----1 Hindi Lexical Paradigms
|
----1 Hinu Lexical Paradigms
|
||||||
|
|
||||||
resource ParadigmsHin = open
|
resource ParadigmsHin = open
|
||||||
(Predef=Predef),
|
Predef,
|
||||||
Prelude,
|
Prelude,
|
||||||
MorphoHin,
|
MorphoHin,
|
||||||
CatHin
|
CatHin,
|
||||||
in {
|
CommonHindustani,
|
||||||
|
ParamX
|
||||||
--2 Parameters
|
in {
|
||||||
|
--2 Parameters
|
||||||
oper
|
|
||||||
masculine : Gender ;
|
oper
|
||||||
feminine : Gender ;
|
masculine : Gender ;
|
||||||
|
feminine : Gender ;
|
||||||
masculine = Masc ; feminine = Fem ; --i
|
singular : Number;
|
||||||
|
plural : Number;
|
||||||
|
|
||||||
--2 Nouns
|
singular = Sg ; plural = Pl;
|
||||||
|
|
||||||
mkN = overload {
|
masculine = Masc ; feminine = Fem ; --i
|
||||||
mkN : Str -> N
|
|
||||||
= \s -> regNoun s ** {lock_N = <>} ;
|
|
||||||
mkN : Str -> Gender -> N
|
--2 Nouns
|
||||||
= \s,g -> reggNoun s g ** {lock_N = <>} ;
|
|
||||||
mkN : (x1,_,_,_,_,x6 : Str) -> Gender -> N
|
mkN = overload {
|
||||||
= \sd,so,sv,pd,po,pv,g -> mkNoun sd so sv pd po pv g ** {lock_N = <>} ;
|
mkN : Str -> N
|
||||||
} ;
|
= \s -> regNoun s ** {lock_N = <>} ;
|
||||||
|
mkN : Str -> Gender -> N
|
||||||
mkPN = overload {
|
= \s,g -> reggNoun s g ** {lock_N = <>} ;
|
||||||
mkPN : Str -> PN = \s -> let n = regNoun s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
mkN : (x1,_,_,_,_,x6 : Str) -> Gender -> N
|
||||||
mkPN : N -> Gender -> PN = \n,g -> {s = n.s ! Sg ; g = g ; lock_PN = <>} ;
|
= \sd,so,sv,pd,po,pv,g -> mkNoun sd so sv pd po pv g ** {lock_N = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
mkN2 : N -> Prep -> Str -> N2;
|
||||||
--2 Adjectives
|
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ! n.g ; c3 = c } ;
|
||||||
|
|
||||||
mkA = overload {
|
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
||||||
mkA : Str -> A
|
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ! n.g ; c3 = q ; c4 = r} ;
|
||||||
= \s -> regAdjective s ** {lock_A = <>} ;
|
|
||||||
mkA : (x1,_,x3 : Str) -> A
|
-- Compound Nouns
|
||||||
= \msd,m,f -> mkAdjective msd m f ** {lock_A = <>} ;
|
|
||||||
} ;
|
mkCmpdNoun : Str -> N -> N
|
||||||
|
= \s,noun -> {s =\\n,c => s ++ noun.s ! n ! c ; g = noun.g ; lock_N = <>};
|
||||||
--2 Verbs
|
|
||||||
|
|
||||||
mkV = overload {
|
-- Proper names
|
||||||
mkV : Str -> V
|
mkPN : Str -> PN = \s -> let n = regNoun s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||||
= \s -> regVerb s ** {lock_V = <>} ;
|
personalPN : Str -> Str -> Str -> Str -> Number -> Gender -> UPerson -> Pron = \s1,s2,s3,sp,nn,g,p -> let n = mkPron s1 s2 s3 in {s = n.s ; a = toAgr nn p g ; ps = sp ; lock_Pron = <>};
|
||||||
mkV : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> V
|
demoPN : Str -> Str -> Str -> Quant = \s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
|
||||||
= \inf,stem,ims,imp,ifs,ifp,pms,pmp,pfs,pfp,ss1,ss2,sp2,sp3,r ->
|
mkDet : Str -> Str -> Str -> Str -> Number -> Det = \s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
||||||
mkVerb inf stem ims imp ifs ifp pms pmp pfs pfp ss1 ss2 sp2 sp3 r **
|
mkIP : (x1,x2,x3:Str) -> Number -> Gender -> IP = \s1,s2,s3,n,g -> let p = mkIntPronForm s1 s2 s3 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
|
||||||
{lock_V = <>} ;
|
|
||||||
} ;
|
-- AdN
|
||||||
|
mkAdN : Str -> AdN = \s -> { s = s ; p = False ; lock_AdN = <> } ;
|
||||||
|
--2 Adjectives
|
||||||
mkV2 = overload {
|
|
||||||
mkV2 : Str -> V2
|
mkA = overload {
|
||||||
= \s -> regVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
mkA : Str-> A
|
||||||
mkV2 : V -> V2
|
= \s -> regAdjective s ** {lock_A = <>} ;
|
||||||
= \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
mkA : Str -> Str -> A2
|
||||||
mkV2 : V -> Str -> V2
|
= \a,c -> let n = regAdjective a in {s = n.s; c2 = c} ** {lock_A2 = <>} ;
|
||||||
= \v,p -> v ** {c2 = {s = p ; c = VTransPost} ; lock_V2 = <>} ;
|
} ;
|
||||||
} ;
|
|
||||||
|
--2 Verbs
|
||||||
|
|
||||||
----3 Compound nouns
|
mkV : Str -> V
|
||||||
----
|
= \s -> mkVerb s ** {lock_V = <>} ;
|
||||||
---- A compound noun is an uninflected string attached to an inflected noun,
|
|
||||||
---- such as "baby boom", "chief executive officer".
|
mkV2 = overload {
|
||||||
--
|
mkV2 : Str -> V2
|
||||||
-- mkN : Str -> N -> N
|
= \s -> mkVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
-- } ;
|
mkV2 : V -> V2
|
||||||
--
|
= \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
--
|
mkV2 : V -> Str -> V2
|
||||||
----3 Relational nouns
|
= \v,p -> v ** {c2 = {s = p ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
----
|
} ;
|
||||||
---- Relational nouns ("daughter of x") need a preposition.
|
|
||||||
--
|
mkV3 : V -> Str -> Str -> V3;
|
||||||
-- mkN2 : N -> Prep -> N2 ;
|
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||||
--
|
mkV2V : V -> Str -> Str -> Bool -> V2V ;
|
||||||
---- The most common preposition is "of", and the following is a
|
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
|
||||||
---- shortcut for regular relational nouns with "of".
|
|
||||||
--
|
-- compund verbs
|
||||||
-- regN2 : Str -> N2 ;
|
compoundV = overload {
|
||||||
--
|
compoundV : Str -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
|
||||||
---- Use the function $mkPrep$ or see the section on prepositions below to
|
compoundV : Str -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
|
||||||
---- form other prepositions.
|
};
|
||||||
----
|
|
||||||
---- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
|
||||||
--
|
----2 Adverbs
|
||||||
-- mkN3 : N -> Prep -> Prep -> N3 ;
|
mkAdv : Str -> Adv = \str -> {s = \\_ => str ; lock_Adv = <>};
|
||||||
--
|
|
||||||
--
|
----2 Prepositions
|
||||||
--
|
|
||||||
----3 Proper names and noun phrases
|
mkPrep : Str -> Str -> Prep ;
|
||||||
----
|
mkPrep s1 s2 = makePrep s1 s2 ** {lock_Prep = <>};
|
||||||
---- Proper names, with a regular genitive, are formed from strings.
|
|
||||||
--
|
--3 Determiners and quantifiers
|
||||||
-- mkPN : overload {
|
|
||||||
--
|
-- mkQuant : overload {
|
||||||
-- mkPN : Str -> PN ;
|
mkQuant : Pron -> Quant ;
|
||||||
--
|
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ;
|
||||||
---- Sometimes a common noun can be reused as a proper name, e.g. "Bank"
|
-- } ;
|
||||||
--
|
|
||||||
-- mkPN : N -> PN
|
-- mkQuant = overload {
|
||||||
-- } ;
|
mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||||
--
|
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = mkQuantifier;
|
||||||
--
|
-- } ;
|
||||||
----2 Adjectives
|
|
||||||
--
|
--2 Conjunctions
|
||||||
-- mkA : overload {
|
mkConj : overload {
|
||||||
--
|
mkConj : Str -> Conj ; -- and (plural agreement)
|
||||||
---- For regular adjectives, the adverbial and comparison forms are derived. This holds
|
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument)
|
||||||
---- even for cases with the variations "happy - happily - happier - happiest",
|
mkConj : Str -> Str -> Conj ; -- both ... and (plural)
|
||||||
---- "free - freely - freer - freest", and "rude - rudest".
|
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument)
|
||||||
--
|
} ;
|
||||||
-- mkA : (happy : Str) -> A ;
|
mkConj = overload {
|
||||||
--
|
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
|
||||||
---- However, the duplication of the final consonant cannot be predicted,
|
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
||||||
---- but a separate case is used to give the comparative
|
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
|
||||||
--
|
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||||
-- mkA : (fat,fatter : Str) -> A ;
|
} ;
|
||||||
--
|
|
||||||
---- As many as four forms may be needed.
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
--
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
-- mkA : (good,better,best,well : Str) -> A
|
|
||||||
-- } ;
|
-- mkV0 : V -> V0 ;
|
||||||
--
|
-- mkVS : V -> VS ;
|
||||||
---- To force comparison to be formed by "more - most",
|
-- mkV2S : V -> Prep -> V2S ;
|
||||||
---- the following function is used:
|
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
||||||
--
|
|
||||||
-- compoundA : A -> A ; -- -/more/most ridiculous
|
|
||||||
--
|
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
--
|
-- mkVA : V -> VA ;
|
||||||
--
|
-- mkV2A : V -> Prep -> V2A ;
|
||||||
----3 Two-place adjectives
|
-- mkVQ : V -> VQ ;
|
||||||
----
|
-- mkV2Q : V -> Prep -> V2Q ;
|
||||||
---- Two-place adjectives need a preposition for their second argument.
|
--
|
||||||
--
|
-- mkAS : A -> AS ;
|
||||||
-- mkA2 : A -> Prep -> A2 ;
|
-- mkA2S : A -> Prep -> A2S ;
|
||||||
--
|
-- mkAV : A -> AV ;
|
||||||
--
|
-- mkA2V : A -> Prep -> A2V ;
|
||||||
--
|
--
|
||||||
----2 Adverbs
|
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
||||||
--
|
---- $V0$ is just $V$; the second argument is treated as adverb.
|
||||||
---- Adverbs are not inflected. Most lexical ones have position
|
--
|
||||||
---- after the verb. Some can be preverbal (e.g. "always").
|
-- V0 : Type ;
|
||||||
--
|
-- AS, A2S, AV, A2V : Type ;
|
||||||
-- mkAdv : Str -> Adv ;
|
--
|
||||||
-- mkAdV : Str -> AdV ;
|
----.
|
||||||
--
|
----2 Definitions of paradigms
|
||||||
---- Adverbs modifying adjectives and sentences can also be formed.
|
----
|
||||||
--
|
---- The definitions should not bother the user of the API. So they are
|
||||||
-- mkAdA : Str -> AdA ;
|
---- hidden from the document.
|
||||||
--
|
--
|
||||||
----2 Prepositions
|
-- Gender = MorphoHin.Gender ;
|
||||||
----
|
-- Number = MorphoHin.Number ;
|
||||||
---- A preposition as used for rection in the lexicon, as well as to
|
-- Case = MorphoHin.Case ;
|
||||||
---- build $PP$s in the resource API, just requires a string.
|
-- human = Masc ;
|
||||||
--
|
-- nonhuman = Neutr ;
|
||||||
-- mkPrep : Str -> Prep ;
|
-- masculine = Masc ;
|
||||||
-- noPrep : Prep ;
|
-- feminine = Fem ;
|
||||||
--
|
-- singular = Sg ;
|
||||||
---- (These two functions are synonyms.)
|
-- plural = Pl ;
|
||||||
--
|
-- nominative = Nom ;
|
||||||
----2 Verbs
|
-- genitive = Gen ;
|
||||||
----
|
|
||||||
--
|
}
|
||||||
---- Verbs are constructed by the function $mkV$, which takes a varying
|
|
||||||
---- number of arguments.
|
|
||||||
--
|
|
||||||
-- mkV : overload {
|
|
||||||
--
|
|
||||||
---- The regular verb function recognizes the special cases where the last
|
|
||||||
---- character is "y" ("cry-cries" but "buy-buys") or a sibilant
|
|
||||||
---- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches",
|
|
||||||
---- "fix - fixes").
|
|
||||||
--
|
|
||||||
-- mkV : (cry : Str) -> V ;
|
|
||||||
--
|
|
||||||
---- Give the present and past forms for regular verbs where
|
|
||||||
---- the last letter is duplicated in some forms,
|
|
||||||
---- e.g. "rip - ripped - ripping".
|
|
||||||
--
|
|
||||||
-- mkV : (stop, stopped : Str) -> V ;
|
|
||||||
--
|
|
||||||
---- There is an extensive list of irregular verbs in the module $IrregularHin$.
|
|
||||||
---- In practice, it is enough to give three forms,
|
|
||||||
---- e.g. "drink - drank - drunk".
|
|
||||||
--
|
|
||||||
-- mkV : (drink, drank, drunk : Str) -> V ;
|
|
||||||
--
|
|
||||||
---- Irregular verbs with duplicated consonant in the present participle.
|
|
||||||
--
|
|
||||||
-- mkV : (run, ran, run, running : Str) -> V ;
|
|
||||||
--
|
|
||||||
---- Except for "be", the worst case needs five forms: the infinitive and
|
|
||||||
---- the third person singular present, the past indicative, and the
|
|
||||||
---- past and present participles.
|
|
||||||
--
|
|
||||||
-- mkV : (go, goes, went, gone, going : Str) -> V
|
|
||||||
-- };
|
|
||||||
--
|
|
||||||
---- Verbs with a particle.
|
|
||||||
---- The particle, such as in "switch on", is given as a string.
|
|
||||||
--
|
|
||||||
-- partV : V -> Str -> V ;
|
|
||||||
--
|
|
||||||
---- Reflexive verbs.
|
|
||||||
---- By default, verbs are not reflexive; this function makes them that.
|
|
||||||
--
|
|
||||||
-- reflV : V -> V ;
|
|
||||||
--
|
|
||||||
----3 Two-place verbs
|
|
||||||
----
|
|
||||||
---- Two-place verbs need a preposition, except the special case with direct object.
|
|
||||||
---- (transitive verbs). Notice that a particle comes from the $V$.
|
|
||||||
--
|
|
||||||
-- mkV2 : overload {
|
|
||||||
-- mkV2 : V -> Prep -> V2 ; -- believe in
|
|
||||||
-- mkV2 : V -> V2 -- kill
|
|
||||||
-- };
|
|
||||||
--
|
|
||||||
----3 Three-place verbs
|
|
||||||
----
|
|
||||||
---- Three-place (ditransitive) verbs need two prepositions, of which
|
|
||||||
---- the first one or both can be absent.
|
|
||||||
--
|
|
||||||
-- mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about
|
|
||||||
-- dirV3 : V -> Prep -> V3 ; -- give,_,to
|
|
||||||
-- dirdirV3 : V -> V3 ; -- give,_,_
|
|
||||||
--
|
|
||||||
----3 Other complement patterns
|
|
||||||
----
|
|
||||||
---- Verbs and adjectives can take complements such as sentences,
|
|
||||||
---- questions, verb phrases, and adjectives.
|
|
||||||
--
|
|
||||||
-- mkV0 : V -> V0 ;
|
|
||||||
-- mkVS : V -> VS ;
|
|
||||||
-- mkV2S : V -> Prep -> V2S ;
|
|
||||||
-- mkVV : V -> VV ;
|
|
||||||
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
|
||||||
-- mkVA : V -> VA ;
|
|
||||||
-- mkV2A : V -> Prep -> V2A ;
|
|
||||||
-- mkVQ : V -> VQ ;
|
|
||||||
-- mkV2Q : V -> Prep -> V2Q ;
|
|
||||||
--
|
|
||||||
-- mkAS : A -> AS ;
|
|
||||||
-- mkA2S : A -> Prep -> A2S ;
|
|
||||||
-- mkAV : A -> AV ;
|
|
||||||
-- mkA2V : A -> Prep -> A2V ;
|
|
||||||
--
|
|
||||||
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
|
||||||
---- $V0$ is just $V$; the second argument is treated as adverb.
|
|
||||||
--
|
|
||||||
-- V0 : Type ;
|
|
||||||
-- AS, A2S, AV, A2V : Type ;
|
|
||||||
--
|
|
||||||
----.
|
|
||||||
----2 Definitions of paradigms
|
|
||||||
----
|
|
||||||
---- The definitions should not bother the user of the API. So they are
|
|
||||||
---- hidden from the document.
|
|
||||||
--
|
|
||||||
-- Gender = MorphoHin.Gender ;
|
|
||||||
-- Number = MorphoHin.Number ;
|
|
||||||
-- Case = MorphoHin.Case ;
|
|
||||||
-- human = Masc ;
|
|
||||||
-- nonhuman = Neutr ;
|
|
||||||
-- masculine = Masc ;
|
|
||||||
-- feminine = Fem ;
|
|
||||||
-- singular = Sg ;
|
|
||||||
-- plural = Pl ;
|
|
||||||
-- nominative = Nom ;
|
|
||||||
-- genitive = Gen ;
|
|
||||||
--
|
|
||||||
-- Preposition : Type = Str ; -- obsolete
|
|
||||||
--
|
|
||||||
-- regN = \ray ->
|
|
||||||
-- let rays = add_s ray
|
|
||||||
-- in
|
|
||||||
-- mk2N ray rays ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- add_s : Str -> Str = \w -> case w of {
|
|
||||||
-- _ + ("io" | "oo") => w + "s" ; -- radio, bamboo
|
|
||||||
-- _ + ("s" | "z" | "x" | "sh" | "ch" | "o") => w + "es" ; -- bus, hero
|
|
||||||
-- _ + ("a" | "o" | "u" | "e") + "y" => w + "s" ; -- boy
|
|
||||||
-- x + "y" => x + "ies" ; -- fly
|
|
||||||
-- _ => w + "s" -- car
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- mk2N = \man,men ->
|
|
||||||
-- let mens = case last men of {
|
|
||||||
-- "s" => men + "'" ;
|
|
||||||
-- _ => men + "'s"
|
|
||||||
-- }
|
|
||||||
-- in
|
|
||||||
-- mk4N man men (man + "'s") mens ;
|
|
||||||
--
|
|
||||||
-- mk4N = \man,men,man's,men's ->
|
|
||||||
-- mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ;
|
|
||||||
--
|
|
||||||
-- genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
|
|
||||||
--
|
|
||||||
-- compoundN s n = {s = \\x,y => s ++ n.s ! x ! y ; g=n.g ; lock_N = <>} ;
|
|
||||||
--
|
|
||||||
-- mkPN = overload {
|
|
||||||
-- mkPN : Str -> PN = regPN ;
|
|
||||||
-- mkPN : N -> PN = nounPN
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ;
|
|
||||||
-- regN2 n = mkN2 (regN n) (mkPrep "of") ;
|
|
||||||
-- mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ;
|
|
||||||
--
|
|
||||||
----3 Relational common noun phrases
|
|
||||||
----
|
|
||||||
---- In some cases, you may want to make a complex $CN$ into a
|
|
||||||
---- relational noun (e.g. "the old town hall of").
|
|
||||||
--
|
|
||||||
-- cnN2 : CN -> Prep -> N2 ;
|
|
||||||
-- cnN3 : CN -> Prep -> Prep -> N3 ;
|
|
||||||
--
|
|
||||||
---- This is obsolete.
|
|
||||||
-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ;
|
|
||||||
-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ;
|
|
||||||
--
|
|
||||||
-- regPN n = regGenPN n human ;
|
|
||||||
-- regGenPN n g = nameReg n g ** {g = g ; lock_PN = <>} ;
|
|
||||||
-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
|
||||||
--
|
|
||||||
-- mk2A a b = mkAdjective a a a b ** {lock_A = <>} ;
|
|
||||||
-- regA a = regADeg a ** {lock_A = <>} ;
|
|
||||||
--
|
|
||||||
-- mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ;
|
|
||||||
--
|
|
||||||
-- ADeg = A ; ----
|
|
||||||
--
|
|
||||||
-- mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ;
|
|
||||||
--
|
|
||||||
-- regADeg happy =
|
|
||||||
-- let
|
|
||||||
-- happ = init happy ;
|
|
||||||
-- y = last happy ;
|
|
||||||
-- happie = case y of {
|
|
||||||
-- "y" => happ + "ie" ;
|
|
||||||
-- "e" => happy ;
|
|
||||||
-- _ => happy + "e"
|
|
||||||
-- } ;
|
|
||||||
-- happily : Str = case happy of {
|
|
||||||
-- _ + "y" => happ + "ily" ;
|
|
||||||
-- _ + "ll" => happy + "y" ;
|
|
||||||
-- _ => happy + "ly"
|
|
||||||
-- } ;
|
|
||||||
-- in mkADeg happy (happie + "r") (happie + "st") happily ;
|
|
||||||
--
|
|
||||||
-- duplADeg fat =
|
|
||||||
-- mkADeg fat
|
|
||||||
-- (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ;
|
|
||||||
--
|
|
||||||
-- compoundADeg a =
|
|
||||||
-- let ad = (a.s ! AAdj Posit)
|
|
||||||
-- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
|
|
||||||
--
|
|
||||||
-- adegA a = a ;
|
|
||||||
--
|
|
||||||
-- mkAdv x = ss x ** {lock_Adv = <>} ;
|
|
||||||
-- mkAdV x = ss x ** {lock_AdV = <>} ;
|
|
||||||
-- mkAdA x = ss x ** {lock_AdA = <>} ;
|
|
||||||
--
|
|
||||||
-- mkPrep p = ss p ** {lock_Prep = <>} ;
|
|
||||||
-- noPrep = mkPrep [] ;
|
|
||||||
--
|
|
||||||
-- mk5V a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ;
|
|
||||||
--
|
|
||||||
-- regV cry =
|
|
||||||
-- let
|
|
||||||
-- cr = init cry ;
|
|
||||||
-- y = last cry ;
|
|
||||||
-- cries = (regN cry).s ! Pl ! Nom ; -- !
|
|
||||||
-- crie = init cries ;
|
|
||||||
-- cried = case last crie of {
|
|
||||||
-- "e" => crie + "d" ;
|
|
||||||
-- _ => crie + "ed"
|
|
||||||
-- } ;
|
|
||||||
-- crying = case y of {
|
|
||||||
-- "e" => case last cr of {
|
|
||||||
-- "e" => cry + "ing" ;
|
|
||||||
-- _ => cr + "ing"
|
|
||||||
-- } ;
|
|
||||||
-- _ => cry + "ing"
|
|
||||||
-- }
|
|
||||||
-- in mk5V cry cries cried cried crying ;
|
|
||||||
--
|
|
||||||
-- reg2V fit fitted =
|
|
||||||
-- let fitt = Predef.tk 2 fitted ;
|
|
||||||
-- in mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ;
|
|
||||||
--
|
|
||||||
-- regDuplV fit =
|
|
||||||
-- case last fit of {
|
|
||||||
-- ("a" | "e" | "i" | "o" | "u" | "y") =>
|
|
||||||
-- Predef.error (["final duplication makes no sense for"] ++ fit) ;
|
|
||||||
-- t =>
|
|
||||||
-- let fitt = fit + t in
|
|
||||||
-- mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing")
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- irregV x y z = let reg = (regV x).s in
|
|
||||||
-- mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ;
|
|
||||||
--
|
|
||||||
-- irreg4V x y z w = let reg = (regV x).s in
|
|
||||||
-- mk5V x (reg ! VPres) y z w ** {s1 = [] ; lock_V = <>} ;
|
|
||||||
--
|
|
||||||
-- irregDuplV fit y z =
|
|
||||||
-- let
|
|
||||||
-- fitting = (regDuplV fit).s ! VPresPart
|
|
||||||
-- in
|
|
||||||
-- mk5V fit (fit + "s") y z fitting ;
|
|
||||||
--
|
|
||||||
-- partV v p = verbPart v p ** {lock_V = <>} ;
|
|
||||||
-- reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ;
|
|
||||||
--
|
|
||||||
-- prepV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; lock_V2 = <>} ;
|
|
||||||
-- dirV2 v = prepV2 v noPrep ;
|
|
||||||
--
|
|
||||||
-- mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p.s ; c3 = q.s ; lock_V3 = <>} ;
|
|
||||||
-- dirV3 v p = mkV3 v noPrep p ;
|
|
||||||
-- dirdirV3 v = dirV3 v noPrep ;
|
|
||||||
--
|
|
||||||
-- mkVS v = v ** {lock_VS = <>} ;
|
|
||||||
-- mkVV v = {
|
|
||||||
-- s = table {VVF vf => v.s ! vf ; _ => variants {}} ;
|
|
||||||
-- isAux = False ; lock_VV = <>
|
|
||||||
-- } ;
|
|
||||||
-- mkVQ v = v ** {lock_VQ = <>} ;
|
|
||||||
--
|
|
||||||
-- V0 : Type = V ;
|
|
||||||
---- V2S, V2V, V2Q : Type = V2 ;
|
|
||||||
-- AS, A2S, AV : Type = A ;
|
|
||||||
-- A2V : Type = A2 ;
|
|
||||||
--
|
|
||||||
-- mkV0 v = v ** {lock_V = <>} ;
|
|
||||||
-- mkV2S v p = prepV2 v p ** {lock_V2S = <>} ;
|
|
||||||
-- mkV2V v p t = prepV2 v p ** {isAux = False ; lock_V2V = <>} ;
|
|
||||||
-- mkVA v = v ** {lock_VA = <>} ;
|
|
||||||
-- mkV2A v p = prepV2 v p ** {lock_V2A = <>} ;
|
|
||||||
-- mkV2Q v p = prepV2 v p ** {lock_V2Q = <>} ;
|
|
||||||
--
|
|
||||||
-- mkAS v = v ** {lock_A = <>} ;
|
|
||||||
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
|
||||||
-- mkAV v = v ** {lock_A = <>} ;
|
|
||||||
-- mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
---- pre-overload API and overload definitions
|
|
||||||
--
|
|
||||||
-- mk4N : (man,men,man's,men's : Str) -> N ;
|
|
||||||
-- regN : Str -> N ;
|
|
||||||
-- mk2N : (man,men : Str) -> N ;
|
|
||||||
-- genderN : Gender -> N -> N ;
|
|
||||||
-- compoundN : Str -> N -> N ;
|
|
||||||
--
|
|
||||||
-- mkN = overload {
|
|
||||||
-- mkN : (man,men,man's,men's : Str) -> N = mk4N ;
|
|
||||||
-- mkN : Str -> N = regN ;
|
|
||||||
-- mkN : (man,men : Str) -> N = mk2N ;
|
|
||||||
-- mkN : Gender -> N -> N = genderN ;
|
|
||||||
-- mkN : Str -> N -> N = compoundN
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- mk2A : (free,freely : Str) -> A ;
|
|
||||||
-- regA : Str -> A ;
|
|
||||||
--
|
|
||||||
-- mkA = overload {
|
|
||||||
-- mkA : Str -> A = regA ;
|
|
||||||
-- mkA : (fat,fatter : Str) -> A = \fat,fatter ->
|
|
||||||
-- mkAdjective fat fatter (init fatter + "st") (fat + "ly") ** {lock_A = <>} ;
|
|
||||||
-- mkA : (good,better,best,well : Str) -> A = \a,b,c,d ->
|
|
||||||
-- mkAdjective a b c d ** {lock_A = <>}
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- compoundA = compoundADeg ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- mk5V : (go, goes, went, gone, going : Str) -> V ;
|
|
||||||
-- regV : (cry : Str) -> V ;
|
|
||||||
-- reg2V : (stop, stopped : Str) -> V;
|
|
||||||
-- irregV : (drink, drank, drunk : Str) -> V ;
|
|
||||||
-- irreg4V : (run, ran, run, running : Str) -> V ;
|
|
||||||
--
|
|
||||||
-- -- Use reg2V instead
|
|
||||||
-- regDuplV : Str -> V ;
|
|
||||||
-- -- Use irreg4V instead
|
|
||||||
-- irregDuplV : (get, got, gotten : Str) -> V ;
|
|
||||||
--
|
|
||||||
-- mkV = overload {
|
|
||||||
-- mkV : (cry : Str) -> V = regV ;
|
|
||||||
-- mkV : (stop, stopped : Str) -> V = reg2V ;
|
|
||||||
-- mkV : (drink, drank, drunk : Str) -> V = irregV ;
|
|
||||||
-- mkV : (run, ran, run, running : Str) -> V = irreg4V ;
|
|
||||||
-- mkV : (go, goes, went, gone, going : Str) -> V = mk5V
|
|
||||||
-- };
|
|
||||||
--
|
|
||||||
-- prepV2 : V -> Prep -> V2 ;
|
|
||||||
-- dirV2 : V -> V2 ;
|
|
||||||
--
|
|
||||||
-- mkV2 = overload {
|
|
||||||
-- mkV2 : V -> Prep -> V2 = prepV2;
|
|
||||||
-- mkV2 : V -> V2 = dirV2
|
|
||||||
-- };
|
|
||||||
--
|
|
||||||
--
|
|
||||||
------ obsolete
|
|
||||||
--
|
|
||||||
---- Comparison adjectives may two more forms.
|
|
||||||
--
|
|
||||||
-- ADeg : Type ;
|
|
||||||
--
|
|
||||||
-- mkADeg : (good,better,best,well : Str) -> ADeg ;
|
|
||||||
--
|
|
||||||
---- The regular pattern recognizes two common variations:
|
|
||||||
---- "-e" ("rude" - "ruder" - "rudest") and
|
|
||||||
---- "-y" ("happy - happier - happiest - happily")
|
|
||||||
--
|
|
||||||
-- regADeg : Str -> ADeg ; -- long, longer, longest
|
|
||||||
--
|
|
||||||
---- However, the duplication of the final consonant is nor predicted,
|
|
||||||
---- but a separate pattern is used:
|
|
||||||
--
|
|
||||||
-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
|
||||||
--
|
|
||||||
---- If comparison is formed by "more", "most", as in general for
|
|
||||||
---- long adjective, the following pattern is used:
|
|
||||||
--
|
|
||||||
-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
|
||||||
--
|
|
||||||
---- From a given $ADeg$, it is possible to get back to $A$.
|
|
||||||
--
|
|
||||||
-- adegA : ADeg -> A ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- regPN : Str -> PN ;
|
|
||||||
-- regGenPN : Str -> Gender -> PN ; -- John, John's
|
|
||||||
--
|
|
||||||
---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
|
||||||
--
|
|
||||||
-- nounPN : N -> PN ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,24 +1,2 @@
|
|||||||
concrete PhraseHin of Phrase = CatHin ** open Prelude, ResHin in {
|
concrete PhraseHin of Phrase = CatHin ** PhraseHindustani with
|
||||||
--
|
(ResHindustani = ResHin) ;
|
||||||
-- lin
|
|
||||||
-- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
|
||||||
--
|
|
||||||
-- UttS s = s ;
|
|
||||||
-- UttQS qs = {s = qs.s ! QDir} ;
|
|
||||||
-- UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
|
||||||
-- UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
|
|
||||||
-- UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
|
||||||
--
|
|
||||||
-- UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
|
||||||
-- UttIAdv iadv = iadv ;
|
|
||||||
-- UttNP np = {s = np.s ! Nom} ;
|
|
||||||
-- UttVP vp = {s = infVP False vp (agrP3 Sg)} ;
|
|
||||||
-- UttAdv adv = adv ;
|
|
||||||
--
|
|
||||||
-- NoPConj = {s = []} ;
|
|
||||||
-- PConjConj conj = {s = conj.s2} ; ---
|
|
||||||
--
|
|
||||||
-- NoVoc = {s = []} ;
|
|
||||||
-- VocNP np = {s = "," ++ np.s ! Nom} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,55 +1,2 @@
|
|||||||
concrete QuestionHin of Question = CatHin ** open ResHin, Prelude in {
|
concrete QuestionHin of Question = CatHin ** QuestionHindustani with
|
||||||
--
|
(ResHindustani = ResHin) ;
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
|
||||||
-- lin
|
|
||||||
--
|
|
||||||
-- QuestCl cl = {
|
|
||||||
-- s = \\t,a,p =>
|
|
||||||
-- let cls = cl.s ! t ! a ! p
|
|
||||||
-- in table {
|
|
||||||
-- QDir => cls ! OQuest ;
|
|
||||||
-- QIndir => "if" ++ cls ! ODir
|
|
||||||
-- } ---- "whether" in ExtHin
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- QuestVP qp vp =
|
|
||||||
-- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
|
|
||||||
-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
|
||||||
--
|
|
||||||
-- QuestSlash ip slash =
|
|
||||||
-- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ;
|
|
||||||
-- --- stranding in ExratHin
|
|
||||||
--
|
|
||||||
-- QuestIAdv iadv cl = mkQuestion iadv cl ;
|
|
||||||
--
|
|
||||||
-- QuestIComp icomp np =
|
|
||||||
-- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ;
|
|
||||||
--
|
|
||||||
-- AdvIP ip adv = {
|
|
||||||
-- s = \\c => ip.s ! c ++ adv.s ;
|
|
||||||
-- n = ip.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- IdetCN idet cn = {
|
|
||||||
-- s = \\c => idet.s ++ cn.s ! idet.n ! c ;
|
|
||||||
-- n = idet.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- IdetIP idet = {
|
|
||||||
-- s = \\c => idet.s ;
|
|
||||||
-- n = idet.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- IdetQuant idet num = {
|
|
||||||
-- s = idet.s ! num.n ++ num.s ;
|
|
||||||
-- n = num.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- CompIAdv a = a ;
|
|
||||||
-- CompIP p = ss (p.s ! Nom) ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
10
lib/src/hindi/README
Normal file
10
lib/src/hindi/README
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Some of the sources are transliterated, in
|
||||||
|
|
||||||
|
./src
|
||||||
|
../hindustani
|
||||||
|
|
||||||
|
Before compilation, do
|
||||||
|
|
||||||
|
gf -s <translit.gfs
|
||||||
|
|
||||||
|
to get unicode.
|
||||||
@@ -1,54 +1,2 @@
|
|||||||
concrete RelativeHin of Relative = CatHin ** open ResHin in {
|
concrete RelativeHin of Relative = CatHin ** RelativeHindustani with
|
||||||
--
|
(ResHindustani = ResHin) ;
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
|
||||||
-- lin
|
|
||||||
--
|
|
||||||
-- RelCl cl = {
|
|
||||||
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
|
||||||
-- c = Nom
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- RelVP rp vp = {
|
|
||||||
-- s = \\t,ant,b,ag =>
|
|
||||||
-- let
|
|
||||||
-- agr = case rp.a of {
|
|
||||||
-- RNoAg => ag ;
|
|
||||||
-- RAg a => a
|
|
||||||
-- } ;
|
|
||||||
-- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp
|
|
||||||
-- in
|
|
||||||
-- cl.s ! t ! ant ! b ! ODir ;
|
|
||||||
-- c = Nom
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
---- Pied piping: "at which we are looking". Stranding and empty
|
|
||||||
---- relative are defined in $ExtraHin.gf$ ("that we are looking at",
|
|
||||||
---- "we are looking at").
|
|
||||||
--
|
|
||||||
-- RelSlash rp slash = {
|
|
||||||
-- s = \\t,a,p,agr =>
|
|
||||||
-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
|
||||||
-- c = Acc
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- FunRP p np rp = {
|
|
||||||
-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
|
||||||
-- a = RAg np.a
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- IdRP =
|
|
||||||
-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
|
||||||
-- in {
|
|
||||||
-- s = table {
|
|
||||||
-- RC _ Gen => "whose" ;
|
|
||||||
-- RC Neutr _ => varr "which" ;
|
|
||||||
-- RC _ Acc => varr "whom" ;
|
|
||||||
-- RC _ Nom => varr "who" ;
|
|
||||||
-- RPrep Neutr => "which" ;
|
|
||||||
-- RPrep _ => "whom"
|
|
||||||
-- } ;
|
|
||||||
-- a = RNoAg
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,300 +1,2 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
instance ResHin of ResHindustani = DiffHin ** open CommonHindustani, Prelude, Predef in {
|
||||||
--
|
} ;
|
||||||
--1 Hindi auxiliary operations.
|
|
||||||
--
|
|
||||||
-- This module contains operations that are needed to make the
|
|
||||||
-- resource syntax work.
|
|
||||||
|
|
||||||
resource ResHin = ParamX ** open Prelude in {
|
|
||||||
|
|
||||||
flags optimize=all ;
|
|
||||||
|
|
||||||
param
|
|
||||||
Case = Dir | Obl | Voc ;
|
|
||||||
Gender = Masc | Fem ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
|
||||||
|
|
||||||
mkNoun : (x1,_,_,_,_,x6 : Str) -> Gender -> Noun =
|
|
||||||
\sd,so,sv,pd,po,pv,g -> {
|
|
||||||
s = table Number [table Case [sd;so;sv] ; table Case [pd;po;pv]] ;
|
|
||||||
g = g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
reggNoun : Str -> Gender -> Noun = \s,g -> case <s,g> of {
|
|
||||||
<-(_ + ("A" | "I")), Fem> =>
|
|
||||||
mkNoun s s s (s + "eM") (s + "oM") (s + "o") Fem ;
|
|
||||||
_ => regNoun s ** {g = g}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
regNoun : Str -> Noun = \s -> case s of {
|
|
||||||
x + "iyA" =>
|
|
||||||
mkNoun s s s (x + "iyAM") (x + "iyoN") (x + "iyo") Fem ;
|
|
||||||
x + "A" =>
|
|
||||||
mkNoun s (x + "e") (x + "e") (x + "e") (x + "oN") (x + "o") Masc ;
|
|
||||||
x + "I" =>
|
|
||||||
mkNoun s s s (x + "iyAM") (x + "iyoN") (x + "iyo") Fem ;
|
|
||||||
_ =>
|
|
||||||
mkNoun s s s s (s + "oN") (s + "o") Masc
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
Adjective = {s : Gender => Number => Case => Str} ;
|
|
||||||
|
|
||||||
mkAdjective : (x1,x2,x3 : Str) -> Adjective = \smd,sm,f -> {
|
|
||||||
s = \\g,n,c => case <g,n,c> of {
|
|
||||||
<Masc,Sg,Dir> => smd ;
|
|
||||||
<Masc> => sm ;
|
|
||||||
_ => f
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
regAdjective : Str -> Adjective = \s -> case s of {
|
|
||||||
acch + "A" => mkAdjective s (acch + "e") (acch + "I") ;
|
|
||||||
_ => mkAdjective s s s
|
|
||||||
} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
VForm =
|
|
||||||
VInf
|
|
||||||
| VStem
|
|
||||||
| VImpf Gender Number
|
|
||||||
| VPerf Gender Number
|
|
||||||
| VSubj Number Person
|
|
||||||
| VFut Number Person Gender
|
|
||||||
| VAbs
|
|
||||||
| VReq
|
|
||||||
| VImp
|
|
||||||
| VReqFut
|
|
||||||
;
|
|
||||||
|
|
||||||
oper
|
|
||||||
Verb = {s : VForm => Str} ;
|
|
||||||
|
|
||||||
mkVerb : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> Verb =
|
|
||||||
\inf,stem,ims,imp,ifs,ifp,pms,pmp,pfs,pfp,ss1,ss2,sp2,sp3,r -> {
|
|
||||||
s =
|
|
||||||
let ga : Number -> Gender -> Str = \n,g ->
|
|
||||||
(regAdjective "gA").s ! g ! n ! Dir
|
|
||||||
in table {
|
|
||||||
VInf => inf ;
|
|
||||||
VStem => stem ;
|
|
||||||
VImpf Masc Sg => ims ;
|
|
||||||
VImpf Masc Pl => imp ;
|
|
||||||
VImpf Fem Sg => ifs ;
|
|
||||||
VImpf Fem Pl => ifp ;
|
|
||||||
VPerf Masc Sg => pms ;
|
|
||||||
VPerf Masc Pl => pmp ;
|
|
||||||
VPerf Fem Sg => pfs ;
|
|
||||||
VPerf Fem Pl => pfp ;
|
|
||||||
VSubj Sg P1 => ss1 ;
|
|
||||||
VSubj Sg _ => ss2 ;
|
|
||||||
VSubj Pl P2 => sp2 ;
|
|
||||||
VSubj Pl _ => sp3 ;
|
|
||||||
VFut Sg P1 g => ss1 + ga Sg g ;
|
|
||||||
VFut Sg _ g => ss2 + ga Sg g ;
|
|
||||||
VFut Pl P2 g => sp2 + ga Pl g ;
|
|
||||||
VFut Pl _ g => sp3 + ga Pl g ;
|
|
||||||
VAbs => stem + "kar" ; --- ke
|
|
||||||
VReq => r ;
|
|
||||||
VImp => sp2 ;
|
|
||||||
VReqFut => stem + "ie-gA"
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
regVerb : Str -> Verb = \cal ->
|
|
||||||
let caly : Str = case cal of {
|
|
||||||
_ + ("A" | "e") => cal + "y" ;
|
|
||||||
c + "U" => c + "uy" ;
|
|
||||||
c + "I" => c + "iy" ;
|
|
||||||
_ => cal
|
|
||||||
}
|
|
||||||
in
|
|
||||||
mkVerb
|
|
||||||
(cal + "nA") cal
|
|
||||||
(cal + "tA") (cal + "te") (cal + "tI") (cal + "tI")
|
|
||||||
(caly + "A") (caly + "e") (caly + "I") (caly + "IN")
|
|
||||||
(caly + "UM") (caly + "e") (caly + "o") (caly + "eN")
|
|
||||||
(caly + "ie-") ;
|
|
||||||
|
|
||||||
param
|
|
||||||
CTense = CPresent | CPast | CFuture ;
|
|
||||||
oper
|
|
||||||
copula : CTense -> Number -> Person -> Gender -> Str = \t,n,p,g ->
|
|
||||||
case <t,n,p,g> of {
|
|
||||||
<CPresent,Sg,P1,_ > => "hUM" ;
|
|
||||||
<CPresent,Sg,P2,_ > => "hE" ;
|
|
||||||
<CPresent,Sg,P3,_ > => "hE" ;
|
|
||||||
<CPresent,Pl,P1,_ > => "hEN" ;
|
|
||||||
<CPresent,Pl,P2,_ > => "ho" ;
|
|
||||||
<CPresent,Pl,P3,_ > => "hEN" ;
|
|
||||||
<CPast, Sg,_ ,Masc> => "TA" ;
|
|
||||||
<CPast, Sg,_ ,Fem > => "TI" ;
|
|
||||||
<CPast, Pl,_ ,Masc> => "Te" ;
|
|
||||||
<CPast, Pl,_ ,Fem > => "TIN" ;
|
|
||||||
<CFuture, Sg,P1,Masc> => "hUNgA" ;
|
|
||||||
<CFuture, Sg,P1,Fem > => "hUNgI" ;
|
|
||||||
<CFuture, Sg,_ ,Masc> => "hogA" ;
|
|
||||||
<CFuture, Sg,_ ,Fem > => "hogI" ;
|
|
||||||
<CFuture, Pl,P2,Masc> => "hoge" ;
|
|
||||||
<CFuture, Pl,_ ,Masc> => "hoNge" ;
|
|
||||||
<CFuture, Pl,P2,Fem > => "hogi:" ;
|
|
||||||
<CFuture, Pl,_ ,Fem > => "hoNgi:"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
PronCase = PC Case | PObj | PPoss ;
|
|
||||||
oper
|
|
||||||
personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n ->
|
|
||||||
case <p,n> of {
|
|
||||||
<P1,Sg> => {s = table PronCase ["mEN" ; "muJ" ; "muJ" ; "muJe" ; "merA"]} ;
|
|
||||||
<P1,Pl> => {s = table PronCase ["ham" ; "ham" ; "ham" ; "hameN" ; "hamArA"]} ;
|
|
||||||
<P2,Sg> => {s = table PronCase ["tU" ; "tuJ" ; "tuJ" ; "tuJe" ; "terA"]} ;
|
|
||||||
<P2,Pl> => {s = table PronCase ["tum" ; "tum" ; "tum" ; "tum" ; "tumhArA"]} ;
|
|
||||||
<P3,Sg> => {s = table PronCase ["vah" ; "u-s" ; "u-s" ; "u-se" ; "u-skA"]} ;
|
|
||||||
<P3,Pl> => {s = table PronCase ["ve" ; "u-n" ; "u-n" ; "u-nheN" ; "u-nkA"]}
|
|
||||||
} ;
|
|
||||||
---- the third is the vocative - is it really this way?
|
|
||||||
|
|
||||||
-- the Hindi verb phrase
|
|
||||||
|
|
||||||
--- CTense = CPresent | CPast | CFuture ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
param
|
|
||||||
VPHTense =
|
|
||||||
VPGenPres -- impf hum nahim "I go"
|
|
||||||
| VPImpPast -- impf Ta nahim "I went"
|
|
||||||
| VPContPres -- stem raha hum nahim "I am going"
|
|
||||||
| VPContPast -- stem raha Ta nahim "I was going"
|
|
||||||
| VPPerf -- perf na/nahim "I went"
|
|
||||||
| VPPerfPres -- perf hum na/nahim "I have gone"
|
|
||||||
| VPPerfPast -- perf Ta na/nahim "I had gone"
|
|
||||||
| VPSubj -- subj na "I may go"
|
|
||||||
| VPFut -- fut na/nahim "I shall go"
|
|
||||||
;
|
|
||||||
|
|
||||||
VPHForm =
|
|
||||||
VPTense VPHTense Agr -- 9 * 12
|
|
||||||
| VPReq
|
|
||||||
| VPImp
|
|
||||||
| VPReqFut
|
|
||||||
| VPInf
|
|
||||||
| VPStem
|
|
||||||
;
|
|
||||||
|
|
||||||
VType = VIntrans | VTrans | VTransPost ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
objVType : VType -> NPCase = \vt -> case vt of {
|
|
||||||
VTrans => NPObj ;
|
|
||||||
_ => NPC Obl
|
|
||||||
} ;
|
|
||||||
|
|
||||||
VPH : Type = {
|
|
||||||
s : Bool => VPHForm => {fin, inf, neg : Str} ;
|
|
||||||
obj : {s : Str ; a : Agr} ;
|
|
||||||
subj : VType ;
|
|
||||||
comp : Agr => Str
|
|
||||||
} ;
|
|
||||||
|
|
||||||
predV : Verb -> VPH = \verb -> {
|
|
||||||
s = \\b,vh =>
|
|
||||||
let
|
|
||||||
na = if_then_Str b [] "na" ;
|
|
||||||
nahim = if_then_Str b [] "nahIN" ;
|
|
||||||
in
|
|
||||||
case vh of {
|
|
||||||
VPTense VPGenPres (Ag g n p) =>
|
|
||||||
{fin = copula CPresent n p g ; inf = verb.s ! VImpf g n ; neg = nahim} ;
|
|
||||||
VPTense VPImpPast (Ag g n p) =>
|
|
||||||
{fin = copula CPast n p g ; inf = verb.s ! VImpf g n ; neg = nahim} ;
|
|
||||||
VPTense VPContPres (Ag g n p) =>
|
|
||||||
{fin = copula CPresent n p g ;
|
|
||||||
inf = verb.s ! VStem ++ raha g n ; neg = nahim} ;
|
|
||||||
VPTense VPContPast (Ag g n p) =>
|
|
||||||
{fin = copula CPast n p g ;
|
|
||||||
inf = verb.s ! VStem ++ raha g n ; neg = nahim} ;
|
|
||||||
VPTense VPPerf (Ag g n _) =>
|
|
||||||
{fin = verb.s ! VPerf g n ; inf = [] ; neg = nahim} ;
|
|
||||||
VPTense VPPerfPres (Ag g n p) =>
|
|
||||||
{fin = copula CPresent n p g ; inf = verb.s ! VPerf g n ; neg = nahim} ;
|
|
||||||
VPTense VPPerfPast (Ag g n p) =>
|
|
||||||
{fin = copula CPast n p g ; inf = verb.s ! VPerf g n ; neg = nahim} ;
|
|
||||||
VPTense VPSubj (Ag _ n p) => {fin = verb.s ! VSubj n p ; inf = [] ; neg = na} ;
|
|
||||||
VPTense VPFut (Ag g n p) => {fin = verb.s ! VFut n p g ; inf = [] ; neg = na} ;
|
|
||||||
VPInf => {fin = verb.s ! VStem ; inf = [] ; neg = na} ;
|
|
||||||
_ => {fin = verb.s ! VStem ; inf = [] ; neg = na} ----
|
|
||||||
} ;
|
|
||||||
obj = {s = [] ; a = defaultAgr} ;
|
|
||||||
subj = VIntrans ;
|
|
||||||
comp = \\_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
raha : Gender -> Number -> Str = \g,n ->
|
|
||||||
(regAdjective "rahA").s ! g ! n ! Dir ;
|
|
||||||
|
|
||||||
VPHSlash = VPH ** {c2 : Compl} ;
|
|
||||||
|
|
||||||
Clause : Type = {s : VPHTense => Bool => Str} ;
|
|
||||||
|
|
||||||
Compl : Type = {s : Str ; c : VType} ;
|
|
||||||
|
|
||||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
|
||||||
s = vps.s ;
|
|
||||||
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
|
||||||
subj = vps.c2.c ;
|
|
||||||
comp = vps.comp
|
|
||||||
} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
Agr = Ag Gender Number Person ;
|
|
||||||
NPCase = NPC Case | NPObj | NPErg ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n P3 ;
|
|
||||||
|
|
||||||
defaultAgr : Agr = agrP3 Masc Sg ;
|
|
||||||
|
|
||||||
npcase2case : NPCase -> Case = \npc -> case npc of {
|
|
||||||
NPC c => c ;
|
|
||||||
NPObj => Obl ;
|
|
||||||
NPErg => Obl
|
|
||||||
} ;
|
|
||||||
|
|
||||||
np2pronCase : NPCase -> PronCase = \np -> case np of {
|
|
||||||
NPC c => PC c ;
|
|
||||||
NPObj => PObj ;
|
|
||||||
NPErg => PC Obl
|
|
||||||
} ;
|
|
||||||
|
|
||||||
toNP : (Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
|
||||||
NPC c => pn ! c ;
|
|
||||||
NPObj => pn ! Obl ;
|
|
||||||
NPErg => pn ! Obl ++ "ne"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
|
||||||
|
|
||||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
|
||||||
s = \\vt,b =>
|
|
||||||
let
|
|
||||||
subjagr : NPCase * Agr = case vt of {
|
|
||||||
VPPerf => case vp.subj of {
|
|
||||||
VTrans => <NPErg, vp.obj.a> ;
|
|
||||||
VTransPost => <NPErg, defaultAgr> ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
subj = subjagr.p1 ;
|
|
||||||
agr = subjagr.p2 ;
|
|
||||||
vps = vp.s ! b ! VPTense vt agr ;
|
|
||||||
in
|
|
||||||
np.s ! subj ++ vp.obj.s ++ vp.comp ! np.a ++ vps.neg ++ vps.inf ++ vps.fin
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,66 +1,2 @@
|
|||||||
concrete SentenceHin of Sentence = CatHin ** open Prelude, ResHin in {
|
concrete SentenceHin of Sentence = CatHin ** SentenceHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
PredVP np vp = mkClause np vp ;
|
|
||||||
|
|
||||||
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
|
||||||
--
|
|
||||||
-- ImpVP vp = {
|
|
||||||
-- s = \\pol,n =>
|
|
||||||
-- let
|
|
||||||
-- agr = AgP2 (numImp n) ;
|
|
||||||
-- verb = infVP True vp agr ;
|
|
||||||
-- dont = case pol of {
|
|
||||||
-- CNeg True => "don't" ;
|
|
||||||
-- CNeg False => "do" ++ "not" ;
|
|
||||||
-- _ => []
|
|
||||||
-- }
|
|
||||||
-- in
|
|
||||||
-- dont ++ verb
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- SlashVP np vp =
|
|
||||||
-- mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ;
|
|
||||||
--
|
|
||||||
-- AdvSlash slash adv = {
|
|
||||||
-- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
|
||||||
-- c2 = slash.c2
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
|
||||||
--
|
|
||||||
-- SlashVS np vs slash =
|
|
||||||
-- mkClause (np.s ! Nom) np.a
|
|
||||||
-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
|
||||||
-- {c2 = slash.c2} ;
|
|
||||||
--
|
|
||||||
-- EmbedS s = {s = conjThat ++ s.s} ;
|
|
||||||
-- EmbedQS qs = {s = qs.s ! QIndir} ;
|
|
||||||
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
|
||||||
--
|
|
||||||
-- UseCl t a p cl = {
|
|
||||||
-- s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir
|
|
||||||
-- } ;
|
|
||||||
-- UseQCl t a p cl = {
|
|
||||||
-- s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! q
|
|
||||||
-- } ;
|
|
||||||
-- UseRCl t a p cl = {
|
|
||||||
-- s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! r ;
|
|
||||||
-- c = cl.c
|
|
||||||
-- } ;
|
|
||||||
-- UseSlash t a p cl = {
|
|
||||||
-- s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir ;
|
|
||||||
-- c2 = cl.c2
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- AdvS a s = {s = a.s ++ "," ++ s.s} ;
|
|
||||||
--
|
|
||||||
-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ;
|
|
||||||
--
|
|
||||||
-- oper
|
|
||||||
-- ctr = contrNeg True ; -- contracted negations
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,134 +1,129 @@
|
|||||||
concrete StructuralHin of Structural = CatHin **
|
concrete StructuralHin of Structural = CatHin **
|
||||||
open MorphoHin, (P = ParadigmsHin), Prelude in {
|
open MorphoHin, ParadigmsHin, Prelude, NounHin,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
coding = utf8;
|
||||||
lin
|
|
||||||
-- above_Prep = ss "above" ;
|
lin
|
||||||
-- after_Prep = ss "after" ;
|
above_Prep = mkPrep "wपर" "wपर" ;
|
||||||
-- all_Predet = ss "all" ;
|
after_Prep = mkPrep ["कै बेद"] ["कै बेद"] ;
|
||||||
-- almost_AdA, almost_AdN = ss "almost" ;
|
all_Predet = ss "तमम" ;
|
||||||
-- although_Subj = ss "although" ;
|
almost_AdA, almost_AdN = mkAdN "तqरयब" ;
|
||||||
-- always_AdV = ss "always" ;
|
although_Subj = ss "गरचh-" ;
|
||||||
-- and_Conj = sd2 [] "and" ** {n = Pl} ;
|
always_AdV = ss "हमयXह" ;
|
||||||
-----b and_Conj = ss "and" ** {n = Pl} ;
|
and_Conj = sd2 [] "wर" ** {n = Pl} ;
|
||||||
-- because_Subj = ss "because" ;
|
because_Subj = ss "कयwनकh-" ;
|
||||||
-- before_Prep = ss "before" ;
|
before_Prep = mkPrep "पहलै" "पहलै" ;
|
||||||
-- behind_Prep = ss "behind" ;
|
behind_Prep = mkPrep "पयचh-ै" "पयचh-ै" ;
|
||||||
-- between_Prep = ss "between" ;
|
between_Prep = mkPrep "दरमयं" "दरमयं" ;
|
||||||
-- both7and_DConj = sd2 "both" "and" ** {n = Pl} ;
|
both7and_DConj = sd2 "दwनwं" "wर" ** {n = Pl} ;
|
||||||
-- but_PConj = ss "but" ;
|
but_PConj = ss "लयकन" ;
|
||||||
-- by8agent_Prep = ss "by" ;
|
by8agent_Prep = mkPrep "" "" ;
|
||||||
-- by8means_Prep = ss "by" ;
|
by8means_Prep = mkPrep "" "" ;
|
||||||
-- can8know_VV, can_VV = {
|
-- can8know_VV,can_VV = mkV "सकन" ** { isAux = True} ;
|
||||||
-- s = table {
|
during_Prep = mkPrep ["कै दरमयं"] ["कै दरमयं"] ;
|
||||||
-- VVF VInf => ["be able to"] ;
|
either7or_DConj = sd2 "कwय यक" "य" ** {n = Sg} ;
|
||||||
-- VVF VPres => "can" ;
|
everybody_NP = MassNP (UseN (ParadigmsHin.mkN "हर कwय" "हर कwय" "हर कwय" "हर कwय" "हर कwय" "हर कwय" Masc )); -- not a good way coz need to include NounHin
|
||||||
-- VVF VPPart => ["been able to"] ;
|
-- every_Det = mkDet "हर" Sg;
|
||||||
-- VVF VPresPart => ["being able to"] ;
|
everything_NP = MassNP (UseN (ParadigmsHin.mkN "हर चयज़" "हर चयज़" "हर चयज़w" "सब चयज़यं" "सब चयज़wं" "सब चयज़w" Masc ));
|
||||||
-- VVF VPast => "could" ; --# notpresent
|
everywhere_Adv = mkAdv "हर जगह" ;
|
||||||
-- VVPastNeg => "couldn't" ; --# notpresent
|
-- few_Det = mkDet "चनद" Pl ;
|
||||||
-- VVPresNeg => "can't"
|
first_Ord = {s = "पेहल" ; n = Sg} ; --DEPRECATED
|
||||||
-- } ;
|
for_Prep = mkPrep "कयलयै" "कयलयै" ;
|
||||||
-- isAux = True
|
from_Prep = mkPrep "सै" "सै" ;
|
||||||
-- } ;
|
he_Pron = personalPN "wह" "स" "" "स क" Sg Masc Pers3_Distant ;
|
||||||
-- during_Prep = ss "during" ;
|
here_Adv = mkAdv "यहं" ;
|
||||||
-- either7or_DConj = sd2 "either" "or" ** {n = Sg} ;
|
here7to_Adv = mkAdv "यहं पर" ;
|
||||||
-- everybody_NP = regNP "everybody" Sg ;
|
here7from_Adv = mkAdv "यहं सै" ;
|
||||||
-- every_Det = mkDeterminer Sg "every" ;
|
how_IAdv = ss "कयसै" ;
|
||||||
-- everything_NP = regNP "everything" Sg ;
|
how8many_IDet = makeIDet "कतनै" "कतनय" Pl ;
|
||||||
-- everywhere_Adv = ss "everywhere" ;
|
if_Subj = ss "गर" ;
|
||||||
-- few_Det = mkDeterminer Pl "few" ;
|
in8front_Prep = mkPrep ["कै समनै"] ["कै समनै"] ;
|
||||||
----- first_Ord = ss "first" ; DEPRECATED
|
i_Pron = personalPN "मयं" "मजh-" "" "मयर" Sg Masc Pers1;
|
||||||
-- for_Prep = ss "for" ;
|
in_Prep = mkPrep "में" "में" ;
|
||||||
-- from_Prep = ss "from" ;
|
it_Pron = personalPN "यह" "यह" "यह" "स क" Sg Masc Pers3_Near;
|
||||||
he_Pron = personalPronoun P3 Sg ** {a = Ag Masc Sg P3} ;
|
less_CAdv = {s = "कम" ; p = ""} ;
|
||||||
-- here_Adv = ss "here" ;
|
-- many_Det = mkDet "बहत ज़यदह" Pl ;
|
||||||
-- here7to_Adv = ss ["to here"] ;
|
more_CAdv = {s = "ज़यदh-" ; p = "" } ;
|
||||||
-- here7from_Adv = ss ["from here"] ;
|
most_Predet = ss "ज़यदह तर" ;
|
||||||
-- how_IAdv = ss "how" ;
|
--much_Det = mkDet "बहत" Pl ;
|
||||||
-- how8many_IDet = mkDeterminer Pl ["how many"] ;
|
-- must_VV = {
|
||||||
-- if_Subj = ss "if" ;
|
-- s = table {
|
||||||
-- in8front_Prep = ss ["in front of"] ;
|
-- VVF VInf => ["हवे तॉ"] ;
|
||||||
i_Pron = personalPronoun P1 Sg ** {a = Ag Masc Sg P1} ;
|
-- VVF VPres => "मुसत" ;
|
||||||
in_Prep = ss "meN" ;
|
-- VVF VPPart => ["हद तॉ"] ;
|
||||||
-- it_Pron = mkNP "it" "it" "its" Sg P3 Neutr ;
|
-- VVF VPresPart => ["हविनग तॉ"] ;
|
||||||
-- less_CAdv = ss "less" ;
|
-- VVF VPast => ["हद तॉ"] ; --# notpresent
|
||||||
-- many_Det = mkDeterminer Pl "many" ;
|
-- VVPastNeg => ["हदn'त तॉ"] ; --# notpresent
|
||||||
-- more_CAdv = ss "more" ;
|
-- VVPresNeg => "मुसतn'त"
|
||||||
-- most_Predet = ss "most" ;
|
-- } ;
|
||||||
-- much_Det = mkDeterminer Sg "much" ;
|
-- isAux = True
|
||||||
-- must_VV = {
|
-- } ;
|
||||||
-- s = table {
|
-----b no_Phr = ss "नॉ" ;
|
||||||
-- VVF VInf => ["have to"] ;
|
no_Utt = ss "नहयं" ;
|
||||||
-- VVF VPres => "must" ;
|
on_Prep = mkPrep "पर" "पर" ;
|
||||||
-- VVF VPPart => ["had to"] ;
|
-- one_Quant = demoPN "यक" "यक" "यक" ; -- DEPRECATED
|
||||||
-- VVF VPresPart => ["having to"] ;
|
only_Predet = ss "सरf" ;
|
||||||
-- VVF VPast => ["had to"] ; --# notpresent
|
or_Conj = sd2 [] "य" ** {n = Sg} ;
|
||||||
-- VVPastNeg => ["hadn't to"] ; --# notpresent
|
otherwise_PConj = ss "य पh-र" ;
|
||||||
-- VVPresNeg => "mustn't"
|
part_Prep = mkPrep "" "" ;
|
||||||
-- } ;
|
please_Voc = ss "महरबनि" ;
|
||||||
-- isAux = True
|
possess_Prep = mkPrep "क" "कय" ;
|
||||||
-- } ;
|
quite_Adv = ss "कहमॉसह" ;
|
||||||
-----b no_Phr = ss "no" ;
|
she_Pron = personalPN "wह" "स" "wह" "स कय" Sg Fem Pers3_Distant ;
|
||||||
-- no_Utt = ss "no" ;
|
so_AdA = ss "सॉ" ;
|
||||||
-- on_Prep = ss "on" ;
|
somebody_NP = MassNP (UseN (ParadigmsHin.mkN "कwय" "कwय" "कwय" "कwय" "कwय" "कwय" Masc ));
|
||||||
------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
--someSg_Det = mkDet "कचh-" Sg ;
|
||||||
-- only_Predet = ss "only" ;
|
--somePl_Det = mkDet "कचh-" Pl ;
|
||||||
-- or_Conj = sd2 [] "or" ** {n = Sg} ;
|
something_NP = MassNP (UseN (ParadigmsHin.mkN "कwय चयज़" "कwय चयज़" "कwय चयज़" "कh- चयज़यं" "कh- चयज़wं" "कh- चयज़w" Masc ));
|
||||||
-- otherwise_PConj = ss "otherwise" ;
|
somewhere_Adv = mkAdv "कहिन पर" ;
|
||||||
-- part_Prep = ss "of" ;
|
that_Quant = demoPN "wह" "स" "न" ;
|
||||||
-- please_Voc = ss "please" ;
|
that_Subj = ss "कह";
|
||||||
-- possess_Prep = ss "of" ;
|
there_Adv = mkAdv "wहं" ;
|
||||||
-- quite_Adv = ss "quite" ;
|
there7to_Adv = mkAdv "wहं पर" ;
|
||||||
-- she_Pron = mkNP "she" "her" "her" Sg P3 Fem ;
|
there7from_Adv = mkAdv ["wहं सै"] ;
|
||||||
-- so_AdA = ss "so" ;
|
therefore_PConj = ss "स लयै" ;
|
||||||
-- somebody_NP = regNP "somebody" Sg ;
|
they_Pron = personalPN "wह" "wह" "wह" "न क" Pl Masc Pers3_Distant ; ----
|
||||||
-- someSg_Det = mkDeterminer Sg "some" ;
|
this_Quant = demoPN "यह" "स" "न";
|
||||||
-- somePl_Det = mkDeterminer Pl "some" ;
|
through_Prep = mkPrep ["मयं सै"] ["मयं सै"] ;
|
||||||
-- something_NP = regNP "something" Sg ;
|
too_AdA = ss "बहत" ;
|
||||||
-- somewhere_Adv = ss "somewhere" ;
|
to_Prep = mkPrep "कw" "कw" ;
|
||||||
-- that_Quant = mkQuant "that" "those" ;
|
under_Prep = mkPrep "नयचै" "नयचै" ;
|
||||||
-- there_Adv = ss "there" ;
|
very_AdA = ss "बहत" ;
|
||||||
-- there7to_Adv = ss "there" ;
|
-- want_VV = mkV "चहन" ** { isAux = False} ;
|
||||||
-- there7from_Adv = ss ["from there"] ;
|
we_Pron = personalPN "हम" "हम" "हम" "हमर" Pl Masc Pers1 ;
|
||||||
-- therefore_PConj = ss "therefore" ;
|
whatSg_IP = mkIP "कय" "किस" "किस" Sg Masc ;
|
||||||
-- they_Pron = mkNP "they" "them" "their" Pl P3 Masc ; ----
|
whatPl_IP = mkIP "कय" "किन" "किन" Pl Masc ;
|
||||||
-- this_Quant = mkQuant "this" "these" ;
|
when_IAdv = ss "कब" ;
|
||||||
-- through_Prep = ss "through" ;
|
when_Subj = ss "कब" ;
|
||||||
-- too_AdA = ss "too" ;
|
where_IAdv = ss "कहं" ;
|
||||||
-- to_Prep = ss "to" ;
|
which_IQuant = {s = \\_ => "कwन सय"} ;
|
||||||
-- under_Prep = ss "under" ;
|
-- whichPl_IDet = makeDet "कwन स" "कwन सय" "कwन सै" "कwन सय" ;
|
||||||
-- very_AdA = ss "very" ;
|
-- whichSg_IDet = makeDet "कwन स" "कwन सय" "कwन सै" "कwन सय" ;
|
||||||
-- want_VV = P.mkVV (P.regV "want") ;
|
whoSg_IP = mkIP "कwन" "किस" "किस" Sg Masc ;
|
||||||
we_Pron = personalPronoun P1 Pl ** {a = Ag Masc Pl P1} ;
|
whoPl_IP = mkIP "कwन" "कन" "कनहwं" Pl Masc ;
|
||||||
|
why_IAdv = ss "कयwं" ;
|
||||||
-- whatPl_IP = mkIP "what" "what" "what's" Sg ;
|
without_Prep = mkPrep ["कै बघयर"] ["कै बघयर"] ;
|
||||||
-- whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
with_Prep = mkPrep ["कै सतh-"] ["कै सतh-"] ;
|
||||||
-- when_IAdv = ss "when" ;
|
-- yes_Phr = ss "हं" ;
|
||||||
-- when_Subj = ss "when" ;
|
yes_Utt = ss "हं" ;
|
||||||
-- where_IAdv = ss "where" ;
|
youSg_Pron = personalPN "तम" "तम" "तम" "तमh-र" Sg Masc Pers2_Casual ;
|
||||||
-- which_IQuant = {s = \\_ => "which"} ;
|
youPl_Pron = personalPN "तम" "तम" "तम" "तमh-र" Pl Masc Pers2_Casual ;
|
||||||
-----b whichPl_IDet = mkDeterminer Pl ["which"] ;
|
youPol_Pron = personalPN "ाप" "ाफ" "ाफ" "ाप क" Sg Masc Pers2_Respect ;
|
||||||
-----b whichSg_IDet = mkDeterminer Sg ["which"] ;
|
no_Quant = demoPN " कwय नहयं" "कwय नहयं" "कwय नहयं" ;
|
||||||
-- whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
not_Predet = {s="नहयं"} ;
|
||||||
-- whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
if_then_Conj = sd2 "गर" "तw" ** {n = Sg} ;
|
||||||
-- why_IAdv = ss "why" ;
|
at_least_AdN = mkAdN ["कम ज़ कम"] ;
|
||||||
-- without_Prep = ss "without" ;
|
at_most_AdN = mkAdN ["ज़यदह सै ज़यदह"];
|
||||||
-- with_Prep = ss "with" ;
|
nothing_NP = MassNP (UseN (ParadigmsHin.mkN "कwय चयज़ नहयं" "कwय चयज़ नहयं" "कwय चयज़ नहयं" "कwय चयज़ नहयं" "कwय चयज़ नहयं" "कwय चयज़ नहयं" Masc ));
|
||||||
-----b yes_Phr = ss "yes" ;
|
except_Prep = mkPrep "सwै" "सwै" ;
|
||||||
-- yes_Utt = ss "yes" ;
|
nobody_NP = MassNP (UseN (ParadigmsHin.mkN "कwय नहयं" "कwय नहयं" "कwय नहयं" "कwय नहयं" "कwय नहयं" "कwय नहयं" Masc ));
|
||||||
-- youSg_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
|
||||||
-- youPl_Pron = mkNP "you" "you" "your" Pl P2 Masc ;
|
as_CAdv = {s = "ेतन" ; p = "जतन"} ;
|
||||||
-- youPol_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
|
||||||
--
|
have_V2 = mkV2 (mkV "रकh-न") "" ;
|
||||||
--
|
|
||||||
--oper
|
language_title_Utt = ss "रदw" ;
|
||||||
-- mkQuant : Str -> Str -> {s : Number => Str} = \x,y -> {
|
|
||||||
-- s = table Number [x ; y]
|
}
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
--
|
|
||||||
|
|||||||
@@ -1,41 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../hindustani:../abstract:../common
|
||||||
|
|
||||||
concrete SymbolHin of Symbol = CatHin ** open Prelude, ResHin in {
|
concrete SymbolHin of Symbol = CatHin ** SymbolHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
{- TODO!
|
|
||||||
lin
|
|
||||||
SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
|
||||||
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
|
||||||
FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ;
|
|
||||||
NumPN i = {s = i.s ; g = Neutr} ;
|
|
||||||
CNIntNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! c ;
|
|
||||||
a = agrgP3 Sg cn.g
|
|
||||||
} ;
|
|
||||||
CNSymbNP det cn xs = {
|
|
||||||
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! c ;
|
|
||||||
a = agrgP3 det.n cn.g
|
|
||||||
} ;
|
|
||||||
CNNumNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Nom ++ i.s ! c ;
|
|
||||||
a = agrgP3 Sg cn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SymbS sy = sy ;
|
|
||||||
|
|
||||||
SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ;
|
|
||||||
SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
lincat
|
|
||||||
|
|
||||||
Symb, [Symb] = SS ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
MkSymb s = s ;
|
|
||||||
|
|
||||||
-- BaseSymb = infixSS "and" ;
|
|
||||||
ConsSymb = infixSS "," ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,50 +1,2 @@
|
|||||||
concrete VerbHin of Verb = CatHin ** open ResHin in {
|
concrete VerbHin of Verb = CatHin ** VerbHindustani with
|
||||||
|
(ResHindustani = ResHin) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
UseV = predV ;
|
|
||||||
|
|
||||||
SlashV2a v = predV v ** {c2 = v.c2} ;
|
|
||||||
|
|
||||||
-- Slash2V3 v np =
|
|
||||||
-- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ;
|
|
||||||
-- Slash3V3 v np =
|
|
||||||
-- insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ----
|
|
||||||
--
|
|
||||||
-- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ;
|
|
||||||
-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
|
||||||
-- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
|
||||||
-- ComplVA v ap = insertObj (ap.s) (predV v) ;
|
|
||||||
--
|
|
||||||
-- SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ;
|
|
||||||
-- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
|
||||||
-- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
|
||||||
-- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
|
||||||
|
|
||||||
ComplSlash vp np = insertObject np vp ;
|
|
||||||
|
|
||||||
-- SlashVV vv vp =
|
|
||||||
-- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
|
|
||||||
-- {c2 = vp.c2} ;
|
|
||||||
-- SlashV2VNP vv np vp =
|
|
||||||
-- insertObjPre (\\_ => vp.c2 ++ np.s ! Acc)
|
|
||||||
-- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
|
||||||
-- {c2 = vp.c2} ;
|
|
||||||
--
|
|
||||||
-- UseComp comp = insertComplement comp.s (predAux auxBe) ;
|
|
||||||
--
|
|
||||||
-- AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
|
||||||
--
|
|
||||||
-- AdVVP adv vp = insertAdV adv.s vp ;
|
|
||||||
--
|
|
||||||
-- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
|
|
||||||
--
|
|
||||||
-- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
-- CompAP ap = ap ;
|
|
||||||
-- CompNP np = {s = \\_ => np.s ! Acc} ;
|
|
||||||
-- CompAdv a = {s = \\_ => a.s} ;
|
|
||||||
--
|
|
||||||
}
|
|
||||||
|
|||||||
133
lib/src/hindi/src/DiffHin.gf
Normal file
133
lib/src/hindi/src/DiffHin.gf
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
instance DiffHin of DiffHindustani = open CommonHindustani, Prelude in {
|
||||||
|
oper
|
||||||
|
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||||
|
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||||
|
s = \\vt,b,ord =>
|
||||||
|
let
|
||||||
|
subjagr : NPCase * Agr = case vt of {
|
||||||
|
VPImpPast => case vp.subj of {
|
||||||
|
VTrans => <NPErg, vp.obj.a> ;
|
||||||
|
VTransPost => <NPErg, defaultAgr> ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
subj = subjagr.p1 ;
|
||||||
|
agr = subjagr.p2 ;
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case vt of {
|
||||||
|
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => case vp.prog of { True => {fin = [] ;inf = Prelude.glue ((vp.s ! VPTense VPFutr agr).inf ++ hw p n) ((vp.s ! VPTense VPFutr agr).fin) } ;
|
||||||
|
_ => {fin = [] ; inf = Prelude.glue (vp.s ! VPTense VPFutr agr).inf (vp.s ! VPTense VPFutr agr).fin }} ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = [] ; inf = Prelude.glue ((vp.s ! VPStem).inf ++ raha g n ++ hw p n) (copula CFuture n p g) } ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfFut => {fin = [] ; inf = Prelude.glue ((vp.s ! VPTense VPPerf agr).inf ++ hw p n) (copula CFuture n p g) } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = [] ; inf = Prelude.glue ((vp.s ! VPTense VPPres agr).inf ++ raha g n ++ hw p n) (copula CFuture n p g )} ;
|
||||||
|
VPSubj => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).inf ++ hw p n ; inf = "Xayd" } ;
|
||||||
|
_ => {fin = (vp.s ! VPTense VPFutr agr).inf ; inf = "Xayd" } }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case vt of {
|
||||||
|
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ na ++ vps.inf ++ vps.fin ++ vp.embComp ;
|
||||||
|
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkSClause : Str -> Agr -> VPH -> Clause =
|
||||||
|
\subj,agr,vp -> {
|
||||||
|
s = \\t,b,ord =>
|
||||||
|
let
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case t of {
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => {fin = [] ; inf = Prelude.glue (vp.s ! VPTense VPFutr agr).inf ((vp.s ! VPTense VPFutr agr).fin) } ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = [] ; inf = Prelude.glue ((vp.s ! VPStem).inf ++ raha g n ++ hw p n) (copula CFuture n p g) } ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfFut => {fin = [] ; inf = Prelude.glue ((vp.s ! VPStem).inf ++ cka g n ++ hw p n) (copula CFuture n p g) } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = [] ; inf = Prelude.glue ((vp.s ! VPStem).inf ++ raha g n ++ hw p n) (copula CFuture n p g ) } ;
|
||||||
|
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case t of {
|
||||||
|
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ na ++ vps.inf ++ vps.fin ++ vp.embComp;
|
||||||
|
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{- Verb : Type = {s : VerbForm => Str} ;
|
||||||
|
|
||||||
|
|
||||||
|
predV v = {
|
||||||
|
s = \\vh =>
|
||||||
|
case vh of {
|
||||||
|
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = v.s ! VF Imperf p n g } ;
|
||||||
|
VPTense VPPast (Ag g n p) => {fin = [] ; inf =v.s ! VF Perf p n g} ;
|
||||||
|
VPTense VPFutr (Ag g n p) => {fin = [] ; inf = Prelude.glue (v.s ! VF Subj p n g) (copula CFuture n p g)} ;
|
||||||
|
VPTense VPPerf (Ag g n p) => { fin = [] ; inf = v.s ! Root ++ cka g n } ;
|
||||||
|
VPStem => {fin = [] ; inf = v.s ! Root};
|
||||||
|
_ => {fin = [] ; inf = v.s ! Root}
|
||||||
|
};
|
||||||
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
inf = v.s ! Inf;
|
||||||
|
ad = [];
|
||||||
|
embComp = [];
|
||||||
|
prog = False ;
|
||||||
|
comp = \\_ => []
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
np2pronCase ppf npc a = case npc of {
|
||||||
|
NPC c => ppf ! c;
|
||||||
|
NPObj => ppf ! Obl ;
|
||||||
|
NPErg =>case (fromAgr a).p of {
|
||||||
|
(Pers3_Near|Pers3_Distant) => Prelude.glue (ppf ! Obl) "nE" ; -- in hindi in case of pronouns nE is tagged to pron rather than a separate word
|
||||||
|
_ => Prelude.glue (ppf ! Dir) "nE"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
25
lib/src/hindi/src/ExtraHin.gf
Normal file
25
lib/src/hindi/src/ExtraHin.gf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude:/Users/virk/gf_1/lib/src/hindustani
|
||||||
|
concrete ExtraHin of ExtraHinAbs = CatHin **
|
||||||
|
open ResHin, Coordination, Prelude, MorphoHin, ParadigmsHin in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
-- GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
||||||
|
|
||||||
|
-- each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
|
||||||
|
have_V = mkV "rakh-na";
|
||||||
|
-- IAdvAdv adv = {s = "ktny" ++ adv.s} ;
|
||||||
|
-- ICompAP ap = {s = "ktnE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||||
|
-- CompoundCN cn1 cn2 = {s = \\n,c => cn1.s ! n ! c ++ cn2.s ! n ! c ; g = cn2.g } ;
|
||||||
|
-- ImperfAP verb = {s = \\n,g,_,_ => verb.s ! VF Habitual Pers3_Distant n g ++ hwa n g } ;
|
||||||
|
-- SlashVP vp = {
|
||||||
|
-- s = vp.s ;
|
||||||
|
-- obj = vp.obj ;
|
||||||
|
-- inf = vp.inf ;
|
||||||
|
-- subj = vp.subj ;
|
||||||
|
-- ad = vp.ad ;
|
||||||
|
-- embComp = vp.embComp;
|
||||||
|
-- comp = vp.comp
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
-- for VP conjunction
|
||||||
|
}
|
||||||
39
lib/src/hindi/src/IdiomHin.gf
Normal file
39
lib/src/hindi/src/IdiomHin.gf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
concrete IdiomHin of Idiom = CatHin ** open Prelude,Predef, ResHin,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
flags coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||||
|
GenericCl vp = mkSClause "kwy" (agrP3 Masc Sg) vp ;
|
||||||
|
|
||||||
|
CleftNP np rs =
|
||||||
|
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||||
|
in
|
||||||
|
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||||
|
|
||||||
|
-- CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||||
|
|
||||||
|
-- ExistNP np =
|
||||||
|
-- mkSClause "whaN" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||||
|
-- (insertObj (\\_ => np.s ! NPC Obl) (predAux auxBe)) ;
|
||||||
|
|
||||||
|
ExistIP ip =
|
||||||
|
let cl = mkSClause ("whaN" ++ ip.s ! Dir) (agrP3 ip.g ip.n) (predAux auxBe);
|
||||||
|
in {
|
||||||
|
s = \\t,p,qf => case qf of {
|
||||||
|
QDir => cl.s ! t ! p ! ODir;
|
||||||
|
QIndir => cl.s ! t! p ! ODir
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
||||||
|
ProgrVP vp = (predProg vp) ;
|
||||||
|
|
||||||
|
|
||||||
|
ImpPl1 vp = {s = "Aw" ++ infVP True vp (agrP1 Masc Pl)} ;
|
||||||
|
ImpP3 np vp = {s = np.s!NPC Dir ++ "kw" ++ (vp.s ! VPImp ).inf ++ "dw"};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
369
lib/src/hindi/src/LexiconHin.gf
Normal file
369
lib/src/hindi/src/LexiconHin.gf
Normal file
@@ -0,0 +1,369 @@
|
|||||||
|
--# -path=.:prelude
|
||||||
|
|
||||||
|
concrete LexiconHin of Lexicon = CatHin **
|
||||||
|
--open ResHin, Prelude in {
|
||||||
|
open ParadigmsHin, Prelude in {
|
||||||
|
|
||||||
|
flags
|
||||||
|
optimize=values ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
airplane_N = mkN "jHaj" ;
|
||||||
|
-- answer_V2S = mkV2 (compoundV "jwab" (mkV "dyna")) ;
|
||||||
|
-- apartment_N = mkN "kmrh" ;
|
||||||
|
apple_N = mkN "syb" ;
|
||||||
|
-- art_N = mkN "fn" ;
|
||||||
|
ask_V2Q = mkV2 (mkV "pwcHna") ;
|
||||||
|
-- baby_N = mkN "bcH" ;
|
||||||
|
bad_A = mkA "bra" ;
|
||||||
|
bank_N = mkN "bynk" ;
|
||||||
|
beautiful_A = mkA "sndr" ;
|
||||||
|
become_VA = mkV "bnna";
|
||||||
|
beer_N = mkN "beer" ;
|
||||||
|
-- beg_V2V = mkV2V (compoundV "altja" (mkV "krna")) "sE" "kh" False;
|
||||||
|
big_A = mkA "bRa" ;
|
||||||
|
-- bike_N = mkN "saycl" feminine ;
|
||||||
|
-- bird_N = mkN "prndh" ;
|
||||||
|
black_A = mkA "kala" ;
|
||||||
|
blue_A = mkA "nyla" ;
|
||||||
|
boat_N = mkN "naw" ;
|
||||||
|
book_N = mkN "ktab" feminine ;
|
||||||
|
-- boot_N = mkN "jwta" ;
|
||||||
|
boss_N = mkN "malk" ;
|
||||||
|
boy_N = mkN "lRka" ;
|
||||||
|
bread_N = mkN "rwty" ;
|
||||||
|
break_V2 = mkV2 (mkV "twRna") ;
|
||||||
|
broad_A = mkA "cwRa" ;
|
||||||
|
brother_N2 = mkN2 (mkN "bHay") (mkPrep "ka" "ka") "kE" ; --not correct
|
||||||
|
brown_A = mkA "bHwra" ;
|
||||||
|
-- butter_N = mkN "mkh-n" ;
|
||||||
|
buy_V2 = mkV2 (mkV "Krydna");
|
||||||
|
camera_N = mkN "kymrH" ;
|
||||||
|
cap_N = mkN "twpy" ;
|
||||||
|
car_N = mkN "kar" ;
|
||||||
|
-- carpet_N = mkN "tpay^y" ;
|
||||||
|
cat_N = mkN "bly" feminine;
|
||||||
|
-- ceiling_N = mkN "ch-t" feminine ;
|
||||||
|
chair_N = mkN "krsy" ;
|
||||||
|
-- cheese_N = mkN "pnyr" feminine ;
|
||||||
|
child_N = mkN "bcH" ;
|
||||||
|
church_N = mkN "grja" ;
|
||||||
|
city_N = mkN "XHr" ;
|
||||||
|
clean_A = mkA "saf" ;
|
||||||
|
clever_A = mkA "catr" ;
|
||||||
|
close_V2 = mkV2 (compoundV "bnd" do_V2);
|
||||||
|
coat_N = mkN "kwT" ;
|
||||||
|
cold_A = mkA "srd" ;
|
||||||
|
come_V = mkV "Ana" ;
|
||||||
|
computer_N = mkN "kmpywTr" ;
|
||||||
|
country_N = mkN "dyX" ;
|
||||||
|
-- cousin_N = mkCmpdNoun "cca" (mkN "zad") ; -- a compund noun made of two nouns
|
||||||
|
cow_N = mkN "gaE" feminine ;
|
||||||
|
die_V = mkV "mrna" ;
|
||||||
|
dirty_A = mkA "gnda" ;
|
||||||
|
-- distance_N3 = mkN3 (mkN "faSlh") (mkPrep "ka") "kE" "sE" ;
|
||||||
|
doctor_N = mkN "daktr" ;
|
||||||
|
dog_N = mkN "kta" ;
|
||||||
|
door_N = mkN "drwza" ;
|
||||||
|
drink_V2 = mkV2 (mkV "pyna");
|
||||||
|
easy_A2V = mkA "Asan" "" ; -- chek for A or a
|
||||||
|
eat_V2 = mkV2 (mkV "kHana") "" ;
|
||||||
|
empty_A = mkA "Kaly" ;
|
||||||
|
enemy_N = mkN "dXmn" ;
|
||||||
|
factory_N = mkN "karKana" ;
|
||||||
|
-- father_N2 = mkN2 (mkN "pta" irregular) (mkPrep "ka") "kE" ;
|
||||||
|
fear_VS = mkV "dRna";
|
||||||
|
find_V2 = mkV2 (mkV "dHwnda") ;
|
||||||
|
fish_N = mkN "mcHly" ;
|
||||||
|
floor_N = mkN "frX" ;
|
||||||
|
forget_V2 = mkV2 (mkV "bHwlna") ;
|
||||||
|
-- fridge_N = mkN "fryg" ;
|
||||||
|
friend_N = mkN "dwst" masculine ;
|
||||||
|
fruit_N = mkN "pHl" ;
|
||||||
|
-- fun_AV = mkAV (regA "fun") ;
|
||||||
|
garden_N = mkN "baG" ; -- chek for G
|
||||||
|
girl_N = mkN "lRky" ;
|
||||||
|
glove_N = mkN "dstana" ;
|
||||||
|
gold_N = mkN "swna" ;
|
||||||
|
good_A = mkA "acHa" ;
|
||||||
|
go_V = mkV "jana" ;
|
||||||
|
green_A = mkA "Hra" ;
|
||||||
|
-- harbour_N = mkCmpdNoun "bndr" (mkN "gah") ;
|
||||||
|
hate_V2 = mkV2 (compoundV "nfrt" do_V2) ;
|
||||||
|
hat_N = mkN "Twpy" ;
|
||||||
|
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
||||||
|
hear_V2 = mkV2 (mkV "snna") ;
|
||||||
|
-- hill_N = mkN "phaRy" ;
|
||||||
|
-- hope_VS = (compoundV "amyd" do_V2);
|
||||||
|
horse_N = mkN "gHwRa" ;
|
||||||
|
hot_A = mkA "grm" ;
|
||||||
|
house_N = mkN "gHr" ;
|
||||||
|
important_A = mkA "zrwry" ; -- check about z
|
||||||
|
-- industry_N = mkN "Snet" feminine ;
|
||||||
|
iron_N = mkN "lwHa" ;
|
||||||
|
king_N = mkN "raja" ;
|
||||||
|
know_V2 = mkV2 (mkV "janna") ;
|
||||||
|
know_VS = mkV "janna";
|
||||||
|
-- lake_N = mkN "jh-yl" feminine ;
|
||||||
|
lamp_N = mkN "dya" ;
|
||||||
|
learn_V2 = mkV2 (mkV "sykHna") ;
|
||||||
|
-- leather_N = mkN "cmRa" ;
|
||||||
|
leave_V2 = mkV2 (mkV "clna") ;
|
||||||
|
like_V2 = mkV2 (compoundV "psnd" do_V2);
|
||||||
|
listen_V2 = mkV2 (mkV "snna") ;
|
||||||
|
live_V = mkV "rhna" ; ---- touch
|
||||||
|
long_A = mkA "lmba" ;
|
||||||
|
lose_V2 = mkV2 (compoundV "kHw" do_V2) ;
|
||||||
|
love_N = mkN "prym" ;
|
||||||
|
love_V2 = mkV2 (compoundV "pyar" do_V2) "kw";
|
||||||
|
man_N = mkN "Admy" ;
|
||||||
|
-- married_A2 = mkA "Xady " "sE" ;
|
||||||
|
meat_N = mkN "mas" ;
|
||||||
|
milk_N = mkN "dwdH" ;
|
||||||
|
moon_N = mkN "cand" ;
|
||||||
|
mother_N2 = mkN2 (mkN "mata" feminine) (mkPrep "ky" "ky") "kE"; -- not covered need to be discussed
|
||||||
|
-- mountain_N = mkN "phaRy" ;
|
||||||
|
music_N = mkN "sngyt" ;
|
||||||
|
-- narrow_A = mkA "baryk" ;
|
||||||
|
new_A = mkA "nya" ;
|
||||||
|
newspaper_N = mkN "aKbar" ;
|
||||||
|
oil_N = mkN "tyl" ;
|
||||||
|
old_A = mkA "bwRHa" ;
|
||||||
|
open_V2 = mkV2 (mkV "kHwlna") ;
|
||||||
|
-- paint_V2A = mkV2 (compoundV "rng" do_V2) ;
|
||||||
|
paper_N = mkN "kaGz" ;
|
||||||
|
paris_PN = mkPN "pyrs" ;
|
||||||
|
peace_N = mkN "amn" ;
|
||||||
|
pen_N = mkN "qlm" ;
|
||||||
|
-- planet_N = mkN "syarh" ;
|
||||||
|
-- plastic_N = mkN "plasTk" ;
|
||||||
|
play_V2 = mkV2 (mkV "kHylna") ;
|
||||||
|
-- policeman_N = mkCmpdNoun "pwlys" (mkN "wala") ;
|
||||||
|
-- priest_N = (mkN "pyGmbr") ;
|
||||||
|
-- probable_AS = mkAS (regA "probable") ;
|
||||||
|
-- queen_N = mkN "Xhzady" ;
|
||||||
|
-- radio_N = mkN "ryDyw" ;
|
||||||
|
rain_V0 = compoundV "barX" (mkV "Hwna" ) ;
|
||||||
|
read_V2 = mkV2 (mkV "pRHna");
|
||||||
|
red_A = mkA "lal" ;
|
||||||
|
religion_N = mkN "dHrm" ;
|
||||||
|
-- restaurant_N = mkN "hwTl" ;
|
||||||
|
river_N = mkN "drya" masculine ;
|
||||||
|
rock_N = mkN "cTan" ;
|
||||||
|
roof_N = mkN "ch-t" masculine ;
|
||||||
|
-- rubber_N = mkN "rbR" ;
|
||||||
|
run_V = mkV "dwRna" ;
|
||||||
|
say_VS = mkV "kHna" ;
|
||||||
|
school_N = mkN "mktb" ;
|
||||||
|
-- science_N = mkN "sans" ; -- vgyan
|
||||||
|
sea_N = mkN "smndr" ;
|
||||||
|
-- seek_V2 = mkV2 (compoundV "tlaX" do_V2) ;
|
||||||
|
see_V2 = mkV2 (mkV "dykHna") ;
|
||||||
|
sell_V3 = mkV3 (mkV "bycna") "kw" "";
|
||||||
|
send_V3 = mkV3 (mkV "bHyjna") "kw" "";
|
||||||
|
sheep_N = mkN "bHyR" feminine ;
|
||||||
|
ship_N = mkN "jHaz" ;
|
||||||
|
shirt_N = mkN "krta" feminine;
|
||||||
|
shoe_N = mkN "jwta" ;
|
||||||
|
shop_N = mkN "dwkan" feminine ;
|
||||||
|
short_A = mkA "cHwTa" ;
|
||||||
|
silver_N = mkN "candy" ;
|
||||||
|
sister_N = mkN "bHn" feminine ;
|
||||||
|
sleep_V = mkV "swna" ;
|
||||||
|
small_A = mkA "cHwTa" ;
|
||||||
|
snake_N = mkN "sanp" ;
|
||||||
|
-- sock_N = mkN "jrab" feminine ;
|
||||||
|
speak_V2 = mkV2 (mkV "bwlna") ;
|
||||||
|
star_N = mkN "tara" ;
|
||||||
|
-- steel_N = mkN "styl" ; -- something like ispat
|
||||||
|
stone_N = mkN "ptHr" ;
|
||||||
|
-- stove_N = mkN "cwlha" ;
|
||||||
|
-- student_N = mkCmpdNoun "t-alb" (mkN "elm") ; -- something vidrati
|
||||||
|
stupid_A = mkA "bEwqwf" ;
|
||||||
|
-- sun_N = mkN "swrj" ; -- swrya
|
||||||
|
switch8off_V2 = mkV2 (compoundV "bnd" do_V2) ;
|
||||||
|
switch8on_V2 = mkV2 (mkV "clana") ;
|
||||||
|
table_N = mkN "myz" feminine ;
|
||||||
|
talk_V3 = mkV3 (mkV "bwlna") "sE" "kE barE meN";
|
||||||
|
-- teacher_N = mkN "istad" ; -- adyapak
|
||||||
|
teach_V2 = mkV2 (mkV "pRHna") ;
|
||||||
|
television_N = mkN "tywy" ;
|
||||||
|
thick_A = mkA "mwTa" ;
|
||||||
|
thin_A = mkA "ptla" ;
|
||||||
|
train_N = mkN "ryl gaRy" ;
|
||||||
|
travel_V = (compoundV "sfr" do_V2) ;
|
||||||
|
-- tree_N = mkN "pyR" masculine ;
|
||||||
|
-- ---- trousers_N = mkN "trousers" ;
|
||||||
|
ugly_A = mkA "bdswrt" ;
|
||||||
|
understand_V2 = mkV2 (mkV "smjHna") ;
|
||||||
|
-- university_N = mkN "ywnywrsTy" ;
|
||||||
|
village_N = mkN "gawN" ; -- check for n or N
|
||||||
|
-- wait_V2 = mkV2 (compoundV "antz-ar" do_V2) "ka" ; -- something prtkXa
|
||||||
|
walk_V = mkV "clna" ;
|
||||||
|
-- warm_A = mkA "grm" ; something gngna
|
||||||
|
-- war_N = mkN "jng" ;
|
||||||
|
watch_V2 = mkV2 (mkV "dykHna") ;
|
||||||
|
-- water_N = mkN "pany" masculine ; -- not covered masculine ending with y
|
||||||
|
white_A = mkA "sfyd" ;
|
||||||
|
window_N = mkN "rwXndan" ;
|
||||||
|
-- wine_N = mkN "Xrab" feminine ;
|
||||||
|
win_V2 = mkV2 (mkV "jytna") ;
|
||||||
|
woman_N = mkN "ewrt" feminine ;
|
||||||
|
-- wonder_VQ = compoundV "Heran" (mkV "hwna") ;
|
||||||
|
wood_N = mkN "lkRy" ;
|
||||||
|
write_V2 = mkV2 (mkV "lkh-na") ;
|
||||||
|
yellow_A = mkA "pyla" ;
|
||||||
|
young_A = mkA "jwan" ;
|
||||||
|
do_V2 = mkV2 (mkV "krna") ;
|
||||||
|
-- now_Adv = mkAdv "ab" ;
|
||||||
|
-- already_Adv = mkAdv "phlE hy" ;
|
||||||
|
song_N = mkN "gyt" ;
|
||||||
|
add_V3 = mkV3 (compoundV "jme" do_V2) "" "" ;
|
||||||
|
-- number_N = mkN "hndsh" ;
|
||||||
|
-- put_V2 = mkV2 (mkV "Dalna") ;
|
||||||
|
stop_V = mkV "rkna" ;
|
||||||
|
-- jump_V = compoundV "cHlang" (mkV "lgana") feminine ;
|
||||||
|
|
||||||
|
-- left_Ord = {s = "bayaN" ; n = singular};
|
||||||
|
-- right_Ord = {s= "dayaN" ; n = singular};
|
||||||
|
-- far_Adv = mkAdv "dwr" ;
|
||||||
|
correct_A = mkA "syH" ;
|
||||||
|
dry_A = mkA "swkHa" ;
|
||||||
|
-- dull_A = mkA "nalik" ;
|
||||||
|
-- full_A = mkA "mkml" ;
|
||||||
|
heavy_A = mkA "bHary" ;
|
||||||
|
near_A = mkA "pas" ;
|
||||||
|
-- rotten_A = mkA "Krab" ;
|
||||||
|
round_A = mkA "gwl" ;
|
||||||
|
sharp_A = mkA "tyz" ;
|
||||||
|
smooth_A = mkA "ckna" ;
|
||||||
|
straight_A = mkA "sydHa" ;
|
||||||
|
wet_A = mkA "gyla" ; ----
|
||||||
|
wide_A = mkA "cwRa" ;
|
||||||
|
animal_N = mkN "janwr" ;
|
||||||
|
ashes_N = mkN "rakh-" feminine; -- FIXME: plural only?
|
||||||
|
-- back_N = mkN "qmr" feminine ;
|
||||||
|
-- bark_N = mkN "bark" ;
|
||||||
|
-- belly_N = mkN "dh-ny" ;
|
||||||
|
-- blood_N = mkN "Kwn" ;
|
||||||
|
bone_N = mkN "HDy" feminine ;
|
||||||
|
-- breast_N = mkN "ch-aty" ; --stan
|
||||||
|
cloud_N = mkN "badl" ;
|
||||||
|
day_N = mkN "dn" ;
|
||||||
|
dust_N = mkN "dHwl" ;
|
||||||
|
ear_N = mkN "kan" ;
|
||||||
|
-- earth_N = mkN "zmyn" feminine ;
|
||||||
|
egg_N = mkN "anDH" ;
|
||||||
|
eye_N = mkN "AnkH" feminine ;
|
||||||
|
fat_N = mkN "mwta" ;
|
||||||
|
feather_N = mkN "pnkH" ;
|
||||||
|
-- fingernail_N = mkN "naKn" ;
|
||||||
|
fire_N = mkN "Ag" feminine ;
|
||||||
|
flower_N = mkN "pHwl" ;
|
||||||
|
fog_N = mkN "dHnd" feminine ;
|
||||||
|
foot_N = mkN "pawN" ; -- not properly covered need to be discussed
|
||||||
|
forest_N = mkN "jngl" ;
|
||||||
|
grass_N = mkN "gHs" feminine ;
|
||||||
|
-- guts_N = mkN "gut" ; -- FIXME: no singular
|
||||||
|
hair_N = mkN "bal" ;
|
||||||
|
hand_N = mkN "HatH" ;
|
||||||
|
head_N = mkN "sr" ;
|
||||||
|
heart_N = mkN "dl" ;
|
||||||
|
-- horn_N = mkN "gh-nty" ;
|
||||||
|
husband_N = mkN "pty" ;
|
||||||
|
ice_N = mkN "brf" feminine ;
|
||||||
|
knee_N = mkN "gHtnH" ;
|
||||||
|
leaf_N = mkN "ptH" ;
|
||||||
|
leg_N = mkN "tang" feminine ;
|
||||||
|
liver_N = mkN "klyjH" ;
|
||||||
|
-- louse_N = mkN "" ; -- jwN
|
||||||
|
mouth_N = mkN "mnH" ;
|
||||||
|
name_N = mkN "nam" ;
|
||||||
|
neck_N = mkN "grdn" feminine ;
|
||||||
|
night_N = mkN "rat" feminine ;
|
||||||
|
nose_N = mkN "nak" ;
|
||||||
|
-- person_N = mkN "XKS" ;
|
||||||
|
rain_N = mkN "barX" feminine ;
|
||||||
|
road_N = mkN "sRk" ;
|
||||||
|
root_N = mkN "gR" feminine ;
|
||||||
|
rope_N = mkN "rsy" ;
|
||||||
|
salt_N = mkN "nmk" feminine ;
|
||||||
|
sand_N = mkN "ryt" feminine ;
|
||||||
|
seed_N = mkN "byj" ;
|
||||||
|
-- skin_N = mkN "jld" feminine ; -- crm
|
||||||
|
sky_N = mkN "ambr" ;
|
||||||
|
smoke_N = mkN "dHwaN"; -- singular masc nouns ending with aN,wN yet to be implemented
|
||||||
|
snow_N = mkN "brf" feminine ;
|
||||||
|
stick_N = mkN "soTy" ;
|
||||||
|
tail_N = mkN "dm" ;
|
||||||
|
-- tongue_N = mkN "zban" feminine ;
|
||||||
|
-- tooth_N = mkN "dant" masculine;
|
||||||
|
wife_N = mkN "ptny" ;
|
||||||
|
wind_N = mkN "Hwa" ;
|
||||||
|
-- wing_N = mkN "pr" ;
|
||||||
|
worm_N = mkN "kyRa" ;
|
||||||
|
year_N = mkN "sal" ;
|
||||||
|
-- blow_V = mkV "clna" ;
|
||||||
|
breathe_V = compoundV "sans" (mkV "lyna" ) ;
|
||||||
|
burn_V = mkV "jlana" ;
|
||||||
|
dig_V = mkV "kHwdna" ;
|
||||||
|
fall_V = mkV "grna" ;
|
||||||
|
-- float_V = mkV "tyrna" ;
|
||||||
|
flow_V = mkV "clna" ;
|
||||||
|
fly_V = mkV "aRna" ;
|
||||||
|
-- freeze_V = mkV "jmna";
|
||||||
|
give_V3 = mkV3 (mkV "dyna") "kw" "";
|
||||||
|
laugh_V = mkV "hnsna" ;
|
||||||
|
-- lie_N = mkN "jh-wt" masculine ;
|
||||||
|
lie_V = compoundV "jHwt" (mkV "bwlna" );
|
||||||
|
play_V = mkV "kHylna" ;
|
||||||
|
sew_V = mkV "syna" ;
|
||||||
|
sing_V = mkV "gana" ;
|
||||||
|
sit_V = mkV "byTHna" ;
|
||||||
|
smell_V = mkV "swngna" ;
|
||||||
|
spit_V = mkV "tHwkna" ;
|
||||||
|
stand_V = compoundV "kHRE" (mkV "hwna" ); -- a type of compound verb made of two verbs i.e 'kHRa' also inflects, rather than a string and verb should be fixed
|
||||||
|
-- swell_V = mkV "swjh-na" ;
|
||||||
|
swim_V = mkV "tyrna" ;
|
||||||
|
think_V = mkV "swcna" ;
|
||||||
|
turn_V = mkV "mRna";
|
||||||
|
-- vomit_V = compoundV "alty" (mkV "krna") feminine ;
|
||||||
|
bite_V2 = mkV2 (mkV "katna") ;
|
||||||
|
count_V2 = mkV2 (mkV "gnna") ;
|
||||||
|
cut_V2 = mkV2 (mkV "katna") ;
|
||||||
|
fear_V2 = mkV2 (mkV "Drna") ;
|
||||||
|
fight_V2 = mkV2 (mkV "lRna") ;
|
||||||
|
-- hit_V2 = mkV2 (compoundV "th-wkr" (mkV "marna" ));
|
||||||
|
hold_V2 = mkV2 (mkV "pkRna") ;
|
||||||
|
-- hunt_V2 = mkV2 (compoundV "Xkar" do_V2);
|
||||||
|
kill_V2 = mkV2 (compoundV "mar" (mkV "Dalna" )) ;
|
||||||
|
pull_V2 = mkV2 (mkV "kHncna");
|
||||||
|
-- push_V2 = mkV2 (mkV "dh-kylna") "kw" ;
|
||||||
|
-- rub_V2 = mkV2 (mkV "rgRna") ;
|
||||||
|
-- scratch_V2 = mkV2 (mkV "kh-rcna") "kw" ;
|
||||||
|
-- split_V2 = mkV2 (mkV "banta") "kw" ;
|
||||||
|
-- squeeze_V2 = dirV2 (regV "squeeze") ;
|
||||||
|
-- stab_V2 = dirV2 (regDuplV "stab") ;
|
||||||
|
-- suck_V2 = mkV2 (mkV "cwsna") ;
|
||||||
|
throw_V2 = mkV2 (mkV "pHynkna") ;
|
||||||
|
tie_V2 = mkV2 (mkV "bandHna") ;
|
||||||
|
wash_V2 = mkV2 (mkV "dHwna") ;
|
||||||
|
wipe_V2 = mkV2 (compoundV "Saf" (mkV "krna" ));
|
||||||
|
|
||||||
|
---- other_A = regA "other" ;
|
||||||
|
|
||||||
|
-- grammar_N = mkN "grdan" ;
|
||||||
|
-- language_N = mkN "zban" feminine ;
|
||||||
|
-- rule_N = mkN "aSwl" ;
|
||||||
|
|
||||||
|
---- added 4/6/2007
|
||||||
|
john_PN = mkPN "jon" ;
|
||||||
|
-- question_N = mkN "swal" ;
|
||||||
|
-- ready_A = regA "ready" ;
|
||||||
|
-- reason_N = mkN "wjh" feminine ;
|
||||||
|
-- today_Adv = mkAdv "Aj" ;
|
||||||
|
-- uncertain_A = mkA ["Gyr yqyny"] ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
460
lib/src/hindi/src/MorphoHin.gf
Normal file
460
lib/src/hindi/src/MorphoHin.gf
Normal file
@@ -0,0 +1,460 @@
|
|||||||
|
--# -path=.:../../prelude:../abstract:../common:../../prelude
|
||||||
|
--
|
||||||
|
----1 A Simple Hinu Resource Morphology
|
||||||
|
----
|
||||||
|
---- Shafqat Virk, Aarne Ranta,2009
|
||||||
|
----
|
||||||
|
---- This resource morphology contains definitions needed in the resource
|
||||||
|
---- syntax. To build a lexicon, it is better to use $ParadigmsHin$, which
|
||||||
|
---- gives a higher-level access to this module.
|
||||||
|
--
|
||||||
|
resource MorphoHin = ResHin ** open Prelude,Predef,ParamX,CommonHindustani in {
|
||||||
|
flags optimize=all ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
----2 Nouns
|
||||||
|
oper
|
||||||
|
mkNoun : (x1,_,_,_,_,x6 : Str) -> Gender -> Noun =
|
||||||
|
\sd,so,sv,pd,po,pv,g -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Dir => sd ;
|
||||||
|
Obl => so ;
|
||||||
|
Voc => sv
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
Dir => pd ;
|
||||||
|
Obl => po ;
|
||||||
|
Voc => pv
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
g = g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
regNoun : Str -> Noun ;
|
||||||
|
regNoun s = case s of {
|
||||||
|
_ + "ya" => mkN05 (s);
|
||||||
|
_ + ("a"|"e"|"h") => mkN01 (s);
|
||||||
|
_ + "y" => mkN03 (s);
|
||||||
|
_ + ("aN"|"wN") => mkN04 (s);
|
||||||
|
_ + "w^" => mkN12 (s);
|
||||||
|
_ => regNoun2 (s)
|
||||||
|
};
|
||||||
|
regNoun2 : Str -> Noun;
|
||||||
|
regNoun2 s = let c = if_then_else Bool (eq (last s) "a" ) True (if_then_else Bool (eq (last s) "h") True (if_then_else Bool (eq (last s) "e") True False))
|
||||||
|
in case c of {
|
||||||
|
False => mkN02 (s);
|
||||||
|
True => mkN01 (s)
|
||||||
|
};
|
||||||
|
|
||||||
|
reggNoun : Str -> Gender -> Noun ;
|
||||||
|
reggNoun s g = let c = if_then_else Bool (eq (last s) "a" ) True (if_then_else Bool (eq (dp 2 s) "aN") True (if_then_else Bool (eq (dp 2 s) "wN") True False))
|
||||||
|
in case <s,g,c> of {
|
||||||
|
<_ + "t",Fem,_> => mkN10 (s);
|
||||||
|
<_ + "t",Masc,_> => mkN02 (s);
|
||||||
|
<_ + "w",Masc,_> => mkN11 (s);
|
||||||
|
<_ + "w",Fem,_> => mkN07 (s);
|
||||||
|
<_ + "ya",Fem,_> => mkN05 (s);
|
||||||
|
<_ + "ya",Masc,_> => mkN02 (s);
|
||||||
|
<_,Fem,False> => mkN08 (s);
|
||||||
|
<_,Fem,_> => mkN09 (s)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
||||||
|
-- Arabic nouns ends with h. also taken as Masc
|
||||||
|
|
||||||
|
mkN01 : Str -> Noun ;
|
||||||
|
mkN01 lRka = let end = last (lRka) ;
|
||||||
|
lRk = if_then_else Str (eq end "e") lRka (tk 1 lRka)
|
||||||
|
in mkNoun (lRka) (lRk+"E") (lRk+"E")
|
||||||
|
(lRk+"E") (lRk+"wN") (lRk+"w")
|
||||||
|
Masc ;
|
||||||
|
|
||||||
|
-- masculine nouns does not end with a, h, e, an
|
||||||
|
|
||||||
|
mkN02 : Str -> Noun ;
|
||||||
|
mkN02 mrd = let mrdwN = mrd+"wN" ;
|
||||||
|
mrdw = tk 1 mrdwN
|
||||||
|
in mkNoun mrd mrd mrd
|
||||||
|
mrd mrdwN mrdw
|
||||||
|
Masc ;
|
||||||
|
|
||||||
|
-- feminine Nouns end with y
|
||||||
|
|
||||||
|
mkN03 : Str -> Noun ;
|
||||||
|
mkN03 krsy = let krsyaN = krsy+"aN" ;
|
||||||
|
krsywN = krsy+"wN" ;
|
||||||
|
krsyw = tk 1 krsywN
|
||||||
|
in mkNoun krsy krsy krsy
|
||||||
|
krsyaN krsywN krsyw
|
||||||
|
Fem ;
|
||||||
|
|
||||||
|
-- feminine nouns end with a, aN, wN
|
||||||
|
mkN04 : Str -> Noun ;
|
||||||
|
mkN04 n = case last n of {
|
||||||
|
"a" => let bla = n
|
||||||
|
in mkNoun bla bla bla
|
||||||
|
(bla+"y^yN") (bla+"w^N") (bla+"w^")
|
||||||
|
Fem ;
|
||||||
|
_ => let maN = n ; -- ends with aN and wN
|
||||||
|
ma = tk 1 maN
|
||||||
|
in mkNoun maN maN maN
|
||||||
|
(ma+"y^yN") (ma+"w^N") (ma+"w^N")
|
||||||
|
Fem
|
||||||
|
|
||||||
|
};
|
||||||
|
--feminine nouns end with ya
|
||||||
|
|
||||||
|
mkN05 : Str -> Noun ;
|
||||||
|
mkN05 gRya = let gRy = (tk 1 gRya)
|
||||||
|
in mkNoun gRya gRya gRya
|
||||||
|
(gRya+"N") (gRy+"wN") (gRy+"w")
|
||||||
|
Fem ;
|
||||||
|
|
||||||
|
-- feminine nouns end with w
|
||||||
|
|
||||||
|
mkN07 : Str -> Noun ;
|
||||||
|
mkN07 khshbw = mkNoun khshbw khshbw khshbw
|
||||||
|
(khshbw + "y^yN") (khshbw + "w^N") (khshbw + "w^")
|
||||||
|
Fem ;
|
||||||
|
|
||||||
|
-- Loan arabic feminine nouns end with t
|
||||||
|
-- this is a noun that shows state, condition
|
||||||
|
|
||||||
|
mkN10 : Str -> Noun ;
|
||||||
|
mkN10 ndamt = mkNoun ndamt ndamt ndamt
|
||||||
|
(ndamt+"yN") (ndamt+"wN") (ndamt+"w")
|
||||||
|
Fem ;
|
||||||
|
-- Worst case function
|
||||||
|
mkN : (_,_,_,_,_,_ : Str) -> Gender -> Noun ;
|
||||||
|
mkN sgNom sgObl sgVoc plNom plObl plVoc g =
|
||||||
|
mkNoun sgNom sgObl sgVoc plNom plObl plVoc g ;
|
||||||
|
|
||||||
|
mkN06 : Str -> Noun ;
|
||||||
|
mkN06 rya = mkNoun rya rya rya
|
||||||
|
(rya+"y^yN") (rya+"w^N") rya
|
||||||
|
Fem ;
|
||||||
|
|
||||||
|
-- feminine nouns that do not end with a, N, w, wN
|
||||||
|
|
||||||
|
mkN08 : Str -> Noun ;
|
||||||
|
mkN08 ktab = mkNoun ktab ktab ktab
|
||||||
|
(ktab+"yN") (ktab+"wN") (ktab+"w")
|
||||||
|
Fem ;
|
||||||
|
|
||||||
|
-- Loan arabic feminine nouns
|
||||||
|
|
||||||
|
mkN09 : Str -> Noun ;
|
||||||
|
mkN09 ahsan = mkNoun ahsan ahsan ahsan
|
||||||
|
(ahsan+"at") (ahsan+"at") (ahsan+"w")
|
||||||
|
Fem ;
|
||||||
|
-- (variants{ahsan+"at";ahsan+"wN"})
|
||||||
|
-- Loan persian maculine nouns end with w
|
||||||
|
|
||||||
|
mkN11 : Str -> Noun ;
|
||||||
|
mkN11 alw = mkNoun alw alw alw
|
||||||
|
alw (alw+"w^N") (alw+"w^")
|
||||||
|
Masc ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Loan persian maculine nouns end with w^
|
||||||
|
|
||||||
|
mkN12 : Str -> Noun ;
|
||||||
|
mkN12 bhao = mkNoun (bhao) (bhao) (bhao)
|
||||||
|
(bhao) (bhao) (bhao)
|
||||||
|
Masc ;
|
||||||
|
----2 Determiners
|
||||||
|
IDeterminer = {s:Gender => Str ; n : Number};
|
||||||
|
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Masc => s1 ;
|
||||||
|
Fem => s2
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
Masc => s3 ;
|
||||||
|
Fem => s4
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
n = n
|
||||||
|
};
|
||||||
|
|
||||||
|
makeIDet : Str -> Str -> Number -> IDeterminer = \s1,s2,n -> {
|
||||||
|
s = table {
|
||||||
|
Masc => s1;
|
||||||
|
Fem => s2
|
||||||
|
};
|
||||||
|
n = n
|
||||||
|
};
|
||||||
|
|
||||||
|
-- Proposition
|
||||||
|
|
||||||
|
makePrep : Str -> Str -> Preposition = \s1,s2 -> {s = table { Masc => s1 ; Fem => s2 } } ** { lock_Prep = <>};
|
||||||
|
|
||||||
|
----2 Pronouns
|
||||||
|
PronForm = {s:Pronoun => Str};
|
||||||
|
makeDemPron : (x1,x2,x3,x4,x5,x6:Str) -> PronForm =
|
||||||
|
\y1,y2,y3,y4,y5,y6 -> {
|
||||||
|
s = table {
|
||||||
|
P Sg _ Dir _ => y1;
|
||||||
|
P Sg _ Obl _ => y2;
|
||||||
|
P Sg _ Voc _ => y3;
|
||||||
|
P Pl _ Dir _ => y4;
|
||||||
|
P Pl _ Obl _ => y5;
|
||||||
|
P Pl _ Voc _ => y6
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
-- DemonPronForm = {s:DemPronForm => Str};
|
||||||
|
mkDemonPronForm : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12:Str) -> DemPronForm =
|
||||||
|
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12 -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => y1 ;
|
||||||
|
Obl => y2 ;
|
||||||
|
Voc => y3
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => y4 ;
|
||||||
|
Obl => y5 ;
|
||||||
|
Voc => y6
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => y7 ;
|
||||||
|
Obl => y8 ;
|
||||||
|
Voc => y9
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => y10 ;
|
||||||
|
Obl => y11 ;
|
||||||
|
Voc => y12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
makeDemonPronForm : Str -> Str -> Str -> DemPronForm ;
|
||||||
|
makeDemonPronForm yeh is inn = mkDemonPronForm yeh is "" yeh is "" yeh inn "" yeh inn "";
|
||||||
|
-- makePossPronForm myra myry hmara hmary = mkDemonPronForm myra myra myra myry myry myry hmara hmara hmara hmary hmary hmary;
|
||||||
|
|
||||||
|
PersPron = {s: PersPronForm => Str};
|
||||||
|
|
||||||
|
mkPersPron:(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36:Str) -> PersPron =
|
||||||
|
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,y31,y32,y33,y34,y35,y36 -> {
|
||||||
|
s =
|
||||||
|
table {
|
||||||
|
PPF Sg Pers1 Dir => y1;
|
||||||
|
PPF Sg Pers1 Obl => y2;
|
||||||
|
PPF Sg Pers1 Voc => y3;
|
||||||
|
PPF Sg Pers2_Casual Dir => y4;
|
||||||
|
PPF Sg Pers2_Casual Obl => y5;
|
||||||
|
PPF Sg Pers2_Casual Voc => y6;
|
||||||
|
PPF Sg Pers2_Familiar Dir => y7;
|
||||||
|
PPF Sg Pers2_Familiar Obl => y8;
|
||||||
|
PPF Sg Pers2_Familiar Voc => y9;
|
||||||
|
PPF Sg Pers2_Respect Dir => y10;
|
||||||
|
PPF Sg Pers2_Respect Obl => y11;
|
||||||
|
PPF Sg Pers2_Respect Voc => y12;
|
||||||
|
PPF Sg Pers3_Near Dir => y13;
|
||||||
|
PPF Sg Pers3_Near Obl => y14;
|
||||||
|
PPF Sg Pers3_Near Voc => y15;
|
||||||
|
PPF Sg Pers3_Distant Dir => y16;
|
||||||
|
PPF Sg Pers3_Distant Obl => y17;
|
||||||
|
PPF Sg Pers3_Distant Voc => y18;
|
||||||
|
PPF Pl Pers1 Dir => y19;
|
||||||
|
PPF Pl Pers1 Obl => y20;
|
||||||
|
PPF Pl Pers1 Voc => y21;
|
||||||
|
PPF Pl Pers2_Casual Dir => y22;
|
||||||
|
PPF Pl Pers2_Casual Obl => y23;
|
||||||
|
PPF Pl Pers2_Casual Voc => y24;
|
||||||
|
PPF Pl Pers2_Familiar Dir => y25;
|
||||||
|
PPF Pl Pers2_Familiar Obl => y26;
|
||||||
|
PPF Pl Pers2_Familiar Voc => y27;
|
||||||
|
PPF Pl Pers2_Respect Dir => y28;
|
||||||
|
PPF Pl Pers2_Respect Obl => y29;
|
||||||
|
PPF Pl Pers2_Respect Voc => y30;
|
||||||
|
PPF Pl Pers3_Near Dir => y31;
|
||||||
|
PPF Pl Pers3_Near Obl => y32;
|
||||||
|
PPF Pl Pers3_Near Voc => y33;
|
||||||
|
PPF Pl Pers3_Distant Dir => y34;
|
||||||
|
PPF Pl Pers3_Distant Obl => y35;
|
||||||
|
PPF Pl Pers3_Distant Voc => y36
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
makePersPron : PersPron;
|
||||||
|
makePersPron = mkPersPron "m(a)yN" "m(o)j'|h" "" "t(o)w " "t(o)j|h" "t(o)w " "t(o)m" "t(o)m" "t(o)m" "Ap" "Ap" "Ap" "y(i)h" "a(i)s" "" "w(o)h" "a(o)s" ""
|
||||||
|
"h(a)m" "h(a)m" "" "t(o)m" "t(o)m" "t(o)m" "t(o)m" "t(o)m" "t(o)m" "Ap" "Ap" "Ap" "y(i)h" "a(i)n" "" "w(o)h" "a(o)n" "" ;
|
||||||
|
|
||||||
|
mkPron : (x1,x2,x3:Str) -> {s:Case => Str} =
|
||||||
|
\y1,y2,y3 -> { s =
|
||||||
|
table {
|
||||||
|
Dir => y1;
|
||||||
|
Obl => y2;
|
||||||
|
Voc => y3
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
------- PossPronForm yet to be implemented
|
||||||
|
|
||||||
|
-- IntPronForm = {s:InterrPronForm => Str};
|
||||||
|
IntPronForm = {s: Case => Str};
|
||||||
|
mkIntPronForm : (x1,x2,x3:Str) -> IntPronForm =
|
||||||
|
\y1,y2,y3 -> {
|
||||||
|
s =
|
||||||
|
table {
|
||||||
|
Dir => y1;
|
||||||
|
Obl => y2;
|
||||||
|
Voc => y3
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
----2 Adjectives
|
||||||
|
-- defined in ResUrd
|
||||||
|
|
||||||
|
----3 Verbs
|
||||||
|
CommonVF = {s : VTense => UPerson => Number => Gender => Str} ;
|
||||||
|
|
||||||
|
mkVerb : (x1: Str) -> Verb = \inf ->
|
||||||
|
let root = (tk 2 inf); inf_obl = ((tk 1 inf) + "E"); inf_fem = ((tk 1 inf) + "y")
|
||||||
|
in { s = table {
|
||||||
|
|
||||||
|
VF tense person number gender => (mkCmnVF root tense person number gender).s ;
|
||||||
|
Inf => inf ;
|
||||||
|
Root => root ;
|
||||||
|
Inf_Obl => inf_obl ;
|
||||||
|
Inf_Fem => inf_fem
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
rem_y : Str -> Str;
|
||||||
|
rem_y str = let b = take 1 str; yth = drop 1 str; a1 = take 4 yth; a2 = take 1 yth; th= if_then_else Str (eq a1 "(a)y") (drop 5 str) (drop 2 str); st = if_then_else Str (eq a1 "(a)y") (b ++ "(i)"++th) (if_then_else Str (eq a2 "y") (b ++ th) str)
|
||||||
|
in rt st;
|
||||||
|
rt: Str -> Str;
|
||||||
|
rt r = r;
|
||||||
|
mkCmnVF : Str -> VTense -> UPerson -> Number -> Gender -> {s:Str} =
|
||||||
|
\root,t,p,n,g ->
|
||||||
|
{s =
|
||||||
|
let form1 = case (last root) of {
|
||||||
|
"a"|"A"|"w" => root + "w^N" ;
|
||||||
|
_ => root + "wN"
|
||||||
|
};
|
||||||
|
form2 = case (last root) of {
|
||||||
|
"a"|"A"|"w" => root + "y^N" ;
|
||||||
|
_ => root + "yN"
|
||||||
|
};
|
||||||
|
in
|
||||||
|
case <t,p,n,g> of {
|
||||||
|
<Subj,Pers1,Sg,_> => form1 ;
|
||||||
|
<Subj,Pers1,Pl,_> => form2 ;
|
||||||
|
<Subj,_,_,_> => (mkImpert root p n g).s ;
|
||||||
|
<Perf,_,_,_> => case root of {
|
||||||
|
"hw" => (mkPastInd root p n g).s ;
|
||||||
|
"ja" => (mkPastInd "gy" p n g).s ;
|
||||||
|
"kr" => (mkPastInd "k" p n g).s ;
|
||||||
|
"dE" => (mkPastInd "d" p n g).s ;
|
||||||
|
"lE" => (mkPastInd "l" p n g).s ;
|
||||||
|
_ => (mkPastInd root p n g).s };
|
||||||
|
<Imperf,Pers2_Familiar,Sg,Masc> => root + "tE";
|
||||||
|
<Imperf,Pers2_Familiar,Sg,Fem> => root + "ty"; --variants{root+"ty" ; root+"tyN"};
|
||||||
|
<Imperf,Pers2_Familiar,Pl,Masc> => root + "tE";
|
||||||
|
<Imperf,Pers2_Familiar,Pl,Fem> => root+"tyN";
|
||||||
|
<Imperf,Pers2_Respect,Sg,Masc> => root + "tE";
|
||||||
|
<Imperf,Pers2_Respect,Sg,Fem> => root + "ty"; --variants{root+"ty" ; root+"tyN"};
|
||||||
|
<Imperf,Pers2_Respect,Pl,Masc> => root + "tE";
|
||||||
|
<Imperf,Pers2_Respect,Pl,Fem> => root+"tyN";
|
||||||
|
<Imperf,_,Sg,Masc> => root+"ta";
|
||||||
|
<Imperf,_,Sg,Fem> => root+"ty";
|
||||||
|
<Imperf,_,Pl,Masc> => root+"te";
|
||||||
|
<Imperf,_,Pl,Fem> => root+"tyN"
|
||||||
|
}
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPastInd : Str -> UPerson -> Number -> Gender -> {s:Str} = \root,p,n,g ->
|
||||||
|
{s = let roo = root ;
|
||||||
|
a = case (last root) of {
|
||||||
|
"a"|"A"|"w"|"k" => "ya" ;
|
||||||
|
_ => "a"
|
||||||
|
} ;
|
||||||
|
y = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "y^y" ;
|
||||||
|
_ => "y"
|
||||||
|
} ;
|
||||||
|
e = case (last root) of {
|
||||||
|
"a"|"A"|"w"|"k" => "y^E" ;
|
||||||
|
_ => "E"
|
||||||
|
} ;
|
||||||
|
yN = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "y^yN" ;
|
||||||
|
_ => "yN"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
in
|
||||||
|
case <p,n,g> of {
|
||||||
|
<Pers1,Sg,Masc> => roo+a ;
|
||||||
|
<Pers1,Sg,Fem> => roo+y ;
|
||||||
|
<Pers1,Pl,Masc> => roo+e ;
|
||||||
|
<Pers1,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Casual,Sg,Masc> => roo+a ;
|
||||||
|
<Pers2_Casual,Sg,Fem> => roo+y ;
|
||||||
|
<Pers2_Casual,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Casual,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Familiar,Sg,Masc> => roo+e ;
|
||||||
|
<Pers2_Familiar,Sg,Fem> => roo+y; --variants{roo+y ; roo+yN} ;
|
||||||
|
<Pers2_Familiar,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Familiar,Pl,Fem> => roo+yN ;
|
||||||
|
|
||||||
|
<Pers2_Respect,Sg,Masc> => roo+e ;
|
||||||
|
<Pers2_Respect,Sg,Fem> => roo+yN; --variants{roo+yN ; roo+y} ;
|
||||||
|
<Pers2_Respect,Pl,Masc> => roo+e ;
|
||||||
|
<Pers2_Respect,Pl,Fem> => roo+yN ;
|
||||||
|
<_,Sg,Masc> => roo + a;
|
||||||
|
<_,Sg,Fem> => roo+y ;
|
||||||
|
<_,Pl,Masc> => roo + e;
|
||||||
|
<_,Pl,Fem> => roo+yN
|
||||||
|
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkImpert : Str -> UPerson -> Number -> Gender -> {s:Str} = \root,p,n,g ->
|
||||||
|
{s = let roo = root ;
|
||||||
|
w = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "w^" ;
|
||||||
|
_ => "w"
|
||||||
|
} ;
|
||||||
|
yN = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "y^yN" ;
|
||||||
|
_ => "yN"
|
||||||
|
} ;
|
||||||
|
yE = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "y^yE" ;
|
||||||
|
_ => "yE"
|
||||||
|
} ;
|
||||||
|
e = case (last root) of {
|
||||||
|
"a"|"A"|"w" => "y^E" ;
|
||||||
|
_ => "E"
|
||||||
|
} in
|
||||||
|
case <p,n,g> of {
|
||||||
|
<Pers1,_,_> => ""; --nonExist ;
|
||||||
|
<Pers2_Casual,Sg,_> => root ;
|
||||||
|
<Pers2_Casual,Pl,_> => roo+w ;
|
||||||
|
<Pers2_Familiar,_,_> => roo+w ;
|
||||||
|
<Pers2_Respect,Sg,_> => roo+w; --variants{roo+w; roo+yN; roo+yE} ;
|
||||||
|
<Pers2_Respect,Pl,_> => roo+yN; --variants{roo+yN; roo+yE} ;
|
||||||
|
<_,Sg,_> => roo+e ;
|
||||||
|
<_,Pl,_> => roo+yN
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
129
lib/src/hindi/src/StructuralHin.gf
Normal file
129
lib/src/hindi/src/StructuralHin.gf
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
concrete StructuralHin of Structural = CatHin **
|
||||||
|
open MorphoHin, ParadigmsHin, Prelude, NounHin,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
above_Prep = mkPrep "awpr" "awpr" ;
|
||||||
|
after_Prep = mkPrep ["kE bed"] ["kE bed"] ;
|
||||||
|
all_Predet = ss "tmam" ;
|
||||||
|
almost_AdA, almost_AdN = mkAdN "tqryba" ;
|
||||||
|
although_Subj = ss "agrch-" ;
|
||||||
|
always_AdV = ss "hmyXh" ;
|
||||||
|
and_Conj = sd2 [] "awr" ** {n = Pl} ;
|
||||||
|
because_Subj = ss "kywnkh-" ;
|
||||||
|
before_Prep = mkPrep "phlE" "phlE" ;
|
||||||
|
behind_Prep = mkPrep "pych-E" "pych-E" ;
|
||||||
|
between_Prep = mkPrep "drmyaN" "drmyaN" ;
|
||||||
|
both7and_DConj = sd2 "dwnwN" "awr" ** {n = Pl} ;
|
||||||
|
but_PConj = ss "lykn" ;
|
||||||
|
by8agent_Prep = mkPrep "" "" ;
|
||||||
|
by8means_Prep = mkPrep "" "" ;
|
||||||
|
-- can8know_VV,can_VV = mkV "skna" ** { isAux = True} ;
|
||||||
|
during_Prep = mkPrep ["kE drmyaN"] ["kE drmyaN"] ;
|
||||||
|
either7or_DConj = sd2 "kwy ayk" "ya" ** {n = Sg} ;
|
||||||
|
everybody_NP = MassNP (UseN (ParadigmsHin.mkN "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" Masc )); -- not a good way coz need to include NounHin
|
||||||
|
-- every_Det = mkDet "hr" Sg;
|
||||||
|
everything_NP = MassNP (UseN (ParadigmsHin.mkN "hr cyz" "hr cyz" "hr cyzw" "sb cyzyN" "sb cyzwN" "sb cyzw" Masc ));
|
||||||
|
everywhere_Adv = mkAdv "hr jgh" ;
|
||||||
|
-- few_Det = mkDet "cnd" Pl ;
|
||||||
|
first_Ord = {s = "pehla" ; n = Sg} ; --DEPRECATED
|
||||||
|
for_Prep = mkPrep "kylyE" "kylyE" ;
|
||||||
|
from_Prep = mkPrep "sE" "sE" ;
|
||||||
|
he_Pron = personalPN "wh" "as" "" "as ka" Sg Masc Pers3_Distant ;
|
||||||
|
here_Adv = mkAdv "yhaN" ;
|
||||||
|
here7to_Adv = mkAdv "yhaN pr" ;
|
||||||
|
here7from_Adv = mkAdv "yhaN sE" ;
|
||||||
|
how_IAdv = ss "kysE" ;
|
||||||
|
how8many_IDet = makeIDet "ktnE" "ktny" Pl ;
|
||||||
|
if_Subj = ss "agr" ;
|
||||||
|
in8front_Prep = mkPrep ["kE samnE"] ["kE samnE"] ;
|
||||||
|
i_Pron = personalPN "myN" "mjh-" "" "myra" Sg Masc Pers1;
|
||||||
|
in_Prep = mkPrep "meN" "meN" ;
|
||||||
|
it_Pron = personalPN "yh" "yh" "yh" "as ka" Sg Masc Pers3_Near;
|
||||||
|
less_CAdv = {s = "km" ; p = ""} ;
|
||||||
|
-- many_Det = mkDet "bht zyadh" Pl ;
|
||||||
|
more_CAdv = {s = "zyadh-" ; p = "" } ;
|
||||||
|
most_Predet = ss "zyadh tr" ;
|
||||||
|
--much_Det = mkDet "bht" Pl ;
|
||||||
|
-- must_VV = {
|
||||||
|
-- s = table {
|
||||||
|
-- VVF VInf => ["have to"] ;
|
||||||
|
-- VVF VPres => "must" ;
|
||||||
|
-- VVF VPPart => ["had to"] ;
|
||||||
|
-- VVF VPresPart => ["having to"] ;
|
||||||
|
-- VVF VPast => ["had to"] ; --# notpresent
|
||||||
|
-- VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||||
|
-- VVPresNeg => "mustn't"
|
||||||
|
-- } ;
|
||||||
|
-- isAux = True
|
||||||
|
-- } ;
|
||||||
|
-----b no_Phr = ss "no" ;
|
||||||
|
no_Utt = ss "nhyN" ;
|
||||||
|
on_Prep = mkPrep "pr" "pr" ;
|
||||||
|
-- one_Quant = demoPN "ayk" "ayk" "ayk" ; -- DEPRECATED
|
||||||
|
only_Predet = ss "srf" ;
|
||||||
|
or_Conj = sd2 [] "ya" ** {n = Sg} ;
|
||||||
|
otherwise_PConj = ss "ya ph-r" ;
|
||||||
|
part_Prep = mkPrep "" "" ;
|
||||||
|
please_Voc = ss "mhrbani" ;
|
||||||
|
possess_Prep = mkPrep "ka" "ky" ;
|
||||||
|
quite_Adv = ss "khamosh" ;
|
||||||
|
she_Pron = personalPN "wh" "as" "wh" "as ky" Sg Fem Pers3_Distant ;
|
||||||
|
so_AdA = ss "so" ;
|
||||||
|
somebody_NP = MassNP (UseN (ParadigmsHin.mkN "kwy" "kwy" "kwy" "kwy" "kwy" "kwy" Masc ));
|
||||||
|
--someSg_Det = mkDet "kch-" Sg ;
|
||||||
|
--somePl_Det = mkDet "kch-" Pl ;
|
||||||
|
something_NP = MassNP (UseN (ParadigmsHin.mkN "kwy cyz" "kwy cyz" "kwy cyz" "kh- cyzyN" "kh- cyzwN" "kh- cyzw" Masc ));
|
||||||
|
somewhere_Adv = mkAdv "khin pr" ;
|
||||||
|
that_Quant = demoPN "wh" "as" "an" ;
|
||||||
|
that_Subj = ss "kh";
|
||||||
|
there_Adv = mkAdv "whaN" ;
|
||||||
|
there7to_Adv = mkAdv "whaN pr" ;
|
||||||
|
there7from_Adv = mkAdv ["whaN sE"] ;
|
||||||
|
therefore_PConj = ss "as lyE" ;
|
||||||
|
they_Pron = personalPN "wh" "wh" "wh" "an ka" Pl Masc Pers3_Distant ; ----
|
||||||
|
this_Quant = demoPN "yh" "as" "an";
|
||||||
|
through_Prep = mkPrep ["myN sE"] ["myN sE"] ;
|
||||||
|
too_AdA = ss "bht" ;
|
||||||
|
to_Prep = mkPrep "kw" "kw" ;
|
||||||
|
under_Prep = mkPrep "nycE" "nycE" ;
|
||||||
|
very_AdA = ss "bht" ;
|
||||||
|
-- want_VV = mkV "cahna" ** { isAux = False} ;
|
||||||
|
we_Pron = personalPN "hm" "hm" "hm" "hmara" Pl Masc Pers1 ;
|
||||||
|
whatSg_IP = mkIP "kya" "kis" "kis" Sg Masc ;
|
||||||
|
whatPl_IP = mkIP "kya" "kin" "kin" Pl Masc ;
|
||||||
|
when_IAdv = ss "kb" ;
|
||||||
|
when_Subj = ss "kb" ;
|
||||||
|
where_IAdv = ss "khaN" ;
|
||||||
|
which_IQuant = {s = \\_ => "kwn sy"} ;
|
||||||
|
-- whichPl_IDet = makeDet "kwn sa" "kwn sy" "kwn sE" "kwn sy" ;
|
||||||
|
-- whichSg_IDet = makeDet "kwn sa" "kwn sy" "kwn sE" "kwn sy" ;
|
||||||
|
whoSg_IP = mkIP "kwn" "kis" "kis" Sg Masc ;
|
||||||
|
whoPl_IP = mkIP "kwn" "kn" "knhwN" Pl Masc ;
|
||||||
|
why_IAdv = ss "kywN" ;
|
||||||
|
without_Prep = mkPrep ["kE bGyr"] ["kE bGyr"] ;
|
||||||
|
with_Prep = mkPrep ["kE sath-"] ["kE sath-"] ;
|
||||||
|
-- yes_Phr = ss "haN" ;
|
||||||
|
yes_Utt = ss "haN" ;
|
||||||
|
youSg_Pron = personalPN "tm" "tm" "tm" "tmh-ara" Sg Masc Pers2_Casual ;
|
||||||
|
youPl_Pron = personalPN "tm" "tm" "tm" "tmh-ara" Pl Masc Pers2_Casual ;
|
||||||
|
youPol_Pron = personalPN "Ap" "AP" "AP" "Ap ka" Sg Masc Pers2_Respect ;
|
||||||
|
no_Quant = demoPN " kwy nhyN" "kwy nhyN" "kwy nhyN" ;
|
||||||
|
not_Predet = {s="nhyN"} ;
|
||||||
|
if_then_Conj = sd2 "agr" "tw" ** {n = Sg} ;
|
||||||
|
at_least_AdN = mkAdN ["km az km"] ;
|
||||||
|
at_most_AdN = mkAdN ["zyadh sE zyadh"];
|
||||||
|
nothing_NP = MassNP (UseN (ParadigmsHin.mkN "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" Masc ));
|
||||||
|
except_Prep = mkPrep "swaE" "swaE" ;
|
||||||
|
nobody_NP = MassNP (UseN (ParadigmsHin.mkN "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" Masc ));
|
||||||
|
|
||||||
|
as_CAdv = {s = "etna" ; p = "jtna"} ;
|
||||||
|
|
||||||
|
have_V2 = mkV2 (mkV "rakh-na") "" ;
|
||||||
|
|
||||||
|
language_title_Utt = ss "ardw" ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
11
lib/src/hindi/translit.gfs
Normal file
11
lib/src/hindi/translit.gfs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
rf -file=../hindustani/CommonHindustani.gf | ps -env=quotes -to_devanagari | wf -file=CommonHindustani.gf
|
||||||
|
rf -file=../hindustani/ExtraHindustani.gf | ps -env=quotes -to_devanagari | wf -file=ExtraHindustani.gf
|
||||||
|
rf -file=../hindustani/ResHindustani.gf | ps -env=quotes -to_devanagari | wf -file=ResHindustani.gf
|
||||||
|
rf -file=../hindustani/StringsHindustani.gf | ps -env=quotes -to_devanagari | wf -file=StringsHindustani.gf
|
||||||
|
rf -file=src/DiffHin.gf | ps -env=quotes -to_devanagari | wf -file=DiffHin.gf
|
||||||
|
rf -file=src/ExtraHin.gf | ps -env=quotes -to_devanagari | wf -file=ExtraHin.gf
|
||||||
|
rf -file=src/IdiomHin.gf | ps -env=quotes -to_devanagari | wf -file=IdiomHin.gf
|
||||||
|
rf -file=src/LexiconHin.gf | ps -env=quotes -to_devanagari | wf -file=LexiconHin.gf
|
||||||
|
rf -file=src/MorphoHin.gf | ps -env=quotes -to_devanagari | wf -file=MorphoHin.gf
|
||||||
|
rf -file=src/StructuralHin.gf | ps -env=quotes -to_devanagari | wf -file=StructuralHin.gf
|
||||||
|
|
||||||
38
lib/src/hindustani/AdjectiveHindustani.gf
Normal file
38
lib/src/hindustani/AdjectiveHindustani.gf
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
incomplete concrete AdjectiveHindustani of Adjective = CatHindustani ** open CommonHindustani,ResHindustani, StringsHindustani, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
PositA a = a ;
|
||||||
|
UseComparA a = a;
|
||||||
|
|
||||||
|
ComparA a np = {
|
||||||
|
s = \\n,g,c,d => np.s ! NPC Obl ++ sE ++ a.s ! n ! g ! c ! d ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
|
ComplA2 a np = {
|
||||||
|
s = \\n,g,c,d => np.s ! NPC Obl ++ a.c2 ++ a.s ! n ! g ! c ! d ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ReflA2 a = {
|
||||||
|
s = \\n,g,c,d => a.s ! n ! g ! c ! d ++ RefPron ++ sE ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SentAP ap sc = {
|
||||||
|
s = \\n,g,c,d => ap.s ! n ! g ! c ! d ++ sc.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdAP ada ap = {
|
||||||
|
s = \\n,g,c,d => ada.s ++ ap.s ! n ! g ! c ! d ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseA2 a = a ;
|
||||||
|
|
||||||
|
CAdvAP cadv ap np = {
|
||||||
|
s = \\n,g,c,d => cadv.s ++ ap.s ! n ! g ! c ! d ++ cadv.p ++ np.s ! NPC Dir ;
|
||||||
|
};
|
||||||
|
|
||||||
|
AdjOrd ord = { s = \\_,_,_,_ => ord.s ; };
|
||||||
|
|
||||||
|
}
|
||||||
20
lib/src/hindustani/AdverbHindustani.gf
Normal file
20
lib/src/hindustani/AdverbHindustani.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
incomplete concrete AdverbHindustani of Adverb = CatHindustani ** open CommonHindustani, ResHindustani, StringsHindustani, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PositAdvAdj a = {s = \\g => a.s ! Sg ! g ! Obl ! Posit} ;
|
||||||
|
ComparAdvAdj cadv a np = {
|
||||||
|
s = \\g => np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit;
|
||||||
|
} ;
|
||||||
|
ComparAdvAdjS cadv a s = {
|
||||||
|
s = \\g => cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ! Posit ++ s.s;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PrepNP prep np = {s = \\g => np.s ! NPObj ++ prep.s ! g } ;
|
||||||
|
|
||||||
|
AdAdv ada adv = { s = \\g => ada.s ++ adv.s ! g} ;
|
||||||
|
|
||||||
|
SubjS sub s = {s = \\_ => sub.s ++ s.s } ;
|
||||||
|
|
||||||
|
AdnCAdv cadv = {s = sE ++ cadv.s ; p = True} ;
|
||||||
|
|
||||||
|
}
|
||||||
92
lib/src/hindustani/CatHindustani.gf
Normal file
92
lib/src/hindustani/CatHindustani.gf
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
--concrete CatUrd of Cat = CommonX - [Adv,AdN] ** open ResUrd, Prelude in {
|
||||||
|
incomplete concrete CatHindustani of Cat =
|
||||||
|
CommonX - [Adv,AdN]** open ResHindustani, Prelude, CommonHindustani, (R = ParamX) in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
------ Tensed/Untensed
|
||||||
|
|
||||||
|
S = {s : Str} ;
|
||||||
|
QS = {s : QForm => Str} ;
|
||||||
|
RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
||||||
|
SSlash = {s : Str ; c2 : ResHindustani.Compl} ;
|
||||||
|
|
||||||
|
---- Sentence
|
||||||
|
|
||||||
|
Cl = ResHindustani.Clause ;
|
||||||
|
ClSlash = {
|
||||||
|
s : CommonHindustani.VPHTense => Polarity => Order => Str ;
|
||||||
|
c2 : ResHindustani.Compl
|
||||||
|
} ;
|
||||||
|
Imp = {s : CPolarity => ImpForm => Str} ;
|
||||||
|
|
||||||
|
---- Question
|
||||||
|
QCl = {s : CommonHindustani.VPHTense => Polarity => QForm => Str} ;
|
||||||
|
IP = {s: Case => Str ; g : Gender ; n : Number};
|
||||||
|
IDet = {s :Gender => Str ; n : Number} ;
|
||||||
|
IQuant = {s : Number => Str} ;
|
||||||
|
|
||||||
|
---- Relative
|
||||||
|
|
||||||
|
RCl = {
|
||||||
|
s : CommonHindustani.VPHTense => Polarity => Order => Agr => Str ;
|
||||||
|
c : Case
|
||||||
|
} ;
|
||||||
|
RP = {s: Number => Case => Str ; a:RAgr};
|
||||||
|
|
||||||
|
---- Verb
|
||||||
|
|
||||||
|
VP = VPH ;
|
||||||
|
VPSlash = ResHindustani.VPHSlash ;
|
||||||
|
Comp = {s : Agr => Str} ;
|
||||||
|
---- Adverb
|
||||||
|
Adv = {s : Gender => Str } ;
|
||||||
|
|
||||||
|
----- AdN
|
||||||
|
AdN = {s : Str ; p : Bool} ;
|
||||||
|
|
||||||
|
---- Adjective
|
||||||
|
|
||||||
|
AP = CommonHindustani.Adjective ;
|
||||||
|
|
||||||
|
---- Noun
|
||||||
|
|
||||||
|
CN = ResHindustani.Noun ;
|
||||||
|
NP = CommonHindustani.NP ;
|
||||||
|
Pron = {s : Case => Str ; ps : Str ; a : Agr};
|
||||||
|
Det = ResHindustani.Determiner ;
|
||||||
|
Predet = {s : Str} ;
|
||||||
|
Num = {s : Str ; n : Number} ;
|
||||||
|
Card = {s : Str; n : Number} ;
|
||||||
|
Ord = {s : Str; n : Number} ;
|
||||||
|
Quant = {s:Number => Gender => Case => Str ; a:Agr};
|
||||||
|
Art = {s : Str} ;
|
||||||
|
|
||||||
|
---- Numeral
|
||||||
|
|
||||||
|
Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Digits = {s : CardOrd => Str ; n : Number } ;
|
||||||
|
|
||||||
|
---- Structural
|
||||||
|
|
||||||
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
|
-----b Conj = {s : Str ; n : Number} ;
|
||||||
|
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
||||||
|
Subj = {s : Str} ;
|
||||||
|
Prep = ResHindustani.Preposition;
|
||||||
|
---- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
|
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
||||||
|
V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ;
|
||||||
|
V3 = Verb ** {c2, c3 : Str} ;
|
||||||
|
VV = Verb ** { isAux : Bool} ;
|
||||||
|
V2V = Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
|
||||||
|
A = CommonHindustani.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
||||||
|
A2 = {s : Number => Gender => Case => Degree => Str ; c2 : Str} ;
|
||||||
|
N = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str } ;
|
||||||
|
N3 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str ; c4 : Str} ;
|
||||||
|
PN = {s : Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
}
|
||||||
309
lib/src/hindustani/CommonHindustani.gf
Normal file
309
lib/src/hindustani/CommonHindustani.gf
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
--
|
||||||
|
--1 Hindustaniu auxiliary operations.
|
||||||
|
--
|
||||||
|
-- This module contains operations that are needed to make the
|
||||||
|
-- resource syntax work.
|
||||||
|
resource CommonHindustani = ParamX ** open Prelude,Predef in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
VPH = {
|
||||||
|
s : VPHForm => {fin, inf : Str} ;
|
||||||
|
obj : {s : Str ; a : Agr} ;
|
||||||
|
subj : VType ;
|
||||||
|
comp : Agr => Str;
|
||||||
|
inf : Str;
|
||||||
|
ad : Str;
|
||||||
|
embComp : Str ;
|
||||||
|
prog : Bool ;
|
||||||
|
} ;
|
||||||
|
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||||
|
param
|
||||||
|
VPHForm =
|
||||||
|
VPTense VPPTense Agr -- 9 * 12
|
||||||
|
| VPReq
|
||||||
|
| VPImp
|
||||||
|
| VPReqFut
|
||||||
|
| VPInf
|
||||||
|
| VPStem
|
||||||
|
;
|
||||||
|
VPPTense =
|
||||||
|
VPPres
|
||||||
|
|VPPast
|
||||||
|
|VPFutr
|
||||||
|
|VPPerf;
|
||||||
|
|
||||||
|
VPHTense =
|
||||||
|
VPGenPres -- impf hum nahim "I go"
|
||||||
|
| VPImpPast -- impf Ta nahim "I went"
|
||||||
|
| VPFut -- fut na/nahim "I shall go"
|
||||||
|
| VPContPres -- stem raha hum nahim "I am going"
|
||||||
|
| VPContPast -- stem raha Ta nahim "I was going"
|
||||||
|
| VPContFut
|
||||||
|
| VPPerfPres -- perf hum na/nahim "I have gone"
|
||||||
|
| VPPerfPast -- perf Ta na/nahim "I had gone"
|
||||||
|
| VPPerfFut
|
||||||
|
| VPPerfPresCont
|
||||||
|
| VPPerfPastCont
|
||||||
|
| VPPerfFutCont
|
||||||
|
| VPSubj -- subj na "I may go"
|
||||||
|
;
|
||||||
|
Agr = Ag Gender Number UPerson ;
|
||||||
|
Gender = Masc | Fem ;
|
||||||
|
Case = Dir | Obl | Voc ;
|
||||||
|
UPerson = Pers1
|
||||||
|
| Pers2_Casual
|
||||||
|
| Pers2_Familiar
|
||||||
|
| Pers2_Respect
|
||||||
|
| Pers3_Near
|
||||||
|
| Pers3_Distant;
|
||||||
|
VType = VIntrans | VTrans | VTransPost ;
|
||||||
|
VerbForm = VF VTense UPerson Number Gender
|
||||||
|
| Inf
|
||||||
|
| Root
|
||||||
|
| Inf_Obl
|
||||||
|
| Inf_Fem;
|
||||||
|
VTense = Subj | Perf | Imperf;
|
||||||
|
CTense = CPresent | CPast | CFuture ;
|
||||||
|
NPCase = NPC Case | NPObj | NPErg ;
|
||||||
|
Order = ODir | OQuest ;
|
||||||
|
|
||||||
|
|
||||||
|
oper
|
||||||
|
copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g ->
|
||||||
|
case <t,n,p,g> of {
|
||||||
|
<CPresent,Sg,Pers1,_ > => "hwN" ;
|
||||||
|
<CPresent,Sg,Pers2_Casual,_ > => "hE" ;
|
||||||
|
<CPresent,Sg,Pers2_Familiar,_ > => "hw" ;
|
||||||
|
<CPresent,Sg,Pers2_Respect,_ > => "hyN" ;
|
||||||
|
<CPresent,Sg,Pers3_Near,_ > => "hE" ;
|
||||||
|
<CPresent,Sg,Pers3_Distant,_ > => "hE" ;
|
||||||
|
<CPresent,Pl,Pers1,_ > => "hyN" ;
|
||||||
|
<CPresent,Pl,Pers2_Casual,_ > => "hw" ;
|
||||||
|
<CPresent,Pl,Pers2_Familiar,_ > => "hw" ;
|
||||||
|
<CPresent,Pl,Pers2_Respect,_ > => "hyN" ;
|
||||||
|
<CPresent,Pl,Pers3_Near,_ > => "hyN" ;
|
||||||
|
<CPresent,Pl,Pers3_Distant,_ > => "hyN" ;
|
||||||
|
<CPast,Sg,Pers1,Masc > => "th-a" ;
|
||||||
|
<CPast,Sg,Pers1,Fem > => "th-y" ;
|
||||||
|
<CPast,Sg,Pers2_Casual,Masc > => "th-a" ;
|
||||||
|
<CPast,Sg,Pers2_Casual,Fem > => "th-y" ;
|
||||||
|
<CPast,Sg,Pers2_Familiar,Masc > => "th-a" ;
|
||||||
|
<CPast,Sg,Pers2_Familiar,Fem > => "th-y" ;
|
||||||
|
<CPast,Sg,Pers2_Respect,Masc > => "th-E" ;
|
||||||
|
<CPast,Sg,Pers2_Respect,Fem > => "th-yN" ;
|
||||||
|
<CPast,Sg,Pers3_Near,Masc > => "th-a" ;
|
||||||
|
<CPast,Sg,Pers3_Near,Fem > => "th-y" ;
|
||||||
|
<CPast,Sg,Pers3_Distant,Masc > => "th-a" ;
|
||||||
|
<CPast,Sg,Pers3_Distant,Fem > => "th-y" ;
|
||||||
|
<CPast,Pl,Pers1,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers1,Fem > => "th-yN" ;
|
||||||
|
<CPast,Pl,Pers2_Casual,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers2_Casual,Fem > => "th-yN" ;
|
||||||
|
<CPast,Pl,Pers2_Familiar,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers2_Familiar,Fem > => "th-yN" ;
|
||||||
|
<CPast,Pl,Pers2_Respect,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers2_Respect,Fem > => "th-yN" ;
|
||||||
|
<CPast,Pl,Pers3_Near,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers3_Near,Fem > => "th-yN" ;
|
||||||
|
<CPast,Pl,Pers3_Distant,Masc > => "th-E" ;
|
||||||
|
<CPast,Pl,Pers3_Distant,Fem > => "th-yN" ;
|
||||||
|
<CFuture,Sg,Pers1,Masc > => "ga" ;
|
||||||
|
<CFuture,Sg,Pers1,Fem > => "gy" ;
|
||||||
|
<CFuture,Sg,Pers2_Casual,Masc > => "ga" ;
|
||||||
|
<CFuture,Sg,Pers2_Casual,Fem > => "gy" ;
|
||||||
|
<CFuture,Sg,Pers2_Familiar,Masc > => "gE" ;
|
||||||
|
<CFuture,Sg,Pers2_Familiar,Fem > => "gy" ;
|
||||||
|
<CFuture,Sg,Pers2_Respect,Masc > => "gE" ;
|
||||||
|
<CFuture,Sg,Pers2_Respect,Fem > => "gy" ;
|
||||||
|
<CFuture,Sg,Pers3_Near,Masc > => "ga" ;
|
||||||
|
<CFuture,Sg,Pers3_Near,Fem > => "gy" ;
|
||||||
|
<CFuture,Sg,Pers3_Distant,Masc > => "ga" ;
|
||||||
|
<CFuture,Sg,Pers3_Distant,Fem > => "gy" ;
|
||||||
|
<CFuture,Pl,Pers1,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers1,Fem > => "gy" ;
|
||||||
|
<CFuture,Pl,Pers2_Casual,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers2_Casual,Fem > => "gy" ;
|
||||||
|
<CFuture,Pl,Pers2_Familiar,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers2_Familiar,Fem > => "gy" ;
|
||||||
|
<CFuture,Pl,Pers2_Respect,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers2_Respect,Fem > => "gy" ;
|
||||||
|
<CFuture,Pl,Pers3_Near,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers3_Near,Fem > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers3_Distant,Masc > => "gE" ;
|
||||||
|
<CFuture,Pl,Pers3_Distant,Fem > => "gy"
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
|
raha : Gender -> Number -> Str = \g,n ->
|
||||||
|
(regAdjective "rha").s ! n ! g ! Dir ! Posit ;
|
||||||
|
|
||||||
|
cka : Gender -> Number -> Str = \g,n ->
|
||||||
|
(regAdjective "cka").s ! n ! g ! Dir ! Posit ;
|
||||||
|
|
||||||
|
hw : UPerson -> Number -> Str = \pp,n ->
|
||||||
|
case <pp,n> of {
|
||||||
|
<Pers1,_> => "hwN";
|
||||||
|
<_,Pl> => "hwN";
|
||||||
|
<_,_> => "hw"
|
||||||
|
};
|
||||||
|
|
||||||
|
-----------------------------------------------
|
||||||
|
-- Hindustani Adjectives
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
Adjective = { s: Number => Gender => Case => Degree => Str };
|
||||||
|
regAdjective : Str -> Adjective;
|
||||||
|
regAdjective x = case x of {
|
||||||
|
acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sab sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
||||||
|
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y")
|
||||||
|
(acch +"E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
||||||
|
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y");
|
||||||
|
|
||||||
|
_ => mkAdjective x x x x x x x x x
|
||||||
|
x x x x x x x x x
|
||||||
|
x x x x x x x x x
|
||||||
|
x x x x x x x x x
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
mkAdjective : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36:Str) -> Adjective =
|
||||||
|
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,y31,y32,y33,y34,y35,y36 -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => table {
|
||||||
|
Posit => y1 ;
|
||||||
|
Compar => y2 ;
|
||||||
|
Superl => y3
|
||||||
|
};
|
||||||
|
Obl => table {
|
||||||
|
Posit => y4 ;
|
||||||
|
Compar => y5 ;
|
||||||
|
Superl => y6
|
||||||
|
};
|
||||||
|
Voc => table {
|
||||||
|
Posit => y7 ;
|
||||||
|
Compar => y8 ;
|
||||||
|
Superl => y9
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => table {
|
||||||
|
Posit => y10 ;
|
||||||
|
Compar => y11 ;
|
||||||
|
Superl => y12
|
||||||
|
};
|
||||||
|
Obl => table {
|
||||||
|
Posit => y13 ;
|
||||||
|
Compar => y14 ;
|
||||||
|
Superl => y15
|
||||||
|
};
|
||||||
|
Voc => table {
|
||||||
|
Posit => y16 ;
|
||||||
|
Compar => y17 ;
|
||||||
|
Superl => y18
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Masc => table {
|
||||||
|
Dir => table {
|
||||||
|
Posit => y19 ;
|
||||||
|
Compar => y20 ;
|
||||||
|
Superl => y21
|
||||||
|
};
|
||||||
|
Obl => table {
|
||||||
|
Posit => y22 ;
|
||||||
|
Compar => y23 ;
|
||||||
|
Superl => y24
|
||||||
|
};
|
||||||
|
Voc => table {
|
||||||
|
Posit => y25 ;
|
||||||
|
Compar => y26 ;
|
||||||
|
Superl => y27
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Fem => table {
|
||||||
|
Dir => table {
|
||||||
|
Posit => y28 ;
|
||||||
|
Compar => y29 ;
|
||||||
|
Superl => y30
|
||||||
|
};
|
||||||
|
Obl => table {
|
||||||
|
Posit => y31 ;
|
||||||
|
Compar => y32 ;
|
||||||
|
Superl => y33
|
||||||
|
};
|
||||||
|
Voc => table {
|
||||||
|
Posit => y34 ;
|
||||||
|
Compar => y35 ;
|
||||||
|
Superl => y36
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Verb : Type = {s : VerbForm => Str} ;
|
||||||
|
|
||||||
|
predV : Verb -> VPH ;
|
||||||
|
predV v = {
|
||||||
|
s = \\vh =>
|
||||||
|
case vh of {
|
||||||
|
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = v.s ! VF Imperf p n g } ;
|
||||||
|
VPTense VPPast (Ag g n p) => {fin = [] ; inf =v.s ! VF Perf p n g} ;
|
||||||
|
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = v.s ! VF Subj p n g } ;
|
||||||
|
VPTense VPPerf (Ag g n p) => { fin = [] ; inf = v.s ! Root ++ cka g n } ;
|
||||||
|
VPStem => {fin = [] ; inf = v.s ! Root};
|
||||||
|
_ => {fin = [] ; inf = v.s ! Root}
|
||||||
|
};
|
||||||
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
inf = v.s ! Inf;
|
||||||
|
ad = [];
|
||||||
|
embComp = [];
|
||||||
|
prog = False ;
|
||||||
|
comp = \\_ => []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
defaultAgr : Agr = agrP3 Masc Sg ;
|
||||||
|
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
||||||
|
toAgr : Number -> UPerson -> Gender -> Agr = \n,p,g ->
|
||||||
|
Ag g n p;
|
||||||
|
|
||||||
|
|
||||||
|
fromAgr : Agr -> {n : Number ; p : UPerson ; g : Gender} = \a -> case a of {
|
||||||
|
Ag g n p => {n = n ; p = p ; g = g}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||||
|
let a = fromAgr a0 ; b = fromAgr b0
|
||||||
|
in
|
||||||
|
toAgr
|
||||||
|
(conjNumber a.n b.n)
|
||||||
|
b.p a.g;
|
||||||
|
|
||||||
|
giveNumber : Agr -> Number =\a -> case a of {
|
||||||
|
Ag _ n _ => n
|
||||||
|
};
|
||||||
|
giveGender : Agr -> Gender =\a -> case a of {
|
||||||
|
Ag g _ _ => g
|
||||||
|
};
|
||||||
|
insertSubj : UPerson -> Str -> Str = \p,s ->
|
||||||
|
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
||||||
|
|
||||||
|
mkOrd : Str -> Str =
|
||||||
|
\s -> case s of {
|
||||||
|
"ayk" => "phla";
|
||||||
|
"dw" => "dwsra";
|
||||||
|
"tyN" => "tesra";
|
||||||
|
"car" => "cwth'a";
|
||||||
|
"ch'" => "ch'Ta";
|
||||||
|
_ => s ++ "waN"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
44
lib/src/hindustani/ConjunctionHindustani.gf
Normal file
44
lib/src/hindustani/ConjunctionHindustani.gf
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
incomplete concrete ConjunctionHindustani of Conjunction =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, Coordination, Prelude in {
|
||||||
|
|
||||||
|
--concrete ConjunctionUrd of Conjunction =
|
||||||
|
-- CatUrd ** open ResUrd, Coordination, Prelude in {
|
||||||
|
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
ConjS = conjunctDistrSS ;
|
||||||
|
|
||||||
|
ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
||||||
|
|
||||||
|
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
||||||
|
a = conjAgr (agrP3 Masc conj.n) ss.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjAP conj ss = conjunctDistrTable4 Number Gender Case Degree conj ss ;
|
||||||
|
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||||
|
|
||||||
|
---- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
|
BaseS = twoSS ;
|
||||||
|
ConsS = consrSS comma ;
|
||||||
|
BaseAdv x y = twoTable Gender x y ;
|
||||||
|
ConsAdv xs x = consrTable Gender comma xs x ;
|
||||||
|
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a} ;
|
||||||
|
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||||
|
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||||
|
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
||||||
|
BaseAP x y = twoTable4 Number Gender Case Degree x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
||||||
|
ConsAP xs x = consrTable4 Number Gender Case Degree comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[S] = {s1,s2 : Str} ;
|
||||||
|
[Adv] = {s1,s2 : Gender => Str} ;
|
||||||
|
[NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
|
||||||
|
[AP] = {s1,s2 : Number => Gender => Case => Degree => Str} ;
|
||||||
|
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
||||||
|
|
||||||
|
}
|
||||||
8
lib/src/hindustani/DiffHindustani.gf
Normal file
8
lib/src/hindustani/DiffHindustani.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
interface DiffHindustani = open CommonHindustani, Prelude in {
|
||||||
|
oper
|
||||||
|
|
||||||
|
mkClause : NP -> VPH -> Clause ;
|
||||||
|
mkSClause : Str -> Agr -> VPH -> Clause ;
|
||||||
|
|
||||||
|
np2pronCase : (Case => Str) -> NPCase -> Agr -> Str ;
|
||||||
|
}
|
||||||
18
lib/src/hindustani/ExtraHindustani.gf
Normal file
18
lib/src/hindustani/ExtraHindustani.gf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
--concrete ExtraUrd of ExtraUrdAbs = CatUrd **
|
||||||
|
-- open ResUrd, Coordination, Prelude, MorphoUrd, ParadigmsUrd in {
|
||||||
|
incomplete concrete ExtraHindustani of ExtraHindustaniAbs = CatHindustani **
|
||||||
|
open CommonHindustani,Coordination,ResHindustani, ParamX in {
|
||||||
|
lin
|
||||||
|
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
||||||
|
|
||||||
|
each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
|
||||||
|
have_V = mkV "rakh-na";
|
||||||
|
IAdvAdv adv = {s = "ktny" ++ adv.s} ;
|
||||||
|
ICompAP ap = {s = "ktnE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||||
|
cost_V = mkV "qymt" ;
|
||||||
|
|
||||||
|
-- added for causitives
|
||||||
|
make_CV = mkVerb "nothing" ** {c2 = "" };
|
||||||
|
|
||||||
|
-- for VP conjunction
|
||||||
|
}
|
||||||
9
lib/src/hindustani/ExtraHindustaniAbs.gf
Normal file
9
lib/src/hindustani/ExtraHindustaniAbs.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
abstract ExtraHindustaniAbs = Extra ** {
|
||||||
|
|
||||||
|
-- uncontracted negations; contracted are the default
|
||||||
|
fun
|
||||||
|
|
||||||
|
each_Det : Det ;
|
||||||
|
have_V : V;
|
||||||
|
cost_V : V;
|
||||||
|
}
|
||||||
135
lib/src/hindustani/NounHindustani.gf
Normal file
135
lib/src/hindustani/NounHindustani.gf
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
--concrete NounUrd of Noun = CatUrd ** open ResUrd, Prelude in {
|
||||||
|
incomplete concrete NounHindustani of Noun =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, StringsHindustani, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
DetCN det cn = {
|
||||||
|
s = \\c => detcn2NP det cn c det.n ;
|
||||||
|
a = agrP3 cn.g det.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ;
|
||||||
|
UsePron p = {s = \\c => np2pronCase p.s c p.a ; a = p.a} ;
|
||||||
|
|
||||||
|
PredetNP pred np = {
|
||||||
|
s = \\c => pred.s ++ np.s ! c ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PPartNP np v2 = {
|
||||||
|
s = \\c => v2.s ! VF Imperf Pers1 Sg Fem ++ np.s ! c ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelNP np rs = {
|
||||||
|
s = \\c => np.s ! c ++ comma ++ rs.s ! np.a ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
n = num.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetQuant quant num = {
|
||||||
|
-- s = \\c => detquant2det quant.s num.s c;
|
||||||
|
s = \\n,g => quant.s!n!g!Dir ++ num.s;
|
||||||
|
n = num.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetNP det = {
|
||||||
|
s = \\c => det2NP det c ; ---- case
|
||||||
|
a = agrP3 Masc Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPron p = {s = \\_,_,_ => p.ps ; a = p.a} ;
|
||||||
|
|
||||||
|
NumSg = {s = []; n = Sg} ;
|
||||||
|
NumPl = {s = []; n = Pl} ;
|
||||||
|
|
||||||
|
NumCard n = n ** {hasCard = True} ;
|
||||||
|
|
||||||
|
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||||
|
OrdDigits n = {s = n.s ! NOrd; n = n.n} ;
|
||||||
|
|
||||||
|
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
||||||
|
OrdNumeral numeral = {s = numeral.s ! NOrd ; n = numeral.n} ;
|
||||||
|
|
||||||
|
AdNum adn num = {s = case adn.p of {False => adn.s ++ num.s ; True => num.s ++ adn.s}; n = num.n} ;
|
||||||
|
|
||||||
|
OrdSuperl a = {s = a.s ! Sg ! Masc ! Dir ! Superl ; n = Sg} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DetArtSg art cn = {
|
||||||
|
s = \\c => art.s ++ toNP (cn.s ! Sg) c ;
|
||||||
|
a = agrP3 cn.g Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetArtPl art cn = {
|
||||||
|
s = \\c => art.s ++ toNP (cn.s ! Pl) c ;
|
||||||
|
a = agrP3 cn.g Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DefArt = {s = \\_,_,_ => [] ; a = defaultAgr} ;
|
||||||
|
IndefArt = {s = \\_,_,_ => [] ; a =defaultAgr } ;
|
||||||
|
|
||||||
|
MassNP cn = {s = \\c => toNP (cn.s ! Sg) c ; a = agrP3 cn.g Sg} ;
|
||||||
|
|
||||||
|
UseN n = n ;
|
||||||
|
UseN2 n = { s = n.s ; g = n.g };
|
||||||
|
|
||||||
|
Use2N3 f = {
|
||||||
|
s = f.s;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c2;
|
||||||
|
c3 = f.c3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Use3N3 f = {
|
||||||
|
s = f.s ;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c2;
|
||||||
|
c3 = f.c3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplN2 f x = {s = \\n,c => case c of {
|
||||||
|
Dir => x.s ! NPC c ++ f.c2 ++ f.s ! n ! c ;
|
||||||
|
Obl => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c ;
|
||||||
|
CommonHindustani.Voc => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c
|
||||||
|
};
|
||||||
|
g = f.g;
|
||||||
|
};
|
||||||
|
ComplN3 f x = {
|
||||||
|
s = \\n,c => x.s ! NPObj ++ f.c4 ++ f.s ! n ! Dir ;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c2;
|
||||||
|
c3 = f.c3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjCN ap cn = {
|
||||||
|
s = \\n,c => ap.s ! n ! cn.g ! c ! Posit ++ cn.s ! n ! c ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelCN cn rs = {
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ rs.s ! agrP3 cn.g n ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ; -- changed during WebAlt adver comes before noun like phaRy pr gh-r (house on the hill)
|
||||||
|
AdvCN cn ad = {s = \\n,c => ad.s ! cn.g ++ cn.s ! n ! c ; g = cn.g} ;
|
||||||
|
|
||||||
|
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||||
|
|
||||||
|
ApposCN cn np = {s = \\n,c => cn.s ! n ! Dir ++ np.s ! NPC c ; g = cn.g} ;
|
||||||
|
|
||||||
|
}
|
||||||
29
lib/src/hindustani/PhraseHindustani.gf
Normal file
29
lib/src/hindustani/PhraseHindustani.gf
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
--concrete PhraseUrd of Phrase = CatUrd ** open Prelude, ResUrd in {
|
||||||
|
incomplete concrete PhraseHindustani of Phrase =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|
||||||
|
UttS s = s ;
|
||||||
|
UttQS qs = {s = qs.s ! QDir} ;
|
||||||
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
||||||
|
UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
|
||||||
|
UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
||||||
|
|
||||||
|
UttIP ip = {s = ip.s ! Dir} ; --- Acc also
|
||||||
|
UttIAdv iadv = iadv ;
|
||||||
|
UttNP np = {s = np.s ! NPC Dir} ;
|
||||||
|
UttVP vp = {s = infVP False vp (agrP3 Masc Sg)} ;
|
||||||
|
UttAdv adv = {s = adv.s ! Masc} ;
|
||||||
|
UttCN cn = {s = cn.s ! Sg ! Dir};
|
||||||
|
UttCard n = n ;
|
||||||
|
UttAP ap = {s = ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||||
|
|
||||||
|
NoPConj = {s = []} ;
|
||||||
|
PConjConj conj = {s = conj.s2} ; ---
|
||||||
|
|
||||||
|
NoVoc = {s = []} ;
|
||||||
|
VocNP np = {s = np.s ! NPC Dir} ;
|
||||||
|
|
||||||
|
}
|
||||||
78
lib/src/hindustani/QuestionHindustani.gf
Normal file
78
lib/src/hindustani/QuestionHindustani.gf
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
--concrete QuestionUrd of Question = CatUrd ** open ResUrd, StringsHindustani, Prelude in {
|
||||||
|
incomplete concrete QuestionHindustani of Question =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, StringsHindustani, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
QuestCl cl = {
|
||||||
|
s = \\t,p,qf => case qf of {
|
||||||
|
QDir => cl.s ! t ! p ! OQuest;
|
||||||
|
QIndir => agr ++ cl.s ! t! p ! ODir
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
QuestVP qp vp =
|
||||||
|
let cl = mkSClause [] (Ag qp.g qp.n Pers3_Near) vp;
|
||||||
|
qp1 = qp.s ! Dir;
|
||||||
|
qp2 = qp.s ! Obl ++ nE
|
||||||
|
in { s = \\t,p,o => case t of {
|
||||||
|
VPImpPast => qp2 ++ cl.s ! t ! p ! ODir;
|
||||||
|
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||||
|
}
|
||||||
|
};
|
||||||
|
QuestSlash ip slash =
|
||||||
|
let ip1 = ip.s ! Dir;
|
||||||
|
ip2 = ip.s ! Obl ++ nE
|
||||||
|
in {
|
||||||
|
s = \\t,p,o => case t of {
|
||||||
|
VPImpPast => ip2 ++ slash.s ! t ! p ! ODir;
|
||||||
|
_ => ip1 ++ slash.s ! t ! p ! ODir
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
QuestIAdv iadv cl = {
|
||||||
|
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
||||||
|
};
|
||||||
|
|
||||||
|
QuestIComp icomp np =
|
||||||
|
let cl = mkSClause (np.s ! NPC Dir ++ icomp.s) np.a (predAux auxBe);
|
||||||
|
in {
|
||||||
|
s = \\t,p,qf => case qf of {
|
||||||
|
QDir => cl.s ! t ! p ! ODir;
|
||||||
|
QIndir => cl.s ! t! p ! ODir
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PrepIP p ip = {s = ip.s ! Voc ++ p.s ! ip.g} ;
|
||||||
|
|
||||||
|
AdvIP ip adv = {
|
||||||
|
s = \\c => adv.s ! ip.g ++ ip.s ! c ;
|
||||||
|
n = ip.n;
|
||||||
|
g = ip.g;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdetCN idet cn = {
|
||||||
|
s = \\c => idet.s ! cn.g ++ cn.s ! idet.n ! c ;
|
||||||
|
g = cn.g;
|
||||||
|
n = idet.n;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdetIP idet = {
|
||||||
|
s = \\_ => idet.s ! Masc ;
|
||||||
|
n = idet.n;
|
||||||
|
g = Masc;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdetQuant iqant num = {
|
||||||
|
s = \\g => iqant.s ! num.n ++ num.s ;
|
||||||
|
n = num.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
CompIAdv a = a ;
|
||||||
|
CompIP p = ss (p.s ! CommonHindustani.Dir) ;
|
||||||
|
AdvIAdv i a = {s = i.s ++ a.s ! Masc} ;
|
||||||
|
|
||||||
|
}
|
||||||
67
lib/src/hindustani/RelativeHindustani.gf
Normal file
67
lib/src/hindustani/RelativeHindustani.gf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
--concrete RelativeUrd of Relative = CatUrd ** open ResUrd, StringsHindustani in {
|
||||||
|
incomplete concrete RelativeHindustani of Relative =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, StringsHindustani, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
RelCl cl = {
|
||||||
|
s = \\t,p,o,agr => case <t,giveNumber agr> of {
|
||||||
|
<VPImpPast,Sg> => js ++ cl.s ! t ! p ! o ;
|
||||||
|
<VPImpPast,Pl> => jn ++ cl.s ! t ! p ! o ;
|
||||||
|
<_,_> => "jw" ++ cl.s ! t ! p ! o
|
||||||
|
};
|
||||||
|
c = Dir
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{- RelVP rp vp = {
|
||||||
|
s = \\t,p,o,ag =>
|
||||||
|
let
|
||||||
|
agr = case rp.a of {
|
||||||
|
RNoAg => ag ;
|
||||||
|
RAg a => a
|
||||||
|
} ;
|
||||||
|
cl = mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp;
|
||||||
|
|
||||||
|
-- cl = case t of {
|
||||||
|
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
||||||
|
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
||||||
|
-- };
|
||||||
|
in
|
||||||
|
cl.s ! t ! p ! ODir ;
|
||||||
|
c = Dir
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelSlash rp slash = {
|
||||||
|
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! Dir ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
||||||
|
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||||
|
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
|
||||||
|
-- };
|
||||||
|
c = Dir
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
FunRP p np rp = {
|
||||||
|
s = \\n,c => rp.s ! n ! c ++ np.s ! NPC c ++ p.s ! Masc ;
|
||||||
|
a = RAg np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdRP = {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
|
||||||
|
CommonHindustani.Dir => jw ;
|
||||||
|
CommonHindustani.Obl => js ;
|
||||||
|
CommonHindustani.Voc => js
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
CommonHindustani.Dir => jw ;
|
||||||
|
CommonHindustani.Obl => jn ;
|
||||||
|
CommonHindustani.Voc => jn
|
||||||
|
}
|
||||||
|
};
|
||||||
|
a = RNoAg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
400
lib/src/hindustani/ResHindustani.gf
Normal file
400
lib/src/hindustani/ResHindustani.gf
Normal file
@@ -0,0 +1,400 @@
|
|||||||
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
--
|
||||||
|
--1 Hindustaniu auxiliary operations.
|
||||||
|
--
|
||||||
|
-- This module contains operations that are needed to make the
|
||||||
|
-- resource syntax work.
|
||||||
|
|
||||||
|
--resource ResHindustani = ParamX ** open Prelude,Predef in {
|
||||||
|
interface ResHindustani = DiffHindustani ** open CommonHindustani, Prelude, Predef in {
|
||||||
|
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
param
|
||||||
|
|
||||||
|
|
||||||
|
-- Order = ODir | OQuest ;
|
||||||
|
|
||||||
|
--2 For $Relative$
|
||||||
|
|
||||||
|
RAgr = RNoAg | RAg Agr ;
|
||||||
|
RCase = RC Number Case ;
|
||||||
|
|
||||||
|
-- for Numerial
|
||||||
|
|
||||||
|
CardOrd = NCard | NOrd ;
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
-- Hindustani Pronouns
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
Pronoun = P Number Gender Case UPerson;
|
||||||
|
PersPronForm = PPF Number UPerson Case;
|
||||||
|
|
||||||
|
-------------------------------------------
|
||||||
|
--Verbs
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
oper
|
||||||
|
Noun = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
Preposition = {s : Gender => Str};
|
||||||
|
DemPronForm = {s : Number => Gender => Case => Str};
|
||||||
|
PossPronForm = {s : Number => Gender => Case => Str};
|
||||||
|
Determiner = {s : Number => Gender => Str ; n : Number};
|
||||||
|
|
||||||
|
-- a useful oper
|
||||||
|
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
||||||
|
|
||||||
|
RefPron : Str;
|
||||||
|
RefPron = "Kwd";
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
-- Grammar part
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
toNP : ( Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||||
|
NPC c => pn ! c ;
|
||||||
|
NPObj => pn ! Dir ;
|
||||||
|
NPErg => pn ! Obl ++ "nE"
|
||||||
|
} ;
|
||||||
|
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||||
|
NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! c ;
|
||||||
|
NPObj => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
||||||
|
NPErg => dt.s ! Sg ! Masc ++ 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"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
------------------------------------------
|
||||||
|
-- Agreement transformations
|
||||||
|
-----------------------------------------
|
||||||
|
{- toAgr : Number -> UPerson -> Gender -> Agr = \n,p,g ->
|
||||||
|
Ag g n p;
|
||||||
|
|
||||||
|
|
||||||
|
fromAgr : Agr -> {n : Number ; p : UPerson ; g : Gender} = \a -> case a of {
|
||||||
|
Ag g n p => {n = n ; p = p ; g = g}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||||
|
let a = fromAgr a0 ; b = fromAgr b0
|
||||||
|
in
|
||||||
|
toAgr
|
||||||
|
(conjNumber a.n b.n)
|
||||||
|
b.p a.g;
|
||||||
|
|
||||||
|
giveNumber : Agr -> Number =\a -> case a of {
|
||||||
|
Ag _ n _ => n
|
||||||
|
};
|
||||||
|
giveGender : Agr -> Gender =\a -> case a of {
|
||||||
|
Ag g _ _ => g
|
||||||
|
};
|
||||||
|
-}
|
||||||
|
-- defaultAgr : Agr = agrP3 Masc Sg ;
|
||||||
|
-- agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
||||||
|
personalAgr : Agr = agrP1 Masc Sg ;
|
||||||
|
agrP1 : Gender -> Number -> Agr = \g,n -> Ag g n Pers1 ;
|
||||||
|
|
||||||
|
param
|
||||||
|
CPolarity =
|
||||||
|
CPos
|
||||||
|
| CNeg Bool ; -- contracted or not
|
||||||
|
|
||||||
|
oper
|
||||||
|
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
||||||
|
Pos => CPos ;
|
||||||
|
Neg => CNeg b
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
objVType : VType -> NPCase = \vt -> case vt of {
|
||||||
|
VTrans => NPObj ;
|
||||||
|
_ => NPC Obl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
VPHSlash = VPH ** {c2 : Compl} ;
|
||||||
|
|
||||||
|
Compl : Type = {s : Str ; c : VType} ;
|
||||||
|
|
||||||
|
|
||||||
|
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||||
|
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
||||||
|
{-
|
||||||
|
-------------------------
|
||||||
|
-- added for cauitives
|
||||||
|
predVcc : (Verb **{c2:Compl}) -> VPHSlash = \verb ->
|
||||||
|
predV verb ** {c2 = {s = "" ; c = VTrans} } ;
|
||||||
|
------------------------
|
||||||
|
-}
|
||||||
|
predAux : Aux -> VPH = \verb -> {
|
||||||
|
s = \\vh =>
|
||||||
|
let
|
||||||
|
|
||||||
|
inf = verb.inf ;
|
||||||
|
part = verb.ppart ;
|
||||||
|
|
||||||
|
in
|
||||||
|
case vh of {
|
||||||
|
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = part } ;
|
||||||
|
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
||||||
|
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
||||||
|
VPStem => {fin = [] ; inf = "rh" };
|
||||||
|
_ => {fin = part ; inf = [] }
|
||||||
|
};
|
||||||
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
inf = verb.inf;
|
||||||
|
ad = [];
|
||||||
|
embComp = [];
|
||||||
|
prog = False ;
|
||||||
|
comp = \\_ => []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Aux = {
|
||||||
|
inf,ppart,prpart : Str
|
||||||
|
} ;
|
||||||
|
|
||||||
|
auxBe : Aux = {
|
||||||
|
inf = "" ;
|
||||||
|
ppart = "" ;
|
||||||
|
prpart = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
predProg : VPH -> VPH = \verb -> {
|
||||||
|
s = \\vh =>
|
||||||
|
case vh of {
|
||||||
|
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = (verb.s!VPStem).inf ++ raha g n} ;
|
||||||
|
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPStem).inf ++ raha g n} ;
|
||||||
|
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = (verb.s!VPStem).inf ++ raha g n } ;
|
||||||
|
VPTense VPPerf (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ raha g n } ;
|
||||||
|
VPStem => {fin = [] ; inf = (verb.s!VPStem).inf };
|
||||||
|
_ => {fin = [] ; inf = [] }
|
||||||
|
};
|
||||||
|
obj = verb.obj ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
inf = verb.inf;
|
||||||
|
ad = verb.ad;
|
||||||
|
embComp = verb.embComp;
|
||||||
|
prog = True ;
|
||||||
|
comp = verb.comp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{- Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||||
|
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||||
|
s = \\vt,b,ord =>
|
||||||
|
let
|
||||||
|
subjagr : NPCase * Agr = case vt of {
|
||||||
|
VPImpPast => case vp.subj of {
|
||||||
|
VTrans => <NPErg, vp.obj.a> ;
|
||||||
|
VTransPost => <NPErg, defaultAgr> ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
subj = subjagr.p1 ;
|
||||||
|
agr = subjagr.p2 ;
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case vt of {
|
||||||
|
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).fin ; inf = (vp.s ! VPTense VPFutr agr).inf ++ hw p n} ;
|
||||||
|
_ => vp.s ! VPTense VPFutr agr } ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n} ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPerf agr).inf ++ hw p n } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPSubj => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).inf ++ hw p n ; inf = "Xayd" } ;
|
||||||
|
_ => {fin = (vp.s ! VPTense VPFutr agr).inf ; inf = "Xayd" } }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case vt of {
|
||||||
|
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ na ++ vps.inf ++ vps.fin ++ vp.embComp ;
|
||||||
|
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkSClause : Str -> Agr -> VPH -> Clause =
|
||||||
|
\subj,agr,vp -> {
|
||||||
|
s = \\t,b,ord =>
|
||||||
|
let
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case t of {
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => vp.s ! VPTense VPFutr agr ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case t of {
|
||||||
|
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ na ++ vps.inf ++ vps.fin ++ vp.embComp;
|
||||||
|
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
-- insertSubj : UPerson -> Str -> Str = \p,s ->
|
||||||
|
-- case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
||||||
|
|
||||||
|
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
subj = vp.subj ;
|
||||||
|
inf = vp.inf;
|
||||||
|
ad = vp.ad;
|
||||||
|
embComp = vp.embComp;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||||
|
} ;
|
||||||
|
insertVV : Str -> VPH -> Str -> VPH = \obj1,vp,emb -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
subj = vp.subj ;
|
||||||
|
inf = vp.inf;
|
||||||
|
ad = vp.ad;
|
||||||
|
embComp = vp.embComp ++ emb ;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = \\a => vp.comp ! a ++ obj1
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
||||||
|
s = vp.s;
|
||||||
|
obj = vp.obj ;
|
||||||
|
subj = vp.subj ;
|
||||||
|
inf = vp.inf;
|
||||||
|
ad = vp.ad;
|
||||||
|
embComp = vp.embComp ++ obj1;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = vp.comp
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||||
|
insertObj obj vp ** {c2 = vp.c2} ;
|
||||||
|
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||||
|
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||||
|
|
||||||
|
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
|
||||||
|
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
|
||||||
|
-- infVV : Bool -> VPH -> Str = \isAux,vp ->
|
||||||
|
-- case isAux of {False => vp.obj.s ++ vp.inf ; True => vp.obj.s ++ (vp.s ! VPImp).fin };
|
||||||
|
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
||||||
|
case isAux of {False => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ; True => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin } ;
|
||||||
|
infV2V : Bool -> VPH -> Str = \isAux,vp ->
|
||||||
|
case isAux of {False => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ++ "ky" ; True => vp.obj.s ++ (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin ++ "ky"};
|
||||||
|
|
||||||
|
|
||||||
|
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||||
|
s = vps.s ;
|
||||||
|
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
||||||
|
subj = vps.c2.c ;
|
||||||
|
inf = vps.inf;
|
||||||
|
ad = vps.ad;
|
||||||
|
embComp = vps.embComp;
|
||||||
|
prog = vps.prog ;
|
||||||
|
comp = vps.comp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
inf = vp.inf ;
|
||||||
|
subj = vp.subj ;
|
||||||
|
ad = vp.ad ;
|
||||||
|
embComp = vp.embComp;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
inf = vp.inf ;
|
||||||
|
subj = vp.subj;
|
||||||
|
ad = vp.ad ++ ad ;
|
||||||
|
embComp = vp.embComp;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = vp.comp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjThat : Str = "kh" ;
|
||||||
|
|
||||||
|
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
inf = vp.inf ;
|
||||||
|
subj = vp.subj;
|
||||||
|
ad = vp.ad;
|
||||||
|
embComp = vp.embComp ++ emb;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = vp.comp
|
||||||
|
} ;
|
||||||
|
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
||||||
|
s = vp.s ;
|
||||||
|
obj = vp.obj ;
|
||||||
|
inf = vp.inf ;
|
||||||
|
subj = vtype;
|
||||||
|
ad = vp.ad;
|
||||||
|
embComp = vp.embComp ;
|
||||||
|
prog = vp.prog ;
|
||||||
|
comp = vp.comp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
105
lib/src/hindustani/SentenceHindustani.gf
Normal file
105
lib/src/hindustani/SentenceHindustani.gf
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
--concrete SentenceUrd of Sentence = CatUrd ** open Prelude, StringsHindustani, ResUrd in {
|
||||||
|
incomplete concrete SentenceHindustani of Sentence =
|
||||||
|
CatHindustani ** open CommonHindustani, ResHindustani, Prelude, StringsHindustani in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
PredVP np vp = mkClause np vp ;
|
||||||
|
|
||||||
|
PredSCVP sc vp = mkSClause sc.s (defaultAgr) vp ;
|
||||||
|
|
||||||
|
ImpVP vp = {
|
||||||
|
s = \\pol,n =>
|
||||||
|
let
|
||||||
|
agr = Ag Masc (numImp n) Pers2_Casual ;
|
||||||
|
verb = infVP True vp agr ;
|
||||||
|
dont = case pol of {
|
||||||
|
CNeg True => mt ;
|
||||||
|
CNeg False => nh ;
|
||||||
|
_ => []
|
||||||
|
}
|
||||||
|
in
|
||||||
|
dont ++ verb
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SlashVP np vp =
|
||||||
|
mkClause np vp ** {c2 = vp.c2} ;
|
||||||
|
|
||||||
|
AdvSlash slash adv = {
|
||||||
|
s = \\t,p,o => adv.s ! Masc ++ slash.s ! t ! p ! o ;
|
||||||
|
c2 = slash.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SlashPrep cl prep = cl ** {c2 = { s = prep.s ! Masc ; c = VIntrans}} ;
|
||||||
|
|
||||||
|
SlashVS np vs slash =
|
||||||
|
mkClause np
|
||||||
|
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
|
||||||
|
{c2 = slash.c2} ;
|
||||||
|
|
||||||
|
EmbedS s = {s = conjThat ++ s.s} ;
|
||||||
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
|
EmbedVP vp = {s = infVP False vp defaultAgr} ; --- agr
|
||||||
|
|
||||||
|
UseCl temp p cl =
|
||||||
|
{ s = case <temp.t,temp.a> of {
|
||||||
|
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! ODir;
|
||||||
|
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! ODir;
|
||||||
|
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! ODir;
|
||||||
|
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! ODir;
|
||||||
|
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! ODir;
|
||||||
|
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! ODir;
|
||||||
|
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir;
|
||||||
|
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResUrd
|
||||||
|
|
||||||
|
};
|
||||||
|
} ;
|
||||||
|
UseQCl temp p cl = {
|
||||||
|
s = \\q => case <temp.t,temp.a> of {
|
||||||
|
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! q;
|
||||||
|
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! q;
|
||||||
|
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! q;
|
||||||
|
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! q;
|
||||||
|
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! q;
|
||||||
|
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! q;
|
||||||
|
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q;
|
||||||
|
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q
|
||||||
|
|
||||||
|
};
|
||||||
|
} ;
|
||||||
|
UseRCl temp p rcl = {
|
||||||
|
s = \\q => case <temp.t,temp.a> of {
|
||||||
|
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPGenPres ! p.p ! ODir ! q;
|
||||||
|
<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPres ! p.p ! ODir ! q;
|
||||||
|
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPImpPast ! p.p ! ODir ! q;
|
||||||
|
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPast ! p.p ! ODir ! q;
|
||||||
|
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VPFut ! p.p ! ODir ! q;
|
||||||
|
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfFut ! p.p ! ODir ! q;
|
||||||
|
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q;
|
||||||
|
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q
|
||||||
|
};
|
||||||
|
c = rcl.c
|
||||||
|
} ;
|
||||||
|
UseSlash temp p clslash = {
|
||||||
|
s = case <temp.t,temp.a> of {
|
||||||
|
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPGenPres ! p.p ! ODir;
|
||||||
|
<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPres ! p.p ! ODir;
|
||||||
|
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPImpPast ! p.p ! ODir ;
|
||||||
|
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPast ! p.p ! ODir;
|
||||||
|
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VPFut ! p.p ! ODir;
|
||||||
|
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfFut ! p.p ! ODir;
|
||||||
|
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir;
|
||||||
|
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir
|
||||||
|
};
|
||||||
|
c2 = clslash.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvS a s = {s = a.s ! Masc ++ s.s} ;
|
||||||
|
|
||||||
|
RelS s r = {s = s.s ++ r.s ! agrP3 Masc Sg} ;
|
||||||
|
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
||||||
|
|
||||||
|
}
|
||||||
20
lib/src/hindustani/StringsHindustani.gf
Normal file
20
lib/src/hindustani/StringsHindustani.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
resource StringsHindustani = {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
agr = "agr" ;
|
||||||
|
awr = "awr" ;
|
||||||
|
jn = "jn" ;
|
||||||
|
js = "js" ;
|
||||||
|
jw = "jw" ;
|
||||||
|
kw = "kw" ;
|
||||||
|
mt = "mt" ;
|
||||||
|
nE = "nE" ;
|
||||||
|
nh = "nh" ;
|
||||||
|
sE = "sE" ;
|
||||||
|
waN = "waN" ;
|
||||||
|
|
||||||
|
comma = "," ;
|
||||||
|
|
||||||
|
}
|
||||||
47
lib/src/hindustani/SymbolHindustani.gf
Normal file
47
lib/src/hindustani/SymbolHindustani.gf
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
|
--concrete SymbolUrd of Symbol = CatUrd ** open Prelude, ResUrd, StringsHindustani in {
|
||||||
|
incomplete concrete SymbolHindustani of Symbol =
|
||||||
|
CatHindustani ** open Prelude, ResHindustani, CommonHindustani in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
-- SymbPN i = {s = \\_ => i.s ; g = Masc} ;
|
||||||
|
SymbPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||||
|
IntPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||||
|
FloatPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||||
|
NumPN i = {s = \\_ =>i.s ; g = Masc} ;
|
||||||
|
CNIntNP cn i = {
|
||||||
|
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||||
|
a = agrP3 cn.g Sg
|
||||||
|
} ;
|
||||||
|
CNSymbNP det cn xs = {
|
||||||
|
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
||||||
|
a = agrP3 cn.g det.n
|
||||||
|
} ;
|
||||||
|
CNNumNP cn i = {
|
||||||
|
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||||
|
a = agrP3 cn.g Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SymbS sy = sy ;
|
||||||
|
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||||
|
SymbOrd sy = { s = sy.s ++ waN ; n = Pl} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
|
||||||
|
Symb, [Symb] = SS ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkSymb s = s ;
|
||||||
|
|
||||||
|
BaseSymb = infixSS awr ;
|
||||||
|
ConsSymb = infixSS [] ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
-- Note: this results in a space before 's, but there's
|
||||||
|
-- not mauch we can do about that.
|
||||||
|
addGenitiveS : Str -> Case => Str = \s ->
|
||||||
|
-- table {_ => s ++ "ka" } ;
|
||||||
|
table {_ => s } ; -- testing for webalt but i think should bring back to its origional form as 'ka' is needed for making genitive, in webalt it gives unnecessary 'ka'
|
||||||
|
|
||||||
|
}
|
||||||
41
lib/src/hindustani/VerbHindustani.gf
Normal file
41
lib/src/hindustani/VerbHindustani.gf
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
--concrete VerbUrd of Verb = CatUrd ** open ResUrd in {
|
||||||
|
incomplete concrete VerbHindustani of Verb = CatHindustani ** open CommonHindustani, ResHindustani, StringsHindustani in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseV v = predV v ;
|
||||||
|
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||||
|
Slash2V3 v np =
|
||||||
|
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||||
|
Slash3V3 v np =
|
||||||
|
insertObjc (\\_ => np.s ! NPC Obl ++ v.c2) (predV v ** {c2 = {s = v.c3 ; c = VTrans}}) ;
|
||||||
|
ComplVV v vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp ) VTransPost;
|
||||||
|
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||||
|
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||||
|
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit) (predV v) ;
|
||||||
|
SlashV2V v vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp **{c2 = {s = sE ; c = VTransPost}} ;
|
||||||
|
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = kw ; c = VTransPost}}) ;
|
||||||
|
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = sE ; c = VTransPost}}) ;
|
||||||
|
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit) (predV v ** {c2 = {s = kw ; c = VTransPost}}) ; ----
|
||||||
|
ComplSlash vp np = insertObject np vp ;
|
||||||
|
SlashVV vv vp =
|
||||||
|
insertEmbCompl (insertObj (\\a => infVP vv.isAux vp a) (predV vv)) vp.embComp **
|
||||||
|
{c2 = vp.c2} ;
|
||||||
|
SlashV2VNP vv np vp =
|
||||||
|
insertObjPre (\\_ => np.s ! NPObj )
|
||||||
|
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||||
|
{c2 = vp.c2} ;
|
||||||
|
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||||
|
|
||||||
|
AdvVP vp adv = insertObj (\\a => adv.s ! giveGender a) vp ;
|
||||||
|
|
||||||
|
AdVVP adv vp = insertAdV adv.s vp ;
|
||||||
|
ReflVP v = insertObjPre (\\_ => RefPron) v ;
|
||||||
|
PassV2 v = predV v ; -- need to be fixed
|
||||||
|
CompAP ap ={s = \\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit } ;
|
||||||
|
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||||
|
CompAdv adv = {s = \\a => adv.s ! giveGender a} ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,38 +1,3 @@
|
|||||||
concrete AdjectiveUrd of Adjective = CatUrd ** open ResUrd, Prelude in {
|
concrete AdjectiveUrd of Adjective = CatUrd ** AdjectiveHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
PositA a = a ;
|
|
||||||
UseComparA a = a;
|
|
||||||
|
|
||||||
ComparA a np = {
|
|
||||||
s = \\n,g,c,d => np.s ! NPC Obl ++ sE_Str ++ a.s ! n ! g ! c ! d ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
|
||||||
|
|
||||||
ComplA2 a np = {
|
|
||||||
s = \\n,g,c,d => np.s ! NPC Obl ++ a.c2 ++ a.s ! n ! g ! c ! d ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ReflA2 a = {
|
|
||||||
s = \\n,g,c,d => a.s ! n ! g ! c ! d ++ RefPron ++ sE_Str ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SentAP ap sc = {
|
|
||||||
s = \\n,g,c,d => ap.s ! n ! g ! c ! d ++ sc.s ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdAP ada ap = {
|
|
||||||
s = \\n,g,c,d => ada.s ++ ap.s ! n ! g ! c ! d ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
UseA2 a = a ;
|
|
||||||
|
|
||||||
CAdvAP cadv ap np = {
|
|
||||||
s = \\n,g,c,d => cadv.s ++ ap.s ! n ! g ! c ! d ++ cadv.p ++ np.s ! NPC Dir ;
|
|
||||||
};
|
|
||||||
|
|
||||||
AdjOrd ord = { s = \\_,_,_,_ => ord.s ; };
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,20 +1,2 @@
|
|||||||
concrete AdverbUrd of Adverb = CatUrd ** open ResUrd, Prelude in {
|
concrete AdverbUrd of Adverb = CatUrd ** AdverbHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
lin
|
|
||||||
PositAdvAdj a = {s = a.s ! Sg ! Masc ! Obl ! Posit} ;
|
|
||||||
ComparAdvAdj cadv a np = {
|
|
||||||
s = np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! Masc ! Obl ! Posit;
|
|
||||||
} ;
|
|
||||||
ComparAdvAdjS cadv a s = {
|
|
||||||
s = cadv.p ++ cadv.s ++ a.s ! Sg ! Masc ! Obl ! Posit ++ s.s;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
PrepNP prep np = {s = np.s ! NPObj ++ prep.s } ;
|
|
||||||
|
|
||||||
AdAdv ada adv = { s = ada.s ++ adv.s} ;
|
|
||||||
|
|
||||||
SubjS = cc2 ;
|
|
||||||
|
|
||||||
AdnCAdv cadv = {s = sE_Str ++ cadv.s} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude:../hindustani
|
||||||
|
|
||||||
concrete AllUrd of AllUrdAbs =
|
concrete AllUrd of AllUrdAbs =
|
||||||
LangUrd,
|
LangUrd,
|
||||||
ExtraUrd
|
ExtraUrd
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
abstract AllUrdAbs =
|
abstract AllUrdAbs =
|
||||||
Lang,
|
Lang,
|
||||||
ExtraUrdAbs
|
ExtraUrdAbs
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
@@ -1,85 +1,2 @@
|
|||||||
concrete CatUrd of Cat = CommonX ** open ResUrd, Prelude in {
|
concrete CatUrd of Cat = CommonX - [Adv,AdN] ** CatHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lincat
|
|
||||||
------ Tensed/Untensed
|
|
||||||
|
|
||||||
S = {s : Str} ;
|
|
||||||
QS = {s : QForm => Str} ;
|
|
||||||
RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
|
||||||
SSlash = {s : Str ; c2 : ResUrd.Compl} ;
|
|
||||||
|
|
||||||
---- Sentence
|
|
||||||
|
|
||||||
Cl = ResUrd.Clause ;
|
|
||||||
ClSlash = {
|
|
||||||
s : ResUrd.VPHTense => Polarity => Order => Str ;
|
|
||||||
c2 : ResUrd.Compl
|
|
||||||
} ;
|
|
||||||
Imp = {s : CPolarity => ImpForm => Str} ;
|
|
||||||
|
|
||||||
---- Question
|
|
||||||
QCl = {s : ResUrd.VPHTense => Polarity => QForm => Str} ;
|
|
||||||
IP = {s: Case => Str ; g : Gender ; n : Number};
|
|
||||||
IDet = {s :Gender => Str ; n : Number} ;
|
|
||||||
IQuant = {s : Number => Str} ;
|
|
||||||
IComp = {s : Str} ;
|
|
||||||
|
|
||||||
---- Relative
|
|
||||||
|
|
||||||
RCl = {
|
|
||||||
s : ResUrd.VPHTense => Polarity => Order => Agr => Str ;
|
|
||||||
c : Case
|
|
||||||
} ;
|
|
||||||
RP = {s: Number => Case => Str ; a:RAgr};
|
|
||||||
|
|
||||||
---- Verb
|
|
||||||
|
|
||||||
VP = ResUrd.VPH ;
|
|
||||||
VPSlash = ResUrd.VPHSlash ;
|
|
||||||
Comp = {s : Agr => Str} ;
|
|
||||||
|
|
||||||
---- Adjective
|
|
||||||
|
|
||||||
AP = ResUrd.Adjective ;
|
|
||||||
|
|
||||||
---- Noun
|
|
||||||
|
|
||||||
CN = ResUrd.Noun ;
|
|
||||||
NP = ResUrd.NP ;
|
|
||||||
Pron = {s : Case => Str ; ps : Str ; a : Agr};
|
|
||||||
Det = ResUrd.Determiner ;
|
|
||||||
Predet = {s : Str} ;
|
|
||||||
Num = {s : Str ; n : Number} ;
|
|
||||||
Card = {s : Str; n : Number} ;
|
|
||||||
Ord = {s : Str; n : Number} ;
|
|
||||||
Quant = {s:Number => Gender => Case => Str ; a:Agr};
|
|
||||||
|
|
||||||
---- Numeral
|
|
||||||
|
|
||||||
Numeral = {s : CardOrd => Str ; n : Number} ;
|
|
||||||
Digits = {s : CardOrd => Str ; n : Number } ;
|
|
||||||
|
|
||||||
---- Structural
|
|
||||||
|
|
||||||
Conj = {s1,s2 : Str ; n : Number} ;
|
|
||||||
-----b Conj = {s : Str ; n : Number} ;
|
|
||||||
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
|
||||||
Subj = {s : Str} ;
|
|
||||||
Prep = ResUrd.Preposition;
|
|
||||||
---- Open lexical classes, e.g. Lexicon
|
|
||||||
|
|
||||||
V, VS, VQ, VA = ResUrd.Verb ; -- = {s : VForm => Str} ;
|
|
||||||
V2, V2A, V2Q, V2S = ResUrd.Verb ** {c2 : Compl} ;
|
|
||||||
V3 = ResUrd.Verb ** {c2, c3 : Str} ;
|
|
||||||
VV = ResUrd.Verb ** { isAux : Bool} ;
|
|
||||||
V2V = ResUrd.Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
|
|
||||||
A = ResUrd.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
|
||||||
A2 = {s : Number => Gender => Case => Degree => Str ; c2 : Str} ;
|
|
||||||
N = {s : Number => Case => Str ; g : Gender} ;
|
|
||||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str } ;
|
|
||||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str ; c4 : Str} ;
|
|
||||||
PN = {s : Case => Str ; g : Gender} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,43 +1,2 @@
|
|||||||
--concrete ConjunctionUrd of Conjunction =
|
concrete ConjunctionUrd of Conjunction = CatUrd ** ConjunctionHindustani with
|
||||||
-- CatUrdu ** open ResUrdu, Coordination, Prelude in {
|
(ResHindustani = ResUrd) ;
|
||||||
|
|
||||||
concrete ConjunctionUrd of Conjunction =
|
|
||||||
CatUrd ** open ResUrd, Coordination, Prelude in {
|
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
ConjS = conjunctDistrSS ;
|
|
||||||
|
|
||||||
ConjAdv = conjunctDistrSS ;
|
|
||||||
|
|
||||||
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
|
||||||
a = conjAgr (agrP3 Masc conj.n) ss.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable4 Number Gender Case Degree conj ss ;
|
|
||||||
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
|
||||||
|
|
||||||
---- These fun's are generated from the list cat's.
|
|
||||||
|
|
||||||
BaseS = twoSS ;
|
|
||||||
ConsS = consrSS comma ;
|
|
||||||
BaseAdv = twoSS ;
|
|
||||||
ConsAdv = consrSS comma ;
|
|
||||||
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a} ;
|
|
||||||
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
|
||||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a} ;
|
|
||||||
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
|
||||||
BaseAP x y = twoTable4 Number Gender Case Degree x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
|
||||||
ConsAP xs x = consrTable4 Number Gender Case Degree comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
|
||||||
|
|
||||||
lincat
|
|
||||||
[S] = {s1,s2 : Str} ;
|
|
||||||
[Adv] = {s1,s2 : Str} ;
|
|
||||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
|
|
||||||
[AP] = {s1,s2 : Number => Gender => Case => Degree => Str} ;
|
|
||||||
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
concrete ExtraUrd of ExtraUrdAbs = CatUrd **
|
concrete ExtraUrd of ExtraUrdAbs = CatUrd **
|
||||||
open ResUrd, Coordination, Prelude, MorphoUrd, ParadigmsUrd in {
|
open ResUrd, Coordination, Prelude, MorphoUrd, ParadigmsUrd,CommonHindustani in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ ka_Str ; a = np.a} ;
|
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "كا" ; a = np.a} ;
|
||||||
|
|
||||||
each_Det = mkDet hr_kwy_Str hr_kwy_Str hr_kwy_Str hr_kwy_Str Sg ;
|
each_Det = mkDet "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Sg ;
|
||||||
have_V = mkV rakh6na_Str ;
|
have_V = mkV "راكh-نا";
|
||||||
|
IAdvAdv adv = {s = "كتنی" ++ adv.s ! Masc} ;
|
||||||
|
ICompAP ap = {s = "كتنے" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||||
|
cost_V = mkV "قیمت" ;
|
||||||
|
|
||||||
|
-- added for causitives
|
||||||
|
make_CV = mkVerb "نoتہiنگ" ** {c2 = "" };
|
||||||
|
|
||||||
-- for VP conjunction
|
-- for VP conjunction
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ abstract ExtraUrdAbs = Extra ** {
|
|||||||
|
|
||||||
each_Det : Det ;
|
each_Det : Det ;
|
||||||
have_V : V;
|
have_V : V;
|
||||||
|
cost_V : V;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude:c:/gf_unicoded/hindustani
|
||||||
|
|
||||||
concrete GrammarUrd of Grammar =
|
concrete GrammarUrd of Grammar =
|
||||||
NounUrd,
|
NounUrd,
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
RelativeUrd,
|
RelativeUrd,
|
||||||
ConjunctionUrd,
|
ConjunctionUrd,
|
||||||
PhraseUrd,
|
PhraseUrd,
|
||||||
TextX,
|
TextX - [Adv,AdN],
|
||||||
StructuralUrd,
|
StructuralUrd,
|
||||||
TenseX,
|
TenseX - [Adv,AdN],
|
||||||
IdiomUrd
|
IdiomUrd
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
flags coding = utf8;
|
flags coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
ImpersCl vp = mkSClause [] (agrP3 Masc Sg) vp ;
|
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||||
GenericCl vp = mkSClause "كوی" (agrP3 Masc Sg) vp ;
|
GenericCl vp = mkSClause "كوی" (agrP3 Masc Sg) vp ;
|
||||||
|
|
||||||
CleftNP np rs =
|
CleftNP np rs =
|
||||||
@@ -12,7 +12,7 @@ concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
|||||||
in
|
in
|
||||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||||
|
|
||||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkSClause "وہاں" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
mkSClause "وہاں" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||||
@@ -27,7 +27,8 @@ concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
||||||
|
ProgrVP vp = (predProg vp) ;
|
||||||
|
|
||||||
|
|
||||||
ImpPl1 vp = {s = "آو" ++ infVP True vp (agrP1 Masc Pl)} ;
|
ImpPl1 vp = {s = "آو" ++ infVP True vp (agrP1 Masc Pl)} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../hindustani
|
||||||
|
|
||||||
concrete LangUrd of Lang =
|
concrete LangUrd of Lang =
|
||||||
GrammarUrd,
|
GrammarUrd,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
bread_N = mkN "روتی" ;
|
bread_N = mkN "روتی" ;
|
||||||
break_V2 = mkV2 (mkV "توڑنا") ;
|
break_V2 = mkV2 (mkV "توڑنا") ;
|
||||||
broad_A = mkA "كھلا" ;
|
broad_A = mkA "كھلا" ;
|
||||||
brother_N2 = mkN2 (mkN "بھای") (mkPrep "كا") "كے" ; --not correct
|
brother_N2 = mkN2 (mkN "بھای") (mkPrep "كا" "كا") "كے" ; --not correct
|
||||||
brown_A = mkA "نسواری" ;
|
brown_A = mkA "نسواری" ;
|
||||||
butter_N = mkN "مكھن" ;
|
butter_N = mkN "مكھن" ;
|
||||||
buy_V2 = mkV2 (mkV "خریدنا");
|
buy_V2 = mkV2 (mkV "خریدنا");
|
||||||
@@ -62,7 +62,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
cow_N = mkN "گاے" feminine ;
|
cow_N = mkN "گاے" feminine ;
|
||||||
die_V = mkV "مرنا" ;
|
die_V = mkV "مرنا" ;
|
||||||
dirty_A = mkA "گندا" ;
|
dirty_A = mkA "گندا" ;
|
||||||
distance_N3 = mkN3 (mkN "فاصلہ") (mkPrep "كا") "كے" "سے" ;
|
distance_N3 = mkN3 (mkN "فاصلہ") (mkPrep "كا" "كا") "كے" "سے" ;
|
||||||
doctor_N = mkN "معالج" ;
|
doctor_N = mkN "معالج" ;
|
||||||
dog_N = mkN "كتا" ;
|
dog_N = mkN "كتا" ;
|
||||||
door_N = mkN "دروزہ" ;
|
door_N = mkN "دروزہ" ;
|
||||||
@@ -72,16 +72,16 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
empty_A = mkA "خالی" ;
|
empty_A = mkA "خالی" ;
|
||||||
enemy_N = mkN "دشمن" ;
|
enemy_N = mkN "دشمن" ;
|
||||||
factory_N = mkN "كارخانہ" ;
|
factory_N = mkN "كارخانہ" ;
|
||||||
father_N2 = mkN2 (mkN "ابا") (mkPrep "كا") "كے" ;
|
father_N2 = mkN2 (mkN "ابا") (mkPrep "كا" "كا") "كے" ;
|
||||||
fear_VS = mkV "درنا";
|
fear_VS = mkV "درنا";
|
||||||
find_V2 = mkV2 (mkV "پانا") ;
|
find_V2 = mkV2 (mkV "پانا") ;
|
||||||
fish_N = mkN "مچھلی" ;
|
fish_N = mkN "مچھلی" ;
|
||||||
floor_N = mkN "فرش" ;
|
floor_N = mkN "فرش" ;
|
||||||
forget_V2 = mkV2 (mkV "بھولنا") ;
|
forget_V2 = mkV2 (mkV "بھولنا") ;
|
||||||
fridge_N = mkN "فریگ" ;
|
fridge_N = mkN "فریگ" ;
|
||||||
friend_N = mkN "دوست" masculine ;
|
-- friend_N = mkN "دوست" masculine ;
|
||||||
fruit_N = mkN "پھل" ;
|
fruit_N = mkN "پھل" ;
|
||||||
-- fun_AV = mkAV (regA "فuن") ;
|
-- fun_AV = mkAV (regA "f?ن") ;
|
||||||
garden_N = mkN "باغ" ;
|
garden_N = mkN "باغ" ;
|
||||||
girl_N = mkN "لڑكی" ;
|
girl_N = mkN "لڑكی" ;
|
||||||
glove_N = mkN "دستانہ" ;
|
glove_N = mkN "دستانہ" ;
|
||||||
@@ -92,7 +92,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
harbour_N = mkCmpdNoun "بندر" (mkN "گاہ") ;
|
harbour_N = mkCmpdNoun "بندر" (mkN "گاہ") ;
|
||||||
hate_V2 = mkV2 (compoundV "نفرت" do_V2) ;
|
hate_V2 = mkV2 (compoundV "نفرت" do_V2) ;
|
||||||
hat_N = mkN "توپی" ;
|
hat_N = mkN "توپی" ;
|
||||||
-- have_V2 = dirV2 (mk5V "ہاvع" "ہاس" "ہاد" "ہاد" "ہاviنگ") ;
|
-- have_V2 = dirV2 (mk5V "ہa?ع" "ہاس" "ہاد" "ہاد" "ہa??نگ") ;
|
||||||
hear_V2 = mkV2 (mkV "سننا") ;
|
hear_V2 = mkV2 (mkV "سننا") ;
|
||||||
hill_N = mkN "پہاڑی" ;
|
hill_N = mkN "پہاڑی" ;
|
||||||
hope_VS = (compoundV "امید" do_V2);
|
hope_VS = (compoundV "امید" do_V2);
|
||||||
@@ -119,11 +119,11 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
love_N = mkN "محبت" ;
|
love_N = mkN "محبت" ;
|
||||||
love_V2 = mkV2 (compoundV "پیار" do_V2) "كو";
|
love_V2 = mkV2 (compoundV "پیار" do_V2) "كو";
|
||||||
man_N = mkN "آدمی" ; -- not correct according to rules should be discussed
|
man_N = mkN "آدمی" ; -- not correct according to rules should be discussed
|
||||||
married_A2 = mkA "شادی كرنا" "سے" ;
|
married_A2 = mkA "شادy?كرنا" "سے" ;
|
||||||
meat_N = mkN "گوشت" ;
|
meat_N = mkN "گوشت" ;
|
||||||
milk_N = mkN "دودھ" ;
|
milk_N = mkN "دودھ" ;
|
||||||
moon_N = mkN "چاند" ;
|
moon_N = mkN "چاند" ;
|
||||||
mother_N2 = mkN2 (mkN "ماں") (mkPrep "كی") "كے"; -- not covered need to be discussed
|
mother_N2 = mkN2 (mkN "ماں") (mkPrep "كی" "كی") "كے"; -- not covered need to be discussed
|
||||||
mountain_N = mkN "پہاڑی" ;
|
mountain_N = mkN "پہاڑی" ;
|
||||||
music_N = mkN "موسیقی" ;
|
music_N = mkN "موسیقی" ;
|
||||||
narrow_A = mkA "باریك" ;
|
narrow_A = mkA "باریك" ;
|
||||||
@@ -142,7 +142,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
play_V2 = mkV2 (mkV "كھیلنا") ;
|
play_V2 = mkV2 (mkV "كھیلنا") ;
|
||||||
policeman_N = mkCmpdNoun "پولیس" (mkN "والا") ;
|
policeman_N = mkCmpdNoun "پولیس" (mkN "والا") ;
|
||||||
priest_N = (mkN "پیغمبر") ;
|
priest_N = (mkN "پیغمبر") ;
|
||||||
-- probable_AS = mkAS (regA "پرoبابلع") ;
|
-- probable_AS = mkAS (regA "پr?بابلع") ;
|
||||||
queen_N = mkN "شہزادی" ;
|
queen_N = mkN "شہزادی" ;
|
||||||
radio_N = mkN "ریڈیو" ;
|
radio_N = mkN "ریڈیو" ;
|
||||||
rain_V0 = compoundV "بارش" (mkV "ہونا" ) ;
|
rain_V0 = compoundV "بارش" (mkV "ہونا" ) ;
|
||||||
@@ -150,9 +150,9 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
red_A = mkA "لال" ;
|
red_A = mkA "لال" ;
|
||||||
religion_N = mkN "مزہب" ;
|
religion_N = mkN "مزہب" ;
|
||||||
restaurant_N = mkN "ہوٹل" ;
|
restaurant_N = mkN "ہوٹل" ;
|
||||||
river_N = mkN "دریا" masculine ;
|
-- river_N = mkN "دریا" masculine ;
|
||||||
rock_N = mkN "چٹان" ;
|
rock_N = mkN "چٹان" ;
|
||||||
roof_N = mkN "چھت" masculine ;
|
-- roof_N = mkN "چھت" masculine ;
|
||||||
rubber_N = mkN "ربڑ" ;
|
rubber_N = mkN "ربڑ" ;
|
||||||
run_V = mkV "دوڑنا" ;
|
run_V = mkV "دوڑنا" ;
|
||||||
say_VS = mkV "كہنا" ;
|
say_VS = mkV "كہنا" ;
|
||||||
@@ -186,16 +186,16 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
switch8off_V2 = mkV2 (mkV "چلانا") ;
|
switch8off_V2 = mkV2 (mkV "چلانا") ;
|
||||||
switch8on_V2 = mkV2 (compoundV "بند" do_V2) ;
|
switch8on_V2 = mkV2 (compoundV "بند" do_V2) ;
|
||||||
table_N = mkN "میز" feminine ;
|
table_N = mkN "میز" feminine ;
|
||||||
talk_V3 = mkV3 (mkV "بولنا") "سے" "كے بارے معں";
|
talk_V3 = mkV3 (mkV "بولنا") "سے" "كE?بارE?معں";
|
||||||
teacher_N = mkN "iستاد" ;
|
teacher_N = mkN "?ستاد" ;
|
||||||
teach_V2 = mkV2 (mkV "پڑھنا") ;
|
teach_V2 = mkV2 (mkV "پڑھنا") ;
|
||||||
television_N = mkN "تعلیویزن" ;
|
television_N = mkN "تعلیویزن" ;
|
||||||
thick_A = mkA "موٹا" ;
|
thick_A = mkA "موٹا" ;
|
||||||
thin_A = mkA "پتلا" ;
|
thin_A = mkA "پتلا" ;
|
||||||
train_N = mkN "گاڑی" ;
|
train_N = mkN "گاڑی" ;
|
||||||
travel_V = (compoundV "سفر" do_V2) ;
|
travel_V = (compoundV "سفر" do_V2) ;
|
||||||
tree_N = mkN "درخت" masculine ;
|
-- tree_N = mkN "درخت" masculine ;
|
||||||
-- ---- trousers_N = mkN "ترouسعرس" ;
|
-- ---- trousers_N = mkN "تr??سعرس" ;
|
||||||
ugly_A = mkA "بدصورت" ;
|
ugly_A = mkA "بدصورت" ;
|
||||||
understand_V2 = mkV2 (mkV "سمجھنا") ;
|
understand_V2 = mkV2 (mkV "سمجھنا") ;
|
||||||
university_N = mkN "یونیورسٹی" ;
|
university_N = mkN "یونیورسٹی" ;
|
||||||
@@ -218,7 +218,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
young_A = mkA "جوان" ;
|
young_A = mkA "جوان" ;
|
||||||
do_V2 = mkV2 (mkV "كرنا") ;
|
do_V2 = mkV2 (mkV "كرنا") ;
|
||||||
now_Adv = mkAdv "اب" ;
|
now_Adv = mkAdv "اب" ;
|
||||||
already_Adv = mkAdv "پہلے ہی" ;
|
already_Adv = mkAdv "پہلE?ہی" ;
|
||||||
song_N = mkN "گانا" ;
|
song_N = mkN "گانا" ;
|
||||||
add_V3 = mkV3 (compoundV "اضافہ" do_V2) "" "" ;
|
add_V3 = mkV3 (compoundV "اضافہ" do_V2) "" "" ;
|
||||||
number_N = mkN "ہندسہ" ;
|
number_N = mkN "ہندسہ" ;
|
||||||
@@ -231,7 +231,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
far_Adv = mkAdv "دور" ;
|
far_Adv = mkAdv "دور" ;
|
||||||
correct_A = mkA "صیہ" ;
|
correct_A = mkA "صیہ" ;
|
||||||
dry_A = mkA "خشك" ;
|
dry_A = mkA "خشك" ;
|
||||||
dull_A = mkA "نالiك" ;
|
dull_A = mkA "ناl?ك" ;
|
||||||
full_A = mkA "مكمل" ;
|
full_A = mkA "مكمل" ;
|
||||||
heavy_A = mkA "بھاری" ;
|
heavy_A = mkA "بھاری" ;
|
||||||
near_A = mkA "قریب" ;
|
near_A = mkA "قریب" ;
|
||||||
@@ -266,7 +266,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
foot_N = mkN "پاوں" ; -- not properly covered need to be discussed
|
foot_N = mkN "پاوں" ; -- not properly covered need to be discussed
|
||||||
forest_N = mkN "نجگل" ;
|
forest_N = mkN "نجگل" ;
|
||||||
grass_N = mkN "گھس" feminine ;
|
grass_N = mkN "گھس" feminine ;
|
||||||
guts_N = mkN "گuت" ; -- FIXME: no singular
|
guts_N = mkN "g?ت" ; -- FIXME: no singular
|
||||||
hair_N = mkN "بال" ;
|
hair_N = mkN "بال" ;
|
||||||
hand_N = mkN "ہاتھ" ;
|
hand_N = mkN "ہاتھ" ;
|
||||||
head_N = mkN "سر" ;
|
head_N = mkN "سر" ;
|
||||||
@@ -299,7 +299,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
stick_N = mkN "چھڑی" ;
|
stick_N = mkN "چھڑی" ;
|
||||||
tail_N = mkN "دم" ;
|
tail_N = mkN "دم" ;
|
||||||
tongue_N = mkN "زبان" feminine ;
|
tongue_N = mkN "زبان" feminine ;
|
||||||
tooth_N = mkN "دانت" masculine;
|
-- tooth_N = mkN "دانت" masculine;
|
||||||
wife_N = mkN "بیوی" ;
|
wife_N = mkN "بیوی" ;
|
||||||
wind_N = mkN "آندھی" ;
|
wind_N = mkN "آندھی" ;
|
||||||
wing_N = mkN "پر" ;
|
wing_N = mkN "پر" ;
|
||||||
@@ -344,7 +344,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
rub_V2 = mkV2 (mkV "رگڑنا") ;
|
rub_V2 = mkV2 (mkV "رگڑنا") ;
|
||||||
scratch_V2 = mkV2 (mkV "كھرچنا") "كو" ;
|
scratch_V2 = mkV2 (mkV "كھرچنا") "كو" ;
|
||||||
split_V2 = mkV2 (mkV "بانتا") "كو" ;
|
split_V2 = mkV2 (mkV "بانتا") "كو" ;
|
||||||
-- squeeze_V2 = dirV2 (regV "سقuععزع") ;
|
-- squeeze_V2 = dirV2 (regV "سq?ععزع") ;
|
||||||
-- stab_V2 = dirV2 (regDuplV "ستاب") ;
|
-- stab_V2 = dirV2 (regDuplV "ستاب") ;
|
||||||
suck_V2 = mkV2 (mkV "چوسنا") ;
|
suck_V2 = mkV2 (mkV "چوسنا") ;
|
||||||
throw_V2 = mkV2 (mkV "پھینكنا") ;
|
throw_V2 = mkV2 (mkV "پھینكنا") ;
|
||||||
@@ -352,19 +352,19 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
wash_V2 = mkV2 (mkV "دھونا") ;
|
wash_V2 = mkV2 (mkV "دھونا") ;
|
||||||
wipe_V2 = mkV2 (compoundV "صاف" (mkV "كرنا" ));
|
wipe_V2 = mkV2 (compoundV "صاف" (mkV "كرنا" ));
|
||||||
|
|
||||||
---- other_A = regA "oتہعر" ;
|
---- other_A = regA "?تہعر" ;
|
||||||
|
|
||||||
grammar_N = mkN "گردان" ;
|
grammar_N = mkN "گردان" ;
|
||||||
language_N = mkN "زبان" feminine ;
|
language_N = mkN "زبان" feminine ;
|
||||||
rule_N = mkN "اصول" ;
|
rule_N = mkN "اصول" ;
|
||||||
|
|
||||||
---- added 4/6/2007
|
---- added 4/6/2007
|
||||||
john_PN = mkPN "جoن" ;
|
john_PN = mkPN "جان" ;
|
||||||
question_N = mkN "سوال" ;
|
question_N = mkN "سوال" ;
|
||||||
-- ready_A = regA "رعادی" ;
|
-- ready_A = regA "رعادی" ;
|
||||||
reason_N = mkN "وجہ" feminine ;
|
reason_N = mkN "وجہ" feminine ;
|
||||||
today_Adv = mkAdv "آج" ;
|
today_Adv = mkAdv "آج" ;
|
||||||
uncertain_A = mkA ["غیر یقینی"] ;
|
uncertain_A = mkA ["غیریقینی"] ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
all: transliterate
|
|
||||||
|
|
||||||
transliterate:
|
|
||||||
gf <transliterateUrdu.gfs
|
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
---- syntax. To build a lexicon, it is better to use $ParadigmsUrd$, which
|
---- syntax. To build a lexicon, it is better to use $ParadigmsUrd$, which
|
||||||
---- gives a higher-level access to this module.
|
---- gives a higher-level access to this module.
|
||||||
--
|
--
|
||||||
resource MorphoUrd = ResUrd ** open Prelude,Predef in {
|
resource MorphoUrd = ResUrd ** open CommonHindustani,Prelude,Predef,ParamX in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
@@ -42,6 +42,7 @@ oper
|
|||||||
_ + "ی" => mkN03 (s);
|
_ + "ی" => mkN03 (s);
|
||||||
_ + ("اں"|"وں") => mkN04 (s);
|
_ + ("اں"|"وں") => mkN04 (s);
|
||||||
_ + "ؤ" => mkN12 (s);
|
_ + "ؤ" => mkN12 (s);
|
||||||
|
_ + "ت" => mkN10 s ;
|
||||||
_ => regNoun2 (s)
|
_ => regNoun2 (s)
|
||||||
};
|
};
|
||||||
regNoun2 : Str -> Noun;
|
regNoun2 : Str -> Noun;
|
||||||
@@ -195,7 +196,11 @@ oper
|
|||||||
|
|
||||||
-- Proposition
|
-- Proposition
|
||||||
|
|
||||||
makePrep : Str -> Preposition = \str -> {s = str};
|
makePrep : Str -> Str -> Preposition = \s1,s2 -> {s =
|
||||||
|
table {
|
||||||
|
Masc => s1;
|
||||||
|
Fem => s2
|
||||||
|
}; } ** { lock_Prep = <>};
|
||||||
|
|
||||||
----2 Pronouns
|
----2 Pronouns
|
||||||
PronForm = {s:Pronoun => Str};
|
PronForm = {s:Pronoun => Str};
|
||||||
|
|||||||
@@ -1,119 +1,2 @@
|
|||||||
concrete NounUrd of Noun = CatUrd ** open ResUrd, Prelude in {
|
concrete NounUrd of Noun = CatUrd ** NounHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
DetCN det cn = {
|
|
||||||
s = \\c => detcn2NP det cn c det.n ;
|
|
||||||
a = agrP3 cn.g det.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ;
|
|
||||||
UsePron p = {s = \\c => np2pronCase p.s c ; a = p.a} ;
|
|
||||||
|
|
||||||
PredetNP pred np = {
|
|
||||||
s = \\c => pred.s ++ np.s ! c ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
PPartNP np v2 = {
|
|
||||||
s = \\c => v2.s ! VF Imperf Pers1 Sg Fem ++ np.s ! c ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
RelNP np rs = {
|
|
||||||
s = \\c => np.s ! c ++ comma_Str ++ rs.s ! np.a ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdvNP np adv = {
|
|
||||||
s = \\c => np.s ! c ++ adv.s ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
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;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetQuant quant num = {
|
|
||||||
-- s = \\c => detquant2det quant.s num.s c;
|
|
||||||
s = \\n,g => quant.s!n!g!Dir ++ num.s;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetNP det = {
|
|
||||||
s = \\c => det2NP det c ; ---- case
|
|
||||||
a = agrP3 Masc Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
PossPron p = {s = \\_,_,_ => p.ps ; a = p.a} ;
|
|
||||||
|
|
||||||
NumSg = {s = []; n = Sg} ;
|
|
||||||
NumPl = {s = []; n = Pl} ;
|
|
||||||
|
|
||||||
NumCard n = n ** {hasCard = True} ;
|
|
||||||
|
|
||||||
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
|
||||||
OrdDigits n = {s = n.s ! NOrd; n = n.n} ;
|
|
||||||
|
|
||||||
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
|
||||||
OrdNumeral numeral = {s = numeral.s ! NOrd ; n = numeral.n} ;
|
|
||||||
|
|
||||||
AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
|
||||||
|
|
||||||
OrdSuperl a = {s = a.s ! Sg ! Masc ! Dir ! Superl ; n = Sg} ;
|
|
||||||
|
|
||||||
DefArt = {s = \\_,_,_ => [] ; a = defaultAgr} ;
|
|
||||||
IndefArt = {s = \\_,_,_ => [] ; a =defaultAgr } ;
|
|
||||||
|
|
||||||
MassNP cn = {s = \\c => toNP (cn.s ! Sg) c ; a = agrP3 cn.g Sg} ;
|
|
||||||
|
|
||||||
UseN n = n ;
|
|
||||||
UseN2 n = { s = n.s ; g = n.g };
|
|
||||||
|
|
||||||
Use2N3 f = {
|
|
||||||
s = f.s;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c2;
|
|
||||||
c3 = f.c3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Use3N3 f = {
|
|
||||||
s = f.s ;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c2;
|
|
||||||
c3 = f.c3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ComplN2 f x = {s = \\n,c => case c of {
|
|
||||||
Dir => x.s ! NPC c ++ f.c2 ++ f.s ! n ! c ;
|
|
||||||
Obl => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c ;
|
|
||||||
ResUrd.Voc => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c
|
|
||||||
};
|
|
||||||
g = f.g;
|
|
||||||
};
|
|
||||||
ComplN3 f x = {
|
|
||||||
s = \\n,c => x.s ! NPObj ++ f.c4 ++ f.s ! n ! Dir ;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c2;
|
|
||||||
c3 = f.c3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdjCN ap cn = {
|
|
||||||
s = \\n,c => ap.s ! n ! cn.g ! c ! Posit ++ cn.s ! n ! c ;
|
|
||||||
g = cn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
RelCN cn rs = {
|
|
||||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! agrP3 cn.g n ;
|
|
||||||
g = cn.g
|
|
||||||
} ;
|
|
||||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
|
||||||
|
|
||||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
|
||||||
|
|
||||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Dir ++ np.s ! NPC c ; g = cn.g} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,127 +1,118 @@
|
|||||||
concrete NumeralUrd of Numeral = CatUrd ** open ResUrd in {
|
concrete NumeralUrd of Numeral = CatUrd ** open ResUrd,CommonHindustani,ParamX, Prelude in {
|
||||||
-- By Harald Hammarström
|
-- By Harald Hammarström
|
||||||
-- Modification for Urdu Shafqat Virk
|
-- Modification for Urdu Shafqat Virk
|
||||||
flags coding=utf8 ;
|
|
||||||
--- still old Devanagari coding
|
-- still old Devanagari coding
|
||||||
|
|
||||||
|
flags coding=utf8 ;
|
||||||
param DForm = unit | ten ;
|
|
||||||
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
param DForm = unit | ten ;
|
||||||
param Size = sing | less100 | more100 ;
|
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
||||||
|
param Size = singl | less100 | more100 ;
|
||||||
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
|
||||||
|
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||||
|
|
||||||
lincat Dig = { s:Str ; n : Number};
|
|
||||||
lincat Digit = LinDigit ;
|
lincat Dig = { s:Str ; n : Number};
|
||||||
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
lincat Digit = LinDigit ;
|
||||||
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
||||||
lincat Sub1000000 = { s : Str ; n : Number } ;
|
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
||||||
|
lincat Sub1000000 = { s : Str ; n : Number } ;
|
||||||
lin num x0 =
|
|
||||||
{s = table {
|
lin num x0 =
|
||||||
NCard => x0.s ;
|
{s = table {
|
||||||
NOrd => x0.s ++ "واں" -- need to use mkOrd which will make irregular ordinals but it gives path error
|
NCard => x0.s ;
|
||||||
};
|
NOrd => x0.s ++ "واں" -- need to use mkOrd x0.s but it gives linking error
|
||||||
n = x0.n
|
};
|
||||||
} ;
|
n = x0.n
|
||||||
oper mkOrd : Str -> Str =
|
} ;
|
||||||
\s -> case s of {
|
|
||||||
"عك" => "پہلا";
|
|
||||||
"دo" => "دوسرا";
|
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
||||||
"تi:ن" => "تعسرا";
|
\do -> \bis -> \sz ->
|
||||||
"چa:ر" => "چوتھا";
|
{s = table {unit => do ; ten => bis } ;
|
||||||
("چحاہ"|"چحا"|"چحاi") => "چھٹا";
|
size = sz ; n = Pl} ;
|
||||||
_ => s ++ "واں"
|
|
||||||
};
|
lin n2 = mkNum "دو" "بیس" r2 ;
|
||||||
-- {s = \\_ => x0.s ; n = x0.n} ;
|
lin n3 = mkNum "تین" "تیس" r3 ;
|
||||||
|
lin n4 = mkNum "چار" "چالیس" r4 ;
|
||||||
|
lin n5 = mkNum "پانچ" "پچاس" r5 ;
|
||||||
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
lin n6 = mkNum "چھ" "ساتھ" r6 ;
|
||||||
\do -> \bis -> \sz ->
|
lin n7 = mkNum "سات" "ستر" r7;
|
||||||
{s = table {unit => do ; ten => bis } ;
|
lin n8 = mkNum "آتھ" "اسی" r8;
|
||||||
size = sz ; n = Pl} ;
|
lin n9 = mkNum "نو" "نوے" r9 ;
|
||||||
|
|
||||||
lin n2 = mkNum "دو" "بیس" r2 ;
|
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
||||||
lin n3 = mkNum "تین" "تیس" r3 ;
|
sg => a1 + "اہ" ;
|
||||||
lin n4 = mkNum "چار" "چالیس" r4 ;
|
r2 => a2 + "یس" ;
|
||||||
lin n5 = mkNum "پانچ" "پچاس" r5 ;
|
r3 => a3 + "تیس" ;
|
||||||
lin n6 = mkNum "چھ" "ساتھ" r6 ;
|
r4 => a4 + "الیس" ;
|
||||||
lin n7 = mkNum "سات" "ستر" r7;
|
r5 => a5 + "ن" ;
|
||||||
lin n8 = mkNum "آتھ" "اسی" r8;
|
r6 => a6 + "ساٹھ" ;
|
||||||
lin n9 = mkNum "نو" "نوے" r9 ;
|
r7 => a7 + "ہتر" ;
|
||||||
|
r8 => a8 + "اسی" ;
|
||||||
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
r9 => a9 + "انوے"
|
||||||
sg => a1 + "اہ" ;
|
} ;
|
||||||
r2 => a2 + "i:س" ;
|
|
||||||
r3 => a3 + "تi:س" ;
|
oper rows : DSize => DSize => Str = table {
|
||||||
r4 => a4 + "a:لi:س" ;
|
sg => mkR "گیارہ" "اك" "اكت" "اكت" "اكیاو" "اك" "اك" "اكی" "اكی" ;
|
||||||
r5 => a5 + "ان" ;
|
r2 => mkR "بارہ" "بای" "بات" "بای" "باو" "با" "با" "بای" "ب" ;
|
||||||
r6 => a6 + "ساٹح" ;
|
r3 => mkR "تیر" "تی" "تین" "تنت" "ترپ" "تری" "ت" "تر" "تر" ;
|
||||||
r7 => a7 + "ہاتتار" ;
|
r4 => mkR "چود" "چوب" "چون" "چوا" "چوو" "چون" "چوہ" "چور" "چور" ;
|
||||||
r8 => a8 + "a:سi:" ;
|
r5 => mkR "پند" "پچی" "پین" "پنتا" "پچپ" "پین" "پہ" "پچ" "پچ" ;
|
||||||
r9 => a9 + "a:ناvع"
|
r6 => mkR "سول" "چھب" "چھت" "چھی" "چھپ" "چھیا" "چھ" "چھی" "چھی" ;
|
||||||
} ;
|
r7 => mkR "ستر" "ستا" "سین" "سنت" "ستاو" "ستا" "سر" "ست" "ستا" ;
|
||||||
|
r8 => mkR "اتھار" "اتھای" "اڑ" "اڑت" "اتھاو" "اڑ" "اتھ" "اتھ" "اتھ" ;
|
||||||
oper rows : DSize => DSize => Str = table {
|
r9 => table {sg => "انیس" ; r2 => "انتیس" ; r3 => "انتالیس" ;
|
||||||
sg => mkR "گیارہ" "iكك" "iكات" "عكت" "iكیاو" "iك" "iك" "iكی" "iكی" ;
|
r4 => "انچاس" ; r5 => "انستھ" ; r6 => "انہتر" ;
|
||||||
r2 => mkR "بارہ" "بای" "بات" "بای" "باو" "با" "با" "بای" "ب" ;
|
r7 => "اناسی" ;
|
||||||
r3 => mkR "تیر" "تی" "تین" "تنت" "ترپ" "تری" "ت" "تر" "تر" ;
|
r8 => "انانوے" ; r9 => "ننانوے" }
|
||||||
r4 => mkR "چود" "چوب" "چون" "چوا" "چوو" "چون" "چوہ" "چور" "چور" ;
|
} ;
|
||||||
r5 => mkR "پند" "پچی" "پین" "پنتا" "پچپ" "پین" "پہ" "پچ" "پچ" ;
|
|
||||||
r6 => mkR "سول" "چھب" "چھت" "چھی" "چھپ" "چھیا" "چھ" "چھی" "چھی" ;
|
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
||||||
r7 => mkR "ستر" "ستا" "سین" "سنت" "ستاو" "ستا" "سر" "ست" "ستا" ;
|
|
||||||
r8 => mkR "اتھار" "اتھای" "اڑ" "اڑت" "اتھاو" "اڑ" "اتھ" "اتھ" "اتھ" ;
|
lin pot01 = {s = table {unit => "ایك" ; _ => "دمی" } ; size = sg ; n = Sg} ;
|
||||||
r9 => table {sg => "انیس" ; r2 => "انتیس" ; r3 => "انتالیس" ;
|
lin pot0 d = d ;
|
||||||
r4 => "انچاس" ; r5 => "انستھ" ; r6 => "انہتر" ;
|
lin pot110 = {s = "داس" ; size = less100 ; n = Pl} ;
|
||||||
r7 => "اناسی" ;
|
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
||||||
r8 => "انانوے" ; r9 => "ننانوے" }
|
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
||||||
} ;
|
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => singl ; _ => less100} ! n.size ; n = n.n } ;
|
||||||
|
|
||||||
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
||||||
|
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
||||||
lin pot01 = {s = table {unit => "ایك" ; _ => "دuممی" } ; size = sg ; n = Sg} ;
|
|
||||||
lin pot0 d = d ;
|
lin pot1as2 n = {s = n.s ; s2 = "دمی" ; size = n.size ; n = n.n} ;
|
||||||
lin pot110 = {s = "داس" ; size = less100 ; n = Pl} ;
|
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
||||||
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
s2 = d.s ! unit ++ "لاكھ" ; size = more100 ; n = d.n} ;
|
||||||
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
lin pot2plus d e =
|
||||||
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => sing ; _ => less100} ! n.size ; n = n.n } ;
|
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
||||||
|
s2 = (d.s ! unit) ++ "لاكھ" ++ (mkhazar e.s e.size) ;
|
||||||
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
size = more100 ; n = d.n} ;
|
||||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
|
||||||
|
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
||||||
lin pot1as2 n = {s = n.s ; s2 = "دuممی" ; size = n.size ; n = n.n} ;
|
lin pot3 n = {s = table { singl => ekhazar ;
|
||||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
less100 => n.s ++ "ہزار" ;
|
||||||
s2 = d.s ! unit ++ "لاكھ" ; size = more100 ; n = d.n} ;
|
more100 => n.s2 } ! n.size ; n = n.n} ;
|
||||||
lin pot2plus d e =
|
lin pot3plus n m =
|
||||||
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
{s = table {singl => ekhazar ;
|
||||||
s2 = (d.s ! unit) ++ "لاكھ" ++ (mkhazar e.s e.size) ;
|
less100 => n.s ++ "ہزار" ;
|
||||||
size = more100 ; n = d.n} ;
|
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
||||||
|
|
||||||
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
lin D_0 = { s = "۰" ; n = Sg};
|
||||||
lin pot3 n = {s = table { sing => ekhazar ;
|
lin D_1 = { s = "۱" ; n = Sg};
|
||||||
less100 => n.s ++ "ہزار" ;
|
lin D_2 = { s = "۲" ; n = Pl};
|
||||||
more100 => n.s2 } ! n.size ; n = n.n} ;
|
lin D_3 = { s = "۳" ; n = Pl};
|
||||||
lin pot3plus n m =
|
lin D_4 = { s = "۴" ; n = Pl};
|
||||||
{s = table {sing => ekhazar ;
|
lin D_5 = { s = "۵" ; n = Pl};
|
||||||
less100 => n.s ++ "ہزار" ;
|
lin D_6 = { s = "۶" ; n = Pl};
|
||||||
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
lin D_7 = { s = "۷" ; n = Pl};
|
||||||
|
lin D_8 = { s = "۸" ; n = Pl};
|
||||||
lin D_0 = { s = "0" ; n = Sg};
|
lin D_9 = { s = "۹" ; n = Pl};
|
||||||
lin D_1 = { s = "1" ; n = Sg};
|
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
||||||
lin D_2 = { s = "2" ; n = Pl};
|
lin IIDig d dg = { s = \\df => Prelude.glue (dg.s ! df) d.s ; n = Pl };
|
||||||
lin D_3 = { s = "3" ; n = Pl};
|
|
||||||
lin D_4 = { s = "4" ; n = Pl};
|
oper ekhazar : Str = variants {"ہزار" ; "ایك" ++ "ہزار"} ;
|
||||||
lin D_5 = { s = "5" ; n = Pl};
|
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {singl => ekhazar ; _ => s ++ "ہزار"} ! sz ;
|
||||||
lin D_6 = { s = "6" ; n = Pl};
|
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "سو" ; _ => s ++ "سو"} ! sz ;
|
||||||
lin D_7 = { s = "7" ; n = Pl};
|
}
|
||||||
lin D_8 = { s = "8" ; n = Pl};
|
|
||||||
lin D_9 = { s = "9" ; n = Pl};
|
|
||||||
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
|
||||||
lin IIDig d dg = { s = \\df => dg.s ! df ++ d.s ; n = Pl }; -- need to use + rather than ++, but gives error need to discuss
|
|
||||||
|
|
||||||
oper ekhazar : Str = variants {"ہزار" ; "ایك" ++ "ہزار"} ;
|
|
||||||
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {sing => ekhazar ; _ => s ++ "ہزار"} ! sz ;
|
|
||||||
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "سو" ; _ => s ++ "سو"} ! sz ;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ resource ParadigmsUrd = open
|
|||||||
Predef,
|
Predef,
|
||||||
Prelude,
|
Prelude,
|
||||||
MorphoUrd,
|
MorphoUrd,
|
||||||
CatUrd
|
CatUrd,
|
||||||
|
CommonHindustani,
|
||||||
|
ParamX
|
||||||
in {
|
in {
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
@@ -33,10 +35,10 @@ oper
|
|||||||
= \sd,so,sv,pd,po,pv,g -> mkNoun sd so sv pd po pv g ** {lock_N = <>} ;
|
= \sd,so,sv,pd,po,pv,g -> mkNoun sd so sv pd po pv g ** {lock_N = <>} ;
|
||||||
} ;
|
} ;
|
||||||
mkN2 : N -> Prep -> Str -> N2;
|
mkN2 : N -> Prep -> Str -> N2;
|
||||||
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ! n.g ; c3 = c } ;
|
||||||
|
|
||||||
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
||||||
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
|
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ! n.g ; c3 = q ; c4 = r} ;
|
||||||
|
|
||||||
-- Compound Nouns
|
-- Compound Nouns
|
||||||
|
|
||||||
@@ -51,6 +53,8 @@ oper
|
|||||||
mkDet : Str -> Str -> Str -> Str -> Number -> Det = \s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
mkDet : Str -> Str -> Str -> Str -> Number -> Det = \s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
||||||
mkIP : (x1,x2,x3:Str) -> Number -> Gender -> IP = \s1,s2,s3,n,g -> let p = mkIntPronForm s1 s2 s3 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
|
mkIP : (x1,x2,x3:Str) -> Number -> Gender -> IP = \s1,s2,s3,n,g -> let p = mkIntPronForm s1 s2 s3 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
|
||||||
|
|
||||||
|
-- AdN
|
||||||
|
mkAdN : Str -> AdN = \s -> {s = s ; p = False ; lock_AdN = <>} ;
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
@@ -59,6 +63,8 @@ oper
|
|||||||
mkA : Str -> Str -> A2
|
mkA : Str -> Str -> A2
|
||||||
= \a,c -> let n = regAdjective a in {s = n.s; c2 = c} ** {lock_A2 = <>} ;
|
= \a,c -> let n = regAdjective a in {s = n.s; c2 = c} ** {lock_A2 = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
mkA2 : A -> Str -> A2 ;
|
||||||
|
mkA2 a str = a ** {c2=str ; lock_A2 = <>} ;
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
@@ -73,11 +79,14 @@ oper
|
|||||||
mkV2 : V -> Str -> V2
|
mkV2 : V -> Str -> V2
|
||||||
= \v,p -> v ** {c2 = {s = p ; c = VTrans} ; lock_V2 = <>} ;
|
= \v,p -> v ** {c2 = {s = p ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
dirV2 : V -> V2 = \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
|
|
||||||
mkV3 : V -> Str -> Str -> V3;
|
mkV3 : V -> Str -> Str -> V3;
|
||||||
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
|
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||||
mkV2V : V -> Str -> Str -> Bool -> V2V ;
|
mkV2V : V -> Str -> Str -> Bool -> V2V ;
|
||||||
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
|
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
|
||||||
|
dirdirV3 : V -> V3 ;
|
||||||
|
dirdirV3 v = v ** { c2 = [] ; c3 = [] ; lock_V3 = <>} ;
|
||||||
|
|
||||||
-- compund verbs
|
-- compund verbs
|
||||||
compoundV = overload {
|
compoundV = overload {
|
||||||
@@ -87,12 +96,24 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
----2 Adverbs
|
----2 Adverbs
|
||||||
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
|
mkAdv : Str -> Adv = \str -> {s = \\_ => str ; lock_Adv = <>};
|
||||||
|
|
||||||
----2 Prepositions
|
----2 Prepositions
|
||||||
|
|
||||||
mkPrep : Str -> Prep ;
|
mkPrep : Str -> Str -> Prep ;
|
||||||
mkPrep str = lin Prep (makePrep str) ;
|
mkPrep s1 s2 = makePrep s1 s2 ** {lock_Prep = <>};
|
||||||
|
|
||||||
|
--3 Determiners and quantifiers
|
||||||
|
|
||||||
|
-- mkQuant : overload {
|
||||||
|
-- mkQuant : Pron -> Quant ;
|
||||||
|
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ;
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
-- mkQuant = overload {
|
||||||
|
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||||
|
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = mkQuantifier;
|
||||||
|
-- } ;
|
||||||
|
|
||||||
--2 Conjunctions
|
--2 Conjunctions
|
||||||
mkConj : overload {
|
mkConj : overload {
|
||||||
@@ -112,15 +133,22 @@ oper
|
|||||||
lin Conj (sd2 x y ** {n = n}) ;
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
-- mkV0 : V -> V0 ;
|
-- mkV0 : V -> V0 ;
|
||||||
-- mkVS : V -> VS ;
|
mkVS : V -> VS;
|
||||||
|
mkVS v = v ;
|
||||||
-- mkV2S : V -> Prep -> V2S ;
|
-- mkV2S : V -> Prep -> V2S ;
|
||||||
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
||||||
|
|
||||||
|
mkAdA : Str -> AdA ;
|
||||||
|
-- mkAdv x = lin Adv (ss x) ;
|
||||||
|
-- mkAdV x = lin AdV (ss x) ;
|
||||||
|
mkAdA x = lin AdA (ss x) ;
|
||||||
|
-- mkAdN x = lin AdN (ss x) ;
|
||||||
|
|
||||||
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
-- mkVA : V -> VA ;
|
-- mkVA : V -> VA ;
|
||||||
-- mkV2A : V -> Prep -> V2A ;
|
-- mkV2A : V -> Prep -> V2A ;
|
||||||
-- mkVQ : V -> VQ ;
|
mkVQ : V -> VQ ;
|
||||||
|
mkVQ v = v ;
|
||||||
-- mkV2Q : V -> Prep -> V2Q ;
|
-- mkV2Q : V -> Prep -> V2Q ;
|
||||||
--
|
--
|
||||||
-- mkAS : A -> AS ;
|
-- mkAS : A -> AS ;
|
||||||
|
|||||||
@@ -1,27 +1,2 @@
|
|||||||
concrete PhraseUrd of Phrase = CatUrd ** open Prelude, ResUrd in {
|
concrete PhraseUrd of Phrase = CatUrd ** PhraseHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
lin
|
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
|
||||||
|
|
||||||
UttS s = s ;
|
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
|
|
||||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
|
||||||
|
|
||||||
UttIP ip = {s = ip.s ! Dir} ; --- Acc also
|
|
||||||
UttIAdv iadv = iadv ;
|
|
||||||
UttNP np = {s = np.s ! NPC Dir} ;
|
|
||||||
UttVP vp = {s = infVP False vp (agrP3 Masc Sg)} ;
|
|
||||||
UttAdv adv = adv ;
|
|
||||||
UttCN cn = {s = cn.s ! Sg ! Dir};
|
|
||||||
UttCard n = n ;
|
|
||||||
UttAP ap = {s = ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
|
||||||
PConjConj conj = {s = conj.s2} ; ---
|
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
|
||||||
VocNP np = {s = np.s ! NPC Dir} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,75 +1,2 @@
|
|||||||
concrete QuestionUrd of Question = CatUrd ** open ResUrd, Prelude in {
|
concrete QuestionUrd of Question = CatUrd ** QuestionHindustani with
|
||||||
flags optimize=all_subs ;
|
(ResHindustani = ResUrd) ;
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
QuestCl cl = {
|
|
||||||
s = \\t,p,qf => case qf of {
|
|
||||||
QDir => cl.s ! t ! p ! OQuest;
|
|
||||||
QIndir => agr_Str ++ cl.s ! t! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
QuestVP qp vp =
|
|
||||||
let cl = mkSClause [] (Ag qp.g qp.n Pers3_Near) vp;
|
|
||||||
qp1 = qp.s ! Dir;
|
|
||||||
qp2 = qp.s ! Obl ++ nE_Str
|
|
||||||
in { s = \\t,p,o => case t of {
|
|
||||||
VPImpPast => qp2 ++ cl.s ! t ! p ! ODir;
|
|
||||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
QuestSlash ip slash =
|
|
||||||
let ip1 = ip.s ! Dir;
|
|
||||||
ip2 = ip.s ! Obl ++ nE_Str
|
|
||||||
in {
|
|
||||||
s = \\t,p,o => case t of {
|
|
||||||
VPImpPast => ip2 ++ slash.s ! t ! p ! ODir;
|
|
||||||
_ => ip1 ++ slash.s ! t ! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
QuestIAdv iadv cl = {
|
|
||||||
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
|
||||||
};
|
|
||||||
|
|
||||||
QuestIComp icomp np =
|
|
||||||
let cl = mkSClause (np.s ! NPC Dir ++ icomp.s) np.a (predAux auxBe);
|
|
||||||
in {
|
|
||||||
s = \\t,p,qf => case qf of {
|
|
||||||
QDir => cl.s ! t ! p ! ODir;
|
|
||||||
QIndir => cl.s ! t! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
PrepIP p ip = {s = ip.s ! ResUrd. Voc ++ p.s } ;
|
|
||||||
|
|
||||||
AdvIP ip adv = {
|
|
||||||
s = \\c => adv.s ++ ip.s ! c ;
|
|
||||||
n = ip.n;
|
|
||||||
g = ip.g;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IdetCN idet cn = {
|
|
||||||
s = \\c => idet.s ! cn.g ++ cn.s ! idet.n ! c ;
|
|
||||||
g = cn.g;
|
|
||||||
n = idet.n;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IdetIP idet = {
|
|
||||||
s = \\_ => idet.s ! Masc ;
|
|
||||||
n = idet.n;
|
|
||||||
g = Masc;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IdetQuant iqant num = {
|
|
||||||
s = \\g => iqant.s ! num.n ++ num.s ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdvIAdv i a = {s = i.s ++ a.s} ;
|
|
||||||
|
|
||||||
CompIAdv a = a ;
|
|
||||||
CompIP p = ss (p.s ! Dir) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
Urdu resource grammar in GF
|
Some of the sources are transliterated, in
|
||||||
|
|
||||||
(c) Shafqat Virk 2010 under GNU LGPL
|
|
||||||
|
|
||||||
Sources: files in ./transliterated/ convert to files with the same names in ./
|
|
||||||
**Don't hand-edit** the generated files, but the ones in ./transliterated/
|
|
||||||
To convert the edited files, do 'make' in this directory.
|
|
||||||
|
|
||||||
Principles: all files containing string literals are in ./transliterated/
|
|
||||||
**Don't put string literals** in other files. Add string opers to transliterated/ResUrd.gf
|
|
||||||
instead (to the end of the file).
|
|
||||||
|
|
||||||
Purpose: the files without strings will work as such for Hindi as well.
|
|
||||||
|
|
||||||
|
./src
|
||||||
|
../hindustani
|
||||||
|
|
||||||
|
Before compilation, do
|
||||||
|
|
||||||
|
gf -s <translit.gfs
|
||||||
|
|
||||||
|
to get unicode.
|
||||||
|
|||||||
@@ -1,66 +1,2 @@
|
|||||||
concrete RelativeUrd of Relative = CatUrd ** open ResUrd in {
|
concrete RelativeUrd of Relative = CatUrd ** RelativeHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
RelCl cl = {
|
|
||||||
s = \\t,p,o,agr => case <t,giveNumber agr> of {
|
|
||||||
<VPImpPast,Sg> => js_Str ++ cl.s ! t ! p ! o ;
|
|
||||||
<VPImpPast,Pl> => jn_Str ++ cl.s ! t ! p ! o ;
|
|
||||||
<_,_> => jw_Str ++ cl.s ! t ! p ! o
|
|
||||||
};
|
|
||||||
c = Dir
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- {-
|
|
||||||
RelVP rp vp = {
|
|
||||||
s = \\t,p,o,ag =>
|
|
||||||
let
|
|
||||||
agr = case rp.a of {
|
|
||||||
RNoAg => ag ;
|
|
||||||
RAg a => a
|
|
||||||
} ;
|
|
||||||
cl = mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp;
|
|
||||||
|
|
||||||
-- cl = case t of {
|
|
||||||
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
|
||||||
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
|
||||||
-- };
|
|
||||||
in
|
|
||||||
cl.s ! t ! p ! ODir ;
|
|
||||||
c = Dir
|
|
||||||
} ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
RelSlash rp slash = {
|
|
||||||
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! Dir ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
|
||||||
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
|
||||||
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
|
|
||||||
-- };
|
|
||||||
c = Dir
|
|
||||||
} ;
|
|
||||||
-- -}
|
|
||||||
FunRP p np rp = {
|
|
||||||
s = \\n,c => rp.s ! n ! c ++ np.s ! NPC c ++ p.s ;
|
|
||||||
a = RAg np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IdRP = {
|
|
||||||
s = table {
|
|
||||||
Sg => table {
|
|
||||||
|
|
||||||
ResUrd.Dir => jw_Str ;
|
|
||||||
ResUrd.Obl => js_Str ;
|
|
||||||
ResUrd.Voc => js_Str
|
|
||||||
};
|
|
||||||
Pl => table {
|
|
||||||
ResUrd.Dir => jw_Str ;
|
|
||||||
ResUrd.Obl => jn_Str ;
|
|
||||||
ResUrd.Voc => jn_Str
|
|
||||||
}
|
|
||||||
};
|
|
||||||
a = RNoAg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,641 +1,2 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
instance ResUrd of ResHindustani = DiffUrd ** open CommonHindustani, Prelude, Predef in {
|
||||||
--
|
} ;
|
||||||
--1 Urdu auxiliary operations.
|
|
||||||
--
|
|
||||||
-- This module contains operations that are needed to make the
|
|
||||||
-- resource syntax work.
|
|
||||||
|
|
||||||
resource ResUrd = ParamX ** open Prelude,Predef in {
|
|
||||||
|
|
||||||
flags optimize=all ;
|
|
||||||
coding = utf8;
|
|
||||||
|
|
||||||
param
|
|
||||||
Case = Dir | Obl | Voc ;
|
|
||||||
Gender = Masc | Fem ;
|
|
||||||
VTense = Subj | Perf | Imperf;
|
|
||||||
UPerson = Pers1
|
|
||||||
| Pers2_Casual
|
|
||||||
| Pers2_Familiar
|
|
||||||
| Pers2_Respect
|
|
||||||
| Pers3_Near
|
|
||||||
| Pers3_Distant;
|
|
||||||
|
|
||||||
Order = ODir | OQuest ;
|
|
||||||
|
|
||||||
--2 For $Relative$
|
|
||||||
|
|
||||||
RAgr = RNoAg | RAg Agr ;
|
|
||||||
RCase = RC Number Case ;
|
|
||||||
|
|
||||||
-- for Numerial
|
|
||||||
|
|
||||||
CardOrd = NCard | NOrd ;
|
|
||||||
|
|
||||||
-----------------------------------------
|
|
||||||
-- Urd Pronouns
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
Pronoun = P Number Gender Case UPerson;
|
|
||||||
PersPronForm = PPF Number UPerson Case;
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
--Verbs
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
VerbForm = VF VTense UPerson Number Gender
|
|
||||||
| Inf
|
|
||||||
| Root
|
|
||||||
| Inf_Obl
|
|
||||||
| Inf_Fem;
|
|
||||||
oper
|
|
||||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
|
||||||
Verb = {s : VerbForm => Str} ;
|
|
||||||
Preposition = {s : Str};
|
|
||||||
DemPronForm = {s : Number => Gender => Case => Str};
|
|
||||||
PossPronForm = {s : Number => Gender => Case => Str};
|
|
||||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
|
||||||
|
|
||||||
-- a useful oper
|
|
||||||
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
-- Urd Adjectives
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
Adjective = { s: Number => Gender => Case => Degree => Str };
|
|
||||||
|
|
||||||
|
|
||||||
mkAdjective : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36:Str) -> Adjective =
|
|
||||||
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,y31,y32,y33,y34,y35,y36 -> {
|
|
||||||
s = table {
|
|
||||||
Sg => table {
|
|
||||||
Masc => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y1 ;
|
|
||||||
Compar => y2 ;
|
|
||||||
Superl => y3
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y4 ;
|
|
||||||
Compar => y5 ;
|
|
||||||
Superl => y6
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y7 ;
|
|
||||||
Compar => y8 ;
|
|
||||||
Superl => y9
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Fem => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y10 ;
|
|
||||||
Compar => y11 ;
|
|
||||||
Superl => y12
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y13 ;
|
|
||||||
Compar => y14 ;
|
|
||||||
Superl => y15
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y16 ;
|
|
||||||
Compar => y17 ;
|
|
||||||
Superl => y18
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Pl => table {
|
|
||||||
Masc => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y19 ;
|
|
||||||
Compar => y20 ;
|
|
||||||
Superl => y21
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y22 ;
|
|
||||||
Compar => y23 ;
|
|
||||||
Superl => y24
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y25 ;
|
|
||||||
Compar => y26 ;
|
|
||||||
Superl => y27
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Fem => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y28 ;
|
|
||||||
Compar => y29 ;
|
|
||||||
Superl => y30
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y31 ;
|
|
||||||
Compar => y32 ;
|
|
||||||
Superl => y33
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y34 ;
|
|
||||||
Compar => y35 ;
|
|
||||||
Superl => y36
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
regAdjective : Str -> Adjective;
|
|
||||||
regAdjective x = case x of {
|
|
||||||
acch + ("ا"|"اں") => mkAdjective x ("بہت" ++ x) ("ساب سے" ++ x) (acch + "ے") ("بہت" ++ acch + "ے") ("ساب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("ساب سے" ++ acch + "ے")
|
|
||||||
(acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی")
|
|
||||||
(acch +"ے") ("بہت" ++ acch + "ے") ("ساب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("ساب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("ساب سے" ++ acch + "ے")
|
|
||||||
(acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("ساب سے" ++ acch + "ی");
|
|
||||||
|
|
||||||
_ => mkAdjective x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RefPron : Str;
|
|
||||||
RefPron = "خود";
|
|
||||||
|
|
||||||
----------------------------------------------------------
|
|
||||||
-- Grammar part
|
|
||||||
----------------------------------------------------------
|
|
||||||
|
|
||||||
param
|
|
||||||
Agr = Ag Gender Number UPerson ;
|
|
||||||
NPCase = NPC Case | NPObj | NPErg ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
np2pronCase : (Case => Str) -> NPCase -> Str = \ppf,npc -> case npc of {
|
|
||||||
NPC c => ppf ! c;
|
|
||||||
NPObj => ppf ! Dir ;
|
|
||||||
NPErg => ppf ! Obl ++ "نع"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
toNP : ( Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
|
||||||
NPC c => pn ! c ;
|
|
||||||
NPObj => pn ! Dir ;
|
|
||||||
NPErg => pn ! Obl ++ "نع"
|
|
||||||
} ;
|
|
||||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
|
||||||
NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
|
||||||
NPObj => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
|
||||||
NPErg => dt.s ! Sg ! Masc ++ 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 ++ "نع"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Agreement transformations
|
|
||||||
-----------------------------------------
|
|
||||||
toAgr : Number -> UPerson -> Gender -> Agr = \n,p,g ->
|
|
||||||
Ag g n p;
|
|
||||||
|
|
||||||
|
|
||||||
fromAgr : Agr -> {n : Number ; p : UPerson ; g : Gender} = \a -> case a of {
|
|
||||||
Ag g n p => {n = n ; p = p ; g = g}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
|
||||||
let a = fromAgr a0 ; b = fromAgr b0
|
|
||||||
in
|
|
||||||
toAgr
|
|
||||||
(conjNumber a.n b.n)
|
|
||||||
b.p a.g;
|
|
||||||
|
|
||||||
giveNumber : Agr -> Number =\a -> case a of {
|
|
||||||
Ag _ n _ => n
|
|
||||||
};
|
|
||||||
giveGender : Agr -> Gender =\a -> case a of {
|
|
||||||
Ag g _ _ => g
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultAgr : Agr = agrP3 Masc Sg ;
|
|
||||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
|
||||||
personalAgr : Agr = agrP1 Masc Sg ;
|
|
||||||
agrP1 : Gender -> Number -> Agr = \g,n -> Ag g n Pers1 ;
|
|
||||||
|
|
||||||
param
|
|
||||||
CPolarity =
|
|
||||||
CPos
|
|
||||||
| CNeg Bool ; -- contracted or not
|
|
||||||
|
|
||||||
oper
|
|
||||||
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
|
||||||
Pos => CPos ;
|
|
||||||
Neg => CNeg b
|
|
||||||
} ;
|
|
||||||
|
|
||||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
CTense = CPresent | CPast | CFuture ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g ->
|
|
||||||
case <t,n,p,g> of {
|
|
||||||
<CPresent,Sg,Pers1,_ > => "ہوں" ;
|
|
||||||
<CPresent,Sg,Pers2_Casual,_ > => "ہے" ;
|
|
||||||
<CPresent,Sg,Pers2_Familiar,_ > => "ہو" ;
|
|
||||||
<CPresent,Sg,Pers2_Respect,_ > => "ہیں" ;
|
|
||||||
<CPresent,Sg,Pers3_Near,_ > => "ہے" ;
|
|
||||||
<CPresent,Sg,Pers3_Distant,_ > => "ہے" ;
|
|
||||||
<CPresent,Pl,Pers1,_ > => "ہیں" ;
|
|
||||||
<CPresent,Pl,Pers2_Casual,_ > => "ہو" ;
|
|
||||||
<CPresent,Pl,Pers2_Familiar,_ > => "ہو" ;
|
|
||||||
<CPresent,Pl,Pers2_Respect,_ > => "ہیں" ;
|
|
||||||
<CPresent,Pl,Pers3_Near,_ > => "ہیں" ;
|
|
||||||
<CPresent,Pl,Pers3_Distant,_ > => "ہیں" ;
|
|
||||||
<CPast,Sg,Pers1,Masc > => "تھا" ;
|
|
||||||
<CPast,Sg,Pers1,Fem > => "تھی" ;
|
|
||||||
<CPast,Sg,Pers2_Casual,Masc > => "تھا" ;
|
|
||||||
<CPast,Sg,Pers2_Casual,Fem > => "تھی" ;
|
|
||||||
<CPast,Sg,Pers2_Familiar,Masc > => "تھا" ;
|
|
||||||
<CPast,Sg,Pers2_Familiar,Fem > => "تھی" ;
|
|
||||||
<CPast,Sg,Pers2_Respect,Masc > => "تھے" ;
|
|
||||||
<CPast,Sg,Pers2_Respect,Fem > => "تھیں" ;
|
|
||||||
<CPast,Sg,Pers3_Near,Masc > => "تھا" ;
|
|
||||||
<CPast,Sg,Pers3_Near,Fem > => "تھی" ;
|
|
||||||
<CPast,Sg,Pers3_Distant,Masc > => "تھا" ;
|
|
||||||
<CPast,Sg,Pers3_Distant,Fem > => "تھی" ;
|
|
||||||
<CPast,Pl,Pers1,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers1,Fem > => "تھیں" ;
|
|
||||||
<CPast,Pl,Pers2_Casual,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers2_Casual,Fem > => "تھیں" ;
|
|
||||||
<CPast,Pl,Pers2_Familiar,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers2_Familiar,Fem > => "تھیں" ;
|
|
||||||
<CPast,Pl,Pers2_Respect,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers2_Respect,Fem > => "تھیں" ;
|
|
||||||
<CPast,Pl,Pers3_Near,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers3_Near,Fem > => "تھیں" ;
|
|
||||||
<CPast,Pl,Pers3_Distant,Masc > => "تھے" ;
|
|
||||||
<CPast,Pl,Pers3_Distant,Fem > => "تھیں" ;
|
|
||||||
<CFuture,Sg,Pers1,Masc > => "گا" ;
|
|
||||||
<CFuture,Sg,Pers1,Fem > => "گی" ;
|
|
||||||
<CFuture,Sg,Pers2_Casual,Masc > => "گا" ;
|
|
||||||
<CFuture,Sg,Pers2_Casual,Fem > => "گi" ;
|
|
||||||
<CFuture,Sg,Pers2_Familiar,Masc > => "گے" ;
|
|
||||||
<CFuture,Sg,Pers2_Familiar,Fem > => "گی" ;
|
|
||||||
<CFuture,Sg,Pers2_Respect,Masc > => "گے" ;
|
|
||||||
<CFuture,Sg,Pers2_Respect,Fem > => "گی" ;
|
|
||||||
<CFuture,Sg,Pers3_Near,Masc > => "گا" ;
|
|
||||||
<CFuture,Sg,Pers3_Near,Fem > => "گی" ;
|
|
||||||
<CFuture,Sg,Pers3_Distant,Masc > => "گا" ;
|
|
||||||
<CFuture,Sg,Pers3_Distant,Fem > => "گی" ;
|
|
||||||
<CFuture,Pl,Pers1,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers1,Fem > => "گی" ;
|
|
||||||
<CFuture,Pl,Pers2_Casual,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers2_Casual,Fem > => "گی" ;
|
|
||||||
<CFuture,Pl,Pers2_Familiar,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers2_Familiar,Fem > => "گی" ;
|
|
||||||
<CFuture,Pl,Pers2_Respect,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers2_Respect,Fem > => "گی" ;
|
|
||||||
<CFuture,Pl,Pers3_Near,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers3_Near,Fem > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers3_Distant,Masc > => "گے" ;
|
|
||||||
<CFuture,Pl,Pers3_Distant,Fem > => "گی"
|
|
||||||
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
VPPTense =
|
|
||||||
VPPres
|
|
||||||
|VPPast
|
|
||||||
|VPFutr;
|
|
||||||
|
|
||||||
VPHTense =
|
|
||||||
VPGenPres -- impf hum nahim "I گo"
|
|
||||||
| VPImpPast -- impf Ta nahim "I وعنت"
|
|
||||||
| VPFut -- fut na/nahim "I سہالل گo"
|
|
||||||
| VPContPres -- stem raha hum nahim "I ام گoiنگ"
|
|
||||||
| VPContPast -- stem raha Ta nahim "I واس گoiنگ"
|
|
||||||
| VPContFut
|
|
||||||
| VPPerfPres -- perf hum na/nahim "I ہاvع گoنع"
|
|
||||||
| VPPerfPast -- perf Ta na/nahim "I ہاد گoنع"
|
|
||||||
| VPPerfFut
|
|
||||||
| VPPerfPresCont
|
|
||||||
| VPPerfPastCont
|
|
||||||
| VPPerfFutCont
|
|
||||||
| VPSubj -- subj na "I مای گo"
|
|
||||||
;
|
|
||||||
|
|
||||||
VPHForm =
|
|
||||||
VPTense VPPTense Agr -- 9 * 12
|
|
||||||
| VPReq
|
|
||||||
| VPImp
|
|
||||||
| VPReqFut
|
|
||||||
| VPInf
|
|
||||||
| VPStem
|
|
||||||
;
|
|
||||||
|
|
||||||
VType = VIntrans | VTrans | VTransPost ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
|
|
||||||
objVType : VType -> NPCase = \vt -> case vt of {
|
|
||||||
VTrans => NPObj ;
|
|
||||||
_ => NPC Obl
|
|
||||||
} ;
|
|
||||||
|
|
||||||
VPH : Type = {
|
|
||||||
s : VPHForm => {fin, inf : Str} ;
|
|
||||||
obj : {s : Str ; a : Agr} ;
|
|
||||||
subj : VType ;
|
|
||||||
comp : Agr => Str;
|
|
||||||
inf : Str;
|
|
||||||
ad : Str;
|
|
||||||
embComp : Str ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
VPHSlash = VPH ** {c2 : Compl} ;
|
|
||||||
|
|
||||||
Compl : Type = {s : Str ; c : VType} ;
|
|
||||||
|
|
||||||
predV : Verb -> VPH = \verb -> {
|
|
||||||
s = \\vh =>
|
|
||||||
case vh of {
|
|
||||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = verb.s ! VF Imperf p n g } ;
|
|
||||||
VPTense VPPast (Ag g n p) => {fin = [] ; inf =verb.s ! VF Perf p n g} ;
|
|
||||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = verb.s ! VF Subj p n g } ;
|
|
||||||
VPStem => {fin = [] ; inf = verb.s ! Root};
|
|
||||||
_ => {fin = [] ; inf = verb.s ! Root}
|
|
||||||
};
|
|
||||||
obj = {s = [] ; a = defaultAgr} ;
|
|
||||||
subj = VTrans ;
|
|
||||||
inf = verb.s ! Inf;
|
|
||||||
ad = [];
|
|
||||||
embComp = [];
|
|
||||||
comp = \\_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
|
||||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
|
||||||
|
|
||||||
|
|
||||||
raha : Gender -> Number -> Str = \g,n ->
|
|
||||||
(regAdjective "رہا").s ! n ! g ! Dir ! Posit ;
|
|
||||||
|
|
||||||
cka : Gender -> Number -> Str = \g,n ->
|
|
||||||
(regAdjective "چكا").s ! n ! g ! Dir ! Posit ;
|
|
||||||
|
|
||||||
hw : UPerson -> Number -> Str = \pp,n ->
|
|
||||||
case <pp,n> of {
|
|
||||||
<Pers1,_> => "ہوں";
|
|
||||||
<_,Pl> => "ہوں";
|
|
||||||
<_,_> => "ہو"
|
|
||||||
};
|
|
||||||
|
|
||||||
predAux : Aux -> VPH = \verb -> {
|
|
||||||
s = \\vh =>
|
|
||||||
let
|
|
||||||
|
|
||||||
inf = verb.inf ;
|
|
||||||
part = verb.ppart ;
|
|
||||||
|
|
||||||
in
|
|
||||||
case vh of {
|
|
||||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = part } ;
|
|
||||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
|
||||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
|
||||||
VPStem => {fin = [] ; inf = "رہ" };
|
|
||||||
_ => {fin = part ; inf = [] }
|
|
||||||
};
|
|
||||||
obj = {s = [] ; a = defaultAgr} ;
|
|
||||||
subj = VIntrans ;
|
|
||||||
inf = verb.inf;
|
|
||||||
ad = [];
|
|
||||||
embComp = [];
|
|
||||||
comp = \\_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Aux = {
|
|
||||||
inf,ppart,prpart : Str
|
|
||||||
} ;
|
|
||||||
|
|
||||||
auxBe : Aux = {
|
|
||||||
inf = "" ;
|
|
||||||
ppart = "" ;
|
|
||||||
prpart = ""
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
|
||||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
|
||||||
s = \\vt,b,ord =>
|
|
||||||
let
|
|
||||||
subjagr : NPCase * Agr = case vt of {
|
|
||||||
VPImpPast => case vp.subj of {
|
|
||||||
VTrans => <NPErg, vp.obj.a> ;
|
|
||||||
VTransPost => <NPErg, defaultAgr> ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
subj = subjagr.p1 ;
|
|
||||||
agr = subjagr.p2 ;
|
|
||||||
n = (fromAgr agr).n;
|
|
||||||
p = (fromAgr agr).p;
|
|
||||||
g = (fromAgr agr).g;
|
|
||||||
vps = case vt of {
|
|
||||||
|
|
||||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
|
||||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
|
||||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
|
||||||
VPContPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n} ;
|
|
||||||
VPPerfPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
|
||||||
VPPerfPresCont =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
|
||||||
VPPerfPastCont =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
|
||||||
VPPerfFutCont =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "ژاید" }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
quest =
|
|
||||||
case ord of
|
|
||||||
{ ODir => [];
|
|
||||||
OQuest => "كیا" };
|
|
||||||
na =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "نا" };
|
|
||||||
nahim =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "نہیں" };
|
|
||||||
in
|
|
||||||
case vt of {
|
|
||||||
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ na ++ vps.inf ++ vps.fin ++ vp.embComp ;
|
|
||||||
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkSClause : Str -> Agr -> VPH -> Clause =
|
|
||||||
\subj,agr,vp -> {
|
|
||||||
s = \\t,b,ord =>
|
|
||||||
let
|
|
||||||
n = (fromAgr agr).n;
|
|
||||||
p = (fromAgr agr).p;
|
|
||||||
g = (fromAgr agr).g;
|
|
||||||
vps = case t of {
|
|
||||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
|
||||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
|
||||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
|
||||||
VPContPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPPerfPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
|
||||||
VPPerfPresCont =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPPerfPastCont =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPPerfFutCont =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "ژاید" }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
quest =
|
|
||||||
case ord of
|
|
||||||
{ ODir => [];
|
|
||||||
OQuest => "كیا" };
|
|
||||||
na =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "نا" };
|
|
||||||
nahim =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "نہیں" };
|
|
||||||
in
|
|
||||||
case t of {
|
|
||||||
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ na ++ vps.inf ++ vps.fin ++ vp.embComp;
|
|
||||||
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertSubj : UPerson -> Str -> Str = \p,s ->
|
|
||||||
case p of { Pers1 => s ++ "وں" ; _ => s ++ "ے"};
|
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
|
||||||
} ;
|
|
||||||
insertVV : Str -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => vp.comp ! a ++ obj1
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp ++ obj1;
|
|
||||||
comp = vp.comp
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
|
||||||
insertObj obj vp ** {c2 = vp.c2} ;
|
|
||||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
|
||||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
|
||||||
|
|
||||||
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
|
|
||||||
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
|
|
||||||
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
|
||||||
case isAux of {False => vp.inf ; True => (vp.s ! VPImp).fin };
|
|
||||||
|
|
||||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
|
||||||
s = vps.s ;
|
|
||||||
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
|
||||||
subj = vps.c2.c ;
|
|
||||||
inf = vps.inf;
|
|
||||||
ad = vps.ad;
|
|
||||||
embComp = vps.embComp;
|
|
||||||
comp = vps.comp
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
ad = vp.ad ;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj;
|
|
||||||
ad = vp.ad ++ ad ;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
|
||||||
conjThat : Str = "كہ" ;
|
|
||||||
|
|
||||||
-- strings collected from syntax files, AR
|
|
||||||
|
|
||||||
oper
|
|
||||||
sE_Str = "سے" ;
|
|
||||||
ka_Str = "كا" ;
|
|
||||||
hr_kwy_Str = "ہر كوی" ;
|
|
||||||
rakh6na_Str = "راكھنا" ;
|
|
||||||
comma_Str = "," ;
|
|
||||||
agr_Str = "اگر" ;
|
|
||||||
nE_Str = "نے" ;
|
|
||||||
jw_Str = "جو" ;
|
|
||||||
js_Str = "جس" ;
|
|
||||||
jn_Str = "جن" ;
|
|
||||||
mt_Str = "مت" ;
|
|
||||||
nh_Str = "نہ" ;
|
|
||||||
waN_Str = "واں" ;
|
|
||||||
awr_Str = "اور" ;
|
|
||||||
ky_Str = "كی" ;
|
|
||||||
kw_Str = "كو" ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,102 +1,2 @@
|
|||||||
concrete SentenceUrd of Sentence = CatUrd ** open Prelude, ResUrd in {
|
concrete SentenceUrd of Sentence = CatUrd ** SentenceHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
|
|
||||||
PredVP np vp = mkClause np vp ;
|
|
||||||
|
|
||||||
PredSCVP sc vp = mkSClause sc.s (defaultAgr) vp ;
|
|
||||||
|
|
||||||
ImpVP vp = {
|
|
||||||
s = \\pol,n =>
|
|
||||||
let
|
|
||||||
agr = Ag Masc (numImp n) Pers2_Casual ;
|
|
||||||
verb = infVP True vp agr ;
|
|
||||||
dont = case pol of {
|
|
||||||
CNeg True => mt_Str ;
|
|
||||||
CNeg False => nh_Str ;
|
|
||||||
_ => []
|
|
||||||
}
|
|
||||||
in
|
|
||||||
dont ++ verb
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SlashVP np vp =
|
|
||||||
mkClause np vp ** {c2 = vp.c2} ;
|
|
||||||
|
|
||||||
AdvSlash slash adv = {
|
|
||||||
s = \\t,p,o => adv.s ++ slash.s ! t ! p ! o ;
|
|
||||||
c2 = slash.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SlashPrep cl prep = cl ** {c2 = { s = prep.s ; c = VIntrans}} ;
|
|
||||||
|
|
||||||
SlashVS np vs slash =
|
|
||||||
mkClause np
|
|
||||||
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
|
|
||||||
{c2 = slash.c2} ;
|
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s} ;
|
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
|
||||||
EmbedVP vp = {s = infVP False vp defaultAgr} ; --- agr
|
|
||||||
|
|
||||||
UseCl temp p cl =
|
|
||||||
{ s = case <temp.t,temp.a> of {
|
|
||||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! ODir
|
|
||||||
;<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! ODir; --# notpresent
|
|
||||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! ODir; --# notpresent
|
|
||||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! ODir; --# notpresent
|
|
||||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! ODir; --# notpresent
|
|
||||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! ODir; --# notpresent
|
|
||||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPContPres ! p.p ! ODir; --# notpresent
|
|
||||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPContPast ! p.p ! ODir --# notpresent
|
|
||||||
|
|
||||||
};
|
|
||||||
} ;
|
|
||||||
UseQCl temp p cl = {
|
|
||||||
s = \\q => case <temp.t,temp.a> of {
|
|
||||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! q
|
|
||||||
;<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! q; --# notpresent
|
|
||||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! q; --# notpresent
|
|
||||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! q; --# notpresent
|
|
||||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! q; --# notpresent
|
|
||||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! q; --# notpresent
|
|
||||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPContPres ! p.p ! q; --# notpresent
|
|
||||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPContPast ! p.p ! q --# notpresent
|
|
||||||
|
|
||||||
};
|
|
||||||
} ;
|
|
||||||
UseRCl temp p rcl = {
|
|
||||||
s = \\q => case <temp.t,temp.a> of {
|
|
||||||
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPGenPres ! p.p ! ODir ! q
|
|
||||||
;<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPres ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPImpPast ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPast ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VPFut ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfFut ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VPContPres ! p.p ! ODir ! q; --# notpresent
|
|
||||||
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VPContPast ! p.p ! ODir ! q --# notpresent
|
|
||||||
};
|
|
||||||
c = rcl.c
|
|
||||||
} ;
|
|
||||||
UseSlash temp p clslash = {
|
|
||||||
s = case <temp.t,temp.a> of {
|
|
||||||
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPGenPres ! p.p ! ODir
|
|
||||||
;<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPres ! p.p ! ODir; --# notpresent
|
|
||||||
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPImpPast ! p.p ! ODir ; --# notpresent
|
|
||||||
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPast ! p.p ! ODir; --# notpresent
|
|
||||||
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VPFut ! p.p ! ODir; --# notpresent
|
|
||||||
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfFut ! p.p ! ODir; --# notpresent
|
|
||||||
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VPContPres ! p.p ! ODir; --# notpresent
|
|
||||||
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VPContPast ! p.p ! ODir --# notpresent
|
|
||||||
};
|
|
||||||
c2 = clslash.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdvS a s = {s = a.s ++ s.s} ;
|
|
||||||
|
|
||||||
RelS s r = {s = s.s ++ r.s ! agrP3 Masc Sg} ;
|
|
||||||
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,49 +1,51 @@
|
|||||||
concrete StructuralUrd of Structural = CatUrd **
|
concrete StructuralUrd of Structural = CatUrd **
|
||||||
open MorphoUrd, ParadigmsUrd, Prelude, NounUrd in {
|
open MorphoUrd, ParadigmsUrd, Prelude, NounUrd,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
above_Prep = ss "اوپر" ;
|
above_Prep = mkPrep "اوپر" "اوپر" ;
|
||||||
after_Prep = ss "كے بعد" ;
|
after_Prep = mkPrep ["كے بعد"] ["كے بعد"] ;
|
||||||
all_Predet = ss "تمام" ;
|
all_Predet = ss "تمام" ;
|
||||||
almost_AdA, almost_AdN = ss "تقریبا" ;
|
almost_AdA, almost_AdN = mkAdN "تقریبا" ;
|
||||||
although_Subj = ss "اگرچھ" ;
|
although_Subj = ss "اگرچh-" ;
|
||||||
always_AdV = ss "ہمیشہ" ;
|
always_AdV = ss "ہمیشہ" ;
|
||||||
and_Conj = sd2 [] "اور" ** {n = Pl} ;
|
and_Conj = sd2 [] "اور" ** {n = Pl} ;
|
||||||
because_Subj = ss "كیونكھ" ;
|
because_Subj = ss "كیونكh-" ;
|
||||||
before_Prep = ss "پہلے" ;
|
before_Prep = mkPrep "پہلے" "پہلے" ;
|
||||||
behind_Prep = ss "پیچھے" ;
|
behind_Prep = mkPrep "پیچh-ے" "پیچh-ے" ;
|
||||||
between_Prep = ss "درمیاں" ;
|
between_Prep = mkPrep "درمیاں" "درمیاں" ;
|
||||||
both7and_DConj = sd2 "دونوں" "اور" ** {n = Pl} ;
|
both7and_DConj = sd2 "دونوں" "اور" ** {n = Pl} ;
|
||||||
but_PConj = ss "لیكن" ;
|
but_PConj = ss "لیكن" ;
|
||||||
by8agent_Prep = ss "" ;
|
by8agent_Prep = mkPrep "" "" ;
|
||||||
by8means_Prep = ss "" ;
|
by8means_Prep = mkPrep "" "" ;
|
||||||
can8know_VV,can_VV = mkV "سكنا" ** { isAux = True} ;
|
can8know_VV,can_VV = mkV "سكنا" ** { isAux = True} ;
|
||||||
during_Prep = ss ["كے درمیاں"] ;
|
during_Prep = mkPrep ["كے درمیاں"] ["كے درمیاں"] ;
|
||||||
either7or_DConj = sd2 "كوی ایك" "یا" ** {n = Sg} ;
|
either7or_DConj = sd2 "كوی ایك" "یا" ** {n = Sg} ;
|
||||||
everybody_NP = MassNP (UseN (ParadigmsUrd.mkN "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Masc )); -- not a good way coz need to include NounUrd
|
everybody_NP = MassNP (UseN (ParadigmsUrd.mkN "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" "ہر كوی" Masc )); -- not a good way coz need to include NounUrd
|
||||||
every_Det = mkDet "ہر" "ہر" "ہر" "ہر" Sg;
|
every_Det = mkDet "ہر" "ہر" "ہر" "ہر" Sg;
|
||||||
everything_NP = MassNP (UseN (ParadigmsUrd.mkN "ہر چیز" "ہر چیز" "ہر چیزو" "سب چیزیں" "سب چیزوں" "سب چیزو" Masc ));
|
everything_NP = MassNP (UseN (ParadigmsUrd.mkN "ہر چیز" "ہر چیز" "ہر چیزو" "سب چیزیں" "سب چیزوں" "سب چیزو" Masc ));
|
||||||
everywhere_Adv = ss "ہر جگہ" ;
|
everywhere_Adv = mkAdv "ہر جگہ" ;
|
||||||
few_Det = mkDet "چند" "چند" "چند" "چند" Pl ;
|
few_Det = mkDet "چند" "چند" "چند" "چند" Pl ;
|
||||||
for_Prep = ss "كیلیے" ;
|
first_Ord = {s = "پعہلا" ; n = Sg} ; --DEPRECATED
|
||||||
from_Prep = ss "سے" ;
|
for_Prep = mkPrep "كیلیے" "كیلیے" ;
|
||||||
|
from_Prep = mkPrep "سے" "سے" ;
|
||||||
he_Pron = personalPN "وہ" "اس" "" "اس كا" Sg Masc Pers3_Distant ;
|
he_Pron = personalPN "وہ" "اس" "" "اس كا" Sg Masc Pers3_Distant ;
|
||||||
here_Adv = ss "یہاں" ;
|
here_Adv = mkAdv "یہاں" ;
|
||||||
here7to_Adv = ss ["یہاں پر"] ;
|
here7to_Adv = mkAdv ["یہاں پر"] ;
|
||||||
here7from_Adv = ss ["یہاں سے"] ;
|
here7from_Adv = mkAdv ["یہاں سے"] ;
|
||||||
how_IAdv = ss "ہoو" ;
|
how_IAdv = ss "كیسے" ;
|
||||||
how8many_IDet = makeIDet "كتنے" "كتنی" Pl ;
|
how8many_IDet = makeIDet "كتنے" "كتنی" Pl ;
|
||||||
|
how8much_IAdv = ss "كتنا" ;
|
||||||
if_Subj = ss "اگر" ;
|
if_Subj = ss "اگر" ;
|
||||||
in8front_Prep = ss ["كے سامنے"] ;
|
in8front_Prep = mkPrep ["كے سامنے"] ["كے سامنے"] ;
|
||||||
i_Pron = personalPN "میں" "مجھ" "" "میرا" Sg Masc Pers1;
|
i_Pron = personalPN "میں" "مجh-" "" "میرا" Sg Masc Pers1;
|
||||||
in_Prep = ss "معں" ;
|
in_Prep = mkPrep "معں" "معں" ;
|
||||||
it_Pron = personalPN "یہ" "یہ" "یہ" "اس كا" Sg Masc Pers3_Near;
|
it_Pron = personalPN "یہ" "یہ" "یہ" "اس كا" Sg Masc Pers3_Near;
|
||||||
less_CAdv = {s = "كم" ; p = ""} ;
|
less_CAdv = {s = "كم" ; p = ""} ;
|
||||||
many_Det = mkDet "بہت زیادہ" "بہت زیادہ" "بہت زیادہ" "بہت زیادہ" Pl ;
|
many_Det = mkDet "بہت زیادہ" "بہت زیادہ" "بہت زیادہ" "بہت زیادہ" Pl ;
|
||||||
more_CAdv = {s = "زیادھ" ; p = "" } ;
|
more_CAdv = {s = "زیادh-" ; p = "" } ;
|
||||||
most_Predet = ss "زیادہ تر" ;
|
most_Predet = ss "زیادہ تر" ;
|
||||||
much_Det = mkDet "بہت" "بہت" "بہت" "بہت" Sg ;
|
much_Det = mkDet "بہت" "بہت" "بہت" "بہت" Sg ;
|
||||||
-- must_VV = {
|
-- must_VV = {
|
||||||
@@ -60,34 +62,34 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
-- } ;
|
-- } ;
|
||||||
-----b no_Phr = ss "نo" ;
|
-----b no_Phr = ss "نo" ;
|
||||||
no_Utt = ss "نہیں" ;
|
no_Utt = ss "نہیں" ;
|
||||||
on_Prep = ss "پر" ;
|
on_Prep = mkPrep "پر" "پر" ;
|
||||||
-- one_Quant = demoPN "ایك" "ایك" "ایك" ; -- DEPRECATED
|
-- one_Quant = demoPN "ایك" "ایك" "ایك" ; -- DEPRECATED
|
||||||
only_Predet = ss "سرف" ;
|
only_Predet = ss "سرف" ;
|
||||||
or_Conj = sd2 [] "یا" ** {n = Sg} ;
|
or_Conj = sd2 [] "یا" ** {n = Sg} ;
|
||||||
otherwise_PConj = ss "یا پھر" ;
|
otherwise_PConj = ss "یا پh-ر" ;
|
||||||
part_Prep = ss "" ;
|
part_Prep = mkPrep "" "" ;
|
||||||
please_Voc = ss "مہربانi" ;
|
please_Voc = ss "مہربانi" ;
|
||||||
possess_Prep = ss "كا" ;
|
possess_Prep = mkPrep "كا" "كی" ;
|
||||||
quite_Adv = ss "كہامoسہ" ;
|
quite_Adv = ss "كہامoسہ" ;
|
||||||
she_Pron = personalPN "وہ" "اس" "وہ" "اس كی" Sg Fem Pers3_Distant ;
|
she_Pron = personalPN "وہ" "اس" "وہ" "اس كی" Sg Fem Pers3_Distant ;
|
||||||
so_AdA = ss "سo" ;
|
so_AdA = ss "سo" ;
|
||||||
somebody_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی" "كوی" "كوی" "كوی" "كوی" "كوی" Masc ));
|
somebody_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی" "كوی" "كوی" "كوی" "كوی" "كوی" Masc ));
|
||||||
someSg_Det = mkDet "كچھ" "كچھ" "كچھ" "كچھ" Sg ;
|
someSg_Det = mkDet "كچh-" "كچh-" "كچh-" "كچh-" Sg ;
|
||||||
somePl_Det = mkDet "كچھ" "كچھ" "كچھ" "كچھ" Pl ;
|
somePl_Det = mkDet "كچh-" "كچh-" "كچh-" "كچh-" Pl ;
|
||||||
something_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی چیز" "كوی چیز" "كوی چیز" "كھ چیزیں" "كھ چیزوں" "كھ چیزو" Masc ));
|
something_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی چیز" "كوی چیز" "كوی چیز" "كh- چیزیں" "كh- چیزوں" "كh- چیزو" Masc ));
|
||||||
somewhere_Adv = ss "كہiن پر" ;
|
somewhere_Adv = mkAdv ["كہiن پر"] ;
|
||||||
that_Quant = demoPN "وہ" "اس" "ان" ;
|
that_Quant = demoPN "وہ" "اس" "ان" ;
|
||||||
that_Subj = ss "كہ";
|
that_Subj = ss "كہ";
|
||||||
there_Adv = ss "وہاں" ;
|
there_Adv = mkAdv "وہاں" ;
|
||||||
there7to_Adv = ss "وہاں پر" ;
|
there7to_Adv = mkAdv ["وہاں پر"] ;
|
||||||
there7from_Adv = ss ["وہاں سے"] ;
|
there7from_Adv = mkAdv ["وہاں سے"] ;
|
||||||
therefore_PConj = ss "اس لیے" ;
|
therefore_PConj = ss "اس لیے" ;
|
||||||
they_Pron = personalPN "وہ" "وہ" "وہ" "ان كا" Pl Masc Pers3_Distant ; ----
|
they_Pron = personalPN "وہ" "وہ" "وہ" "ان كا" Pl Masc Pers3_Distant ; ----
|
||||||
this_Quant = demoPN "یہ" "اس" "ان";
|
this_Quant = demoPN "یہ" "اس" "ان";
|
||||||
through_Prep = ss ["میں سے"] ;
|
through_Prep = mkPrep ["میں سے"] ["میں سے"] ;
|
||||||
too_AdA = ss "بہت" ;
|
too_AdA = ss "بہت" ;
|
||||||
to_Prep = ss "كو" ;
|
to_Prep = mkPrep "كو" "كو" ; -- ** {lock_Prep = <>};
|
||||||
under_Prep = ss "نیچے" ;
|
under_Prep = mkPrep "نیچے" "نیچے" ; -- ** {lock_Prep = <>};
|
||||||
very_AdA = ss "بہت" ;
|
very_AdA = ss "بہت" ;
|
||||||
want_VV = mkV "چاہنا" ** { isAux = False} ;
|
want_VV = mkV "چاہنا" ** { isAux = False} ;
|
||||||
we_Pron = personalPN "ہم" "ہم" "ہم" "ہمارا" Pl Masc Pers1 ;
|
we_Pron = personalPN "ہم" "ہم" "ہم" "ہمارا" Pl Masc Pers1 ;
|
||||||
@@ -102,25 +104,25 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
whoSg_IP = mkIP "كون" "كiس" "كiس" Sg Masc ;
|
whoSg_IP = mkIP "كون" "كiس" "كiس" Sg Masc ;
|
||||||
whoPl_IP = mkIP "كون" "كن" "كنہوں" Pl Masc ;
|
whoPl_IP = mkIP "كون" "كن" "كنہوں" Pl Masc ;
|
||||||
why_IAdv = ss "كیوں" ;
|
why_IAdv = ss "كیوں" ;
|
||||||
without_Prep = ss ["كے بغیر"] ;
|
without_Prep = mkPrep ["كے بغیر"] ["كے بغیر"] ;
|
||||||
with_Prep = ss ["كے ساتھ"] ;
|
with_Prep = mkPrep ["كے ساتh-"] ["كے ساتh-"] ;
|
||||||
-- yes_Phr = ss "ہاں" ;
|
-- yes_Phr = ss "ہاں" ;
|
||||||
yes_Utt = ss "ہاں" ;
|
yes_Utt = ss "ہاں" ;
|
||||||
youSg_Pron = personalPN "تم" "تم" "تم" "تمھارا" Sg Masc Pers2_Casual ;
|
youSg_Pron = personalPN "تم" "تم" "تم" "تمh-ارا" Sg Masc Pers2_Casual ;
|
||||||
youPl_Pron = personalPN "تم" "تم" "تم" "تمھارا" Pl Masc Pers2_Casual ;
|
youPl_Pron = personalPN "تم" "تم" "تم" "تمh-ارا" Pl Masc Pers2_Casual ;
|
||||||
youPol_Pron = personalPN "آپ" "آP" "آP" "آپ كا" Sg Masc Pers2_Respect ;
|
youPol_Pron = personalPN "آپ" "آP" "آP" "آپ كا" Sg 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} ;
|
||||||
at_least_AdN = ss ["كم از كم"] ;
|
at_least_AdN = mkAdN ["كم از كم"] ;
|
||||||
at_most_AdN = ss ["زیادہ سے زیادہ"];
|
at_most_AdN = mkAdN ["زیادہ سے زیادہ"];
|
||||||
nothing_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" Masc ));
|
nothing_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" "كوی چیز نہیں" Masc ));
|
||||||
except_Prep = ss "سواے" ;
|
except_Prep = mkPrep "سواے" "سواے" ;
|
||||||
nobody_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" Masc ));
|
nobody_NP = MassNP (UseN (ParadigmsUrd.mkN "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" "كوی نہیں" Masc ));
|
||||||
|
|
||||||
as_CAdv = {s = "عتنا" ; p = "جتنا"} ;
|
as_CAdv = {s = "عتنا" ; p = "جتنا"} ;
|
||||||
|
|
||||||
have_V2 = mkV2 (mkV "راكھنا") "" ;
|
have_V2 = mkV2 (mkV "راكh-نا") "" ;
|
||||||
|
|
||||||
language_title_Utt = ss "اردو" ;
|
language_title_Utt = ss "اردو" ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../hindustani:../abstract:../common
|
||||||
|
|
||||||
concrete SymbolUrd of Symbol = CatUrd ** open Prelude, ResUrd in {
|
concrete SymbolUrd of Symbol = CatUrd ** SymbolHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
lin
|
|
||||||
-- SymbPN i = {s = \\_ => i.s ; g = Masc} ;
|
|
||||||
SymbPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
|
||||||
IntPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
|
||||||
FloatPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
|
||||||
NumPN i = {s = \\_ =>i.s ; g = Masc} ;
|
|
||||||
CNIntNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
|
||||||
a = agrP3 cn.g Sg
|
|
||||||
} ;
|
|
||||||
CNSymbNP det cn xs = {
|
|
||||||
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
|
||||||
a = agrP3 cn.g det.n
|
|
||||||
} ;
|
|
||||||
CNNumNP cn i = {
|
|
||||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
|
||||||
a = agrP3 cn.g Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SymbS sy = sy ;
|
|
||||||
SymbNum sy = { s = sy.s ; n = Pl } ;
|
|
||||||
SymbOrd sy = { s = sy.s ++ waN_Str ; n = Pl} ;
|
|
||||||
|
|
||||||
lincat
|
|
||||||
|
|
||||||
Symb, [Symb] = SS ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
MkSymb s = s ;
|
|
||||||
|
|
||||||
BaseSymb = infixSS awr_Str
|
|
||||||
;
|
|
||||||
ConsSymb = infixSS [] ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
-- Note: this results in a space before 's, but there's
|
|
||||||
-- not mauch we can do about that.
|
|
||||||
addGenitiveS : Str -> Case => Str = \s ->
|
|
||||||
table {_ => s ++ ka_Str} ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,40 +1,2 @@
|
|||||||
concrete VerbUrd of Verb = CatUrd ** open ResUrd in {
|
concrete VerbUrd of Verb = CatUrd ** VerbHindustani with
|
||||||
|
(ResHindustani = ResUrd) ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
UseV v = predV v ;
|
|
||||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VIntrans}} ;
|
|
||||||
Slash2V3 v np =
|
|
||||||
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
|
||||||
Slash3V3 v np =
|
|
||||||
insertObjc (\\_ => np.s ! NPC Obl ++ v.c2) (predV v ** {c2 = {s = v.c3 ; c = VTrans}}) ;
|
|
||||||
ComplVV v vp = insertVV (infVV v.isAux vp) (predV v) ;
|
|
||||||
ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ;
|
|
||||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
|
||||||
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit) (predV v) ;
|
|
||||||
SlashV2V v vp = insertVV ((vp.s!VPImp).inf++ky_Str) (predV v) **{c2 = {s = sE_Str ; c = VIntrans}} ;
|
|
||||||
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = kw_Str ; c = VIntrans}}) ;
|
|
||||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = sE_Str ; c = VIntrans}}) ;
|
|
||||||
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit) (predV v ** {c2 = {s = kw_Str ; c = VIntrans}}) ; ----
|
|
||||||
ComplSlash vp np = insertObject np vp ;
|
|
||||||
SlashVV vv vp =
|
|
||||||
insertObj (\\a => infVP vv.isAux vp a) (predV vv) **
|
|
||||||
{c2 = vp.c2} ;
|
|
||||||
SlashV2VNP vv np vp =
|
|
||||||
insertObjPre (\\_ => np.s ! NPObj )
|
|
||||||
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
|
||||||
{c2 = vp.c2} ;
|
|
||||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
|
||||||
|
|
||||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
|
||||||
|
|
||||||
AdVVP adv vp = insertAdV adv.s vp ;
|
|
||||||
ReflVP v = insertObjPre (\\_ => RefPron) v ;
|
|
||||||
PassV2 v = predV v ; -- need to be fixed
|
|
||||||
CompAP ap ={s = \\a => ap.s ! giveNumber a ! giveGender a ! Dir ! Posit } ;
|
|
||||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
|
||||||
CompAdv a = {s = \\_ => a.s} ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
115
lib/src/urdu/src/DiffUrd.gf
Normal file
115
lib/src/urdu/src/DiffUrd.gf
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
instance DiffUrd of DiffHindustani = open CommonHindustani, Prelude in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||||
|
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||||
|
s = \\vt,b,ord =>
|
||||||
|
let
|
||||||
|
subjagr : NPCase * Agr = case vt of {
|
||||||
|
VPImpPast => case vp.subj of {
|
||||||
|
VTrans => <NPErg, vp.obj.a> ;
|
||||||
|
VTransPost => <NPErg, defaultAgr> ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
_ => <NPC Dir, np.a>
|
||||||
|
} ;
|
||||||
|
subj = subjagr.p1 ;
|
||||||
|
agr = subjagr.p2 ;
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case vt of {
|
||||||
|
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).fin ; inf = (vp.s ! VPTense VPFutr agr).inf ++ hw p n} ;
|
||||||
|
_ => vp.s ! VPTense VPFutr agr } ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n} ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPerf agr).inf } ;
|
||||||
|
VPPerfFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPerf agr).inf ++ hw p n } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPSubj => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).inf ++ hw p n ; inf = "Xayd" } ;
|
||||||
|
_ => {fin = (vp.s ! VPTense VPFutr agr).inf ; inf = "Xayd" } }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case vt of {
|
||||||
|
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ na ++ vps.inf ++ vps.fin ++ vp.embComp ;
|
||||||
|
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkSClause : Str -> Agr -> VPH -> Clause =
|
||||||
|
\subj,agr,vp -> {
|
||||||
|
s = \\t,b,ord =>
|
||||||
|
let
|
||||||
|
n = (fromAgr agr).n;
|
||||||
|
p = (fromAgr agr).p;
|
||||||
|
g = (fromAgr agr).g;
|
||||||
|
vps = case t of {
|
||||||
|
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||||
|
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||||
|
VPFut => vp.s ! VPTense VPFutr agr ;
|
||||||
|
VPContPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPContFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPPerfPres => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfPast => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||||
|
VPPerfFut => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
||||||
|
VPPerfPresCont => {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfPastCont => {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
||||||
|
VPPerfFutCont => {fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
||||||
|
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
quest =
|
||||||
|
case ord of
|
||||||
|
{ ODir => [];
|
||||||
|
OQuest => "kya" };
|
||||||
|
na =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "na" };
|
||||||
|
nahim =
|
||||||
|
case b of
|
||||||
|
{ Pos => [];
|
||||||
|
Neg => "nhyN" };
|
||||||
|
in
|
||||||
|
case t of {
|
||||||
|
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ na ++ vps.inf ++ vps.fin ++ vp.embComp;
|
||||||
|
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
np2pronCase ppf npc a = case npc of {
|
||||||
|
NPC c => ppf ! c;
|
||||||
|
NPObj => ppf ! Obl ;
|
||||||
|
NPErg => case (fromAgr a).p of {
|
||||||
|
(Pers3_Near|Pers3_Distant) => ppf ! Obl ++ "nE" ;
|
||||||
|
_ => ppf ! Dir ++ "nE"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
}
|
||||||
19
lib/src/urdu/src/ExtraUrd.gf
Normal file
19
lib/src/urdu/src/ExtraUrd.gf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
concrete ExtraUrd of ExtraUrdAbs = CatUrd **
|
||||||
|
open ResUrd, Coordination, Prelude, MorphoUrd, ParadigmsUrd,CommonHindustani in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
||||||
|
|
||||||
|
each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
|
||||||
|
have_V = mkV "rakh-na";
|
||||||
|
IAdvAdv adv = {s = "ktny" ++ adv.s ! Masc} ;
|
||||||
|
ICompAP ap = {s = "ktnE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||||
|
cost_V = mkV "qymt" ;
|
||||||
|
|
||||||
|
-- added for causitives
|
||||||
|
make_CV = mkVerb "nothing" ** {c2 = "" };
|
||||||
|
|
||||||
|
-- for VP conjunction
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
flags coding = utf8;
|
flags coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
ImpersCl vp = mkSClause [] (agrP3 Masc Sg) vp ;
|
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||||
GenericCl vp = mkSClause "kwy" (agrP3 Masc Sg) vp ;
|
GenericCl vp = mkSClause "kwy" (agrP3 Masc Sg) vp ;
|
||||||
|
|
||||||
CleftNP np rs =
|
CleftNP np rs =
|
||||||
@@ -12,7 +12,7 @@ concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
|||||||
in
|
in
|
||||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||||
|
|
||||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkSClause "whaN" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
mkSClause "whaN" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||||
@@ -27,7 +27,8 @@ concrete IdiomUrd of Idiom = CatUrd ** open Prelude,Predef, ResUrd in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
||||||
|
ProgrVP vp = (predProg vp) ;
|
||||||
|
|
||||||
|
|
||||||
ImpPl1 vp = {s = "Aw" ++ infVP True vp (agrP1 Masc Pl)} ;
|
ImpPl1 vp = {s = "Aw" ++ infVP True vp (agrP1 Masc Pl)} ;
|
||||||
@@ -14,7 +14,7 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
apartment_N = mkN "kmrh" ;
|
apartment_N = mkN "kmrh" ;
|
||||||
apple_N = mkN "syb" ;
|
apple_N = mkN "syb" ;
|
||||||
art_N = mkN "fn" ;
|
art_N = mkN "fn" ;
|
||||||
ask_V2Q = mkV2 (mkV "pwch-na") ;
|
ask_V2Q = mkV2 (mkV "pwch'na") ;
|
||||||
baby_N = mkN "bch" ;
|
baby_N = mkN "bch" ;
|
||||||
bad_A = mkA "bra" ;
|
bad_A = mkA "bra" ;
|
||||||
bank_N = mkN "bank" ;
|
bank_N = mkN "bank" ;
|
||||||
@@ -34,27 +34,27 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
boy_N = mkN "lRka" ;
|
boy_N = mkN "lRka" ;
|
||||||
bread_N = mkN "rwty" ;
|
bread_N = mkN "rwty" ;
|
||||||
break_V2 = mkV2 (mkV "twRna") ;
|
break_V2 = mkV2 (mkV "twRna") ;
|
||||||
broad_A = mkA "kh-la" ;
|
broad_A = mkA "kh'la" ;
|
||||||
brother_N2 = mkN2 (mkN "bh-ay") (mkPrep "ka") "kE" ; --not correct
|
brother_N2 = mkN2 (mkN "bh'ay") (mkPrep "ka" "ka") "kE" ; --not correct
|
||||||
brown_A = mkA "nswary" ;
|
brown_A = mkA "nswary" ;
|
||||||
butter_N = mkN "mkh-n" ;
|
butter_N = mkN "mkh'n" ;
|
||||||
buy_V2 = mkV2 (mkV "Krydna");
|
buy_V2 = mkV2 (mkV "Krydna");
|
||||||
camera_N = mkN "kymrh" ;
|
camera_N = mkN "kymrh" ;
|
||||||
cap_N = mkN "twpy" ;
|
cap_N = mkN "twpy" ;
|
||||||
car_N = mkN "gaRy" ;
|
car_N = mkN "gaRy" ;
|
||||||
carpet_N = mkN "tpay^y" ;
|
carpet_N = mkN "tpay^y" ;
|
||||||
cat_N = mkN "bly" ;
|
cat_N = mkN "bly" ;
|
||||||
ceiling_N = mkN "ch-t" feminine ;
|
ceiling_N = mkN "ch't" feminine ;
|
||||||
chair_N = mkN "krsy" ;
|
chair_N = mkN "krsy" ;
|
||||||
cheese_N = mkN "pnyr" feminine ;
|
cheese_N = mkN "pnyr" feminine ;
|
||||||
child_N = mkN "bch" ;
|
child_N = mkN "bch" ;
|
||||||
church_N = mkCmpdNoun "grja" (mkN "gh-r") ;
|
church_N = mkCmpdNoun "grja" (mkN "gh'r") ;
|
||||||
city_N = mkN "Xhr" ;
|
city_N = mkN "Xhr" ;
|
||||||
clean_A = mkA "Saf" ;
|
clean_A = mkA "Saf" ;
|
||||||
clever_A = mkA "hwXyar" ;
|
clever_A = mkA "hwXyar" ;
|
||||||
close_V2 = mkV2 (compoundV "bnd" do_V2);
|
close_V2 = mkV2 (compoundV "bnd" do_V2);
|
||||||
coat_N = mkN "kwT" ;
|
coat_N = mkN "kwT" ;
|
||||||
cold_A = mkA "Th-nDa" ;
|
cold_A = mkA "Th'nDa" ;
|
||||||
come_V = mkV "Ana" ;
|
come_V = mkV "Ana" ;
|
||||||
computer_N = mkN "kmpywTr" ;
|
computer_N = mkN "kmpywTr" ;
|
||||||
country_N = mkN "mlk" ;
|
country_N = mkN "mlk" ;
|
||||||
@@ -62,75 +62,76 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
cow_N = mkN "gaE" feminine ;
|
cow_N = mkN "gaE" feminine ;
|
||||||
die_V = mkV "mrna" ;
|
die_V = mkV "mrna" ;
|
||||||
dirty_A = mkA "gnda" ;
|
dirty_A = mkA "gnda" ;
|
||||||
distance_N3 = mkN3 (mkN "faSlh") (mkPrep "ka") "kE" "sE" ;
|
distance_N3 = mkN3 (mkN "faSlh") (mkPrep "ka" "ka") "kE" "sE" ;
|
||||||
doctor_N = mkN "mealj" ;
|
doctor_N = mkN "mealj" ;
|
||||||
dog_N = mkN "kta" ;
|
dog_N = mkN "kta" ;
|
||||||
door_N = mkN "drwzh" ;
|
door_N = mkN "drwzh" ;
|
||||||
drink_V2 = mkV2 (mkV "pyna");
|
drink_V2 = mkV2 (mkV "pyna");
|
||||||
easy_A2V = mkA "Asan" "" ;
|
easy_A2V = mkA "Asan" "" ;
|
||||||
eat_V2 = mkV2 (mkV "kh-ana") "" ;
|
eat_V2 = mkV2 (mkV "kh'ana") "" ;
|
||||||
empty_A = mkA "Kaly" ;
|
empty_A = mkA "Kaly" ;
|
||||||
enemy_N = mkN "dXmn" ;
|
enemy_N = mkN "dXmn" ;
|
||||||
factory_N = mkN "karKanh" ;
|
factory_N = mkN "karKanh" ;
|
||||||
father_N2 = mkN2 (mkN "aba") (mkPrep "ka") "kE" ;
|
father_N2 = mkN2 (mkN "aba") (mkPrep "ka" "ka") "kE" ;
|
||||||
fear_VS = mkV "drna";
|
fear_VS = mkV "drna";
|
||||||
find_V2 = mkV2 (mkV "pana") ;
|
find_V2 = mkV2 (mkV "pana") ;
|
||||||
fish_N = mkN "mch-ly" ;
|
fish_N = mkN "mch'ly" ;
|
||||||
floor_N = mkN "frX" ;
|
floor_N = mkN "frX" ;
|
||||||
forget_V2 = mkV2 (mkV "bh-wlna") ;
|
forget_V2 = mkV2 (mkV "bh'wlna") ;
|
||||||
fridge_N = mkN "fryg" ;
|
fridge_N = mkN "fryg" ;
|
||||||
friend_N = mkN "dwst" masculine ;
|
-- friend_N = mkN "dwst" masculine ;
|
||||||
fruit_N = mkN "ph-l" ;
|
fruit_N = mkN "ph'l" ;
|
||||||
-- fun_AV = mkAV (regA "fun") ;
|
-- fun_AV = mkAV (regA "f?n") ;
|
||||||
garden_N = mkN "baG" ;
|
garden_N = mkN "baG" ;
|
||||||
girl_N = mkN "lRky" ;
|
girl_N = mkN "lRky" ;
|
||||||
glove_N = mkN "dstanh" ;
|
glove_N = mkN "dstanh" ;
|
||||||
gold_N = mkN "swna" ;
|
gold_N = mkN "swna" ;
|
||||||
good_A = mkA "ach-a" ;
|
good_A = mkA "ach'a" ;
|
||||||
go_V = mkV "jana" ;
|
go_V = mkV "jana" ;
|
||||||
green_A = mkA "sbz" ;
|
green_A = mkA "sbz" ;
|
||||||
harbour_N = mkCmpdNoun "bndr" (mkN "gah") ;
|
harbour_N = mkCmpdNoun "bndr" (mkN "gah") ;
|
||||||
hate_V2 = mkV2 (compoundV "nfrt" do_V2) ;
|
hate_V2 = mkV2 (compoundV "nfrt" do_V2) ;
|
||||||
hat_N = mkN "twpy" ;
|
hat_N = mkN "twpy" ;
|
||||||
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
-- have_V2 = dirV2 (mk5V "ha?e" "has" "had" "had" "ha??ng") ;
|
||||||
hear_V2 = mkV2 (mkV "snna") ;
|
hear_V2 = mkV2 (mkV "snna") ;
|
||||||
hill_N = mkN "phaRy" ;
|
hill_N = mkN "phaRy" ;
|
||||||
hope_VS = (compoundV "amyd" do_V2);
|
hope_VS = (compoundV "amyd" do_V2);
|
||||||
horse_N = mkN "gh-wRa" ;
|
horse_N = mkN "gh'wRa" ;
|
||||||
hot_A = mkA "grm" ;
|
hot_A = mkA "grm" ;
|
||||||
house_N = mkN "gh-r" ;
|
house_N = mkN "gh'r" ;
|
||||||
important_A = mkA "ahm" ;
|
important_A = mkA "ahm" ;
|
||||||
industry_N = mkN "Snet" feminine ;
|
industry_N = mkN "Snet" feminine ;
|
||||||
iron_N = mkN "lwha" ;
|
iron_N = mkN "lwha" ;
|
||||||
king_N = mkN "badXah" ;
|
king_N = mkN "badXah" ;
|
||||||
know_V2 = mkV2 (mkV "janna") ;
|
know_V2 = mkV2 (mkV "janna") ;
|
||||||
know_VS = mkV "janna";
|
know_VS = (mkV "janna") ;
|
||||||
lake_N = mkN "jh-yl" feminine ;
|
know_VQ = (mkV "janna") ;
|
||||||
|
lake_N = mkN "jh'yl" feminine ;
|
||||||
lamp_N = mkN "lymp" ;
|
lamp_N = mkN "lymp" ;
|
||||||
learn_V2 = mkV2 (mkV "sykh-na") ;
|
learn_V2 = mkV2 (mkV "sykh'na") ;
|
||||||
leather_N = mkN "cmRa" ;
|
leather_N = mkN "cmRa" ;
|
||||||
leave_V2 = mkV2 (mkV "jana") ;
|
leave_V2 = mkV2 (mkV "jana") ;
|
||||||
like_V2 = mkV2 (compoundV "psnd" do_V2);
|
like_V2 = mkV2 (compoundV "psnd" do_V2);
|
||||||
listen_V2 = mkV2 (mkV "snna") ;
|
listen_V2 = mkV2 (mkV "snna") ;
|
||||||
live_V = mkV "rhna" ; ---- touch
|
live_V = mkV "rhna" ; ---- touch
|
||||||
long_A = mkA "lmba" ;
|
long_A = mkA "lmba" ;
|
||||||
lose_V2 = mkV2 (compoundV "kh-w" do_V2) ;
|
lose_V2 = mkV2 (compoundV "kh'w" do_V2) ;
|
||||||
love_N = mkN "mHbt" ;
|
love_N = mkN "mHbt" ;
|
||||||
love_V2 = mkV2 (compoundV "pyar" do_V2) "kw";
|
love_V2 = mkV2 (compoundV "pyar" do_V2) "kw";
|
||||||
man_N = mkN "Admy" ; -- not correct according to rules should be discussed
|
man_N = mkN "Admy" ; -- not correct according to rules should be discussed
|
||||||
married_A2 = mkA "Xady krna" "sE" ;
|
married_A2 = mkA "Xady?krna" "sE" ;
|
||||||
meat_N = mkN "gwXt" ;
|
meat_N = mkN "gwXt" ;
|
||||||
milk_N = mkN "dwdh-" ;
|
milk_N = mkN "dwdh'" ;
|
||||||
moon_N = mkN "cand" ;
|
moon_N = mkN "cand" ;
|
||||||
mother_N2 = mkN2 (mkN "maN") (mkPrep "ky") "kE"; -- not covered need to be discussed
|
mother_N2 = mkN2 (mkN "maN") (mkPrep "ky" "ky") "kE"; -- not covered need to be discussed
|
||||||
mountain_N = mkN "phaRy" ;
|
mountain_N = mkN "phaRy" ;
|
||||||
music_N = mkN "mwsyqy" ;
|
music_N = mkN "mwsyqy" ;
|
||||||
narrow_A = mkA "baryk" ;
|
narrow_A = mkA "baryk" ;
|
||||||
new_A = mkA "nya" ;
|
new_A = mkA "nya" ;
|
||||||
newspaper_N = mkN "aKbar" ;
|
newspaper_N = mkN "aKbar" ;
|
||||||
oil_N = mkN "tyl" ;
|
oil_N = mkN "tyl" ;
|
||||||
old_A = mkA "bwRh-a" ;
|
old_A = mkA "bwRh'a" ;
|
||||||
open_V2 = mkV2 (mkV "kh-wlna") ;
|
open_V2 = mkV2 (mkV "kh'wlna") ;
|
||||||
paint_V2A = mkV2 (compoundV "rng" do_V2) ;
|
paint_V2A = mkV2 (compoundV "rng" do_V2) ;
|
||||||
paper_N = mkN "kaGz" ;
|
paper_N = mkN "kaGz" ;
|
||||||
paris_PN = mkPN "pyrs" ;
|
paris_PN = mkPN "pyrs" ;
|
||||||
@@ -138,20 +139,20 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
pen_N = mkN "pnsl" ;
|
pen_N = mkN "pnsl" ;
|
||||||
planet_N = mkN "syarh" ;
|
planet_N = mkN "syarh" ;
|
||||||
plastic_N = mkN "plasTk" ;
|
plastic_N = mkN "plasTk" ;
|
||||||
play_V2 = mkV2 (mkV "kh-ylna") ;
|
play_V2 = mkV2 (mkV "kh'ylna") ;
|
||||||
policeman_N = mkCmpdNoun "pwlys" (mkN "wala") ;
|
policeman_N = mkCmpdNoun "pwlys" (mkN "wala") ;
|
||||||
priest_N = (mkN "pyGmbr") ;
|
priest_N = (mkN "pyGmbr") ;
|
||||||
-- probable_AS = mkAS (regA "probable") ;
|
-- probable_AS = mkAS (regA "pr?bable") ;
|
||||||
queen_N = mkN "Xhzady" ;
|
queen_N = mkN "Xhzady" ;
|
||||||
radio_N = mkN "ryDyw" ;
|
radio_N = mkN "ryDyw" ;
|
||||||
rain_V0 = compoundV "barX" (mkV "hwna" ) ;
|
rain_V0 = compoundV "barX" (mkV "hwna" ) ;
|
||||||
read_V2 = mkV2 (mkV "pRh-na");
|
read_V2 = mkV2 (mkV "pRh'na");
|
||||||
red_A = mkA "lal" ;
|
red_A = mkA "lal" ;
|
||||||
religion_N = mkN "mzhb" ;
|
religion_N = mkN "mzhb" ;
|
||||||
restaurant_N = mkN "hwTl" ;
|
restaurant_N = mkN "hwTl" ;
|
||||||
river_N = mkN "drya" masculine ;
|
-- river_N = mkN "drya" masculine ;
|
||||||
rock_N = mkN "cTan" ;
|
rock_N = mkN "cTan" ;
|
||||||
roof_N = mkN "ch-t" masculine ;
|
-- roof_N = mkN "ch't" masculine ;
|
||||||
rubber_N = mkN "rbR" ;
|
rubber_N = mkN "rbR" ;
|
||||||
run_V = mkV "dwRna" ;
|
run_V = mkV "dwRna" ;
|
||||||
say_VS = mkV "khna" ;
|
say_VS = mkV "khna" ;
|
||||||
@@ -159,25 +160,25 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
science_N = mkN "sans" ;
|
science_N = mkN "sans" ;
|
||||||
sea_N = mkN "smndr" ;
|
sea_N = mkN "smndr" ;
|
||||||
seek_V2 = mkV2 (compoundV "tlaX" do_V2) ;
|
seek_V2 = mkV2 (compoundV "tlaX" do_V2) ;
|
||||||
see_V2 = mkV2 (mkV "dykh-na") ;
|
see_V2 = mkV2 (mkV "dykh'na") ;
|
||||||
sell_V3 = mkV3 (mkV "bycna") "kw" "";
|
sell_V3 = mkV3 (mkV "bycna") "kw" "";
|
||||||
send_V3 = mkV3 (mkV "bh-yjna") "kw" "";
|
send_V3 = mkV3 (mkV "bh'yjna") "kw" "";
|
||||||
sheep_N = mkN "bh-yR" feminine ;
|
sheep_N = mkN "bh'yR" feminine ;
|
||||||
ship_N = mkN "jhaz" ;
|
ship_N = mkN "jhaz" ;
|
||||||
shirt_N = mkN "qmyZ-" feminine;
|
shirt_N = mkN "qmyZ-" feminine;
|
||||||
shoe_N = mkN "jwta" ;
|
shoe_N = mkN "jwta" ;
|
||||||
shop_N = mkN "dwkan" feminine ;
|
shop_N = mkN "dwkan" feminine ;
|
||||||
short_A = mkA "ch-wTa" ;
|
short_A = mkA "ch'wTa" ;
|
||||||
silver_N = mkN "candy" ;
|
silver_N = mkN "candy" ;
|
||||||
sister_N = mkN "bhn" feminine ;
|
sister_N = mkN "bhn" feminine ;
|
||||||
sleep_V = mkV "swna" ;
|
sleep_V = mkV "swna" ;
|
||||||
small_A = mkA "ch-wTa" ;
|
small_A = mkA "ch'wTa" ;
|
||||||
snake_N = mkN "sanp" ;
|
snake_N = mkN "sanp" ;
|
||||||
sock_N = mkN "jrab" feminine ;
|
sock_N = mkN "jrab" feminine ;
|
||||||
speak_V2 = mkV2 (mkV "bwlna") ;
|
speak_V2 = mkV2 (mkV "bwlna") ;
|
||||||
star_N = mkN "stara" ;
|
star_N = mkN "stara" ;
|
||||||
steel_N = mkN "styl" ;
|
steel_N = mkN "styl" ;
|
||||||
stone_N = mkN "pth-r" ;
|
stone_N = mkN "pth'r" ;
|
||||||
stove_N = mkN "cwlha" ;
|
stove_N = mkN "cwlha" ;
|
||||||
student_N = mkCmpdNoun "t-alb" (mkN "elm") ;
|
student_N = mkCmpdNoun "t-alb" (mkN "elm") ;
|
||||||
stupid_A = mkA "aHmq" ;
|
stupid_A = mkA "aHmq" ;
|
||||||
@@ -185,99 +186,99 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
switch8off_V2 = mkV2 (mkV "clana") ;
|
switch8off_V2 = mkV2 (mkV "clana") ;
|
||||||
switch8on_V2 = mkV2 (compoundV "bnd" do_V2) ;
|
switch8on_V2 = mkV2 (compoundV "bnd" do_V2) ;
|
||||||
table_N = mkN "myz" feminine ;
|
table_N = mkN "myz" feminine ;
|
||||||
talk_V3 = mkV3 (mkV "bwlna") "sE" "kE barE meN";
|
talk_V3 = mkV3 (mkV "bwlna") "sE" "kE?barE?meN";
|
||||||
teacher_N = mkN "istad" ;
|
teacher_N = mkN "?stad" ;
|
||||||
teach_V2 = mkV2 (mkV "pRh-na") ;
|
teach_V2 = mkV2 (mkV "pRh'na") ;
|
||||||
television_N = mkN "telywyzn" ;
|
television_N = mkN "telywyzn" ;
|
||||||
thick_A = mkA "mwTa" ;
|
thick_A = mkA "mwTa" ;
|
||||||
thin_A = mkA "ptla" ;
|
thin_A = mkA "ptla" ;
|
||||||
train_N = mkN "gaRy" ;
|
train_N = mkN "gaRy" ;
|
||||||
travel_V = (compoundV "sfr" do_V2) ;
|
travel_V = (compoundV "sfr" do_V2) ;
|
||||||
tree_N = mkN "drKt" masculine ;
|
-- tree_N = mkN "drKt" masculine ;
|
||||||
-- ---- trousers_N = mkN "trousers" ;
|
-- ---- trousers_N = mkN "tr??sers" ;
|
||||||
ugly_A = mkA "bdSwrt" ;
|
ugly_A = mkA "bdSwrt" ;
|
||||||
understand_V2 = mkV2 (mkV "smjh-na") ;
|
understand_V2 = mkV2 (mkV "smjh'na") ;
|
||||||
university_N = mkN "ywnywrsTy" ;
|
university_N = mkN "ywnywrsTy" ;
|
||||||
village_N = mkN "gawN" ;
|
village_N = mkN "gawN" ;
|
||||||
wait_V2 = mkV2 (compoundV "antz-ar" do_V2) ;
|
wait_V2 = mkV2 (compoundV "antz-ar" do_V2) ;
|
||||||
walk_V = mkV "clna" ;
|
walk_V = mkV "clna" ;
|
||||||
warm_A = mkA "grm" ;
|
warm_A = mkA "grm" ;
|
||||||
war_N = mkN "jng" ;
|
war_N = mkN "jng" ;
|
||||||
watch_V2 = mkV2 (mkV "dykh-na") ;
|
watch_V2 = mkV2 (mkV "dykh'na") ;
|
||||||
water_N = mkN "pany" ; -- not covered masculine ending with y
|
water_N = mkN "pany" ; -- not covered masculine ending with y
|
||||||
white_A = mkA "sfyd" ;
|
white_A = mkA "sfyd" ;
|
||||||
window_N = mkN "kh-Rky" ;
|
window_N = mkN "kh'Rky" ;
|
||||||
wine_N = mkN "Xrab" feminine ;
|
wine_N = mkN "Xrab" feminine ;
|
||||||
win_V2 = mkV2 (mkV "jytna") ;
|
win_V2 = mkV2 (mkV "jytna") ;
|
||||||
woman_N = mkN "ewrt" feminine ;
|
woman_N = mkN "ewrt" feminine ;
|
||||||
wonder_VQ = compoundV "Heran" (mkV "hwna") ;
|
wonder_VQ = compoundV "Heran" (mkV "hwna") ;
|
||||||
wood_N = mkN "lkRy" ;
|
wood_N = mkN "lkRy" ;
|
||||||
write_V2 = mkV2 (mkV "lkh-na") ;
|
write_V2 = mkV2 (mkV "lkh'na") ;
|
||||||
yellow_A = mkA "pyla" ;
|
yellow_A = mkA "pyla" ;
|
||||||
young_A = mkA "jwan" ;
|
young_A = mkA "jwan" ;
|
||||||
do_V2 = mkV2 (mkV "krna") ;
|
do_V2 = mkV2 (mkV "krna") ;
|
||||||
now_Adv = mkAdv "ab" ;
|
now_Adv = mkAdv "ab" ;
|
||||||
already_Adv = mkAdv "phlE hy" ;
|
already_Adv = mkAdv "phlE?hy" ;
|
||||||
song_N = mkN "gana" ;
|
song_N = mkN "gana" ;
|
||||||
add_V3 = mkV3 (compoundV "aZ-afh" do_V2) "" "" ;
|
add_V3 = mkV3 (compoundV "aZ-afh" do_V2) "" "" ;
|
||||||
number_N = mkN "hndsh" ;
|
number_N = mkN "hndsh" ;
|
||||||
put_V2 = mkV2 (mkV "Dalna") ;
|
put_V2 = mkV2 (mkV "Dalna") ;
|
||||||
stop_V = mkV "rkna" ;
|
stop_V = mkV "rkna" ;
|
||||||
jump_V = mkV "ch-langna" ;
|
jump_V = mkV "ch'langna" ;
|
||||||
|
|
||||||
left_Ord = {s = "bayaN" ; n = singular};
|
left_Ord = {s = "bayaN" ; n = singular};
|
||||||
right_Ord = {s= "dayaN" ; n = singular};
|
right_Ord = {s= "dayaN" ; n = singular};
|
||||||
far_Adv = mkAdv "dwr" ;
|
far_Adv = mkAdv "dwr" ;
|
||||||
correct_A = mkA "Syh" ;
|
correct_A = mkA "Syh" ;
|
||||||
dry_A = mkA "KXk" ;
|
dry_A = mkA "KXk" ;
|
||||||
dull_A = mkA "nalik" ;
|
dull_A = mkA "nal?k" ;
|
||||||
full_A = mkA "mkml" ;
|
full_A = mkA "mkml" ;
|
||||||
heavy_A = mkA "bh-ary" ;
|
heavy_A = mkA "bh'ary" ;
|
||||||
near_A = mkA "qryb" ;
|
near_A = mkA "qryb" ;
|
||||||
rotten_A = mkA "Krab" ;
|
rotten_A = mkA "Krab" ;
|
||||||
round_A = mkA "gwl" ;
|
round_A = mkA "gwl" ;
|
||||||
sharp_A = mkA "tyz" ;
|
sharp_A = mkA "tyz" ;
|
||||||
smooth_A = mkA "hmwar" ;
|
smooth_A = mkA "hmwar" ;
|
||||||
straight_A = mkA "sydh-a" ;
|
straight_A = mkA "sydh'a" ;
|
||||||
wet_A = mkA "gyla" ; ----
|
wet_A = mkA "gyla" ; ----
|
||||||
wide_A = mkA "kh-la" ;
|
wide_A = mkA "kh'la" ;
|
||||||
animal_N = mkN "janwr" ;
|
animal_N = mkN "janwr" ;
|
||||||
ashes_N = mkN "rakh-" feminine; -- FIXME: plural only?
|
ashes_N = mkN "rakh'" feminine; -- FIXME: plural only?
|
||||||
back_N = mkN "qmr" feminine ;
|
back_N = mkN "qmr" feminine ;
|
||||||
bark_N = mkN "bark" ;
|
bark_N = mkN "bark" ;
|
||||||
belly_N = mkN "dh-ny" ;
|
belly_N = mkN "dh'ny" ;
|
||||||
blood_N = mkN "Kwn" ;
|
blood_N = mkN "Kwn" ;
|
||||||
bone_N = mkN "hDy" ;
|
bone_N = mkN "hDy" ;
|
||||||
breast_N = mkN "ch-aty" ;
|
breast_N = mkN "ch'aty" ;
|
||||||
cloud_N = mkN "badl" ;
|
cloud_N = mkN "badl" ;
|
||||||
day_N = mkN "dn" ;
|
day_N = mkN "dn" ;
|
||||||
dust_N = mkN "dh-wl" ;
|
dust_N = mkN "dh'wl" ;
|
||||||
ear_N = mkN "kan" ;
|
ear_N = mkN "kan" ;
|
||||||
earth_N = mkN "zmyn" feminine ;
|
earth_N = mkN "zmyn" feminine ;
|
||||||
egg_N = mkN "anDh" ;
|
egg_N = mkN "anDh" ;
|
||||||
eye_N = mkN "Ankh-" feminine ;
|
eye_N = mkN "Ankh'" feminine ;
|
||||||
fat_N = mkN "mwta" ;
|
fat_N = mkN "mwta" ;
|
||||||
feather_N = mkN "pr" ;
|
feather_N = mkN "pr" ;
|
||||||
fingernail_N = mkN "naKn" ;
|
fingernail_N = mkN "naKn" ;
|
||||||
fire_N = mkN "Ag" feminine ;
|
fire_N = mkN "Ag" feminine ;
|
||||||
flower_N = mkN "ph-wl" ;
|
flower_N = mkN "ph'wl" ;
|
||||||
fog_N = mkN "dh-nd" feminine ;
|
fog_N = mkN "dh'nd" feminine ;
|
||||||
foot_N = mkN "pawN" ; -- not properly covered need to be discussed
|
foot_N = mkN "pawN" ; -- not properly covered need to be discussed
|
||||||
forest_N = mkN "njgl" ;
|
forest_N = mkN "njgl" ;
|
||||||
grass_N = mkN "gh-s" feminine ;
|
grass_N = mkN "gh's" feminine ;
|
||||||
guts_N = mkN "gut" ; -- FIXME: no singular
|
guts_N = mkN "g?t" ; -- FIXME: no singular
|
||||||
hair_N = mkN "bal" ;
|
hair_N = mkN "bal" ;
|
||||||
hand_N = mkN "hath-" ;
|
hand_N = mkN "hath'" ;
|
||||||
head_N = mkN "sr" ;
|
head_N = mkN "sr" ;
|
||||||
heart_N = mkN "dl" ;
|
heart_N = mkN "dl" ;
|
||||||
horn_N = mkN "gh-nty" ;
|
horn_N = mkN "gh'nty" ;
|
||||||
husband_N = mkN "Xwhr" ;
|
husband_N = mkN "Xwhr" ;
|
||||||
ice_N = mkN "brf" feminine ;
|
ice_N = mkN "brf" feminine ;
|
||||||
knee_N = mkN "khny" ;
|
knee_N = mkN "khny" ;
|
||||||
leaf_N = mkN "pth" ;
|
leaf_N = mkN "pth" ;
|
||||||
leg_N = mkN "tang" feminine ;
|
leg_N = mkN "tang" feminine ;
|
||||||
liver_N = mkN "jgr" ;
|
liver_N = mkN "jgr" ;
|
||||||
louse_N = mkN "gh-r" ;
|
louse_N = mkN "gh'r" ;
|
||||||
mouth_N = mkN "mnh" ;
|
mouth_N = mkN "mnh" ;
|
||||||
name_N = mkN "nam" ;
|
name_N = mkN "nam" ;
|
||||||
neck_N = mkN "grdn" feminine ;
|
neck_N = mkN "grdn" feminine ;
|
||||||
@@ -293,21 +294,21 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
seed_N = mkN "byj" ;
|
seed_N = mkN "byj" ;
|
||||||
skin_N = mkN "jld" feminine ;
|
skin_N = mkN "jld" feminine ;
|
||||||
sky_N = mkN "Asman" ;
|
sky_N = mkN "Asman" ;
|
||||||
smoke_N = mkN "dh-waN"; -- singular masc nouns ending with aN,wN yet to be implemented
|
smoke_N = mkN "dh'waN"; -- singular masc nouns ending with aN,wN yet to be implemented
|
||||||
snow_N = mkN "brf" feminine ;
|
snow_N = mkN "brf" feminine ;
|
||||||
stick_N = mkN "ch-Ry" ;
|
stick_N = mkN "ch'Ry" ;
|
||||||
tail_N = mkN "dm" ;
|
tail_N = mkN "dm" ;
|
||||||
tongue_N = mkN "zban" feminine ;
|
tongue_N = mkN "zban" feminine ;
|
||||||
tooth_N = mkN "dant" masculine;
|
-- tooth_N = mkN "dant" masculine;
|
||||||
wife_N = mkN "bywy" ;
|
wife_N = mkN "bywy" ;
|
||||||
wind_N = mkN "Andh-y" ;
|
wind_N = mkN "Andh'y" ;
|
||||||
wing_N = mkN "pr" ;
|
wing_N = mkN "pr" ;
|
||||||
worm_N = mkN "grm" ;
|
worm_N = mkN "grm" ;
|
||||||
year_N = mkN "sal" ;
|
year_N = mkN "sal" ;
|
||||||
blow_V = mkV "clna" ;
|
blow_V = mkV "clna" ;
|
||||||
breathe_V = compoundV "sans" (mkV "lyna" ) ;
|
breathe_V = compoundV "sans" (mkV "lyna" ) ;
|
||||||
burn_V = mkV "jlna" ;
|
burn_V = mkV "jlna" ;
|
||||||
dig_V = mkV "kh-wdna" ;
|
dig_V = mkV "kh'wdna" ;
|
||||||
fall_V = mkV "grna" ;
|
fall_V = mkV "grna" ;
|
||||||
float_V = mkV "tyrna" ;
|
float_V = mkV "tyrna" ;
|
||||||
flow_V = mkV "bhna" ;
|
flow_V = mkV "bhna" ;
|
||||||
@@ -315,16 +316,16 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
freeze_V = mkV "jmna";
|
freeze_V = mkV "jmna";
|
||||||
give_V3 = mkV3 (mkV "dyna") "kw" "";
|
give_V3 = mkV3 (mkV "dyna") "kw" "";
|
||||||
laugh_V = mkV "hnsna" ;
|
laugh_V = mkV "hnsna" ;
|
||||||
-- lie_N = mkN "jh-wt" masculine ;
|
-- lie_N = mkN "jh'wt" masculine ;
|
||||||
lie_V = compoundV "jh-wt" (mkV "bwlna" );
|
lie_V = compoundV "jh'wt" (mkV "bwlna" );
|
||||||
play_V = mkV "kh-ylna" ;
|
play_V = mkV "kh'ylna" ;
|
||||||
sew_V = mkV "syna" ;
|
sew_V = mkV "syna" ;
|
||||||
sing_V = mkV "gana" ;
|
sing_V = mkV "gana" ;
|
||||||
sit_V = mkV "byTh-na" ;
|
sit_V = mkV "byTh'na" ;
|
||||||
smell_V = mkV "swngna" ;
|
smell_V = mkV "swngna" ;
|
||||||
spit_V = mkV "th-wkna" ;
|
spit_V = mkV "th'wkna" ;
|
||||||
stand_V = compoundV "kh-RE" (mkV "hwna" );
|
stand_V = compoundV "kh'RE" (mkV "hwna" );
|
||||||
swell_V = mkV "swjh-na" ;
|
swell_V = mkV "swjh'na" ;
|
||||||
swim_V = mkV "tyrna" ;
|
swim_V = mkV "tyrna" ;
|
||||||
think_V = mkV "swcna" ;
|
think_V = mkV "swcna" ;
|
||||||
turn_V = mkV "mRna";
|
turn_V = mkV "mRna";
|
||||||
@@ -334,36 +335,36 @@ concrete LexiconUrd of Lexicon = CatUrd **
|
|||||||
cut_V2 = mkV2 (mkV "katna") ;
|
cut_V2 = mkV2 (mkV "katna") ;
|
||||||
fear_V2 = mkV2 (mkV "Drna") ;
|
fear_V2 = mkV2 (mkV "Drna") ;
|
||||||
fight_V2 = mkV2 (mkV "lRna") ;
|
fight_V2 = mkV2 (mkV "lRna") ;
|
||||||
hit_V2 = mkV2 (compoundV "th-wkr" (mkV "marna" ));
|
hit_V2 = mkV2 (compoundV "th'wkr" (mkV "marna" ));
|
||||||
hold_V2 = mkV2 (mkV "pkRna") ;
|
hold_V2 = mkV2 (mkV "pkRna") ;
|
||||||
hunt_V2 = mkV2 (compoundV "Xkar" do_V2);
|
hunt_V2 = mkV2 (compoundV "Xkar" do_V2);
|
||||||
kill_V2 = mkV2 (compoundV "mar" (mkV "Dalna" )) ;
|
kill_V2 = mkV2 (compoundV "mar" (mkV "Dalna" )) ;
|
||||||
pull_V2 = mkV2 (mkV "kh-ncna");
|
pull_V2 = mkV2 (mkV "kh'ncna");
|
||||||
push_V2 = mkV2 (mkV "dh-kylna") "kw" ;
|
push_V2 = mkV2 (mkV "dh'kylna") "kw" ;
|
||||||
rub_V2 = mkV2 (mkV "rgRna") ;
|
rub_V2 = mkV2 (mkV "rgRna") ;
|
||||||
scratch_V2 = mkV2 (mkV "kh-rcna") "kw" ;
|
scratch_V2 = mkV2 (mkV "kh'rcna") "kw" ;
|
||||||
split_V2 = mkV2 (mkV "banta") "kw" ;
|
split_V2 = mkV2 (mkV "banta") "kw" ;
|
||||||
-- squeeze_V2 = dirV2 (regV "squeeze") ;
|
-- squeeze_V2 = dirV2 (regV "sq?eeze") ;
|
||||||
-- stab_V2 = dirV2 (regDuplV "stab") ;
|
-- stab_V2 = dirV2 (regDuplV "stab") ;
|
||||||
suck_V2 = mkV2 (mkV "cwsna") ;
|
suck_V2 = mkV2 (mkV "cwsna") ;
|
||||||
throw_V2 = mkV2 (mkV "ph-ynkna") ;
|
throw_V2 = mkV2 (mkV "ph'ynkna") ;
|
||||||
tie_V2 = mkV2 (mkV "bandh-na") ;
|
tie_V2 = mkV2 (mkV "bandh'na") ;
|
||||||
wash_V2 = mkV2 (mkV "dh-wna") ;
|
wash_V2 = mkV2 (mkV "dh'wna") ;
|
||||||
wipe_V2 = mkV2 (compoundV "Saf" (mkV "krna" ));
|
wipe_V2 = mkV2 (compoundV "Saf" (mkV "krna" ));
|
||||||
|
|
||||||
---- other_A = regA "other" ;
|
---- other_A = regA "?ther" ;
|
||||||
|
|
||||||
grammar_N = mkN "grdan" ;
|
grammar_N = mkN "grdan" ;
|
||||||
language_N = mkN "zban" feminine ;
|
language_N = mkN "zban" feminine ;
|
||||||
rule_N = mkN "aSwl" ;
|
rule_N = mkN "aSwl" ;
|
||||||
|
|
||||||
---- added 4/6/2007
|
---- added 4/6/2007
|
||||||
john_PN = mkPN "jon" ;
|
john_PN = mkPN "jan" ;
|
||||||
question_N = mkN "swal" ;
|
question_N = mkN "swal" ;
|
||||||
-- ready_A = regA "ready" ;
|
-- ready_A = regA "ready" ;
|
||||||
reason_N = mkN "wjh" feminine ;
|
reason_N = mkN "wjh" feminine ;
|
||||||
today_Adv = mkAdv "Aj" ;
|
today_Adv = mkAdv "Aj" ;
|
||||||
uncertain_A = mkA ["Gyr yqyny"] ;
|
uncertain_A = mkA ["Gyryqyny"] ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
---- syntax. To build a lexicon, it is better to use $ParadigmsUrd$, which
|
---- syntax. To build a lexicon, it is better to use $ParadigmsUrd$, which
|
||||||
---- gives a higher-level access to this module.
|
---- gives a higher-level access to this module.
|
||||||
--
|
--
|
||||||
resource MorphoUrd = ResUrd ** open Prelude,Predef in {
|
resource MorphoUrd = ResUrd ** open CommonHindustani,Prelude,Predef,ParamX in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
@@ -42,6 +42,7 @@ oper
|
|||||||
_ + "y" => mkN03 (s);
|
_ + "y" => mkN03 (s);
|
||||||
_ + ("aN"|"wN") => mkN04 (s);
|
_ + ("aN"|"wN") => mkN04 (s);
|
||||||
_ + "w^" => mkN12 (s);
|
_ + "w^" => mkN12 (s);
|
||||||
|
_ + "t" => mkN10 s ;
|
||||||
_ => regNoun2 (s)
|
_ => regNoun2 (s)
|
||||||
};
|
};
|
||||||
regNoun2 : Str -> Noun;
|
regNoun2 : Str -> Noun;
|
||||||
@@ -195,7 +196,11 @@ oper
|
|||||||
|
|
||||||
-- Proposition
|
-- Proposition
|
||||||
|
|
||||||
makePrep : Str -> Preposition = \str -> {s = str};
|
makePrep : Str -> Str -> Preposition = \s1,s2 -> {s =
|
||||||
|
table {
|
||||||
|
Masc => s1;
|
||||||
|
Fem => s2
|
||||||
|
}; } ** { lock_Prep = <>};
|
||||||
|
|
||||||
----2 Pronouns
|
----2 Pronouns
|
||||||
PronForm = {s:Pronoun => Str};
|
PronForm = {s:Pronoun => Str};
|
||||||
@@ -1,45 +1,47 @@
|
|||||||
concrete StructuralUrd of Structural = CatUrd **
|
concrete StructuralUrd of Structural = CatUrd **
|
||||||
open MorphoUrd, ParadigmsUrd, Prelude, NounUrd in {
|
open MorphoUrd, ParadigmsUrd, Prelude, NounUrd,ParamX,CommonHindustani in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
above_Prep = ss "awpr" ;
|
above_Prep = mkPrep "awpr" "awpr" ;
|
||||||
after_Prep = ss "kE bed" ;
|
after_Prep = mkPrep ["kE bed"] ["kE bed"] ;
|
||||||
all_Predet = ss "tmam" ;
|
all_Predet = ss "tmam" ;
|
||||||
almost_AdA, almost_AdN = ss "tqryba" ;
|
almost_AdA, almost_AdN = mkAdN "tqryba" ;
|
||||||
although_Subj = ss "agrch-" ;
|
although_Subj = ss "agrch-" ;
|
||||||
always_AdV = ss "hmyXh" ;
|
always_AdV = ss "hmyXh" ;
|
||||||
and_Conj = sd2 [] "awr" ** {n = Pl} ;
|
and_Conj = sd2 [] "awr" ** {n = Pl} ;
|
||||||
because_Subj = ss "kywnkh-" ;
|
because_Subj = ss "kywnkh-" ;
|
||||||
before_Prep = ss "phlE" ;
|
before_Prep = mkPrep "phlE" "phlE" ;
|
||||||
behind_Prep = ss "pych-E" ;
|
behind_Prep = mkPrep "pych-E" "pych-E" ;
|
||||||
between_Prep = ss "drmyaN" ;
|
between_Prep = mkPrep "drmyaN" "drmyaN" ;
|
||||||
both7and_DConj = sd2 "dwnwN" "awr" ** {n = Pl} ;
|
both7and_DConj = sd2 "dwnwN" "awr" ** {n = Pl} ;
|
||||||
but_PConj = ss "lykn" ;
|
but_PConj = ss "lykn" ;
|
||||||
by8agent_Prep = ss "" ;
|
by8agent_Prep = mkPrep "" "" ;
|
||||||
by8means_Prep = ss "" ;
|
by8means_Prep = mkPrep "" "" ;
|
||||||
can8know_VV,can_VV = mkV "skna" ** { isAux = True} ;
|
can8know_VV,can_VV = mkV "skna" ** { isAux = True} ;
|
||||||
during_Prep = ss ["kE drmyaN"] ;
|
during_Prep = mkPrep ["kE drmyaN"] ["kE drmyaN"] ;
|
||||||
either7or_DConj = sd2 "kwy ayk" "ya" ** {n = Sg} ;
|
either7or_DConj = sd2 "kwy ayk" "ya" ** {n = Sg} ;
|
||||||
everybody_NP = MassNP (UseN (ParadigmsUrd.mkN "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" Masc )); -- not a good way coz need to include NounUrd
|
everybody_NP = MassNP (UseN (ParadigmsUrd.mkN "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" "hr kwy" Masc )); -- not a good way coz need to include NounUrd
|
||||||
every_Det = mkDet "hr" "hr" "hr" "hr" Sg;
|
every_Det = mkDet "hr" "hr" "hr" "hr" Sg;
|
||||||
everything_NP = MassNP (UseN (ParadigmsUrd.mkN "hr cyz" "hr cyz" "hr cyzw" "sb cyzyN" "sb cyzwN" "sb cyzw" Masc ));
|
everything_NP = MassNP (UseN (ParadigmsUrd.mkN "hr cyz" "hr cyz" "hr cyzw" "sb cyzyN" "sb cyzwN" "sb cyzw" Masc ));
|
||||||
everywhere_Adv = ss "hr jgh" ;
|
everywhere_Adv = mkAdv "hr jgh" ;
|
||||||
few_Det = mkDet "cnd" "cnd" "cnd" "cnd" Pl ;
|
few_Det = mkDet "cnd" "cnd" "cnd" "cnd" Pl ;
|
||||||
for_Prep = ss "kylyE" ;
|
first_Ord = {s = "pehla" ; n = Sg} ; --DEPRECATED
|
||||||
from_Prep = ss "sE" ;
|
for_Prep = mkPrep "kylyE" "kylyE" ;
|
||||||
|
from_Prep = mkPrep "sE" "sE" ;
|
||||||
he_Pron = personalPN "wh" "as" "" "as ka" Sg Masc Pers3_Distant ;
|
he_Pron = personalPN "wh" "as" "" "as ka" Sg Masc Pers3_Distant ;
|
||||||
here_Adv = ss "yhaN" ;
|
here_Adv = mkAdv "yhaN" ;
|
||||||
here7to_Adv = ss ["yhaN pr"] ;
|
here7to_Adv = mkAdv ["yhaN pr"] ;
|
||||||
here7from_Adv = ss ["yhaN sE"] ;
|
here7from_Adv = mkAdv ["yhaN sE"] ;
|
||||||
how_IAdv = ss "how" ;
|
how_IAdv = ss "kysE" ;
|
||||||
how8many_IDet = makeIDet "ktnE" "ktny" Pl ;
|
how8many_IDet = makeIDet "ktnE" "ktny" Pl ;
|
||||||
|
how8much_IAdv = ss "ktna" ;
|
||||||
if_Subj = ss "agr" ;
|
if_Subj = ss "agr" ;
|
||||||
in8front_Prep = ss ["kE samnE"] ;
|
in8front_Prep = mkPrep ["kE samnE"] ["kE samnE"] ;
|
||||||
i_Pron = personalPN "myN" "mjh-" "" "myra" Sg Masc Pers1;
|
i_Pron = personalPN "myN" "mjh-" "" "myra" Sg Masc Pers1;
|
||||||
in_Prep = ss "meN" ;
|
in_Prep = mkPrep "meN" "meN" ;
|
||||||
it_Pron = personalPN "yh" "yh" "yh" "as ka" Sg Masc Pers3_Near;
|
it_Pron = personalPN "yh" "yh" "yh" "as ka" Sg Masc Pers3_Near;
|
||||||
less_CAdv = {s = "km" ; p = ""} ;
|
less_CAdv = {s = "km" ; p = ""} ;
|
||||||
many_Det = mkDet "bht zyadh" "bht zyadh" "bht zyadh" "bht zyadh" Pl ;
|
many_Det = mkDet "bht zyadh" "bht zyadh" "bht zyadh" "bht zyadh" Pl ;
|
||||||
@@ -60,14 +62,14 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
-- } ;
|
-- } ;
|
||||||
-----b no_Phr = ss "no" ;
|
-----b no_Phr = ss "no" ;
|
||||||
no_Utt = ss "nhyN" ;
|
no_Utt = ss "nhyN" ;
|
||||||
on_Prep = ss "pr" ;
|
on_Prep = mkPrep "pr" "pr" ;
|
||||||
-- one_Quant = demoPN "ayk" "ayk" "ayk" ; -- DEPRECATED
|
-- one_Quant = demoPN "ayk" "ayk" "ayk" ; -- DEPRECATED
|
||||||
only_Predet = ss "srf" ;
|
only_Predet = ss "srf" ;
|
||||||
or_Conj = sd2 [] "ya" ** {n = Sg} ;
|
or_Conj = sd2 [] "ya" ** {n = Sg} ;
|
||||||
otherwise_PConj = ss "ya ph-r" ;
|
otherwise_PConj = ss "ya ph-r" ;
|
||||||
part_Prep = ss "" ;
|
part_Prep = mkPrep "" "" ;
|
||||||
please_Voc = ss "mhrbani" ;
|
please_Voc = ss "mhrbani" ;
|
||||||
possess_Prep = ss "ka" ;
|
possess_Prep = mkPrep "ka" "ky" ;
|
||||||
quite_Adv = ss "khamosh" ;
|
quite_Adv = ss "khamosh" ;
|
||||||
she_Pron = personalPN "wh" "as" "wh" "as ky" Sg Fem Pers3_Distant ;
|
she_Pron = personalPN "wh" "as" "wh" "as ky" Sg Fem Pers3_Distant ;
|
||||||
so_AdA = ss "so" ;
|
so_AdA = ss "so" ;
|
||||||
@@ -75,19 +77,19 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
someSg_Det = mkDet "kch-" "kch-" "kch-" "kch-" Sg ;
|
someSg_Det = mkDet "kch-" "kch-" "kch-" "kch-" Sg ;
|
||||||
somePl_Det = mkDet "kch-" "kch-" "kch-" "kch-" Pl ;
|
somePl_Det = mkDet "kch-" "kch-" "kch-" "kch-" Pl ;
|
||||||
something_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy cyz" "kwy cyz" "kwy cyz" "kh- cyzyN" "kh- cyzwN" "kh- cyzw" Masc ));
|
something_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy cyz" "kwy cyz" "kwy cyz" "kh- cyzyN" "kh- cyzwN" "kh- cyzw" Masc ));
|
||||||
somewhere_Adv = ss "khin pr" ;
|
somewhere_Adv = mkAdv ["khin pr"] ;
|
||||||
that_Quant = demoPN "wh" "as" "an" ;
|
that_Quant = demoPN "wh" "as" "an" ;
|
||||||
that_Subj = ss "kh";
|
that_Subj = ss "kh";
|
||||||
there_Adv = ss "whaN" ;
|
there_Adv = mkAdv "whaN" ;
|
||||||
there7to_Adv = ss "whaN pr" ;
|
there7to_Adv = mkAdv ["whaN pr"] ;
|
||||||
there7from_Adv = ss ["whaN sE"] ;
|
there7from_Adv = mkAdv ["whaN sE"] ;
|
||||||
therefore_PConj = ss "as lyE" ;
|
therefore_PConj = ss "as lyE" ;
|
||||||
they_Pron = personalPN "wh" "wh" "wh" "an ka" Pl Masc Pers3_Distant ; ----
|
they_Pron = personalPN "wh" "wh" "wh" "an ka" Pl Masc Pers3_Distant ; ----
|
||||||
this_Quant = demoPN "yh" "as" "an";
|
this_Quant = demoPN "yh" "as" "an";
|
||||||
through_Prep = ss ["myN sE"] ;
|
through_Prep = mkPrep ["myN sE"] ["myN sE"] ;
|
||||||
too_AdA = ss "bht" ;
|
too_AdA = ss "bht" ;
|
||||||
to_Prep = ss "kw" ;
|
to_Prep = mkPrep "kw" "kw" ; -- ** {lock_Prep = <>};
|
||||||
under_Prep = ss "nycE" ;
|
under_Prep = mkPrep "nycE" "nycE" ; -- ** {lock_Prep = <>};
|
||||||
very_AdA = ss "bht" ;
|
very_AdA = ss "bht" ;
|
||||||
want_VV = mkV "cahna" ** { isAux = False} ;
|
want_VV = mkV "cahna" ** { isAux = False} ;
|
||||||
we_Pron = personalPN "hm" "hm" "hm" "hmara" Pl Masc Pers1 ;
|
we_Pron = personalPN "hm" "hm" "hm" "hmara" Pl Masc Pers1 ;
|
||||||
@@ -102,8 +104,8 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
whoSg_IP = mkIP "kwn" "kis" "kis" Sg Masc ;
|
whoSg_IP = mkIP "kwn" "kis" "kis" Sg Masc ;
|
||||||
whoPl_IP = mkIP "kwn" "kn" "knhwN" Pl Masc ;
|
whoPl_IP = mkIP "kwn" "kn" "knhwN" Pl Masc ;
|
||||||
why_IAdv = ss "kywN" ;
|
why_IAdv = ss "kywN" ;
|
||||||
without_Prep = ss ["kE bGyr"] ;
|
without_Prep = mkPrep ["kE bGyr"] ["kE bGyr"] ;
|
||||||
with_Prep = ss ["kE sath-"] ;
|
with_Prep = mkPrep ["kE sath-"] ["kE sath-"] ;
|
||||||
-- yes_Phr = ss "haN" ;
|
-- yes_Phr = ss "haN" ;
|
||||||
yes_Utt = ss "haN" ;
|
yes_Utt = ss "haN" ;
|
||||||
youSg_Pron = personalPN "tm" "tm" "tm" "tmh-ara" Sg Masc Pers2_Casual ;
|
youSg_Pron = personalPN "tm" "tm" "tm" "tmh-ara" Sg Masc Pers2_Casual ;
|
||||||
@@ -112,10 +114,10 @@ concrete StructuralUrd of Structural = CatUrd **
|
|||||||
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} ;
|
||||||
at_least_AdN = ss ["km az km"] ;
|
at_least_AdN = mkAdN ["km az km"] ;
|
||||||
at_most_AdN = ss ["zyadh sE zyadh"];
|
at_most_AdN = mkAdN ["zyadh sE zyadh"];
|
||||||
nothing_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" Masc ));
|
nothing_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" "kwy cyz nhyN" Masc ));
|
||||||
except_Prep = ss "swaE" ;
|
except_Prep = mkPrep "swaE" "swaE" ;
|
||||||
nobody_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" Masc ));
|
nobody_NP = MassNP (UseN (ParadigmsUrd.mkN "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" "kwy nhyN" Masc ));
|
||||||
|
|
||||||
as_CAdv = {s = "etna" ; p = "jtna"} ;
|
as_CAdv = {s = "etna" ; p = "jtna"} ;
|
||||||
11
lib/src/urdu/translit.gfs
Normal file
11
lib/src/urdu/translit.gfs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
rf -file=../hindustani/CommonHindustani.gf | ps -env=quotes -to_urdu | wf -file=CommonHindustani.gf
|
||||||
|
rf -file=../hindustani/ExtraHindustani.gf | ps -env=quotes -to_urdu | wf -file=ExtraHindustani.gf
|
||||||
|
rf -file=../hindustani/ResHindustani.gf | ps -env=quotes -to_urdu | wf -file=ResHindustani.gf
|
||||||
|
rf -file=../hindustani/StringsHindustani.gf | ps -env=quotes -to_urdu | wf -file=StringsHindustani.gf
|
||||||
|
rf -file=src/DiffUrd.gf | ps -env=quotes -to_urdu | wf -file=DiffUrd.gf
|
||||||
|
rf -file=src/ExtraUrd.gf | ps -env=quotes -to_urdu | wf -file=ExtraUrd.gf
|
||||||
|
rf -file=src/IdiomUrd.gf | ps -env=quotes -to_urdu | wf -file=IdiomUrd.gf
|
||||||
|
rf -file=src/LexiconUrd.gf | ps -env=quotes -to_urdu | wf -file=LexiconUrd.gf
|
||||||
|
rf -file=src/MorphoUrd.gf | ps -env=quotes -to_urdu | wf -file=MorphoUrd.gf
|
||||||
|
rf -file=src/StructuralUrd.gf | ps -env=quotes -to_urdu | wf -file=StructuralUrd.gf
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
rf -file=transliterated/IdiomUrd.gf | ps -env=quotes -to_urdu | wf -file=IdiomUrd.gf
|
|
||||||
rf -file=transliterated/LexiconUrd.gf | ps -env=quotes -to_urdu | wf -file=LexiconUrd.gf
|
|
||||||
rf -file=transliterated/MorphoUrd.gf | ps -env=quotes -to_urdu | wf -file=MorphoUrd.gf
|
|
||||||
rf -file=transliterated/NumeralUrd.gf | ps -env=quotes -to_urdu | wf -file=NumeralUrd.gf
|
|
||||||
rf -file=transliterated/ResUrd.gf | ps -env=quotes -to_urdu | wf -file=ResUrd.gf
|
|
||||||
rf -file=transliterated/StructuralUrd.gf | ps -env=quotes -to_urdu | wf -file=StructuralUrd.gf
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
concrete NumeralUrd of Numeral = CatUrd ** open ResUrd in {
|
|
||||||
-- By Harald Hammarström
|
|
||||||
-- Modification for Urdu Shafqat Virk
|
|
||||||
flags coding=utf8 ;
|
|
||||||
--- still old Devanagari coding
|
|
||||||
|
|
||||||
|
|
||||||
param DForm = unit | ten ;
|
|
||||||
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
|
||||||
param Size = sing | less100 | more100 ;
|
|
||||||
|
|
||||||
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
|
||||||
|
|
||||||
|
|
||||||
lincat Dig = { s:Str ; n : Number};
|
|
||||||
lincat Digit = LinDigit ;
|
|
||||||
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
|
||||||
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
|
||||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
|
||||||
lincat Sub1000000 = { s : Str ; n : Number } ;
|
|
||||||
|
|
||||||
lin num x0 =
|
|
||||||
{s = table {
|
|
||||||
NCard => x0.s ;
|
|
||||||
NOrd => x0.s ++ "waN" -- need to use mkOrd which will make irregular ordinals but it gives path error
|
|
||||||
};
|
|
||||||
n = x0.n
|
|
||||||
} ;
|
|
||||||
oper mkOrd : Str -> Str =
|
|
||||||
\s -> case s of {
|
|
||||||
"ek" => "phla";
|
|
||||||
"do" => "dwsra";
|
|
||||||
"ti:n" => "tesra";
|
|
||||||
"ca:r" => "cwth-a";
|
|
||||||
("cHah"|"cHa"|"cHai") => "ch-Ta";
|
|
||||||
_ => s ++ "waN"
|
|
||||||
};
|
|
||||||
-- {s = \\_ => x0.s ; n = x0.n} ;
|
|
||||||
|
|
||||||
|
|
||||||
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
|
||||||
\do -> \bis -> \sz ->
|
|
||||||
{s = table {unit => do ; ten => bis } ;
|
|
||||||
size = sz ; n = Pl} ;
|
|
||||||
|
|
||||||
lin n2 = mkNum "dw" "bys" r2 ;
|
|
||||||
lin n3 = mkNum "tyn" "tys" r3 ;
|
|
||||||
lin n4 = mkNum "car" "calys" r4 ;
|
|
||||||
lin n5 = mkNum "panc" "pcas" r5 ;
|
|
||||||
lin n6 = mkNum "ch-" "sath-" r6 ;
|
|
||||||
lin n7 = mkNum "sat" "str" r7;
|
|
||||||
lin n8 = mkNum "Ath-" "asy" r8;
|
|
||||||
lin n9 = mkNum "nw" "nwE" r9 ;
|
|
||||||
|
|
||||||
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
|
||||||
sg => a1 + "ah" ;
|
|
||||||
r2 => a2 + "i:s" ;
|
|
||||||
r3 => a3 + "ti:s" ;
|
|
||||||
r4 => a4 + "a:li:s" ;
|
|
||||||
r5 => a5 + "an" ;
|
|
||||||
r6 => a6 + "saTH" ;
|
|
||||||
r7 => a7 + "hattar" ;
|
|
||||||
r8 => a8 + "a:si:" ;
|
|
||||||
r9 => a9 + "a:nave"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
oper rows : DSize => DSize => Str = table {
|
|
||||||
sg => mkR "gyarh" "ikk" "ikat" "ekt" "ikyaw" "ik" "ik" "iky" "iky" ;
|
|
||||||
r2 => mkR "barh" "bay" "bat" "bay" "baw" "ba" "ba" "bay" "b" ;
|
|
||||||
r3 => mkR "tyr" "ty" "tyn" "tnt" "trp" "try" "t" "tr" "tr" ;
|
|
||||||
r4 => mkR "cwd" "cwb" "cwn" "cwa" "cww" "cwn" "cwh" "cwr" "cwr" ;
|
|
||||||
r5 => mkR "pnd" "pcy" "pyn" "pnta" "pcp" "pyn" "ph" "pc" "pc" ;
|
|
||||||
r6 => mkR "swl" "ch-b" "ch-t" "ch-y" "ch-p" "ch-ya" "ch-" "ch-y" "ch-y" ;
|
|
||||||
r7 => mkR "str" "sta" "syn" "snt" "staw" "sta" "sr" "st" "sta" ;
|
|
||||||
r8 => mkR "ath-ar" "ath-ay" "aR" "aRt" "ath-aw" "aR" "ath-" "ath-" "ath-" ;
|
|
||||||
r9 => table {sg => "anys" ; r2 => "antys" ; r3 => "antalys" ;
|
|
||||||
r4 => "ancas" ; r5 => "ansth-" ; r6 => "anhtr" ;
|
|
||||||
r7 => "anasy" ;
|
|
||||||
r8 => "ananwE" ; r9 => "nnanwE" }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
|
||||||
|
|
||||||
lin pot01 = {s = table {unit => "ayk" ; _ => "dummy" } ; size = sg ; n = Sg} ;
|
|
||||||
lin pot0 d = d ;
|
|
||||||
lin pot110 = {s = "das" ; size = less100 ; n = Pl} ;
|
|
||||||
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
|
||||||
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
|
||||||
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => sing ; _ => less100} ! n.size ; n = n.n } ;
|
|
||||||
|
|
||||||
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
|
||||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
|
||||||
|
|
||||||
lin pot1as2 n = {s = n.s ; s2 = "dummy" ; size = n.size ; n = n.n} ;
|
|
||||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
|
||||||
s2 = d.s ! unit ++ "lakh-" ; size = more100 ; n = d.n} ;
|
|
||||||
lin pot2plus d e =
|
|
||||||
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
|
||||||
s2 = (d.s ! unit) ++ "lakh-" ++ (mkhazar e.s e.size) ;
|
|
||||||
size = more100 ; n = d.n} ;
|
|
||||||
|
|
||||||
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
|
||||||
lin pot3 n = {s = table { sing => ekhazar ;
|
|
||||||
less100 => n.s ++ "hzar" ;
|
|
||||||
more100 => n.s2 } ! n.size ; n = n.n} ;
|
|
||||||
lin pot3plus n m =
|
|
||||||
{s = table {sing => ekhazar ;
|
|
||||||
less100 => n.s ++ "hzar" ;
|
|
||||||
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
|
||||||
|
|
||||||
lin D_0 = { s = "0" ; n = Sg};
|
|
||||||
lin D_1 = { s = "1" ; n = Sg};
|
|
||||||
lin D_2 = { s = "2" ; n = Pl};
|
|
||||||
lin D_3 = { s = "3" ; n = Pl};
|
|
||||||
lin D_4 = { s = "4" ; n = Pl};
|
|
||||||
lin D_5 = { s = "5" ; n = Pl};
|
|
||||||
lin D_6 = { s = "6" ; n = Pl};
|
|
||||||
lin D_7 = { s = "7" ; n = Pl};
|
|
||||||
lin D_8 = { s = "8" ; n = Pl};
|
|
||||||
lin D_9 = { s = "9" ; n = Pl};
|
|
||||||
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
|
||||||
lin IIDig d dg = { s = \\df => dg.s ! df ++ d.s ; n = Pl }; -- need to use + rather than ++, but gives error need to discuss
|
|
||||||
|
|
||||||
oper ekhazar : Str = variants {"hzar" ; "ayk" ++ "hzar"} ;
|
|
||||||
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {sing => ekhazar ; _ => s ++ "hzar"} ! sz ;
|
|
||||||
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "sw" ; _ => s ++ "sw"} ! sz ;
|
|
||||||
}
|
|
||||||
@@ -1,641 +0,0 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
|
||||||
--
|
|
||||||
--1 Urdu auxiliary operations.
|
|
||||||
--
|
|
||||||
-- This module contains operations that are needed to make the
|
|
||||||
-- resource syntax work.
|
|
||||||
|
|
||||||
resource ResUrd = ParamX ** open Prelude,Predef in {
|
|
||||||
|
|
||||||
flags optimize=all ;
|
|
||||||
coding = utf8;
|
|
||||||
|
|
||||||
param
|
|
||||||
Case = Dir | Obl | Voc ;
|
|
||||||
Gender = Masc | Fem ;
|
|
||||||
VTense = Subj | Perf | Imperf;
|
|
||||||
UPerson = Pers1
|
|
||||||
| Pers2_Casual
|
|
||||||
| Pers2_Familiar
|
|
||||||
| Pers2_Respect
|
|
||||||
| Pers3_Near
|
|
||||||
| Pers3_Distant;
|
|
||||||
|
|
||||||
Order = ODir | OQuest ;
|
|
||||||
|
|
||||||
--2 For $Relative$
|
|
||||||
|
|
||||||
RAgr = RNoAg | RAg Agr ;
|
|
||||||
RCase = RC Number Case ;
|
|
||||||
|
|
||||||
-- for Numerial
|
|
||||||
|
|
||||||
CardOrd = NCard | NOrd ;
|
|
||||||
|
|
||||||
-----------------------------------------
|
|
||||||
-- Urd Pronouns
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
Pronoun = P Number Gender Case UPerson;
|
|
||||||
PersPronForm = PPF Number UPerson Case;
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
--Verbs
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
VerbForm = VF VTense UPerson Number Gender
|
|
||||||
| Inf
|
|
||||||
| Root
|
|
||||||
| Inf_Obl
|
|
||||||
| Inf_Fem;
|
|
||||||
oper
|
|
||||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
|
||||||
Verb = {s : VerbForm => Str} ;
|
|
||||||
Preposition = {s : Str};
|
|
||||||
DemPronForm = {s : Number => Gender => Case => Str};
|
|
||||||
PossPronForm = {s : Number => Gender => Case => Str};
|
|
||||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
|
||||||
|
|
||||||
-- a useful oper
|
|
||||||
eq : Str -> Str -> Bool = \s1,s2-> (pbool2bool (eqStr s1 s2)) ;
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
-- Urd Adjectives
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
Adjective = { s: Number => Gender => Case => Degree => Str };
|
|
||||||
|
|
||||||
|
|
||||||
mkAdjective : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36:Str) -> Adjective =
|
|
||||||
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,y31,y32,y33,y34,y35,y36 -> {
|
|
||||||
s = table {
|
|
||||||
Sg => table {
|
|
||||||
Masc => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y1 ;
|
|
||||||
Compar => y2 ;
|
|
||||||
Superl => y3
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y4 ;
|
|
||||||
Compar => y5 ;
|
|
||||||
Superl => y6
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y7 ;
|
|
||||||
Compar => y8 ;
|
|
||||||
Superl => y9
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Fem => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y10 ;
|
|
||||||
Compar => y11 ;
|
|
||||||
Superl => y12
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y13 ;
|
|
||||||
Compar => y14 ;
|
|
||||||
Superl => y15
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y16 ;
|
|
||||||
Compar => y17 ;
|
|
||||||
Superl => y18
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Pl => table {
|
|
||||||
Masc => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y19 ;
|
|
||||||
Compar => y20 ;
|
|
||||||
Superl => y21
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y22 ;
|
|
||||||
Compar => y23 ;
|
|
||||||
Superl => y24
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y25 ;
|
|
||||||
Compar => y26 ;
|
|
||||||
Superl => y27
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Fem => table {
|
|
||||||
Dir => table {
|
|
||||||
Posit => y28 ;
|
|
||||||
Compar => y29 ;
|
|
||||||
Superl => y30
|
|
||||||
};
|
|
||||||
Obl => table {
|
|
||||||
Posit => y31 ;
|
|
||||||
Compar => y32 ;
|
|
||||||
Superl => y33
|
|
||||||
};
|
|
||||||
Voc => table {
|
|
||||||
Posit => y34 ;
|
|
||||||
Compar => y35 ;
|
|
||||||
Superl => y36
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
regAdjective : Str -> Adjective;
|
|
||||||
regAdjective x = case x of {
|
|
||||||
acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sab sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
|
||||||
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y")
|
|
||||||
(acch +"E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sab sE" ++ acch + "E")
|
|
||||||
(acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sab sE" ++ acch + "y");
|
|
||||||
|
|
||||||
_ => mkAdjective x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
x x x x x x x x x
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RefPron : Str;
|
|
||||||
RefPron = "Kwd";
|
|
||||||
|
|
||||||
----------------------------------------------------------
|
|
||||||
-- Grammar part
|
|
||||||
----------------------------------------------------------
|
|
||||||
|
|
||||||
param
|
|
||||||
Agr = Ag Gender Number UPerson ;
|
|
||||||
NPCase = NPC Case | NPObj | NPErg ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
np2pronCase : (Case => Str) -> NPCase -> Str = \ppf,npc -> case npc of {
|
|
||||||
NPC c => ppf ! c;
|
|
||||||
NPObj => ppf ! Dir ;
|
|
||||||
NPErg => ppf ! Obl ++ "ne"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
toNP : ( Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
|
||||||
NPC c => pn ! c ;
|
|
||||||
NPObj => pn ! Dir ;
|
|
||||||
NPErg => pn ! Obl ++ "ne"
|
|
||||||
} ;
|
|
||||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
|
||||||
NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
|
||||||
NPObj => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
|
||||||
NPErg => dt.s ! Sg ! Masc ++ 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"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
-- Agreement transformations
|
|
||||||
-----------------------------------------
|
|
||||||
toAgr : Number -> UPerson -> Gender -> Agr = \n,p,g ->
|
|
||||||
Ag g n p;
|
|
||||||
|
|
||||||
|
|
||||||
fromAgr : Agr -> {n : Number ; p : UPerson ; g : Gender} = \a -> case a of {
|
|
||||||
Ag g n p => {n = n ; p = p ; g = g}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
|
||||||
let a = fromAgr a0 ; b = fromAgr b0
|
|
||||||
in
|
|
||||||
toAgr
|
|
||||||
(conjNumber a.n b.n)
|
|
||||||
b.p a.g;
|
|
||||||
|
|
||||||
giveNumber : Agr -> Number =\a -> case a of {
|
|
||||||
Ag _ n _ => n
|
|
||||||
};
|
|
||||||
giveGender : Agr -> Gender =\a -> case a of {
|
|
||||||
Ag g _ _ => g
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultAgr : Agr = agrP3 Masc Sg ;
|
|
||||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
|
||||||
personalAgr : Agr = agrP1 Masc Sg ;
|
|
||||||
agrP1 : Gender -> Number -> Agr = \g,n -> Ag g n Pers1 ;
|
|
||||||
|
|
||||||
param
|
|
||||||
CPolarity =
|
|
||||||
CPos
|
|
||||||
| CNeg Bool ; -- contracted or not
|
|
||||||
|
|
||||||
oper
|
|
||||||
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
|
||||||
Pos => CPos ;
|
|
||||||
Neg => CNeg b
|
|
||||||
} ;
|
|
||||||
|
|
||||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
CTense = CPresent | CPast | CFuture ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g ->
|
|
||||||
case <t,n,p,g> of {
|
|
||||||
<CPresent,Sg,Pers1,_ > => "hwN" ;
|
|
||||||
<CPresent,Sg,Pers2_Casual,_ > => "hE" ;
|
|
||||||
<CPresent,Sg,Pers2_Familiar,_ > => "hw" ;
|
|
||||||
<CPresent,Sg,Pers2_Respect,_ > => "hyN" ;
|
|
||||||
<CPresent,Sg,Pers3_Near,_ > => "hE" ;
|
|
||||||
<CPresent,Sg,Pers3_Distant,_ > => "hE" ;
|
|
||||||
<CPresent,Pl,Pers1,_ > => "hyN" ;
|
|
||||||
<CPresent,Pl,Pers2_Casual,_ > => "hw" ;
|
|
||||||
<CPresent,Pl,Pers2_Familiar,_ > => "hw" ;
|
|
||||||
<CPresent,Pl,Pers2_Respect,_ > => "hyN" ;
|
|
||||||
<CPresent,Pl,Pers3_Near,_ > => "hyN" ;
|
|
||||||
<CPresent,Pl,Pers3_Distant,_ > => "hyN" ;
|
|
||||||
<CPast,Sg,Pers1,Masc > => "th-a" ;
|
|
||||||
<CPast,Sg,Pers1,Fem > => "th-y" ;
|
|
||||||
<CPast,Sg,Pers2_Casual,Masc > => "th-a" ;
|
|
||||||
<CPast,Sg,Pers2_Casual,Fem > => "th-y" ;
|
|
||||||
<CPast,Sg,Pers2_Familiar,Masc > => "th-a" ;
|
|
||||||
<CPast,Sg,Pers2_Familiar,Fem > => "th-y" ;
|
|
||||||
<CPast,Sg,Pers2_Respect,Masc > => "th-E" ;
|
|
||||||
<CPast,Sg,Pers2_Respect,Fem > => "th-yN" ;
|
|
||||||
<CPast,Sg,Pers3_Near,Masc > => "th-a" ;
|
|
||||||
<CPast,Sg,Pers3_Near,Fem > => "th-y" ;
|
|
||||||
<CPast,Sg,Pers3_Distant,Masc > => "th-a" ;
|
|
||||||
<CPast,Sg,Pers3_Distant,Fem > => "th-y" ;
|
|
||||||
<CPast,Pl,Pers1,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers1,Fem > => "th-yN" ;
|
|
||||||
<CPast,Pl,Pers2_Casual,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers2_Casual,Fem > => "th-yN" ;
|
|
||||||
<CPast,Pl,Pers2_Familiar,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers2_Familiar,Fem > => "th-yN" ;
|
|
||||||
<CPast,Pl,Pers2_Respect,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers2_Respect,Fem > => "th-yN" ;
|
|
||||||
<CPast,Pl,Pers3_Near,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers3_Near,Fem > => "th-yN" ;
|
|
||||||
<CPast,Pl,Pers3_Distant,Masc > => "th-E" ;
|
|
||||||
<CPast,Pl,Pers3_Distant,Fem > => "th-yN" ;
|
|
||||||
<CFuture,Sg,Pers1,Masc > => "ga" ;
|
|
||||||
<CFuture,Sg,Pers1,Fem > => "gy" ;
|
|
||||||
<CFuture,Sg,Pers2_Casual,Masc > => "ga" ;
|
|
||||||
<CFuture,Sg,Pers2_Casual,Fem > => "gi" ;
|
|
||||||
<CFuture,Sg,Pers2_Familiar,Masc > => "gE" ;
|
|
||||||
<CFuture,Sg,Pers2_Familiar,Fem > => "gy" ;
|
|
||||||
<CFuture,Sg,Pers2_Respect,Masc > => "gE" ;
|
|
||||||
<CFuture,Sg,Pers2_Respect,Fem > => "gy" ;
|
|
||||||
<CFuture,Sg,Pers3_Near,Masc > => "ga" ;
|
|
||||||
<CFuture,Sg,Pers3_Near,Fem > => "gy" ;
|
|
||||||
<CFuture,Sg,Pers3_Distant,Masc > => "ga" ;
|
|
||||||
<CFuture,Sg,Pers3_Distant,Fem > => "gy" ;
|
|
||||||
<CFuture,Pl,Pers1,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers1,Fem > => "gy" ;
|
|
||||||
<CFuture,Pl,Pers2_Casual,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers2_Casual,Fem > => "gy" ;
|
|
||||||
<CFuture,Pl,Pers2_Familiar,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers2_Familiar,Fem > => "gy" ;
|
|
||||||
<CFuture,Pl,Pers2_Respect,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers2_Respect,Fem > => "gy" ;
|
|
||||||
<CFuture,Pl,Pers3_Near,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers3_Near,Fem > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers3_Distant,Masc > => "gE" ;
|
|
||||||
<CFuture,Pl,Pers3_Distant,Fem > => "gy"
|
|
||||||
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
param
|
|
||||||
VPPTense =
|
|
||||||
VPPres
|
|
||||||
|VPPast
|
|
||||||
|VPFutr;
|
|
||||||
|
|
||||||
VPHTense =
|
|
||||||
VPGenPres -- impf hum nahim "I go"
|
|
||||||
| VPImpPast -- impf Ta nahim "I went"
|
|
||||||
| VPFut -- fut na/nahim "I shall go"
|
|
||||||
| VPContPres -- stem raha hum nahim "I am going"
|
|
||||||
| VPContPast -- stem raha Ta nahim "I was going"
|
|
||||||
| VPContFut
|
|
||||||
| VPPerfPres -- perf hum na/nahim "I have gone"
|
|
||||||
| VPPerfPast -- perf Ta na/nahim "I had gone"
|
|
||||||
| VPPerfFut
|
|
||||||
| VPPerfPresCont
|
|
||||||
| VPPerfPastCont
|
|
||||||
| VPPerfFutCont
|
|
||||||
| VPSubj -- subj na "I may go"
|
|
||||||
;
|
|
||||||
|
|
||||||
VPHForm =
|
|
||||||
VPTense VPPTense Agr -- 9 * 12
|
|
||||||
| VPReq
|
|
||||||
| VPImp
|
|
||||||
| VPReqFut
|
|
||||||
| VPInf
|
|
||||||
| VPStem
|
|
||||||
;
|
|
||||||
|
|
||||||
VType = VIntrans | VTrans | VTransPost ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
|
|
||||||
objVType : VType -> NPCase = \vt -> case vt of {
|
|
||||||
VTrans => NPObj ;
|
|
||||||
_ => NPC Obl
|
|
||||||
} ;
|
|
||||||
|
|
||||||
VPH : Type = {
|
|
||||||
s : VPHForm => {fin, inf : Str} ;
|
|
||||||
obj : {s : Str ; a : Agr} ;
|
|
||||||
subj : VType ;
|
|
||||||
comp : Agr => Str;
|
|
||||||
inf : Str;
|
|
||||||
ad : Str;
|
|
||||||
embComp : Str ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
VPHSlash = VPH ** {c2 : Compl} ;
|
|
||||||
|
|
||||||
Compl : Type = {s : Str ; c : VType} ;
|
|
||||||
|
|
||||||
predV : Verb -> VPH = \verb -> {
|
|
||||||
s = \\vh =>
|
|
||||||
case vh of {
|
|
||||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = verb.s ! VF Imperf p n g } ;
|
|
||||||
VPTense VPPast (Ag g n p) => {fin = [] ; inf =verb.s ! VF Perf p n g} ;
|
|
||||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = verb.s ! VF Subj p n g } ;
|
|
||||||
VPStem => {fin = [] ; inf = verb.s ! Root};
|
|
||||||
_ => {fin = [] ; inf = verb.s ! Root}
|
|
||||||
};
|
|
||||||
obj = {s = [] ; a = defaultAgr} ;
|
|
||||||
subj = VTrans ;
|
|
||||||
inf = verb.s ! Inf;
|
|
||||||
ad = [];
|
|
||||||
embComp = [];
|
|
||||||
comp = \\_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
|
||||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
|
||||||
|
|
||||||
|
|
||||||
raha : Gender -> Number -> Str = \g,n ->
|
|
||||||
(regAdjective "rha").s ! n ! g ! Dir ! Posit ;
|
|
||||||
|
|
||||||
cka : Gender -> Number -> Str = \g,n ->
|
|
||||||
(regAdjective "cka").s ! n ! g ! Dir ! Posit ;
|
|
||||||
|
|
||||||
hw : UPerson -> Number -> Str = \pp,n ->
|
|
||||||
case <pp,n> of {
|
|
||||||
<Pers1,_> => "hwN";
|
|
||||||
<_,Pl> => "hwN";
|
|
||||||
<_,_> => "hw"
|
|
||||||
};
|
|
||||||
|
|
||||||
predAux : Aux -> VPH = \verb -> {
|
|
||||||
s = \\vh =>
|
|
||||||
let
|
|
||||||
|
|
||||||
inf = verb.inf ;
|
|
||||||
part = verb.ppart ;
|
|
||||||
|
|
||||||
in
|
|
||||||
case vh of {
|
|
||||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = part } ;
|
|
||||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
|
||||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
|
||||||
VPStem => {fin = [] ; inf = "rh" };
|
|
||||||
_ => {fin = part ; inf = [] }
|
|
||||||
};
|
|
||||||
obj = {s = [] ; a = defaultAgr} ;
|
|
||||||
subj = VIntrans ;
|
|
||||||
inf = verb.inf;
|
|
||||||
ad = [];
|
|
||||||
embComp = [];
|
|
||||||
comp = \\_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Aux = {
|
|
||||||
inf,ppart,prpart : Str
|
|
||||||
} ;
|
|
||||||
|
|
||||||
auxBe : Aux = {
|
|
||||||
inf = "" ;
|
|
||||||
ppart = "" ;
|
|
||||||
prpart = ""
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
|
||||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
|
||||||
s = \\vt,b,ord =>
|
|
||||||
let
|
|
||||||
subjagr : NPCase * Agr = case vt of {
|
|
||||||
VPImpPast => case vp.subj of {
|
|
||||||
VTrans => <NPErg, vp.obj.a> ;
|
|
||||||
VTransPost => <NPErg, defaultAgr> ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
_ => <NPC Dir, np.a>
|
|
||||||
} ;
|
|
||||||
subj = subjagr.p1 ;
|
|
||||||
agr = subjagr.p2 ;
|
|
||||||
n = (fromAgr agr).n;
|
|
||||||
p = (fromAgr agr).p;
|
|
||||||
g = (fromAgr agr).g;
|
|
||||||
vps = case vt of {
|
|
||||||
|
|
||||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
|
||||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
|
||||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
|
||||||
VPContPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n} ;
|
|
||||||
VPPerfPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
|
||||||
VPPerfPresCont =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
|
||||||
VPPerfPastCont =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
|
||||||
VPPerfFutCont =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
quest =
|
|
||||||
case ord of
|
|
||||||
{ ODir => [];
|
|
||||||
OQuest => "kya" };
|
|
||||||
na =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "na" };
|
|
||||||
nahim =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "nhyN" };
|
|
||||||
in
|
|
||||||
case vt of {
|
|
||||||
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ na ++ vps.inf ++ vps.fin ++ vp.embComp ;
|
|
||||||
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkSClause : Str -> Agr -> VPH -> Clause =
|
|
||||||
\subj,agr,vp -> {
|
|
||||||
s = \\t,b,ord =>
|
|
||||||
let
|
|
||||||
n = (fromAgr agr).n;
|
|
||||||
p = (fromAgr agr).p;
|
|
||||||
g = (fromAgr agr).g;
|
|
||||||
vps = case t of {
|
|
||||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
|
||||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
|
||||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
|
||||||
VPContPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPContFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPPerfPres =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfPast =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
|
||||||
VPPerfFut =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
|
||||||
VPPerfPresCont =>
|
|
||||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPPerfPastCont =>
|
|
||||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ raha g n } ;
|
|
||||||
VPPerfFutCont =>
|
|
||||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ raha g n ++ hw p n } ;
|
|
||||||
VPSubj => {fin = insertSubj p (vp.s ! VPStem).inf ; inf = "xayd" }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
quest =
|
|
||||||
case ord of
|
|
||||||
{ ODir => [];
|
|
||||||
OQuest => "kya" };
|
|
||||||
na =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "na" };
|
|
||||||
nahim =
|
|
||||||
case b of
|
|
||||||
{ Pos => [];
|
|
||||||
Neg => "nhyN" };
|
|
||||||
in
|
|
||||||
case t of {
|
|
||||||
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ na ++ vps.inf ++ vps.fin ++ vp.embComp;
|
|
||||||
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ nahim ++ vps.inf ++ vps.fin ++ vp.embComp};
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertSubj : UPerson -> Str -> Str = \p,s ->
|
|
||||||
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
|
||||||
} ;
|
|
||||||
insertVV : Str -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => vp.comp ! a ++ obj1
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp ++ obj1;
|
|
||||||
comp = vp.comp
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
|
||||||
insertObj obj vp ** {c2 = vp.c2} ;
|
|
||||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
|
||||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
|
||||||
|
|
||||||
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
|
|
||||||
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
|
|
||||||
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
|
||||||
case isAux of {False => vp.inf ; True => (vp.s ! VPImp).fin };
|
|
||||||
|
|
||||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
|
||||||
s = vps.s ;
|
|
||||||
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
|
||||||
subj = vps.c2.c ;
|
|
||||||
inf = vps.inf;
|
|
||||||
ad = vps.ad;
|
|
||||||
embComp = vps.embComp;
|
|
||||||
comp = vps.comp
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
ad = vp.ad ;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj;
|
|
||||||
ad = vp.ad ++ ad ;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
|
||||||
conjThat : Str = "kh" ;
|
|
||||||
|
|
||||||
-- strings collected from syntax files, AR
|
|
||||||
|
|
||||||
oper
|
|
||||||
sE_Str = "sE" ;
|
|
||||||
ka_Str = "ka" ;
|
|
||||||
hr_kwy_Str = "hr kwy" ;
|
|
||||||
rakh6na_Str = "rakh-na" ;
|
|
||||||
comma_Str = "," ;
|
|
||||||
agr_Str = "agr" ;
|
|
||||||
nE_Str = "nE" ;
|
|
||||||
jw_Str = "jw" ;
|
|
||||||
js_Str = "js" ;
|
|
||||||
jn_Str = "jn" ;
|
|
||||||
mt_Str = "mt" ;
|
|
||||||
nh_Str = "nh" ;
|
|
||||||
waN_Str = "waN" ;
|
|
||||||
awr_Str = "awr" ;
|
|
||||||
ky_Str = "ky" ;
|
|
||||||
kw_Str = "kw" ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user