mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-09-18 00:06:03 -06:00
more updates from Codex
This commit is contained in:
@@ -7,13 +7,13 @@ concrete AdjectiveTel of Adjective = CatTel ** open ResTel, Prelude in {
|
||||
UseComparA a = a ;
|
||||
|
||||
ComparA a np = {
|
||||
s = \\g,n,c => a.s ! g ! n ! c ++ "కంటే" ++ np.s ! NPC Obl
|
||||
s = \\g,n,c => np.s ! NPC Obl ++ "కంటే" ++ a.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\g,n,c => a.s ! g ! n ! c ++ a.c2 ++ np.s ! NPC Obl
|
||||
s = \\g,n,c => np.s ! NPC Obl ++ a.c2 ++ a.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
ReflA2 a = {
|
||||
@@ -21,7 +21,7 @@ concrete AdjectiveTel of Adjective = CatTel ** open ResTel, Prelude in {
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ sc.s
|
||||
s = \\g,n,c => sc.s ++ ap.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
AdAP ada ap = {
|
||||
@@ -29,7 +29,7 @@ concrete AdjectiveTel of Adjective = CatTel ** open ResTel, Prelude in {
|
||||
} ;
|
||||
|
||||
AdvAP ap adv = {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s
|
||||
s = \\g,n,c => adv.s ++ ap.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
UseA2 a = a ;
|
||||
|
||||
@@ -15,7 +15,7 @@ concrete CatTel of Cat = CommonX ** open ResTel, Prelude in {
|
||||
--
|
||||
Cl = ResTel.Clause ;
|
||||
ClSlash = {s : VPHTense => Polarity => Str ; c2 : Compl} ;
|
||||
Imp = {s : Str} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
--
|
||||
---- Question
|
||||
--
|
||||
|
||||
@@ -103,8 +103,8 @@ concrete DocumentationTel of Documentation = CatTel ** open
|
||||
tr (th "Infinitive" ++ td (verb.s ! VInf)) ++
|
||||
tr (th "Stem" ++ td (verb.s ! VStem)) ++
|
||||
tr (th "Absolutive" ++ td (verb.s ! VAbs)) ++
|
||||
tr (th "Request" ++ td (verb.s ! VReq)) ++
|
||||
tr (th "Imperative" ++ td (verb.s ! VImp)) ++
|
||||
tr (th "Imperative" ++ td (verb.s ! VImp Sg Pos)) ++
|
||||
tr (th "Request" ++ td (verb.s ! VImp Pl Pos)) ++
|
||||
tr (th "Future request" ++ td (verb.s ! VReqFut))
|
||||
) ++
|
||||
heading2 "Imperfect" ++ genderNumberTable verb VImpf ++
|
||||
@@ -133,7 +133,7 @@ concrete DocumentationTel of Documentation = CatTel ** open
|
||||
futureTable : Verb -> Gender -> Str = \verb,gender ->
|
||||
frameTable (
|
||||
tr (th "" ++ th "P1" ++ th "P2" ++ th "P3") ++
|
||||
tr (th "Sg" ++ td (verb.s ! VFut Sg P1 gender) ++ td (verb.s ! VFut Sg P2 gender) ++ td (verb.s ! VFut Sg P3 gender)) ++
|
||||
tr (th "Pl" ++ td (verb.s ! VFut Pl P1 gender) ++ td (verb.s ! VFut Pl P2 gender) ++ td (verb.s ! VFut Pl P3 gender))
|
||||
tr (th "Sg" ++ td (verb.s ! VFuture gender Sg P1) ++ td (verb.s ! VFuture gender Sg P2) ++ td (verb.s ! VFuture gender Sg P3)) ++
|
||||
tr (th "Pl" ++ td (verb.s ! VFuture gender Pl P1) ++ td (verb.s ! VFuture gender Pl P2) ++ td (verb.s ! VFuture gender Pl P3))
|
||||
) ;
|
||||
}
|
||||
|
||||
+66
-12
@@ -20,6 +20,10 @@ concrete ExtendTel of Extend =
|
||||
lincat
|
||||
VPS = {s : Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Agr => Str} ;
|
||||
VPI = {s : Str} ;
|
||||
[VPI] = {s1,s2 : Str} ;
|
||||
[Comp] = {s1,s2 : Agr => Str} ;
|
||||
[Imp] = {s1,s2 : Polarity => Number => Str} ;
|
||||
|
||||
lin
|
||||
UseDAP dap = {s = \\c => dap.s ! Neutr ! npcase2case c ; a = agrP3 Neutr dap.n} ;
|
||||
@@ -33,14 +37,14 @@ concrete ExtendTel of Extend =
|
||||
} ;
|
||||
|
||||
AdvRNP np prep rnp = {
|
||||
s = \\c => np.s ! c ++ rnp.s ! NPC Obl ++ prep.s ;
|
||||
s = \\c => rnp.s ! NPC Obl ++ prep.s ++ np.s ! c ;
|
||||
a = np.a ;
|
||||
lock_NP = <>
|
||||
} ;
|
||||
|
||||
AdvRVP vp prep rnp = insertAdv (rnp.s ! NPC Obl ++ prep.s) vp ;
|
||||
AdvRAP ap prep rnp = {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ rnp.s ! NPC Obl ++ prep.s
|
||||
s = \\g,n,c => rnp.s ! NPC Obl ++ prep.s ++ ap.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Masc ! Sg ! Dir} ;
|
||||
@@ -61,29 +65,59 @@ concrete ExtendTel of Extend =
|
||||
} ;
|
||||
PredVPS np vps = {s = np.s ! NPC Dir ++ vps.s ! np.a} ;
|
||||
|
||||
MkVPI vp = {s = let f = vp.s ! Pos ! VPInf in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin} ;
|
||||
BaseVPI first second = {s1 = first.s ; s2 = second.s} ;
|
||||
ConsVPI first rest = {s1 = first.s ++ "," ++ rest.s1 ; s2 = rest.s2} ;
|
||||
ConjVPI conj vpi = {s = vpi.s1 ++ conj.s2 ++ vpi.s2} ;
|
||||
ComplVPIVV vv vpi = predV vv ** {comp = \\_ => vpi.s} ;
|
||||
|
||||
BaseComp first second = {s1 = first.s ; s2 = second.s} ;
|
||||
ConsComp first rest = {
|
||||
s1 = \\agr => first.s ! agr ++ "," ++ rest.s1 ! agr ;
|
||||
s2 = rest.s2
|
||||
} ;
|
||||
ConjComp conj comps = {
|
||||
s = \\agr => comps.s1 ! agr ++ conj.s2 ++ comps.s2 ! agr
|
||||
} ;
|
||||
|
||||
BaseImp first second = {s1 = first.s ; s2 = second.s} ;
|
||||
ConsImp first rest = {
|
||||
s1 = \\pol,num => first.s ! pol ! num ++ "," ++ rest.s1 ! pol ! num ;
|
||||
s2 = rest.s2
|
||||
} ;
|
||||
ConjImp conj imps = {
|
||||
s = \\pol,num => imps.s1 ! pol ! num ++ conj.s2 ++ imps.s2 ! pol ! num
|
||||
} ;
|
||||
|
||||
CompoundN modifier head = {
|
||||
s = \\n,c => modifier.s ! Sg ! Dir ++ head.s ! n ! c ;
|
||||
g = head.g
|
||||
} ;
|
||||
|
||||
CompoundAP noun adjective = {
|
||||
s = \\g,n,c => noun.s ! Sg ! Dir ++ adjective.s ! g ! n ! c
|
||||
} ;
|
||||
|
||||
GenModNP num np cn = {
|
||||
s = \\c => np.s ! NPC Obl ++ cn.s ! num.n ! npcase2case c ;
|
||||
a = agrP3 cn.g num.n
|
||||
} ;
|
||||
|
||||
PresPartAP vp = {
|
||||
s = \\_,_,_ => let f = vp.s ! Pos ! VPStem in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.inf ++ f.fin
|
||||
s = \\g,n,_ => let f = vp.s ! Pos ! VPPresPart in
|
||||
vp.obj.s ++ vp.comp ! Ag g n P3 ++ f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
PastPartAP vps = {
|
||||
s = \\_,_,_ => let f = vps.s ! Pos ! VPStem in
|
||||
vps.obj.s ++ vps.comp ! defaultAgr ++ f.inf ++ f.fin
|
||||
s = \\g,n,_ => let f = vps.passive ! Pos ! VPPastPart in
|
||||
vps.obj.s ++ vps.comp ! Ag g n P3 ++ f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
PastPartAgentAP vps np = {
|
||||
s = \\_,_,_ => let f = vps.s ! Pos ! VPStem in
|
||||
np.s ! NPC Obl ++ vps.obj.s ++ vps.comp ! defaultAgr ++ f.inf ++ f.fin
|
||||
s = \\g,n,_ => let f = vps.passive ! Pos ! VPPastPart in
|
||||
np.s ! NPC Obl ++ "చేత" ++ vps.obj.s ++ vps.comp ! Ag g n P3 ++
|
||||
f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
GerundCN vp = {
|
||||
@@ -92,13 +126,29 @@ concrete ExtendTel of Extend =
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
GerundNP vp = {
|
||||
s = \\_ => let f = vp.s ! Pos ! VPInf in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin ;
|
||||
a = defaultAgr
|
||||
} ;
|
||||
|
||||
GerundAdv vp = {
|
||||
s = let f = vp.s ! Pos ! VPInf in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
ByVP vp = {
|
||||
s = let f = vp.s ! Pos ! VPInf in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin ++ "ద్వారా"
|
||||
} ;
|
||||
|
||||
ApposNP first second = {
|
||||
s = \\c => first.s ! c ++ "," ++ second.s ! c ;
|
||||
a = first.a
|
||||
} ;
|
||||
|
||||
ReflPoss num cn = {
|
||||
s = \\c => cn.s ! num.n ! npcase2case c ;
|
||||
s = \\c => "తన" ++ cn.s ! num.n ! npcase2case c ;
|
||||
a = agrP3 cn.g num.n ;
|
||||
lock_NP = <>
|
||||
} ;
|
||||
@@ -109,16 +159,20 @@ concrete ExtendTel of Extend =
|
||||
} ;
|
||||
|
||||
PassVPSlash vps = {
|
||||
s = vps.s ;
|
||||
s = vps.passive ;
|
||||
passive = vps.passive ;
|
||||
obj = vps.obj ;
|
||||
subj = VIntrans ;
|
||||
comp = vps.comp
|
||||
} ;
|
||||
|
||||
PassAgentVPSlash vps agent = {
|
||||
s = vps.s ;
|
||||
s = vps.passive ;
|
||||
passive = vps.passive ;
|
||||
obj = vps.obj ;
|
||||
subj = VIntrans ;
|
||||
comp = \\agr => agent.s ! NPC Obl ++ vps.comp ! agr
|
||||
comp = \\agr => agent.s ! NPC Obl ++ "చేత" ++ vps.comp ! agr
|
||||
} ;
|
||||
|
||||
ProgrVPSlash vps = vps ;
|
||||
}
|
||||
|
||||
+45
-1
@@ -1,9 +1,53 @@
|
||||
concrete IdiomTel of Idiom = CatTel ** open Prelude, ResTel in {
|
||||
lin
|
||||
ProgrVP vp = vp ;
|
||||
ProgrVP vp = vp ** {
|
||||
s = \\pol,form => case form of {
|
||||
VPTense VPGenPres agr => vp.s ! pol ! VPTense VPContPres agr ;
|
||||
VPTense VPPerf agr => vp.s ! pol ! VPTense VPContPast agr ;
|
||||
_ => vp.s ! pol ! form
|
||||
}
|
||||
} ;
|
||||
|
||||
ExistNP np = {
|
||||
s = \\tense,pol => np.s ! NPC Dir ++ existVerb tense pol np.a
|
||||
} ;
|
||||
|
||||
ExistNPAdv np adv = {
|
||||
s = \\tense,pol => np.s ! NPC Dir ++ adv.s ++ existVerb tense pol np.a
|
||||
} ;
|
||||
|
||||
ImpPl1 vp = {
|
||||
s = let f = vp.s ! Pos ! VPHort in
|
||||
vp.obj.s ++ vp.comp ! (Ag Masc Pl P1) ++ f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
ImpersCl vp = mkClause {
|
||||
s = \\_ => "అది" ;
|
||||
a = agrP3 Neutr Sg
|
||||
} vp ;
|
||||
|
||||
oper
|
||||
existVerb : VPHTense -> Polarity -> Agr -> Str = \tense,pol,agr ->
|
||||
case pol of {
|
||||
Neg => "లేదు" ;
|
||||
Pos => case <tense,agr> of {
|
||||
<VPPerf, Ag Masc Sg P3> => "ఉండేవాడు" ;
|
||||
<VPPerf, Ag _ Sg P3> => "ఉండేది" ;
|
||||
<VPPerf, Ag Neutr Pl P3> => "ఉండేవి" ;
|
||||
<VPPerf, Ag _ Pl _ > => "ఉండేవారు" ;
|
||||
<VPPerfPast, Ag Masc Sg P3> => "ఉండేవాడు" ;
|
||||
<VPPerfPast, Ag _ Sg P3> => "ఉండేది" ;
|
||||
<VPPerfPast, Ag Neutr Pl P3> => "ఉండేవి" ;
|
||||
<VPPerfPast, Ag _ Pl _ > => "ఉండేవారు" ;
|
||||
<VPFut, Ag Masc Sg P3> => "ఉంటాడు" ;
|
||||
<VPFut, Ag _ Sg P3> => "ఉంటుంది" ;
|
||||
<VPFut, Ag Neutr Pl P3> => "ఉంటాయి" ;
|
||||
<VPFut, Ag _ Pl _ > => "ఉంటారు" ;
|
||||
<_, Ag Masc Sg P3> => "ఉన్నాడు" ;
|
||||
<_, Ag _ Sg P3> => "ఉంది" ;
|
||||
<_, Ag Neutr Pl P3> => "ఉన్నాయి" ;
|
||||
<_, Ag _ Pl _ > => "ఉన్నారు" ;
|
||||
_ => "ఉంది"
|
||||
}
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common
|
||||
--# -path=.:../abstract:../common:../api:../prelude
|
||||
|
||||
concrete LangTel of Lang =
|
||||
GrammarTel,
|
||||
|
||||
@@ -27,5 +27,7 @@ concrete NamesTel of Names = CatTel ** open ResTel in {
|
||||
a = agrP3 Neutr Sg
|
||||
} ;
|
||||
|
||||
AdjLN ap name = {s = ap.s ! Neutr ! Sg ! Dir ++ name.s} ;
|
||||
|
||||
InLN name = {s = name.s ++ "లో"} ;
|
||||
}
|
||||
|
||||
+26
-4
@@ -27,7 +27,12 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
||||
-- } ;
|
||||
--
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
s = \\c => adv.s ++ np.s ! c ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
ExtAdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ "," ++ adv.s ;
|
||||
a = np.a
|
||||
} ;
|
||||
--
|
||||
@@ -57,6 +62,7 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
||||
NumDecimal n = {s = n.s ; n = n.n} ;
|
||||
AdNum adn card = {s = adn.s ++ card.s ; n = card.n} ;
|
||||
OrdNumeral numeral = {s = numeral.s} ;
|
||||
OrdDigits digits = {s = digits.s ++ "వ"} ;
|
||||
--
|
||||
-- NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||
-- OrdDigits n = {s = n.s ! NOrd} ;
|
||||
@@ -101,7 +107,10 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
||||
-- c2 = f.c3
|
||||
-- } ;
|
||||
--
|
||||
ComplN2 f x = {s = \\n,c => f.s ! n ! c ++ f.c2 ++ x.s ! NPC c ; g = f.g} ;
|
||||
ComplN2 f x = {
|
||||
s = \\n,c => x.s ! NPC c ++ f.c2 ++ f.s ! n ! c ;
|
||||
g = f.g
|
||||
} ;
|
||||
-- ComplN3 f x = {
|
||||
-- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ;
|
||||
-- g = f.g ;
|
||||
@@ -122,9 +131,9 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
||||
-- 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} ;
|
||||
AdvCN cn ad = {s = \\n,c => ad.s ++ cn.s ! n ! c ; g = cn.g} ;
|
||||
--
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||
SentCN cn sc = {s = \\n,c => sc.s ++ cn.s ! n ! c ; g = cn.g} ;
|
||||
|
||||
PossNP cn np = {
|
||||
s = \\n,c => np.s ! NPC Obl ++ cn.s ! n ! c ;
|
||||
@@ -136,6 +145,19 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
CountNP det np = {
|
||||
s = \\c => np.s ! NPC Obl ++ "లో" ++ det.s ! Neutr ! npcase2case c ;
|
||||
a = agrP3 Neutr det.n
|
||||
} ;
|
||||
|
||||
QuantityNP decimal mu = {
|
||||
s = \\_ => case mu.isPre of {
|
||||
True => mu.s ++ decimal.s ;
|
||||
False => decimal.s ++ mu.s
|
||||
} ;
|
||||
a = agrP3 Neutr Pl
|
||||
} ;
|
||||
|
||||
ApposCN cn np = {
|
||||
s = \\n,c => cn.s ! n ! c ++ np.s ! NPC Dir ;
|
||||
g = cn.g
|
||||
|
||||
@@ -10,14 +10,16 @@ concrete PhraseTel of Phrase = CatTel ** open Prelude, ResTel in {
|
||||
UttAP ap = {s = ap.s ! Masc ! Sg ! Dir} ;
|
||||
UttVP vp = {s = let f = vp.s ! Pos ! VPInf in f.inf ++ f.fin} ;
|
||||
UttAdv adv = adv ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s} ;
|
||||
UttIP ip = {s = ip.s ! Dir} ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
-- PConjConj conj = {s = conj.s2} ; ---
|
||||
--
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! NPC Dir} ;
|
||||
-- VocNP np = {s = "," ++ np.s ! Nom} ;
|
||||
--
|
||||
}
|
||||
|
||||
@@ -7,10 +7,14 @@ concrete QuestionTel of Question = CatTel ** open ResTel, Prelude in {
|
||||
|
||||
QuestVP ip vp = mkClause {s = \\_ => ip.s ! Dir ; a = agrP3 Neutr ip.n} vp ;
|
||||
QuestIAdv iadv cl = cl ** {s = \\t,p => iadv.s ++ cl.s ! t ! p} ;
|
||||
QuestIComp icomp np = mkClause np (predV (regVerb []) ** {comp = \\_ => icomp.s}) ;
|
||||
QuestSlash ip slash = {
|
||||
s = \\t,p => slash.s ! t ! p ++ ip.s ! Obl ++ slash.c2.s
|
||||
} ;
|
||||
QuestIComp icomp np = mkClause np (predCopula ** {comp = \\_ => icomp.s}) ;
|
||||
|
||||
PrepIP p ip = {s = ip.s ! Obl ++ p.s} ;
|
||||
AdvIP ip adv = {s = \\c => ip.s ! c ++ adv.s ; n = ip.n} ;
|
||||
AdvIAdv iadv adv = {s = adv.s ++ iadv.s} ;
|
||||
IdetCN idet cn = {s = \\c => idet.s ++ cn.s ! idet.n ! c ; n = idet.n} ;
|
||||
IdetIP idet = {s = \\_ => idet.s ; n = idet.n} ;
|
||||
IdetQuant iq num = {s = iq.s ! num.n ++ num.s ; n = num.n} ;
|
||||
|
||||
@@ -4,7 +4,16 @@ concrete RelativeTel of Relative = CatTel ** open ResTel in {
|
||||
--
|
||||
lin
|
||||
RelCl cl = cl ;
|
||||
RelVP rp vp = mkClause {s = \\_ => rp.s ; a = defaultAgr} vp ;
|
||||
RelVP rp vp = {
|
||||
s = \\tense,pol => let f = vp.s ! pol ! case tense of {
|
||||
VPGenPres => VPRelPresent ;
|
||||
VPFut => VPRelPresent ;
|
||||
_ => VPPastPart
|
||||
} in vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
RelSlash rp slash = {
|
||||
s = \\t,p => slash.s ! t ! p ++ rp.s ++ slash.c2.s
|
||||
} ;
|
||||
IdRP = {s = "ఏ"} ;
|
||||
FunRP prep np rp = {s = np.s ! NPC Obl ++ prep.s ++ rp.s} ;
|
||||
--
|
||||
|
||||
+302
-53
@@ -10,7 +10,7 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
flags optimize=all ;
|
||||
|
||||
param
|
||||
Case = Dir | Obl ;
|
||||
Case = Dir | Obl | Acc ;
|
||||
Gender = Masc | Fem | Neutr ;
|
||||
|
||||
oper
|
||||
@@ -18,12 +18,32 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
|
||||
mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun =
|
||||
\sd,so,pd,po,g -> {
|
||||
s = table Number [table Case [sd;so] ; table Case [pd;po]] ;
|
||||
s = table Number [
|
||||
table Case [sd;so;accusative sd] ;
|
||||
table Case [pd;po;accusative pd]
|
||||
] ;
|
||||
g = g
|
||||
} ;
|
||||
|
||||
wallNoun : Str -> Noun = \goda ->
|
||||
mkNoun goda goda (goda + "లు") (goda + "ల") Neutr ;
|
||||
accusative : Str -> Str = \word -> case word of {
|
||||
stem + "ం" => stem + "ాన్ని" ;
|
||||
stem + "ము" => stem + "ాన్ని" ;
|
||||
stem + "లు" => stem + "లను" ;
|
||||
stem + "ి" => word + "ని" ;
|
||||
stem + "ై" => word + "ని" ;
|
||||
stem + "ు" => word + "ను" ;
|
||||
_ => word + "ను"
|
||||
} ;
|
||||
|
||||
wallNoun : Str -> Noun = \word ->
|
||||
case word of {
|
||||
stem + "ం" => mkNoun word word (stem + "ాలు") (stem + "ాల") Neutr ;
|
||||
stem + "ము" => mkNoun word word (stem + "ములు") (stem + "ముల") Neutr ;
|
||||
stem + "లు" => mkNoun word word word (stem + "ల") Neutr ;
|
||||
stem + "ుడు" => mkNoun word word (stem + "ులు") (stem + "ుల") Neutr ;
|
||||
stem + "ి" => mkNoun word word (stem + "ులు") (stem + "ుల") Neutr ;
|
||||
_ => mkNoun word word (word + "లు") (word + "ల") Neutr
|
||||
} ;
|
||||
|
||||
reggNoun : Str -> Gender -> Noun = \s,g ->
|
||||
wallNoun s ** {g = g} ;
|
||||
@@ -47,18 +67,24 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
VForm =
|
||||
VInf
|
||||
| VStem
|
||||
| VPresent Gender Number Person
|
||||
| VPast Gender Number Person
|
||||
| VFuture Gender Number Person
|
||||
| VNegFinite Bool Gender Number Person
|
||||
| VPresentPart
|
||||
| VRelativePresent
|
||||
| VPastPart
|
||||
| VHortative
|
||||
| VImpf Gender Number
|
||||
| VPerf Gender Number
|
||||
| VSubj Number Person
|
||||
| VFut Number Person Gender
|
||||
| VAbs
|
||||
| VReq
|
||||
| VImp
|
||||
| VImp Number Polarity
|
||||
| VReqFut
|
||||
;
|
||||
|
||||
oper
|
||||
Verb = {s : VForm => Str} ;
|
||||
Verb = {s, passive : VForm => Str} ;
|
||||
|
||||
mkVerb : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> Verb =
|
||||
\inf,stem,ims,imp,ifs,ifp,pms,pmp,pfs,pfp,ss1,ss2,sp2,sp3,r -> {
|
||||
@@ -83,19 +109,229 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
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 ;
|
||||
VReq => r ;
|
||||
VImp => sp2 ;
|
||||
VReqFut => r
|
||||
}
|
||||
VImp Sg Pos => sp2 ;
|
||||
VImp Sg Neg => verbRoot stem + "వద్దు" ;
|
||||
VImp Pl Pos => r ;
|
||||
VImp Pl Neg => verbRoot stem + "కండి" ;
|
||||
VReqFut => r ;
|
||||
VPresent g n p => presentFinite stem (Ag g n p) ;
|
||||
VPast g n p => pastFinite stem (Ag g n p) ;
|
||||
VFuture g n p => futureFinite stem (Ag g n p) ;
|
||||
VNegFinite future g n p => case future of {
|
||||
True => verbRoot stem + negativeEnding (Ag g n p) ;
|
||||
False => verbRoot stem + "లేదు"
|
||||
} ;
|
||||
VPresentPart => nonPastStem stem + "ున్న" ;
|
||||
VRelativePresent => relativePresent stem ;
|
||||
VPastPart => pastStem stem + "ిన" ;
|
||||
VHortative => verbRoot stem + "దాం"
|
||||
} ;
|
||||
passive = conjugation (verbRoot stem + "బడు")
|
||||
} ;
|
||||
|
||||
regVerb : Str -> Verb = \cal ->
|
||||
mkVerb cal cal cal cal cal cal cal cal cal cal cal cal cal cal cal ;
|
||||
regVerb : Str -> Verb = \verb -> {
|
||||
s = conjugation verb ;
|
||||
passive = conjugation (verbRoot verb + "బడు")
|
||||
} ;
|
||||
|
||||
conjugation : Str -> VForm => Str = \verb ->
|
||||
let root = verbRoot verb in table {
|
||||
VInf => root + "డం" ;
|
||||
VStem => verb ;
|
||||
VPresent g n p => presentFinite verb (Ag g n p) ;
|
||||
VPast g n p => pastFinite verb (Ag g n p) ;
|
||||
VFuture g n p => futureFinite verb (Ag g n p) ;
|
||||
VNegFinite future g n p => case future of {
|
||||
True => root + negativeEnding (Ag g n p) ;
|
||||
False => root + "లేదు"
|
||||
} ;
|
||||
VPresentPart => nonPastStem verb + "ున్న" ;
|
||||
VRelativePresent => relativePresent verb ;
|
||||
VPastPart => pastStem verb + "ిన" ;
|
||||
VHortative => root + "దాం" ;
|
||||
VImpf g n => nonPastStem verb + "ున్న" ;
|
||||
VPerf g n => pastStem verb ;
|
||||
VSubj n p => nonPastStem verb + finiteEnding (Ag Masc n p) ;
|
||||
VAbs => pastStem verb + "ి" ;
|
||||
VImp Sg Pos => verb ;
|
||||
VImp Sg Neg => root + "వద్దు" ;
|
||||
VImp Pl Pos => root + "ండి" ;
|
||||
VImp Pl Neg => root + "కండి" ;
|
||||
VReqFut => root + "ండి"
|
||||
} ;
|
||||
|
||||
-- The WordNet lexicon gives verbs in the usual dictionary/imperative
|
||||
-- form. These operations provide the productive spoken-Telugu stems.
|
||||
-- Irregular high-frequency verbs are listed before the regular suffix
|
||||
-- rules; compound verbs are handled because matching is suffix based.
|
||||
verbRoot : Str -> Str = \verb -> case verb of {
|
||||
stem + "ండి" => stem ;
|
||||
stem + "ు" => stem ;
|
||||
_ => verb
|
||||
} ;
|
||||
|
||||
pastStem : Str -> Str = \verb -> case verb of {
|
||||
stem + "చేయు" => stem + "చేశ" ;
|
||||
stem + "తిను" => stem + "తిన్న" ;
|
||||
stem + "విను" => stem + "విన్న" ;
|
||||
stem + "కొను" => stem + "కొన్న" ;
|
||||
stem + "కను" => stem + "కన్న" ;
|
||||
stem + "ఉండు" => stem + "ఉన్న" ;
|
||||
stem + "వచ్చు" => stem + "వచ్చ" ;
|
||||
stem + "పో" => stem + "పోయ" ;
|
||||
stem + "ను" => stem + "న్న" ;
|
||||
stem + "ు" => stem ;
|
||||
_ => verb
|
||||
} ;
|
||||
|
||||
nonPastStem : Str -> Str = \verb -> case verb of {
|
||||
stem + "చేయు" => stem + "చేస్త" ;
|
||||
stem + "అవు" => stem + "అవుత" ;
|
||||
stem + "వెళ్ళు" => stem + "వెళ్త" ;
|
||||
stem + "పో" => stem + "పోత" ;
|
||||
stem + "తిను" => stem + "తింట" ;
|
||||
stem + "విను" => stem + "వింట" ;
|
||||
stem + "కొను" => stem + "కొంట" ;
|
||||
stem + "ను" => stem + "ంట" ;
|
||||
stem + "ించు" => stem + "ిస్త" ;
|
||||
stem + "చు" => stem + "స్త" ;
|
||||
stem + "ు" => stem + "ుత" ;
|
||||
_ => verb + "త"
|
||||
} ;
|
||||
|
||||
relativePresent : Str -> Str = \verb -> case verb of {
|
||||
stem + "చేయు" => stem + "చేసే" ;
|
||||
stem + "వెళ్ళు" => stem + "వెళ్ళే" ;
|
||||
stem + "వచ్చు" => stem + "వచ్చే" ;
|
||||
_ => verbRoot verb + "ే"
|
||||
} ;
|
||||
|
||||
finiteEnding : Agr -> Str = \agr -> case agr of {
|
||||
Ag _ Sg P1 => "ాను" ;
|
||||
Ag _ Sg P2 => "ావు" ;
|
||||
Ag Masc Sg P3 => "ాడు" ;
|
||||
Ag _ Sg P3 => "ింది" ;
|
||||
Ag _ Pl P1 => "ాము" ;
|
||||
Ag Neutr Pl P3 => "ాయి" ;
|
||||
Ag _ Pl _ => "ారు"
|
||||
} ;
|
||||
|
||||
presentFinite : Str -> Agr -> Str = \verb,agr ->
|
||||
nonPastStem verb + "ున్న" + case agr of {
|
||||
Ag _ Sg P1 => "ాను" ;
|
||||
Ag _ Sg P2 => "ావు" ;
|
||||
Ag Masc Sg P3 => "ాడు" ;
|
||||
Ag _ Sg P3 => "ది" ;
|
||||
Ag _ Pl P1 => "ాము" ;
|
||||
Ag Neutr Pl P3 => "ాయి" ;
|
||||
Ag _ Pl _ => "ారు"
|
||||
} ;
|
||||
|
||||
pastFinite : Str -> Agr -> Str = \verb,agr -> case agr of {
|
||||
Ag Masc Sg P3 => pastStem verb + "ాడు" ;
|
||||
Ag _ Sg P3 => case verb of {
|
||||
stem + "చేయు" => stem + "చేసింది" ;
|
||||
stem + "తిను" => stem + "తిన్నది" ;
|
||||
stem + "విను" => stem + "విన్నది" ;
|
||||
stem + "కొను" => stem + "కొన్నది" ;
|
||||
stem + "కను" => stem + "కన్నది" ;
|
||||
_ => pastStem verb + case agr of {
|
||||
Ag Masc Sg P3 => "ాడు" ;
|
||||
_ => "ింది"
|
||||
}
|
||||
} ;
|
||||
_ => pastStem verb + finiteEnding agr
|
||||
} ;
|
||||
|
||||
futureFinite : Str -> Agr -> Str = \verb,agr ->
|
||||
nonPastStem verb + case agr of {
|
||||
Ag _ Sg P1 => "ాను" ;
|
||||
Ag _ Sg P2 => "ావు" ;
|
||||
Ag Masc Sg P3 => "ాడు" ;
|
||||
Ag _ Sg P3 => "ుంది" ;
|
||||
Ag _ Pl P1 => "ాము" ;
|
||||
Ag Neutr Pl P3 => "ాయి" ;
|
||||
Ag _ Pl _ => "ారు"
|
||||
} ;
|
||||
|
||||
negativeEnding : Agr -> Str = \agr -> case agr of {
|
||||
Ag _ Sg P1 => "ను" ;
|
||||
Ag _ Sg P2 => "వు" ;
|
||||
Ag Masc Sg P3 => "డు" ;
|
||||
Ag _ Sg P3 => "దు" ;
|
||||
Ag _ Pl P1 => "ము" ;
|
||||
Ag Neutr Pl P3 => "వు" ;
|
||||
Ag _ Pl _ => "రు"
|
||||
} ;
|
||||
|
||||
finitePast : Verb -> Agr -> Str = \verb,agr ->
|
||||
case agr of {Ag g n p => verb.s ! VPast g n p} ;
|
||||
|
||||
finitePresent : Verb -> Agr -> Str = \verb,agr ->
|
||||
case agr of {Ag g n p => verb.s ! VPresent g n p} ;
|
||||
|
||||
finiteFuture : Verb -> Agr -> Str = \verb,agr ->
|
||||
case agr of {Ag g n p => verb.s ! VFuture g n p} ;
|
||||
|
||||
finiteNegative : Verb -> VPHTense -> Agr -> Str = \verb,tense,agr ->
|
||||
case agr of {Ag g n p => verb.s ! VNegFinite (case tense of {
|
||||
VPFut => True ; _ => False}) g n p} ;
|
||||
|
||||
passiveV : Verb -> Verb = \verb -> {
|
||||
s = verb.passive ;
|
||||
passive = verb.passive
|
||||
} ;
|
||||
|
||||
predCopula : VPH = {
|
||||
s = \\pol,form => case form of {
|
||||
VPTense tense agr => case pol of {
|
||||
Neg => {fin = case tense of {
|
||||
VPGenPres => negativeCopula agr ;
|
||||
_ => "కాలేదు"
|
||||
} ; inf = [] ; neg = []} ;
|
||||
Pos => {fin = case tense of {
|
||||
VPGenPres => [] ;
|
||||
VPContPres => [] ;
|
||||
VPPerf => copulaPast agr ;
|
||||
VPPerfPres => copulaPast agr ;
|
||||
VPImpPast => copulaPast agr ;
|
||||
VPContPast => copulaPast agr ;
|
||||
VPPerfPast => copulaPast agr ;
|
||||
VPSubj => futureFinite "అవు" agr ;
|
||||
VPFut => futureFinite "అవు" agr
|
||||
} ; inf = [] ; neg = []}
|
||||
} ;
|
||||
VPInf => {fin = "అవడం" ; inf = [] ; neg = []} ;
|
||||
VPStem => {fin = "అవు" ; inf = [] ; neg = []} ;
|
||||
VPPresPart => {fin = "అవుతున్న" ; inf = [] ; neg = []} ;
|
||||
VPRelPresent => {fin = "అయ్యే" ; inf = [] ; neg = []} ;
|
||||
VPPastPart => {fin = "అయిన" ; inf = [] ; neg = []} ;
|
||||
VPHort => {fin = "అవుదాం" ; inf = [] ; neg = []} ;
|
||||
VPImp Sg => {fin = "అవు" ; inf = [] ; neg = []} ;
|
||||
VPImp Pl => {fin = "అవండి" ; inf = [] ; neg = []} ;
|
||||
VPReqFut => {fin = "అవండి" ; inf = [] ; neg = []}
|
||||
} ;
|
||||
passive = verbForms (regVerb "అవు") ;
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
negativeCopula : Agr -> Str = \agr -> case agr of {
|
||||
Ag _ Pl _ => "కారు" ;
|
||||
_ => "కాదు"
|
||||
} ;
|
||||
|
||||
copulaPast : Agr -> Str = \agr -> case agr of {
|
||||
Ag _ Sg P1 => "అయ్యాను" ;
|
||||
Ag _ Sg P2 => "అయ్యావు" ;
|
||||
Ag Masc Sg P3 => "అయ్యాడు" ;
|
||||
Ag _ Sg P3 => "అయింది" ;
|
||||
Ag _ Pl P1 => "అయ్యాము" ;
|
||||
Ag Neutr Pl P3 => "అయ్యాయి" ;
|
||||
Ag _ Pl _ => "అయ్యారు"
|
||||
} ;
|
||||
|
||||
param
|
||||
CTense = CPresent | CPast | CFuture ;
|
||||
@@ -110,12 +346,12 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
oper
|
||||
personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n ->
|
||||
case <p,n> of {
|
||||
<P1,Sg> => {s = table {PC Dir => "నేను" ; PC Obl => "నా" ; PObj => "నన్ను" ; PPoss => "నా"}} ;
|
||||
<P1,Pl> => {s = table {PC Dir => "మేము" ; PC Obl => "మా" ; PObj => "మమ్మల్ని" ; PPoss => "మా"}} ;
|
||||
<P2,Sg> => {s = table {PC Dir => "నువ్వు" ; PC Obl => "నీ" ; PObj => "నిన్ను" ; PPoss => "నీ"}} ;
|
||||
<P2,Pl> => {s = table {PC Dir => "మీరు" ; PC Obl => "మీ" ; PObj => "మిమ్మల్ని" ; PPoss => "మీ"}} ;
|
||||
<P3,Sg> => {s = table {PC Dir => "అతను" ; PC Obl => "అతని" ; PObj => "అతన్ని" ; PPoss => "అతని"}} ;
|
||||
<P3,Pl> => {s = table {PC Dir => "వారు" ; PC Obl => "వారి" ; PObj => "వారిని" ; PPoss => "వారి"}}
|
||||
<P1,Sg> => {s = table {PC Dir => "నేను" ; PC Obl => "నా" ; PC Acc => "నన్ను" ; PObj => "నన్ను" ; PPoss => "నా"}} ;
|
||||
<P1,Pl> => {s = table {PC Dir => "మేము" ; PC Obl => "మా" ; PC Acc => "మమ్మల్ని" ; PObj => "మమ్మల్ని" ; PPoss => "మా"}} ;
|
||||
<P2,Sg> => {s = table {PC Dir => "నువ్వు" ; PC Obl => "నీ" ; PC Acc => "నిన్ను" ; PObj => "నిన్ను" ; PPoss => "నీ"}} ;
|
||||
<P2,Pl> => {s = table {PC Dir => "మీరు" ; PC Obl => "మీ" ; PC Acc => "మిమ్మల్ని" ; PObj => "మిమ్మల్ని" ; PPoss => "మీ"}} ;
|
||||
<P3,Sg> => {s = table {PC Dir => "అతను" ; PC Obl => "అతని" ; PC Acc => "అతన్ని" ; PObj => "అతన్ని" ; PPoss => "అతని"}} ;
|
||||
<P3,Pl> => {s = table {PC Dir => "వారు" ; PC Obl => "వారి" ; PC Acc => "వారిని" ; PObj => "వారిని" ; PPoss => "వారి"}}
|
||||
} ;
|
||||
---- the third is the vocative - is it really this way?
|
||||
|
||||
@@ -139,12 +375,15 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
;
|
||||
|
||||
VPHForm =
|
||||
VPTense VPHTense Agr -- 9 * 12
|
||||
| VPReq
|
||||
| VPImp
|
||||
VPInf
|
||||
| VPTense VPHTense Agr -- 9 * 12
|
||||
| VPImp Number
|
||||
| VPReqFut
|
||||
| VPInf
|
||||
| VPStem
|
||||
| VPPresPart
|
||||
| VPRelPresent
|
||||
| VPPastPart
|
||||
| VPHort
|
||||
;
|
||||
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
@@ -155,41 +394,50 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
_ => NPC Obl
|
||||
} ;
|
||||
|
||||
FiniteForm : Type = {fin, inf, neg : Str} ;
|
||||
|
||||
VPH : Type = {
|
||||
s : Polarity => VPHForm => {fin, inf, neg : Str} ;
|
||||
s, passive : Polarity => VPHForm => FiniteForm ;
|
||||
obj : {s : Str ; a : Agr} ;
|
||||
subj : VType ;
|
||||
comp : Agr => Str
|
||||
} ;
|
||||
|
||||
predV : Verb -> VPH = \verb -> {
|
||||
s = \\b,vh =>
|
||||
verbForms : Verb -> (Polarity => VPHForm => FiniteForm) = \verb -> \\b,vh =>
|
||||
let
|
||||
na = case b of {Pos => []; Neg => "వద్దు" } ;
|
||||
negative = case b of {Pos => []; Neg => "లేదు"} ;
|
||||
in
|
||||
case vh of {
|
||||
VPTense VPGenPres (Ag g n p) =>
|
||||
{fin = copula CPresent n p g ; inf = verb.s ! VImpf g n ; neg = negative} ;
|
||||
VPTense VPImpPast (Ag g n p) =>
|
||||
{fin = copula CPast n p g ; inf = verb.s ! VImpf g n ; neg = negative} ;
|
||||
VPTense VPContPres (Ag g n p) =>
|
||||
{fin = copula CPresent n p g ;
|
||||
inf = verb.s ! VStem ++ progressive g n ; neg = negative} ;
|
||||
VPTense VPContPast (Ag g n p) =>
|
||||
{fin = copula CPast n p g ;
|
||||
inf = verb.s ! VStem ++ progressive g n ; neg = negative} ;
|
||||
VPTense VPPerf (Ag g n _) =>
|
||||
{fin = verb.s ! VPerf g n ; inf = [] ; neg = negative} ;
|
||||
VPTense VPPerfPres (Ag g n p) =>
|
||||
{fin = copula CPresent n p g ; inf = verb.s ! VPerf g n ; neg = negative} ;
|
||||
VPTense VPPerfPast (Ag g n p) =>
|
||||
{fin = copula CPast n p g ; inf = verb.s ! VPerf g n ; neg = negative} ;
|
||||
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} ----
|
||||
VPTense tense agr => case b of {
|
||||
Neg => {fin = finiteNegative verb tense agr ; inf = [] ; neg = []} ;
|
||||
Pos => case tense of {
|
||||
VPGenPres => {fin = finiteFuture verb agr ; inf = [] ; neg = []} ;
|
||||
VPImpPast => {fin = finitePast verb agr ; inf = [] ; neg = []} ;
|
||||
VPContPres => {fin = finitePresent verb agr ; inf = [] ; neg = []} ;
|
||||
VPContPast => {fin = finitePast verb agr ; inf = [] ; neg = []} ;
|
||||
VPPerf => {fin = finitePast verb agr ; inf = [] ; neg = []} ;
|
||||
VPPerfPres => {fin = finitePast verb agr ; inf = [] ; neg = []} ;
|
||||
VPPerfPast => {fin = finitePast verb agr ; inf = [] ; neg = []} ;
|
||||
VPSubj => {fin = finiteFuture verb agr ; inf = [] ; neg = []} ;
|
||||
VPFut => {fin = finiteFuture verb agr ; inf = [] ; neg = []}
|
||||
}
|
||||
} ;
|
||||
{- The finite cases above deliberately precede the legacy form
|
||||
table. The latter remains part of the public paradigms API. -}
|
||||
VPInf => {fin = verb.s ! VInf ; inf = [] ; neg = na} ;
|
||||
VPStem => {fin = verb.s ! VStem ; inf = [] ; neg = na} ;
|
||||
VPPresPart => {fin = verb.s ! VPresentPart ; inf = [] ; neg = na} ;
|
||||
VPRelPresent => {fin = verb.s ! VRelativePresent ; inf = [] ; neg = na} ;
|
||||
VPPastPart => {fin = verb.s ! VPastPart ; inf = [] ; neg = na} ;
|
||||
VPHort => {fin = verb.s ! VHortative ; inf = [] ; neg = na} ;
|
||||
VPImp n => {fin = verb.s ! VImp n b ; inf = [] ; neg = []} ;
|
||||
VPReqFut => {fin = verb.s ! VReqFut ; inf = [] ; neg = na}
|
||||
} ;
|
||||
|
||||
predV : Verb -> VPH = \verb -> {
|
||||
s = verbForms verb ;
|
||||
passive = verbForms (passiveV verb) ;
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
comp = \\_ => []
|
||||
@@ -205,6 +453,7 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
passive = vps.passive ;
|
||||
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
||||
subj = vps.c2.c ;
|
||||
comp = vps.comp
|
||||
@@ -242,7 +491,7 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
|
||||
npcase2case : NPCase -> Case = \npc -> case npc of {
|
||||
NPC c => c ;
|
||||
NPObj => Obl ;
|
||||
NPObj => Acc ;
|
||||
NPErg => Obl
|
||||
} ;
|
||||
|
||||
@@ -254,7 +503,7 @@ resource ResTel = ParamX ** open Prelude in {
|
||||
|
||||
toNP : (Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Obl ;
|
||||
NPObj => pn ! Acc ;
|
||||
NPErg => pn ! Obl
|
||||
} ;
|
||||
|
||||
|
||||
@@ -8,10 +8,13 @@ concrete SentenceTel of Sentence = CatTel ** open Prelude, ResTel in {
|
||||
|
||||
PredSCVP sc vp = mkClause {s = \\_ => sc.s ; a = agrP3 Neutr Sg} vp ;
|
||||
|
||||
ImpVP vp = {s = let f = vp.s ! Pos ! VPImp in
|
||||
vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin} ;
|
||||
ImpVP vp = {
|
||||
s = \\pol,num =>
|
||||
let f = vp.s ! pol ! VPImp num
|
||||
in vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {s = adv.s ++ imp.s} ;
|
||||
AdvImp adv imp = {s = \\pol,num => adv.s ++ imp.s ! pol ! num} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
|
||||
|
||||
@@ -4,36 +4,83 @@ concrete StructuralTel of Structural = CatTel **
|
||||
flags optimize=all ;
|
||||
|
||||
lin
|
||||
above_Prep = P.mkPrep "పైన" ;
|
||||
after_Prep = P.mkPrep "తర్వాత" ;
|
||||
almost_AdA = P.mkAdA "దాదాపు" ;
|
||||
almost_AdN = P.mkAdN "దాదాపు" ;
|
||||
always_AdV = P.mkAdV "ఎల్లప్పుడూ" ;
|
||||
as_CAdv = {s = "అంత" ; p = "గా"} ;
|
||||
at_least_AdN = P.mkAdN "కనీసం" ;
|
||||
at_most_AdN = P.mkAdN "గరిష్ఠంగా" ;
|
||||
before_Prep = P.mkPrep "ముందు" ;
|
||||
behind_Prep = P.mkPrep "వెనుక" ;
|
||||
between_Prep = P.mkPrep "మధ్య" ;
|
||||
all_Predet = {s = "అన్ని"} ;
|
||||
although_Subj = {s = "అయినప్పటికీ"} ;
|
||||
and_Conj = {s1 = [] ; s2 = "మరియు" ; n = Pl} ;
|
||||
because_Subj = {s = "ఎందుకంటే"} ;
|
||||
by8agent_Prep = P.mkPrep "చేత" ;
|
||||
by8means_Prep = P.mkPrep "ద్వారా" ;
|
||||
either7or_DConj = {s1 = "గాని" ; s2 = "లేదా" ; n = Sg} ;
|
||||
both7and_DConj = {s1 = "రెండూ" ; s2 = "మరియు" ; n = Pl} ;
|
||||
every_Det = {s = \\_,_ => "ప్రతి" ; n = Sg} ;
|
||||
during_Prep = P.mkPrep "సమయంలో" ;
|
||||
everybody_NP = {s = \\_ => "అందరూ" ; a = Ag Masc Pl P3} ;
|
||||
everything_NP = {s = \\_ => "అన్నీ" ; a = Ag Neutr Pl P3} ;
|
||||
everywhere_Adv = P.mkAdv "ప్రతిచోటా" ;
|
||||
except_Prep = P.mkPrep "తప్ప" ;
|
||||
few_Det = {s = \\_,_ => "కొద్దిమంది" ; n = Pl} ;
|
||||
for_Prep = P.mkPrep "కోసం" ;
|
||||
from_Prep = P.mkPrep "నుండి" ;
|
||||
if_Subj = {s = "అయితే"} ;
|
||||
how8many_IDet = {s = "ఎన్ని" ; n = Pl} ;
|
||||
how8much_IAdv = {s = "ఎంత"} ;
|
||||
how_IAdv = {s = "ఎలా"} ;
|
||||
it_Pron = {
|
||||
s = table {PC Dir => "అది" ; PC Obl => "దాని" ; PObj => "దానిని" ; PPoss => "దాని"} ;
|
||||
s = table {PC Dir => "అది" ; PC Obl => "దాని" ; PC Acc => "దానిని" ; PObj => "దానిని" ; PPoss => "దాని"} ;
|
||||
a = Ag Neutr Sg P3
|
||||
} ;
|
||||
or_Conj = {s1 = [] ; s2 = "లేదా" ; n = Sg} ;
|
||||
more_CAdv = {s = "మరింత" ; p = "కంటే"} ;
|
||||
most_Predet = {s = "చాలా వరకు"} ;
|
||||
no_Quant = {s = \\_,_,_ => "ఏ"} ;
|
||||
on_Prep = P.mkPrep "మీద" ;
|
||||
only_Predet = {s = "మాత్రమే"} ;
|
||||
please_Voc = {s = "దయచేసి"} ;
|
||||
she_Pron = {
|
||||
s = table {PC Dir => "ఆమె" ; PC Obl => "ఆమె" ; PObj => "ఆమెను" ; PPoss => "ఆమె"} ;
|
||||
s = table {PC Dir => "ఆమె" ; PC Obl => "ఆమె" ; PC Acc => "ఆమెను" ; PObj => "ఆమెను" ; PPoss => "ఆమె"} ;
|
||||
a = Ag Fem Sg P3
|
||||
} ;
|
||||
that_Quant = {s = table {
|
||||
Sg => \\_,_ => "అది" ;
|
||||
Pl => \\_,_ => "అవి"
|
||||
Sg => \\_,_ => "ఆ" ;
|
||||
Pl => \\_,_ => "ఆ"
|
||||
}
|
||||
} ;
|
||||
that_Subj = {s = "అని"} ;
|
||||
they_Pron = personalPronoun P3 Pl ** {a = Ag Masc Pl P3} ;
|
||||
this_Quant = {s = table {
|
||||
Sg => \\_,_ => "ఇది" ;
|
||||
Pl => \\_,_ => "ఇవి"
|
||||
Sg => \\_,_ => "ఈ" ;
|
||||
Pl => \\_,_ => "ఈ"
|
||||
}
|
||||
} ;
|
||||
very_AdA = {s = "చాలా"} ;
|
||||
somebody_NP = {s = \\_ => "ఎవరో ఒకరు" ; a = Ag Masc Sg P3} ;
|
||||
something_NP = {s = \\_ => "ఏదో ఒకటి" ; a = Ag Neutr Sg P3} ;
|
||||
somewhere_Adv = P.mkAdv "ఎక్కడో" ;
|
||||
through_Prep = P.mkPrep "ద్వారా" ;
|
||||
to_Prep = P.mkPrep "కు" ;
|
||||
too_AdA = P.mkAdA "మరీ" ;
|
||||
under_Prep = P.mkPrep "కింద" ;
|
||||
want_VV = P.mkVV (P.mkV "కోరు") ;
|
||||
whatPl_IP = {s = \\_ => "ఏవి" ; n = Pl} ;
|
||||
whatSg_IP = {s = \\_ => "ఏది" ; n = Sg} ;
|
||||
when_IAdv = {s = "ఎప్పుడు"} ;
|
||||
where_IAdv = {s = "ఎక్కడ"} ;
|
||||
which_IQuant = {s = \\_ => "ఏ"} ;
|
||||
whoPl_IP = {s = \\c => case c of {Dir => "ఎవరు" ; Obl => "ఎవరి" ; Acc => "ఎవరిని"} ; n = Pl} ;
|
||||
whoSg_IP = {s = \\c => case c of {Dir => "ఎవరు" ; Obl => "ఎవరి" ; Acc => "ఎవరిని"} ; n = Sg} ;
|
||||
why_IAdv = {s = "ఎందుకు"} ;
|
||||
without_Prep = P.mkPrep "లేకుండా" ;
|
||||
when_Subj = {s = "అప్పుడు"} ;
|
||||
with_Prep = {s = "తో"} ;
|
||||
youSg_Pron = personalPronoun P2 Sg ** {a = Ag Masc Sg P2} ;
|
||||
|
||||
+12
-3
@@ -12,6 +12,11 @@ concrete VerbTel of Verb = CatTel ** open ResTel, Prelude in {
|
||||
comp = \\agr => case agr of {Ag g n _ => ap.s ! g ! n ! Dir}
|
||||
} ;
|
||||
|
||||
SlashV2S v sent = predV v ** {
|
||||
c2 = v.c2 ;
|
||||
comp = \\_ => sent.s ++ "అని"
|
||||
} ;
|
||||
|
||||
Slash2V3 v np =
|
||||
let vp = insertObject np (predV v ** {c2 = v.c2})
|
||||
in vp ** {c2 = v.c3} ;
|
||||
@@ -35,15 +40,19 @@ concrete VerbTel of Verb = CatTel ** open ResTel, Prelude in {
|
||||
f.inf ++ f.fin
|
||||
} ;
|
||||
|
||||
ComplVS v s = predV v ** {comp = \\_ => s.s} ;
|
||||
ComplVQ v q = predV v ** {comp = \\_ => q.s} ;
|
||||
ComplVS v s = predV v ** {comp = \\_ => s.s ++ "అని"} ;
|
||||
ComplVQ v q = predV v ** {comp = \\_ => q.s ++ "అని"} ;
|
||||
ComplVA v ap = predV v ** {comp = \\agr => case agr of {
|
||||
Ag g n _ => ap.s ! g ! n ! Dir
|
||||
}} ;
|
||||
|
||||
VPSlashPrep vp prep = vp ** {
|
||||
c2 = {s = prep.s ; c = VTransPost}
|
||||
} ;
|
||||
|
||||
AdVVP adv vp = insertAdv adv.s vp ;
|
||||
|
||||
UseComp comp = predV (regVerb []) ** {comp = comp.s} ;
|
||||
UseComp comp = predCopula ** {comp = comp.s} ;
|
||||
|
||||
CompAP ap = {s = \\agr => case agr of {
|
||||
Ag g n _ => ap.s ! g ! n ! Dir
|
||||
|
||||
Reference in New Issue
Block a user