mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-09-14 14:26:02 -06:00
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ Sco,Scots,scots,,,y,,,,,y,n
|
|||||||
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n,n
|
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n,n
|
||||||
Swe,Swedish,swedish,Scand,,y,,,,y,y,y
|
Swe,Swedish,swedish,Scand,,y,,,,y,y,y
|
||||||
Tam,Tamil,tamil,n,n,n,n,n,n,n,n,n
|
Tam,Tamil,tamil,n,n,n,n,n,n,n,n,n
|
||||||
Tel,Telugu,telugu,,,y,n,n,n,,n,n
|
Tel,Telugu,telugu,,,y,y,n,n,,n,n
|
||||||
Tha,Thai,thai,,to_thai,,,,,,y,n
|
Tha,Thai,thai,,to_thai,,,,,,y,n
|
||||||
Tur,Turkish,turkish,,,y,,,n,,n,n
|
Tur,Turkish,turkish,,,y,,,n,,n,n
|
||||||
Ukr,Ukrainian,ukrainian,,,,y,n,n,n,y,n
|
Ukr,Ukrainian,ukrainian,,,,y,n,n,n,y,n
|
||||||
|
|||||||
|
+31
-30
@@ -1,36 +1,37 @@
|
|||||||
concrete AdjectiveHin of Adjective = CatHin ** open ResHin, Prelude in {
|
concrete AdjectiveTel of Adjective = CatTel ** open ResTel, Prelude in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
PositA a = a ;
|
PositA a = a ;
|
||||||
|
|
||||||
-- ComparA a np = {
|
UseComparA a = a ;
|
||||||
-- s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ;
|
|
||||||
-- isPre = False
|
ComparA a np = {
|
||||||
-- } ;
|
s = \\g,n,c => a.s ! g ! n ! c ++ "కంటే" ++ np.s ! NPC Obl
|
||||||
--
|
} ;
|
||||||
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
|
||||||
--
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
-- ComplA2 a np = {
|
|
||||||
-- s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ;
|
ComplA2 a np = {
|
||||||
-- isPre = False
|
s = \\g,n,c => a.s ! g ! n ! c ++ a.c2 ++ np.s ! NPC Obl
|
||||||
-- } ;
|
} ;
|
||||||
--
|
|
||||||
-- ReflA2 a = {
|
ReflA2 a = {
|
||||||
-- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ;
|
s = a.s
|
||||||
-- isPre = False
|
} ;
|
||||||
-- } ;
|
|
||||||
--
|
SentAP ap sc = {
|
||||||
-- SentAP ap sc = {
|
s = \\g,n,c => ap.s ! g ! n ! c ++ sc.s
|
||||||
-- s = \\a => ap.s ! a ++ sc.s ;
|
} ;
|
||||||
-- isPre = False
|
|
||||||
-- } ;
|
AdAP ada ap = {
|
||||||
--
|
s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c
|
||||||
-- AdAP ada ap = {
|
} ;
|
||||||
-- s = \\a => ada.s ++ ap.s ! a ;
|
|
||||||
-- isPre = ap.isPre
|
AdvAP ap adv = {
|
||||||
-- } ;
|
s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s
|
||||||
--
|
} ;
|
||||||
-- UseA2 a = a ;
|
|
||||||
--
|
UseA2 a = a ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-20
@@ -1,20 +1,20 @@
|
|||||||
--concrete AdverbTel of Adverb = CatTel ** open ResTel, Prelude in {
|
concrete AdverbTel of Adverb = CatTel ** open ResTel, Prelude in {
|
||||||
----
|
lin
|
||||||
---- lin
|
PositAdvAdj a = {s = a.s ! Masc ! Sg ! Dir} ;
|
||||||
---- PositAdvAdj a = {s = a.s ! AAdv} ;
|
PositAdAAdj a = {s = a.s ! Masc ! Sg ! Dir} ;
|
||||||
---- ComparAdvAdj cadv a np = {
|
-- ComparAdvAdj cadv a np = {
|
||||||
---- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom
|
-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom
|
||||||
---- } ;
|
-- } ;
|
||||||
---- ComparAdvAdjS cadv a s = {
|
-- ComparAdvAdjS cadv a s = {
|
||||||
---- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s
|
-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s
|
||||||
---- } ;
|
-- } ;
|
||||||
----
|
--
|
||||||
---- PrepNP prep np = {s = prep.s ++ np.s ! Acc} ;
|
PrepNP prep np = {s = np.s ! NPC Obl ++ prep.s} ;
|
||||||
----
|
--
|
||||||
---- AdAdv = cc2 ;
|
AdAdv ada adv = {s = ada.s ++ adv.s} ;
|
||||||
----
|
--
|
||||||
---- SubjS = cc2 ;
|
SubjS subj sent = {s = sent.s ++ subj.s} ;
|
||||||
----
|
--
|
||||||
---- AdnCAdv cadv = {s = cadv.s ++ "than"} ;
|
-- AdnCAdv cadv = {s = cadv.s ++ "than"} ;
|
||||||
----
|
--
|
||||||
--}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
----# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
--
|
|
||||||
--concrete AllTel of AllTelAbs = LangTel ;
|
concrete AllTel of AllTelAbs =
|
||||||
|
LangTel,
|
||||||
|
ExtendTel ;
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
abstract AllHinAbs = Lang ;
|
abstract AllTelAbs =
|
||||||
|
Lang, Extend ;
|
||||||
|
|||||||
+77
-82
@@ -3,88 +3,83 @@ concrete CatTel of Cat = CommonX ** open ResTel, Prelude in {
|
|||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
----
|
--
|
||||||
------ Tensed/Untensed
|
---- Tensed/Untensed
|
||||||
----
|
--
|
||||||
---- S = {s : Str} ;
|
S = {s : Str} ;
|
||||||
---- QS = {s : QForm => Str} ;
|
QS = {s : Str} ;
|
||||||
---- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
RS = {s : Str} ;
|
||||||
---- SSlash = {s : Str ; c2 : Str} ;
|
SSlash = {s : Str} ;
|
||||||
----
|
--
|
||||||
------ Sentence
|
---- Sentence
|
||||||
----
|
--
|
||||||
-- Cl = ResTel.Clause ;
|
Cl = ResTel.Clause ;
|
||||||
---- ClSlash = {
|
ClSlash = {s : VPHTense => Polarity => Str ; c2 : Compl} ;
|
||||||
---- s : ResTel.Tense => Anteriority => CPolarity => Order => Str ;
|
Imp = {s : Str} ;
|
||||||
---- c2 : Str
|
--
|
||||||
---- } ;
|
---- Question
|
||||||
---- Imp = {s : CPolarity => ImpForm => Str} ;
|
--
|
||||||
----
|
QCl = ResTel.Clause ;
|
||||||
------ Question
|
IP = {s : Case => Str ; n : Number} ;
|
||||||
----
|
IComp = {s : Str} ;
|
||||||
---- QCl = {s : ResTel.Tense => Anteriority => CPolarity => QForm => Str} ;
|
IDet = {s : Str ; n : Number} ;
|
||||||
---- IP = {s : Case => Str ; n : Number} ;
|
IQuant = {s : Number => Str} ;
|
||||||
---- IComp = {s : Str} ;
|
--
|
||||||
---- IDet = {s : Str ; n : Number} ;
|
---- Relative
|
||||||
---- IQuant = {s : Number => Str} ;
|
--
|
||||||
----
|
RCl = ResTel.Clause ;
|
||||||
------ Relative
|
RP = {s : Str} ;
|
||||||
----
|
--
|
||||||
---- RCl = {
|
---- Verb
|
||||||
---- s : ResTel.Tense => Anteriority => CPolarity => Agr => Str ;
|
--
|
||||||
---- c : Case
|
VP = ResTel.VPH ;
|
||||||
---- } ;
|
VPSlash = ResTel.VPHSlash ;
|
||||||
---- RP = {s : RCase => Str ; a : RAgr} ;
|
Comp = {s : Agr => Str} ;
|
||||||
----
|
--
|
||||||
------ Verb
|
---- Adjective
|
||||||
----
|
--
|
||||||
-- VP = ResTel.VPH ;
|
AP = ResTel.Adjective ;
|
||||||
-- VPSlash = ResTel.VPHSlash ;
|
--
|
||||||
---- Comp = {s : Agr => Str} ;
|
---- Noun
|
||||||
----
|
--
|
||||||
------ Adjective
|
|
||||||
----
|
|
||||||
-- AP = ResTel.Adjective ;
|
|
||||||
----
|
|
||||||
------ Noun
|
|
||||||
----
|
|
||||||
CN = ResTel.Noun ;
|
CN = ResTel.Noun ;
|
||||||
-- NP = ResTel.NP ;
|
NP = ResTel.NP ;
|
||||||
-- Pron = {s : PronCase => Str ; a : Agr} ;
|
Pron = {s : PronCase => Str ; a : Agr} ;
|
||||||
-- Det = {s : Gender => Case => Str ; n : Number} ;
|
Det = {s : Gender => Case => Str ; n : Number} ;
|
||||||
---- Predet, Ord = {s : Str} ;
|
Predet, Ord = {s : Str} ;
|
||||||
-- Num = {s : Str ; n : Number} ;
|
Num = {s : Str ; n : Number} ;
|
||||||
---- Card = {s : Str; n : Number} ;
|
Card, ACard = {s : Str; n : Number} ;
|
||||||
-- Quant = {s : Number => Gender => Case => Str} ;
|
DAP = {s : Gender => Case => Str ; n : Number} ;
|
||||||
-- Art = {s : Str} ;
|
Quant = {s : Number => Gender => Case => Str} ;
|
||||||
----
|
Art = {s : Str} ;
|
||||||
------ Numeral
|
--
|
||||||
----
|
---- Numeral
|
||||||
---- Numeral = {s : CardOrd => Str ; n : Number} ;
|
--
|
||||||
---- Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ;
|
Numeral, Digits, Decimal = {s : Str ; n : Number} ;
|
||||||
----
|
LN, GN, SN = {s : Str} ;
|
||||||
------ Structural
|
--
|
||||||
----
|
---- Structural
|
||||||
---- Conj = {s1,s2 : Str ; n : Number} ;
|
--
|
||||||
-------b Conj = {s : Str ; n : Number} ;
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
-------b DConj = {s1,s2 : Str ; n : Number} ;
|
-----b Conj = {s : Str ; n : Number} ;
|
||||||
---- Subj = {s : Str} ;
|
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
||||||
---- Prep = {s : Str} ;
|
Subj = {s : Str} ;
|
||||||
----
|
Prep = {s : Str} ;
|
||||||
------ Open lexical classes, e.g. Lexicon
|
--
|
||||||
----
|
---- Open lexical classes, e.g. Lexicon
|
||||||
-- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
--
|
||||||
-- V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ;
|
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
||||||
---- V3 = Verb ** {c2, c3 : Str} ;
|
V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ;
|
||||||
---- VV = {s : VVForm => Str ; isAux : Bool} ;
|
V3 = Verb ** {c2, c3 : Compl} ;
|
||||||
---- V2V = Verb ** {c2 : Str ; isAux : Bool} ;
|
VV = Verb ** {isAux : Bool} ;
|
||||||
----
|
V2V = Verb ** {c2 : Compl} ;
|
||||||
-- A = ResTel.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
--
|
||||||
---- A2 = {s : AForm => Str ; c2 : Str} ;
|
A = ResTel.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
||||||
----
|
A2 = ResTel.Adjective ** {c2 : Str} ;
|
||||||
|
--
|
||||||
N = ResTel.Noun ; --{s : Number => Case => Str ; g : Gender} ;
|
N = ResTel.Noun ; --{s : Number => Case => Str ; g : Gender} ;
|
||||||
---- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
N2 = ResTel.Noun ** {c2 : Str} ;
|
||||||
---- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
|
N3 = ResTel.Noun ** {c2,c3 : Str} ;
|
||||||
-- PN = {s : Case => Str ; g : Gender} ;
|
PN = {s : Case => Str ; g : Gender} ;
|
||||||
----
|
--
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +1,57 @@
|
|||||||
--concrete ConjunctionTel of Conjunction =
|
concrete ConjunctionTel of Conjunction =
|
||||||
-- CatTel ** open ResTel, Coordination, Prelude in {
|
CatTel ** open ResTel, Coordination, Prelude in {
|
||||||
----
|
lin
|
||||||
---- flags optimize=all_subs ;
|
BaseS x y = {s1 = x.s ; s2 = y.s} ;
|
||||||
----
|
ConsS x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||||
---- lin
|
ConjS conj xs = {s = xs.s1 ++ conj.s2 ++ xs.s2} ;
|
||||||
----
|
|
||||||
---- ConjS = conjunctDistrSS ;
|
BaseAdv x y = {s1 = x.s ; s2 = y.s} ;
|
||||||
----
|
ConsAdv x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||||
---- ConjAdv = conjunctDistrSS ;
|
ConjAdv conj xs = {s = xs.s1 ++ conj.s2 ++ xs.s2} ;
|
||||||
----
|
|
||||||
---- ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
BaseNP x y = {s1 = x.s ; s2 = y.s ; a = x.a} ;
|
||||||
---- a = conjAgr (agrP3 conj.n) ss.a
|
ConsNP x xs = {s1 = \\c => x.s ! c ++ "," ++ xs.s1 ! c ; s2 = xs.s2 ; a = xs.a} ;
|
||||||
---- } ;
|
ConjNP conj xs = {
|
||||||
----
|
s = \\c => xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
|
||||||
---- ConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
a = case xs.a of {Ag g _ p => Ag g Pl p}
|
||||||
---- isPre = ss.isPre
|
} ;
|
||||||
---- } ;
|
|
||||||
----
|
BaseAP x y = {s1 = x.s ; s2 = y.s} ;
|
||||||
------ These fun's are generated from the list cat's.
|
ConsAP x xs = {s1 = \\g,n,c => x.s ! g ! n ! c ++ "," ++ xs.s1 ! g ! n ! c ; s2 = xs.s2} ;
|
||||||
----
|
ConjAP conj xs = {s = \\g,n,c => xs.s1 ! g ! n ! c ++ conj.s2 ++ xs.s2 ! g ! n ! c} ;
|
||||||
---- BaseS = twoSS ;
|
|
||||||
---- ConsS = consrSS comma ;
|
BaseCN x y = {s1 = x.s ; s2 = y.s ; g = y.g} ;
|
||||||
---- BaseAdv = twoSS ;
|
ConsCN x xs = {s1 = \\n,c => x.s ! n ! c ++ "," ++ xs.s1 ! n ! c ; s2 = xs.s2 ; g = xs.g} ;
|
||||||
---- ConsAdv = consrSS comma ;
|
ConjCN conj xs = {s = \\n,c => xs.s1 ! n ! c ++ conj.s2 ++ xs.s2 ! n ! c ; g = xs.g} ;
|
||||||
---- 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} ;
|
-- ConjS = conjunctDistrSS ;
|
||||||
---- 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} ;
|
-- ConjAdv = conjunctDistrSS ;
|
||||||
----
|
--
|
||||||
---- lincat
|
-- ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||||
---- [S] = {s1,s2 : Str} ;
|
-- a = conjAgr (agrP3 conj.n) ss.a
|
||||||
---- [Adv] = {s1,s2 : Str} ;
|
-- } ;
|
||||||
---- [NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
--
|
||||||
---- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
-- 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 : NPCase => Str ; a : Agr} ;
|
||||||
|
[AP] = {s1,s2 : Gender => Number => Case => Str} ;
|
||||||
|
[CN] = {s1,s2 : Number => Case => Str ; g : Gender} ;
|
||||||
|
--
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
|
concrete DocumentationTel of Documentation = CatTel ** open
|
||||||
|
ResTel, Prelude, HTML in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Inflection = {t : Str ; s1, s2 : Str} ;
|
||||||
|
Definition = {s : Str} ;
|
||||||
|
Document = {s : Str} ;
|
||||||
|
Tag = {s : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||||
|
t = "n" ;
|
||||||
|
s1 = heading1 ("Noun" ++ genderName noun.g) ;
|
||||||
|
s2 = frameTable (
|
||||||
|
tr (th "" ++ th "Sg" ++ th "Pl") ++
|
||||||
|
tr (th "Dir" ++ td (noun.s ! Sg ! Dir) ++ td (noun.s ! Pl ! Dir)) ++
|
||||||
|
tr (th "Obl" ++ td (noun.s ! Sg ! Obl) ++ td (noun.s ! Pl ! Obl))
|
||||||
|
)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionPN = \name -> {
|
||||||
|
t = "pn" ;
|
||||||
|
s1 = heading1 ("Proper name" ++ genderName name.g) ;
|
||||||
|
s2 = frameTable (
|
||||||
|
tr (th "Dir" ++ td (name.s ! Dir)) ++
|
||||||
|
tr (th "Obl" ++ td (name.s ! Obl))
|
||||||
|
)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionLN, InflectionGN, InflectionSN = \name -> {
|
||||||
|
t = "pn" ;
|
||||||
|
s1 = heading1 "Name" ;
|
||||||
|
s2 = paragraph name.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionA, InflectionA2 = \adj -> {
|
||||||
|
t = "a" ;
|
||||||
|
s1 = heading1 "Adjective" ;
|
||||||
|
s2 = adjectiveTable adj
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionV, InflectionV2, InflectionVV, InflectionVS,
|
||||||
|
InflectionVQ, InflectionVA, InflectionV3, InflectionV2V,
|
||||||
|
InflectionV2S, InflectionV2Q, InflectionV2A = \verb -> {
|
||||||
|
t = "v" ;
|
||||||
|
s1 = heading1 "Verb" ;
|
||||||
|
s2 = verbTable verb
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||||
|
t = "adv" ;
|
||||||
|
s1 = heading1 "Adverb" ;
|
||||||
|
s2 = paragraph adv.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionPrep = \prep -> {
|
||||||
|
t = "prep" ;
|
||||||
|
s1 = heading1 "Preposition" ;
|
||||||
|
s2 = paragraph prep.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
NoDefinition title = {s = title.s} ;
|
||||||
|
MkDefinition title definition = {
|
||||||
|
s = paragraph ("<b>నిర్వచనం:</b>" ++ title.s ++ definition.s)
|
||||||
|
} ;
|
||||||
|
MkDefinitionEx title definition example = {
|
||||||
|
s = paragraph ("<b>నిర్వచనం:</b>" ++ title.s ++ definition.s) ++
|
||||||
|
paragraph ("<b>ఉదాహరణ:</b>" ++ example.s)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MkDocument definition inflection example = {
|
||||||
|
s = inflection.s1 ++ definition.s ++ inflection.s2 ++ paragraph example.s
|
||||||
|
} ;
|
||||||
|
MkTag inflection = {s = inflection.t} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
genderName : Gender -> Str = \gender -> case gender of {
|
||||||
|
Masc => "(Masc)" ;
|
||||||
|
Fem => "(Fem)" ;
|
||||||
|
Neutr => "(Neutr)"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
adjectiveTable : Adjective -> Str = \adj ->
|
||||||
|
frameTable (
|
||||||
|
tr (th "" ++ th "Sg Dir" ++ th "Sg Obl" ++ th "Pl Dir" ++ th "Pl Obl") ++
|
||||||
|
adjectiveRow "Masc" adj Masc ++
|
||||||
|
adjectiveRow "Fem" adj Fem ++
|
||||||
|
adjectiveRow "Neutr" adj Neutr
|
||||||
|
) ;
|
||||||
|
|
||||||
|
adjectiveRow : Str -> Adjective -> Gender -> Str = \label,adj,gender ->
|
||||||
|
tr (th label ++
|
||||||
|
td (adj.s ! gender ! Sg ! Dir) ++
|
||||||
|
td (adj.s ! gender ! Sg ! Obl) ++
|
||||||
|
td (adj.s ! gender ! Pl ! Dir) ++
|
||||||
|
td (adj.s ! gender ! Pl ! Obl)) ;
|
||||||
|
|
||||||
|
verbTable : Verb -> Str = \verb ->
|
||||||
|
heading2 "Basic forms" ++
|
||||||
|
frameTable (
|
||||||
|
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 "Future request" ++ td (verb.s ! VReqFut))
|
||||||
|
) ++
|
||||||
|
heading2 "Imperfect" ++ genderNumberTable verb VImpf ++
|
||||||
|
heading2 "Perfect" ++ genderNumberTable verb VPerf ++
|
||||||
|
heading2 "Subjunctive" ++ personTable verb VSubj ++
|
||||||
|
heading2 "Future" ++
|
||||||
|
heading3 "Masculine" ++ futureTable verb Masc ++
|
||||||
|
heading3 "Feminine" ++ futureTable verb Fem ++
|
||||||
|
heading3 "Neuter" ++ futureTable verb Neutr ;
|
||||||
|
|
||||||
|
genderNumberTable : Verb -> (Gender -> Number -> VForm) -> Str = \verb,form ->
|
||||||
|
frameTable (
|
||||||
|
tr (th "" ++ th "Sg" ++ th "Pl") ++
|
||||||
|
tr (th "Masc" ++ td (verb.s ! form Masc Sg) ++ td (verb.s ! form Masc Pl)) ++
|
||||||
|
tr (th "Fem" ++ td (verb.s ! form Fem Sg) ++ td (verb.s ! form Fem Pl)) ++
|
||||||
|
tr (th "Neutr" ++ td (verb.s ! form Neutr Sg) ++ td (verb.s ! form Neutr Pl))
|
||||||
|
) ;
|
||||||
|
|
||||||
|
personTable : Verb -> (Number -> Person -> VForm) -> Str = \verb,form ->
|
||||||
|
frameTable (
|
||||||
|
tr (th "" ++ th "P1" ++ th "P2" ++ th "P3") ++
|
||||||
|
tr (th "Sg" ++ td (verb.s ! form Sg P1) ++ td (verb.s ! form Sg P2) ++ td (verb.s ! form Sg P3)) ++
|
||||||
|
tr (th "Pl" ++ td (verb.s ! form Pl P1) ++ td (verb.s ! form Pl P2) ++ td (verb.s ! form Pl P3))
|
||||||
|
) ;
|
||||||
|
|
||||||
|
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))
|
||||||
|
) ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
|
concrete ExtendTel of Extend =
|
||||||
|
CatTel ** ExtendFunctor - [
|
||||||
|
VPS, ListVPS, BaseVPS, ConsVPS, ConjVPS, MkVPS, PredVPS,
|
||||||
|
CompBareCN, CompIQuant, CompoundN, DetNPMasc, DetNPFem, EmptyRelSlash,
|
||||||
|
ExistCN, ExistIPQS, ExistMassCN, ExistNPQS, ExistPluralCN, ExistS,
|
||||||
|
ExistsNP, GenModNP, PiedPipingQuestSlash, PiedPipingRelSlash,
|
||||||
|
GerundAdv, GerundCN, PassAgentVPSlash, PassVPSlash,
|
||||||
|
PastPartAP, PastPartAgentAP, PresPartAP,
|
||||||
|
PossPronRNP, ReflPoss,
|
||||||
|
PredAPVP, PredIAdvVP, PrepCN, SlashBareV2S, StrandQuestSlash,
|
||||||
|
StrandRelSlash, SubjRelNP, SubjunctRelCN, UttAccIP, UttDatIP,
|
||||||
|
theyFem_Pron, theyNeutr_Pron, youFem_Pron, youPlFem_Pron,
|
||||||
|
youPolFem_Pron, youPolPlFem_Pron, youPolPl_Pron,
|
||||||
|
ReflPron, PositAdVAdj
|
||||||
|
]
|
||||||
|
with (Grammar = GrammarTel) ** open ResTel, Prelude in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {s : Agr => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseDAP dap = {s = \\c => dap.s ! Neutr ! npcase2case c ; a = agrP3 Neutr dap.n} ;
|
||||||
|
UseDAPMasc dap = {s = \\c => dap.s ! Masc ! npcase2case c ; a = agrP3 Masc dap.n} ;
|
||||||
|
UseDAPFem dap = {s = \\c => dap.s ! Fem ! npcase2case c ; a = agrP3 Fem dap.n} ;
|
||||||
|
|
||||||
|
ReflPron = {
|
||||||
|
s = \\c => case c of {NPC Dir => "తనను" ; _ => "తన"} ;
|
||||||
|
a = defaultAgr ;
|
||||||
|
lock_NP = <>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvRNP np prep rnp = {
|
||||||
|
s = \\c => np.s ! c ++ rnp.s ! NPC Obl ++ prep.s ;
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PositAdVAdj a = {s = a.s ! Masc ! Sg ! Dir} ;
|
||||||
|
|
||||||
|
MkVPS temp pol vp = {
|
||||||
|
s = \\agr => let f = vp.s ! pol.p !
|
||||||
|
VPTense (tenseVPH temp.t temp.a) agr
|
||||||
|
in vp.obj.s ++ vp.comp ! agr ++ f.neg ++ f.inf ++ f.fin
|
||||||
|
} ;
|
||||||
|
|
||||||
|
BaseVPS first second = {s1 = first.s ; s2 = second.s} ;
|
||||||
|
ConsVPS first rest = {
|
||||||
|
s1 = \\agr => first.s ! agr ++ "," ++ rest.s1 ! agr ;
|
||||||
|
s2 = rest.s2
|
||||||
|
} ;
|
||||||
|
ConjVPS conj vps = {
|
||||||
|
s = \\agr => vps.s1 ! agr ++ conj.s2 ++ vps.s2 ! agr
|
||||||
|
} ;
|
||||||
|
PredVPS np vps = {s = np.s ! NPC Dir ++ vps.s ! np.a} ;
|
||||||
|
|
||||||
|
CompoundN modifier head = {
|
||||||
|
s = \\n,c => modifier.s ! Sg ! Dir ++ head.s ! n ! c ;
|
||||||
|
g = head.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PastPartAP vps = {
|
||||||
|
s = \\_,_,_ => let f = vps.s ! Pos ! VPStem in
|
||||||
|
vps.obj.s ++ vps.comp ! defaultAgr ++ 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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
GerundCN vp = {
|
||||||
|
s = \\_,_ => let f = vp.s ! Pos ! VPInf in
|
||||||
|
vp.obj.s ++ vp.comp ! defaultAgr ++ f.inf ++ f.fin ;
|
||||||
|
g = Neutr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
GerundAdv vp = {
|
||||||
|
s = let f = vp.s ! Pos ! VPInf in
|
||||||
|
vp.obj.s ++ vp.comp ! defaultAgr ++ f.inf ++ f.fin
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ReflPoss num cn = {
|
||||||
|
s = \\c => cn.s ! num.n ! npcase2case c ;
|
||||||
|
a = agrP3 cn.g num.n ;
|
||||||
|
lock_NP = <>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPronRNP pron num cn rnp = {
|
||||||
|
s = \\c => pron.s ! PPoss ++ cn.s ! num.n ! Dir ++ rnp.s ! c ;
|
||||||
|
a = agrP3 cn.g num.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PassVPSlash vps = {
|
||||||
|
s = vps.s ;
|
||||||
|
obj = vps.obj ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
comp = vps.comp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PassAgentVPSlash vps agent = {
|
||||||
|
s = vps.s ;
|
||||||
|
obj = vps.obj ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
comp = \\agr => agent.s ! NPC Obl ++ vps.comp ! agr
|
||||||
|
} ;
|
||||||
|
}
|
||||||
+16
-14
@@ -1,18 +1,20 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete GrammarTel of Grammar =
|
concrete GrammarTel of Grammar =
|
||||||
NounTel
|
NounTel,
|
||||||
-- VerbTel,
|
VerbTel,
|
||||||
-- AdjectiveTel,
|
AdjectiveTel,
|
||||||
-- AdverbTel,
|
AdverbTel,
|
||||||
-- NumeralTel,
|
NumeralTel,
|
||||||
-- SentenceTel,
|
SentenceTel,
|
||||||
-- QuestionTel,
|
QuestionTel,
|
||||||
-- RelativeTel,
|
RelativeTel,
|
||||||
-- ConjunctionTel,
|
ConjunctionTel,
|
||||||
-- PhraseTel,
|
PhraseTel,
|
||||||
-- TextX,
|
TextX - [Adv,AdN,SC],
|
||||||
-- StructuralTel,
|
StructuralTel,
|
||||||
-- IdiomTel
|
TenseX - [Adv,AdN,SC],
|
||||||
|
IdiomTel,
|
||||||
|
NamesTel
|
||||||
** {
|
** {
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-30
@@ -1,30 +1,9 @@
|
|||||||
--concrete IdiomTel of Idiom = CatTel ** open Prelude, ResTel in {
|
concrete IdiomTel of Idiom = CatTel ** open Prelude, ResTel in {
|
||||||
----
|
lin
|
||||||
---- flags optimize=all_subs ;
|
ProgrVP vp = vp ;
|
||||||
----
|
|
||||||
---- lin
|
ImpersCl vp = mkClause {
|
||||||
---- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
s = \\_ => "అది" ;
|
||||||
---- GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
a = agrP3 Neutr Sg
|
||||||
----
|
} vp ;
|
||||||
---- CleftNP np rs = mkClause "it" (agrP3 Sg)
|
}
|
||||||
---- (insertObj (\\_ => rs.s ! np.a)
|
|
||||||
---- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
|
||||||
----
|
|
||||||
---- CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
|
||||||
---- (insertObj (\\_ => optStr conjThat ++ s.s)
|
|
||||||
---- (insertObj (\\_ => ad.s) (predAux auxBe))) ;
|
|
||||||
----
|
|
||||||
---- ExistNP np =
|
|
||||||
---- mkClause "there" (agrP3 (fromAgr np.a).n)
|
|
||||||
---- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ;
|
|
||||||
----
|
|
||||||
---- ExistIP ip =
|
|
||||||
---- mkQuestion (ss (ip.s ! Nom))
|
|
||||||
---- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
|
|
||||||
----
|
|
||||||
---- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ;
|
|
||||||
----
|
|
||||||
---- ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ;
|
|
||||||
----
|
|
||||||
--}
|
|
||||||
--
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete LangTel of Lang =
|
concrete LangTel of Lang =
|
||||||
GrammarTel,
|
GrammarTel,
|
||||||
LexiconTel
|
LexiconTel
|
||||||
|
,DocumentationTel --# notpresent
|
||||||
** {
|
** {
|
||||||
}
|
}
|
||||||
|
|||||||
+367
-371
@@ -1,375 +1,371 @@
|
|||||||
--# -path=.:prelude
|
--# -path=.:prelude
|
||||||
|
|
||||||
concrete LexiconTel of Lexicon = CatTel **
|
concrete LexiconTel of Lexicon = CatTel **
|
||||||
open ParadigmsTel, Prelude in {
|
open ParadigmsTel, Prelude in {
|
||||||
--
|
|
||||||
-- flags
|
lin
|
||||||
-- optimize=values ;
|
airplane_N = mkN "విమానం" ;
|
||||||
--
|
answer_V2S = mkV2S (mkV "సమాధానం చెప్పు") toP ;
|
||||||
lin
|
apartment_N = mkN "నివాసగృహం" ;
|
||||||
-- airplane_N = regN "airplane" ;
|
apple_N = mkN "ఆపిల్" ;
|
||||||
-- answer_V2S = mkV2S (regV "answer") toP ;
|
art_N = mkN "కళ" ;
|
||||||
-- apartment_N = regN "apartment" ;
|
ask_V2Q = mkV2Q (mkV "అడుగు") noPrep ;
|
||||||
-- apple_N = mkN "seb" ;
|
baby_N = mkN "శిశువు" ;
|
||||||
-- art_N = regN "art" ;
|
bad_A = mkA "చెడ్డ" ;
|
||||||
-- ask_V2Q = mkV2Q (regV "ask") noPrep ;
|
bank_N = mkN "బ్యాంకు" ;
|
||||||
-- baby_N = regN "baby" ;
|
beautiful_A = mkA "అందమైన";
|
||||||
-- bad_A = mkADeg "bad" "worse" "worst" "badly" ;
|
become_VA = mkVA (mkV "అవు") ;
|
||||||
-- bank_N = regN "bank" ;
|
beer_N = mkN "బీరు" ;
|
||||||
-- beautiful_A = compoundADeg (regA "beautiful") ;
|
beg_V2V = mkV2V (mkV "వేడుకో") noPrep toP ;
|
||||||
-- become_VA = mkVA (irregV "become" "became" "become") ;
|
big_A = mkA "పెద్ద" ;
|
||||||
-- beer_N = regN "beer" ;
|
bike_N = mkN "సైకిల్" ;
|
||||||
-- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ;
|
bird_N = mkN "పక్షి" ;
|
||||||
-- big_A = mkA "baRA" ;
|
black_A = mkA "నలుపు" ;
|
||||||
-- bike_N = regN "bike" ;
|
blue_A = mkA "నీలం" ;
|
||||||
-- bird_N = regN "bird" ;
|
boat_N = mkN "పడవ" ;
|
||||||
-- black_A = regADeg "black" ;
|
book_N = mkN "పుస్తకం" ;
|
||||||
-- blue_A = regADeg "blue" ;
|
boot_N = mkN "బూటు" ;
|
||||||
-- boat_N = regN "boat" ;
|
boss_N = mkN masculine (mkN "యజమాని") ;
|
||||||
-- book_N = regN "book" ;
|
boy_N = mkN "బాలుడు" ;
|
||||||
-- boot_N = regN "boot" ;
|
bread_N = mkN "రొట్టె" ;
|
||||||
-- boss_N = mkN human (regN "boss") ;
|
break_V2 = dirV2 (mkV "విరగగొట్టు") ;
|
||||||
-- boy_N = mkN "lar.kA" ;
|
broad_A = mkA "విశాలమైన" ;
|
||||||
-- bread_N = mkN "rot.I" ;
|
brother_N2 = mkN2 (mkN masculine (mkN "సోదరుడు")) (mkPrep "యొక్క") ;
|
||||||
-- break_V2 = dirV2 (irregV "break" "broke" "broken") ;
|
brown_A = mkA "గోధుమరంగు" ;
|
||||||
-- broad_A = regADeg "broad" ;
|
butter_N = mkN "వెన్న" ;
|
||||||
-- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ;
|
buy_V2 = dirV2 (mkV "కొను") ;
|
||||||
-- brown_A = regADeg "brown" ;
|
camera_N = mkN "కెమెరా" ;
|
||||||
-- butter_N = regN "butter" ;
|
cap_N = mkN "టోపీ" ;
|
||||||
-- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ;
|
car_N = mkN "కారు" ;
|
||||||
-- camera_N = regN "camera" ;
|
carpet_N = mkN "తివాచీ" ;
|
||||||
-- cap_N = regN "cap" ;
|
cat_N = mkN "పిల్లి" ;
|
||||||
-- car_N = regN "car" ;
|
ceiling_N = mkN "పైకప్పు" ;
|
||||||
-- carpet_N = regN "carpet" ;
|
chair_N = mkN "కుర్చీ" ;
|
||||||
-- cat_N = regN "cat" ;
|
cheese_N = mkN "జున్ను" ;
|
||||||
-- ceiling_N = regN "ceiling" ;
|
child_N = mkN "పిల్లవాడు" ;
|
||||||
-- chair_N = regN "chair" ;
|
church_N = mkN "చర్చి" ;
|
||||||
-- cheese_N = regN "cheese" ;
|
city_N = mkN "నగరం" ;
|
||||||
-- child_N = mk2N "child" "children" ;
|
clean_A = mkA "శుభ్రమైన" ;
|
||||||
-- church_N = regN "church" ;
|
clever_A = mkA "తెలివైన" ;
|
||||||
-- city_N = regN "city" ;
|
close_V2 = dirV2 (mkV "మూయు") ;
|
||||||
-- clean_A = regADeg "clean" ;
|
coat_N = mkN "కోటు" ;
|
||||||
-- clever_A = regADeg "clever" ;
|
cold_A = mkA "చల్లని" ;
|
||||||
-- close_V2 = dirV2 (regV "close") ;
|
come_V = (mkV "వచ్చు") ;
|
||||||
-- coat_N = regN "coat" ;
|
computer_N = mkN "కంప్యూటర్" ;
|
||||||
-- cold_A = regADeg "cold" ;
|
country_N = mkN "దేశం" ;
|
||||||
-- come_V = (irregV "come" "came" "come") ;
|
cousin_N = mkN masculine (mkN "బంధువు") ;
|
||||||
-- computer_N = regN "computer" ;
|
cow_N = mkN "ఆవు" ;
|
||||||
-- country_N = regN "country" ;
|
die_V = (mkV "చనిపోవు") ;
|
||||||
-- cousin_N = mkN human (regN "cousin") ;
|
dirty_A = mkA "మురికైన" ;
|
||||||
-- cow_N = regN "cow" ;
|
distance_N3 = mkN3 (mkN "దూరం") fromP toP ;
|
||||||
-- die_V = (regV "die") ;
|
doctor_N = mkN masculine (mkN "వైద్యుడు") ;
|
||||||
-- dirty_A = regADeg "dirty" ;
|
dog_N = mkN "కుక్క" ;
|
||||||
-- distance_N3 = mkN3 (regN "distance") fromP toP ;
|
door_N = mkN "తలుపు" ;
|
||||||
-- doctor_N = mkN human (regN "doctor") ;
|
drink_V2 = dirV2 (mkV "తాగు") ;
|
||||||
-- dog_N = regN "dog" ;
|
easy_A2V = mkA2V (mkA "సులభమైన") forP ;
|
||||||
-- door_N = regN "door" ;
|
eat_V2 = mkV2 "తిను" ;
|
||||||
-- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ;
|
empty_A = mkA "ఖాళీ" ;
|
||||||
-- easy_A2V = mkA2V (regA "easy") forP ;
|
enemy_N = mkN "శత్రువు" ;
|
||||||
-- eat_V2 = mkV2 "KA" ;
|
factory_N = mkN "కర్మాగారం" ;
|
||||||
-- empty_A = regADeg "empty" ;
|
father_N2 = mkN2 (mkN masculine (mkN "తండ్రి")) (mkPrep "యొక్క") ;
|
||||||
-- enemy_N = regN "enemy" ;
|
fear_VS = mkVS (mkV "భయపడు") ;
|
||||||
-- factory_N = regN "factory" ;
|
find_V2 = dirV2 (mkV "కనుగొను") ;
|
||||||
-- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ;
|
fish_N = mkN "చేప" ;
|
||||||
-- fear_VS = mkVS (regV "fear") ;
|
floor_N = mkN "నేల" ;
|
||||||
-- find_V2 = dirV2 (irregV "find" "found" "found") ;
|
forget_V2 = dirV2 (mkV "మర్చిపోవు") ;
|
||||||
-- fish_N = mk2N "fish" "fish" ;
|
fridge_N = mkN "శీతలపేటిక" ;
|
||||||
-- floor_N = regN "floor" ;
|
friend_N = mkN masculine (mkN "స్నేహితుడు") ;
|
||||||
-- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ;
|
fruit_N = mkN "పండు" ;
|
||||||
-- fridge_N = regN "fridge" ;
|
fun_AV = mkAV (mkA "సరదా") ;
|
||||||
-- friend_N = mkN human (regN "friend") ;
|
garden_N = mkN "తోట" ;
|
||||||
-- fruit_N = regN "fruit" ;
|
girl_N = mkN "బాలిక" ;
|
||||||
-- fun_AV = mkAV (regA "fun") ;
|
glove_N = mkN "చేతితొడుగు" ;
|
||||||
-- garden_N = regN "garden" ;
|
gold_N = mkN "బంగారం" ;
|
||||||
-- girl_N = mkN "lar.kI" ;
|
good_A = mkA "మంచి" ;
|
||||||
-- glove_N = regN "glove" ;
|
go_V = mkV "వెళ్ళు" ;
|
||||||
-- gold_N = regN "gold" ;
|
green_A = mkA "ఆకుపచ్చ" ;
|
||||||
-- good_A = mkA "a-cCA" ;
|
harbour_N = mkN "నౌకాశ్రయం" ;
|
||||||
-- go_V = mkV "cal" ;
|
hate_V2 = dirV2 (mkV "ద్వేషించు") ;
|
||||||
-- green_A = regADeg "green" ;
|
hat_N = mkN "టోపీ" ;
|
||||||
-- harbour_N = regN "harbour" ;
|
hear_V2 = dirV2 (mkV "విను") ;
|
||||||
-- hate_V2 = dirV2 (regV "hate") ;
|
hill_N = mkN "కొండ" ;
|
||||||
-- hat_N = regN "hat" ;
|
hope_VS = mkVS (mkV "ఆశించు") ;
|
||||||
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
horse_N = mkN "గుర్రం" ;
|
||||||
-- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ;
|
hot_A = mkA "వేడి" ;
|
||||||
-- hill_N = regN "hill" ;
|
house_N = mkN "ఇల్లు" ;
|
||||||
-- hope_VS = mkVS (regV "hope") ;
|
important_A = mkA "ముఖ్యమైన";
|
||||||
-- horse_N = regN "horse" ;
|
industry_N = mkN "పరిశ్రమ" ;
|
||||||
-- hot_A = duplADeg "hot" ;
|
iron_N = mkN "ఇనుము" ;
|
||||||
-- house_N = regN "house" ;
|
king_N = mkN masculine (mkN "రాజు") ;
|
||||||
-- important_A = compoundADeg (regA "important") ;
|
know_V2 = dirV2 (mkV "తెలుసు") ;
|
||||||
-- industry_N = regN "industry" ;
|
lake_N = mkN "సరస్సు" ;
|
||||||
-- iron_N = regN "iron" ;
|
lamp_N = mkN "దీపం" ;
|
||||||
-- king_N = mkN masculine (regN "king") ;
|
learn_V2 = dirV2 (mkV "నేర్చుకో") ;
|
||||||
-- know_V2 = dirV2 (irregV "know" "knew" "known") ;
|
leather_N = mkN "తోలు" ;
|
||||||
-- lake_N = regN "lake" ;
|
leave_V2 = dirV2 (mkV "విడిచిపెట్టు") ;
|
||||||
-- lamp_N = regN "lamp" ;
|
like_V2 = dirV2 (mkV "ఇష్టపడు") ;
|
||||||
-- learn_V2 = dirV2 (regV "learn") ;
|
listen_V2 = prepV2 (mkV "విను") toP ;
|
||||||
-- leather_N = regN "leather" ;
|
live_V = mkV "జీవించు" ; -- touch
|
||||||
-- leave_V2 = dirV2 (irregV "leave" "left" "left") ;
|
long_A = mkA "పొడవైన" ;
|
||||||
-- like_V2 = dirV2 (regV "like") ;
|
lose_V2 = dirV2 (mkV "కోల్పోవు") ;
|
||||||
-- listen_V2 = prepV2 (regV "listen") toP ;
|
love_N = mkN "ప్రేమ" ;
|
||||||
-- live_V = mkV "CU" ; -- touch
|
love_V2 = dirV2 (mkV "ప్రేమించు") ;
|
||||||
-- long_A = regADeg "long" ;
|
man_N = mkN masculine (mkN "మనిషి") ;
|
||||||
-- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ;
|
married_A2 = mkA2 (mkA "వివాహిత") toP ;
|
||||||
-- love_N = regN "love" ;
|
meat_N = mkN "మాంసం" ;
|
||||||
-- love_V2 = dirV2 (regV "love") ;
|
milk_N = mkN "పాలు" ;
|
||||||
-- man_N = mkN masculine (mk2N "man" "men") ;
|
moon_N = mkN "చంద్రుడు" ;
|
||||||
-- married_A2 = mkA2 (regA "married") toP ;
|
mother_N2 = mkN2 (mkN feminine (mkN "తల్లి")) (mkPrep "యొక్క") ;
|
||||||
-- meat_N = regN "meat" ;
|
mountain_N = mkN "పర్వతం" ;
|
||||||
-- milk_N = regN "milk" ;
|
music_N = mkN "సంగీతం" ;
|
||||||
-- moon_N = regN "moon" ;
|
narrow_A = mkA "ఇరుకైన" ;
|
||||||
-- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ;
|
new_A = mkA "కొత్త" ;
|
||||||
-- mountain_N = regN "mountain" ;
|
newspaper_N = mkN "వార్తాపత్రిక" ;
|
||||||
-- music_N = regN "music" ;
|
oil_N = mkN "నూనె" ;
|
||||||
-- narrow_A = regADeg "narrow" ;
|
old_A = mkA "పాత" ;
|
||||||
-- new_A = regADeg "new" ;
|
open_V2 = dirV2 (mkV "తెరువు") ;
|
||||||
-- newspaper_N = regN "newspaper" ;
|
paint_V2A = mkV2A (mkV "రంగువేయు") noPrep ;
|
||||||
-- oil_N = regN "oil" ;
|
paper_N = mkN "కాగితం" ;
|
||||||
-- old_A = regADeg "old" ;
|
paris_PN = mkPN (mkN "పారిస్") ;
|
||||||
-- open_V2 = dirV2 (regV "open") ;
|
peace_N = mkN "శాంతి" ;
|
||||||
-- paint_V2A = mkV2A (regV "paint") noPrep ;
|
pen_N = mkN "కలం" ;
|
||||||
-- paper_N = regN "paper" ;
|
planet_N = mkN "గ్రహం" ;
|
||||||
-- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ;
|
plastic_N = mkN "ప్లాస్టిక్" ;
|
||||||
-- peace_N = regN "peace" ;
|
play_V2 = dirV2 (mkV "ఆడు") ;
|
||||||
-- pen_N = regN "pen" ;
|
policeman_N = mkN masculine (mkN "పోలీసు" "పోలీసు") ;
|
||||||
-- planet_N = regN "planet" ;
|
priest_N = mkN masculine (mkN "పూజారి") ;
|
||||||
-- plastic_N = regN "plastic" ;
|
probable_AS = mkAS (mkA "సంభావ్యమైన") ;
|
||||||
-- play_V2 = dirV2 (regV "play") ;
|
queen_N = mkN feminine (mkN "రాణి") ;
|
||||||
-- policeman_N = mkN masculine (mkN "policeman" "policemen") ;
|
radio_N = mkN "రేడియో" ;
|
||||||
-- priest_N = mkN human (regN "priest") ;
|
rain_V0 = mkV0 (mkV "వర్షించు") ;
|
||||||
-- probable_AS = mkAS (regA "probable") ;
|
read_V2 = dirV2 (mkV "చదువు") ;
|
||||||
-- queen_N = mkN feminine (regN "queen") ;
|
red_A = mkA "ఎరుపు" ;
|
||||||
-- radio_N = regN "radio" ;
|
religion_N = mkN "మతం" ;
|
||||||
-- rain_V0 = mkV0 (regV "rain") ;
|
restaurant_N = mkN "భోజనశాల" ;
|
||||||
-- read_V2 = dirV2 (irregV "read" "read" "read") ;
|
river_N = mkN "నది" ;
|
||||||
-- red_A = mkA "lAl" ;
|
rock_N = mkN "రాయి" ;
|
||||||
-- religion_N = regN "religion" ;
|
roof_N = mkN "కప్పు" ;
|
||||||
-- restaurant_N = regN "restaurant" ;
|
rubber_N = mkN "రబ్బరు" ;
|
||||||
-- river_N = regN "river" ;
|
run_V = (mkV "పరుగెత్తు") ;
|
||||||
-- rock_N = regN "rock" ;
|
say_VS = mkVS (mkV "చెప్పు") ;
|
||||||
-- roof_N = regN "roof" ;
|
school_N = mkN "పాఠశాల" ;
|
||||||
-- rubber_N = regN "rubber" ;
|
science_N = mkN "విజ్ఞానం" ;
|
||||||
-- run_V = (irregDuplV "run" "ran" "run") ;
|
sea_N = mkN "సముద్రం" ;
|
||||||
-- say_VS = mkVS (irregV "say" "said" "said") ;
|
seek_V2 = dirV2 (mkV "వెతుకు") ;
|
||||||
-- school_N = regN "school" ;
|
see_V2 = dirV2 (mkV "చూడు") ;
|
||||||
-- science_N = regN "science" ;
|
sell_V3 = mkV3 (mkV "అమ్ము") noPrep toP ;
|
||||||
-- sea_N = regN "sea" ;
|
send_V3 = mkV3 (mkV "పంపు") noPrep toP ;
|
||||||
-- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ;
|
sheep_N = mkN "గొర్రె" ;
|
||||||
-- see_V2 = dirV2 (irregV "see" "saw" "seen") ;
|
ship_N = mkN "ఓడ" ;
|
||||||
-- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ;
|
shirt_N = mkN "చొక్కా" ;
|
||||||
-- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ;
|
shoe_N = mkN "చెప్పు" ;
|
||||||
-- sheep_N = mk2N "sheep" "sheep" ;
|
shop_N = mkN "దుకాణం" ;
|
||||||
-- ship_N = regN "ship" ;
|
short_A = mkA "పొట్టి" ;
|
||||||
-- shirt_N = regN "shirt" ;
|
silver_N = mkN "వెండి" ;
|
||||||
-- shoe_N = regN "shoe" ;
|
sister_N = mkN2 (mkN feminine (mkN "సోదరి")) (mkPrep "యొక్క") ;
|
||||||
-- shop_N = regN "shop" ;
|
sleep_V = (mkV "నిద్రపోవు") ;
|
||||||
-- short_A = regADeg "short" ;
|
small_A = mkA "చిన్న" ;
|
||||||
-- silver_N = regN "silver" ;
|
snake_N = mkN "పాము" ;
|
||||||
-- sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ;
|
sock_N = mkN "మేజోడు" ;
|
||||||
-- sleep_V = (irregV "sleep" "slept" "slept") ;
|
speak_V2 = dirV2 (mkV "మాట్లాడు") ;
|
||||||
-- small_A = regADeg "small" ;
|
star_N = mkN "నక్షత్రం" ;
|
||||||
-- snake_N = regN "snake" ;
|
steel_N = mkN "ఉక్కు" ;
|
||||||
-- sock_N = regN "sock" ;
|
stone_N = mkN "రాయి" ;
|
||||||
-- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ;
|
stove_N = mkN "పొయ్యి" ;
|
||||||
-- star_N = regN "star" ;
|
student_N = mkN masculine (mkN "విద్యార్థి") ;
|
||||||
-- steel_N = regN "steel" ;
|
stupid_A = mkA "మూర్ఖమైన" ;
|
||||||
-- stone_N = regN "stone" ;
|
sun_N = mkN "సూర్యుడు" ;
|
||||||
-- stove_N = regN "stove" ;
|
switch8off_V2 = dirV2 (partV (mkV "ఆపివేయు") "ఆపివేయు") ;
|
||||||
-- student_N = mkN human (regN "student") ;
|
switch8on_V2 = dirV2 (partV (mkV "ప్రారంభించు") "ప్రారంభించు") ;
|
||||||
-- stupid_A = regADeg "stupid" ;
|
table_N = mkN "బల్ల" ;
|
||||||
-- sun_N = regN "sun" ;
|
talk_V3 = mkV3 (mkV "మాట్లాడు") toP aboutP ;
|
||||||
-- switch8off_V2 = dirV2 (partV (regV "switch") "off") ;
|
teacher_N = mkN masculine (mkN "ఉపాధ్యాయుడు") ;
|
||||||
-- switch8on_V2 = dirV2 (partV (regV "switch") "on") ;
|
teach_V2 = dirV2 (mkV "బోధించు") ;
|
||||||
-- table_N = regN "table" ;
|
television_N = mkN "దూరదర్శిని" ;
|
||||||
-- talk_V3 = mkV3 (regV "talk") toP aboutP ;
|
thick_A = mkA "మందమైన" ;
|
||||||
-- teacher_N = mkN human (regN "teacher") ;
|
thin_A = mkA "సన్నని" ;
|
||||||
-- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ;
|
train_N = mkN "రైలు" ;
|
||||||
-- television_N = regN "television" ;
|
travel_V = (mkV "ప్రయాణించు") ;
|
||||||
-- thick_A = regADeg "thick" ;
|
tree_N = mkN "చెట్టు" ;
|
||||||
-- thin_A = duplADeg "thin" ;
|
-- trousers_N = mkN "trousers" ;
|
||||||
-- train_N = regN "train" ;
|
ugly_A = mkA "వికారమైన" ;
|
||||||
-- travel_V = (regDuplV "travel") ;
|
understand_V2 = dirV2 (mkV "అర్థంచేసుకో") ;
|
||||||
-- tree_N = regN "tree" ;
|
university_N = mkN "విశ్వవిద్యాలయం" ;
|
||||||
-- -- trousers_N = regN "trousers" ;
|
village_N = mkN "గ్రామం" ;
|
||||||
-- ugly_A = regADeg "ugly" ;
|
wait_V2 = prepV2 (mkV "వేచిఉండు") forP ;
|
||||||
-- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ;
|
walk_V = (mkV "నడుచు") ;
|
||||||
-- university_N = regN "university" ;
|
warm_A = mkA "వెచ్చని" ;
|
||||||
-- village_N = regN "village" ;
|
war_N = mkN "యుద్ధం" ;
|
||||||
-- wait_V2 = prepV2 (regV "wait") forP ;
|
watch_V2 = dirV2 (mkV "చూడు") ;
|
||||||
-- walk_V = (regV "walk") ;
|
water_N = mkN "నీరు" ;
|
||||||
-- warm_A = regADeg "warm" ;
|
white_A = mkA "తెలుపు" ;
|
||||||
-- war_N = regN "war" ;
|
window_N = mkN "కిటికీ" ;
|
||||||
-- watch_V2 = dirV2 (regV "watch") ;
|
wine_N = mkN "ద్రాక్షారసం" ;
|
||||||
-- water_N = regN "water" ;
|
win_V2 = dirV2 (mkV "గెలుచు") ;
|
||||||
-- white_A = regADeg "white" ;
|
woman_N = mkN feminine (mkN "స్త్రీ") ;
|
||||||
window_N = mkN "kiTiki:" ;
|
wonder_VQ = mkVQ (mkV "ఆశ్చర్యపడు") ;
|
||||||
-- wine_N = regN "wine" ;
|
wood_N = mkN "కలప" ;
|
||||||
-- win_V2 = dirV2 (irregDuplV "win" "won" "won") ;
|
write_V2 = dirV2 (mkV "వ్రాయు") ;
|
||||||
-- woman_N = mkN feminine (mk2N "woman" "women") ;
|
yellow_A = mkA "పసుపు" ;
|
||||||
-- wonder_VQ = mkVQ (regV "wonder") ;
|
young_A = mkA "యువ" ;
|
||||||
-- wood_N = regN "wood" ;
|
|
||||||
-- write_V2 = dirV2 (irregV "write" "wrote" "written") ;
|
do_V2 = dirV2 (mkV "చేయు") ;
|
||||||
-- yellow_A = regADeg "yellow" ;
|
now_Adv = mkAdv "ఇప్పుడు" ;
|
||||||
-- young_A = regADeg "young" ;
|
already_Adv = mkAdv "ఇప్పటికే" ;
|
||||||
--
|
song_N = mkN "పాట" ;
|
||||||
-- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ;
|
add_V3 = mkV3 (mkV "కలుపు") noPrep toP ;
|
||||||
-- now_Adv = mkAdv "now" ;
|
number_N = mkN "సంఖ్య" ;
|
||||||
-- already_Adv = mkAdv "already" ;
|
put_V2 = prepV2 (mkV "పెట్టు") noPrep ;
|
||||||
-- song_N = regN "song" ;
|
stop_V = mkV "ఆపు" ;
|
||||||
-- add_V3 = dirV3 (regV "add") toP ;
|
jump_V = mkV "దూకు" ;
|
||||||
-- number_N = regN "number" ;
|
|
||||||
-- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ;
|
left_Ord = ss "ఎడమ" ;
|
||||||
-- stop_V = regDuplV "stop" ;
|
right_Ord = ss "కుడి" ;
|
||||||
-- jump_V = regV "jump" ;
|
far_Adv = mkAdv "దూరంగా" ;
|
||||||
--
|
correct_A = (mkA "సరైన") ;
|
||||||
-- left_Ord = ss "left" ;
|
dry_A = mkA "పొడి" ;
|
||||||
-- right_Ord = ss "right" ;
|
dull_A = mkA "మొద్దైన" ;
|
||||||
-- far_Adv = mkAdv "far" ;
|
full_A = mkA "నిండిన" ;
|
||||||
-- correct_A = (regA "correct") ;
|
heavy_A = mkA "బరువైన" ;
|
||||||
-- dry_A = regA "dry" ;
|
near_A = mkA "దగ్గర" ;
|
||||||
-- dull_A = regA "dull" ;
|
rotten_A = (mkA "కుళ్ళిన") ;
|
||||||
-- full_A = regA "full" ;
|
round_A = mkA "గుండ్రని" ;
|
||||||
-- heavy_A = regA "heavy" ;
|
sharp_A = mkA "పదునైన" ;
|
||||||
-- near_A = regA "near" ;
|
smooth_A = mkA "మృదువైన" ;
|
||||||
-- rotten_A = (regA "rotten") ;
|
straight_A = mkA "నేరుగా" ;
|
||||||
-- round_A = regA "round" ;
|
wet_A = mkA "తడి" ; --
|
||||||
-- sharp_A = regA "sharp" ;
|
wide_A = mkA "వెడల్పైన" ;
|
||||||
-- smooth_A = regA "smooth" ;
|
animal_N = mkN "జంతువు" ;
|
||||||
-- straight_A = regA "straight" ;
|
ashes_N = mkN "బూడిద" ; -- FIXME: plural only?
|
||||||
-- wet_A = regA "wet" ; --
|
back_N = mkN "వీపు" ;
|
||||||
-- wide_A = regA "wide" ;
|
bark_N = mkN "చెట్టు బెరడు" ;
|
||||||
-- animal_N = regN "animal" ;
|
belly_N = mkN "కడుపు" ;
|
||||||
-- ashes_N = regN "ash" ; -- FIXME: plural only?
|
blood_N = mkN "రక్తం" ;
|
||||||
-- back_N = regN "back" ;
|
bone_N = mkN "ఎముక" ;
|
||||||
-- bark_N = regN "bark" ;
|
breast_N = mkN "రొమ్ము" ;
|
||||||
-- belly_N = regN "belly" ;
|
cloud_N = mkN "మేఘం" ;
|
||||||
-- blood_N = regN "blood" ;
|
day_N = mkN "రోజు" ;
|
||||||
-- bone_N = regN "bone" ;
|
dust_N = mkN "దుమ్ము" ;
|
||||||
-- breast_N = regN "breast" ;
|
ear_N = mkN "చెవి" ;
|
||||||
-- cloud_N = regN "cloud" ;
|
earth_N = mkN "భూమి" ;
|
||||||
-- day_N = regN "day" ;
|
egg_N = mkN "గుడ్డు" ;
|
||||||
-- dust_N = regN "dust" ;
|
eye_N = mkN "కన్ను" ;
|
||||||
-- ear_N = regN "ear" ;
|
fat_N = mkN "కొవ్వు" ;
|
||||||
-- earth_N = regN "earth" ;
|
feather_N = mkN "ఈక" ;
|
||||||
-- egg_N = regN "egg" ;
|
fingernail_N = mkN "గోరు" ;
|
||||||
-- eye_N = regN "eye" ;
|
fire_N = mkN "నిప్పు" ;
|
||||||
-- fat_N = regN "fat" ;
|
flower_N = mkN "పువ్వు" ;
|
||||||
-- feather_N = regN "feather" ;
|
fog_N = mkN "పొగమంచు" ;
|
||||||
-- fingernail_N = regN "fingernail" ;
|
foot_N = mkN "పాదం" ;
|
||||||
-- fire_N = regN "fire" ;
|
forest_N = mkN "అడవి" ;
|
||||||
-- flower_N = regN "flower" ;
|
grass_N = mkN "గడ్డి" ;
|
||||||
-- fog_N = regN "fog" ;
|
guts_N = mkN "పేగులు" ; -- FIXME: no singular
|
||||||
-- foot_N = mk2N "foot" "feet" ;
|
hair_N = mkN "వెంట్రుక" ;
|
||||||
-- forest_N = regN "forest" ;
|
hand_N = mkN "చెయ్యి" ;
|
||||||
-- grass_N = regN "grass" ;
|
head_N = mkN "తల" ;
|
||||||
-- guts_N = regN "gut" ; -- FIXME: no singular
|
heart_N = mkN "గుండె" ;
|
||||||
-- hair_N = regN "hair" ;
|
horn_N = mkN "కొమ్ము" ;
|
||||||
-- hand_N = regN "hand" ;
|
husband_N = mkN masculine (mkN "భర్త") ;
|
||||||
-- head_N = regN "head" ;
|
ice_N = mkN "మంచు" ;
|
||||||
-- heart_N = regN "heart" ;
|
knee_N = mkN "మోకాలు" ;
|
||||||
-- horn_N = regN "horn" ;
|
leaf_N = mkN "ఆకు" ;
|
||||||
-- husband_N = mkN masculine (regN "husband") ;
|
leg_N = mkN "కాలు" ;
|
||||||
-- ice_N = regN "ice" ;
|
liver_N = mkN "కాలేయం" ;
|
||||||
-- knee_N = regN "knee" ;
|
louse_N = mkN "పేను" ;
|
||||||
-- leaf_N = mk2N "leaf" "leaves" ;
|
mouth_N = mkN "నోరు" ;
|
||||||
-- leg_N = regN "leg" ;
|
name_N = mkN "పేరు" ;
|
||||||
-- liver_N = regN "liver" ;
|
neck_N = mkN "మెడ" ;
|
||||||
-- louse_N = mk2N "louse" "lice" ;
|
night_N = mkN "రాత్రి" ;
|
||||||
-- mouth_N = regN "mouth" ;
|
nose_N = mkN "ముక్కు" ;
|
||||||
-- name_N = regN "name" ;
|
person_N = mkN masculine (mkN "వ్యక్తి") ;
|
||||||
-- neck_N = regN "neck" ;
|
rain_N = mkN "వర్షం" ;
|
||||||
-- night_N = regN "night" ;
|
road_N = mkN "రోడ్డు" ;
|
||||||
-- nose_N = regN "nose" ;
|
root_N = mkN "వేరు" ;
|
||||||
-- person_N = mkN human (regN "person") ;
|
rope_N = mkN "తాడు" ;
|
||||||
-- rain_N = regN "rain" ;
|
salt_N = mkN "ఉప్పు" ;
|
||||||
-- road_N = regN "road" ;
|
sand_N = mkN "ఇసుక" ;
|
||||||
-- root_N = regN "root" ;
|
seed_N = mkN "విత్తనం" ;
|
||||||
-- rope_N = regN "rope" ;
|
skin_N = mkN "చర్మం" ;
|
||||||
-- salt_N = regN "salt" ;
|
sky_N = mkN "ఆకాశం" ;
|
||||||
-- sand_N = regN "sand" ;
|
smoke_N = mkN "పొగ" ;
|
||||||
-- seed_N = regN "seed" ;
|
snow_N = mkN "హిమం" ;
|
||||||
-- skin_N = regN "skin" ;
|
stick_N = mkN "కర్ర" ;
|
||||||
-- sky_N = regN "sky" ;
|
tail_N = mkN "తోక" ;
|
||||||
-- smoke_N = regN "smoke" ;
|
tongue_N = mkN "నాలుక" ;
|
||||||
-- snow_N = regN "snow" ;
|
tooth_N = mkN "పన్ను" ;
|
||||||
-- stick_N = regN "stick" ;
|
wife_N = mkN feminine (mkN "భార్య") ;
|
||||||
-- tail_N = regN "tail" ;
|
wind_N = mkN "గాలి" ;
|
||||||
-- tongue_N = regN "tongue" ;
|
wing_N = mkN "రెక్క" ;
|
||||||
-- tooth_N = mk2N "tooth" "teeth" ;
|
worm_N = mkN "పురుగు" ;
|
||||||
-- wife_N = mkN feminine (mk2N "wife" "wives") ;
|
year_N = mkN "సంవత్సరం" ;
|
||||||
-- wind_N = regN "wind" ;
|
blow_V = mkV "ఊదు" ;
|
||||||
-- wing_N = regN "wing" ;
|
breathe_V = dirV2 (mkV "శ్వాసించు") ;
|
||||||
-- worm_N = regN "worm" ;
|
burn_V = mkV "కాల్చు" ;
|
||||||
-- year_N = regN "year" ;
|
dig_V = mkV "త్రవ్వు" ;
|
||||||
-- blow_V = IrregTel.blow_V ;
|
fall_V = mkV "పడు" ;
|
||||||
-- breathe_V = dirV2 (regV "breathe") ;
|
float_V = mkV "తేలు" ;
|
||||||
-- burn_V = IrregTel.burn_V ;
|
flow_V = mkV "ప్రవహించు" ;
|
||||||
-- dig_V = IrregTel.dig_V ;
|
fly_V = mkV "ఎగురు" ;
|
||||||
-- fall_V = IrregTel.fall_V ;
|
freeze_V = mkV "గడ్డకట్టు" ;
|
||||||
-- float_V = regV "float" ;
|
give_V3 = mkV3 (mkV "ఇచ్చు") noPrep toP ;
|
||||||
-- flow_V = regV "flow" ;
|
laugh_V = mkV "నవ్వు" ;
|
||||||
-- fly_V = IrregTel.fly_V ;
|
lie_V = mkV "పడుకొను" ;
|
||||||
-- freeze_V = IrregTel.freeze_V ;
|
play_V = mkV "ఆడు" ;
|
||||||
-- give_V3 = dirV3 give_V toP ;
|
sew_V = mkV "కుట్టు" ;
|
||||||
-- laugh_V = regV "laugh" ;
|
sing_V = mkV "పాడు" ;
|
||||||
-- lie_V = IrregTel.lie_V ;
|
sit_V = mkV "కూర్చు" ;
|
||||||
-- play_V = regV "play" ;
|
smell_V = mkV "వాసనచూడు" ;
|
||||||
-- sew_V = mkV "sI" ;
|
spit_V = mkV "ఉమ్ము" ;
|
||||||
-- sing_V = IrregTel.sing_V ;
|
stand_V = mkV "నిలుచు" ;
|
||||||
-- sit_V = IrregTel.sit_V ;
|
swell_V = mkV "ఉబ్బు" ;
|
||||||
-- smell_V = regV "smell" ;
|
swim_V = mkV "ఈదు" ;
|
||||||
-- spit_V = IrregTel.spit_V ;
|
think_V = mkV "ఆలోచించు" ;
|
||||||
-- stand_V = IrregTel.stand_V ;
|
turn_V = mkV "తిరుగు" ;
|
||||||
-- swell_V = IrregTel.swell_V ;
|
vomit_V = mkV "వాంతిచేయు" ;
|
||||||
-- swim_V = IrregTel.swim_V ;
|
|
||||||
-- think_V = IrregTel.think_V ;
|
bite_V2 = dirV2 (mkV "కొరుకు") ;
|
||||||
-- turn_V = regV "turn" ;
|
count_V2 = dirV2 (mkV "లెక్కించు") ;
|
||||||
-- vomit_V = regV "vomit" ;
|
cut_V2 = dirV2 (mkV "కోయు") ;
|
||||||
--
|
fear_V2 = dirV2 (mkV "భయపడు") ;
|
||||||
-- bite_V2 = dirV2 IrregTel.bite_V ;
|
fight_V2 = dirV2 (mkV "పోరాడు") ;
|
||||||
-- count_V2 = dirV2 (regV "count") ;
|
hit_V2 = mkV2 (mkV "కొట్టు") "ను" ;
|
||||||
-- cut_V2 = dirV2 IrregTel.cut_V ;
|
hold_V2 = dirV2 (mkV "పట్టుకొను") ;
|
||||||
-- fear_V2 = dirV2 (regV "fear") ;
|
hunt_V2 = dirV2 (mkV "వేటాడు") ;
|
||||||
-- fight_V2 = dirV2 fight_V ;
|
kill_V2 = dirV2 (mkV "చంపు") ;
|
||||||
-- hit_V2 = mkV2 (mkV "mAr") "ko" ;
|
pull_V2 = dirV2 (mkV "లాగు") ;
|
||||||
-- hold_V2 = dirV2 hold_V ;
|
push_V2 = dirV2 (mkV "తోయు") ;
|
||||||
-- hunt_V2 = dirV2 (regV "hunt") ;
|
rub_V2 = dirV2 (mkV "రుద్దు") ;
|
||||||
-- kill_V2 = dirV2 (regV "kill") ;
|
scratch_V2 = dirV2 (mkV "గోకు") ;
|
||||||
-- pull_V2 = dirV2 (regV "pull") ;
|
split_V2 = dirV2 (mkV "చీల్చు") ;
|
||||||
-- push_V2 = dirV2 (regV "push") ;
|
squeeze_V2 = dirV2 (mkV "పిండు") ;
|
||||||
-- rub_V2 = dirV2 (regDuplV "rub") ;
|
stab_V2 = dirV2 (mkV "పొడుచు") ;
|
||||||
-- scratch_V2 = dirV2 (regV "scratch") ;
|
suck_V2 = dirV2 (mkV "చీకు") ;
|
||||||
-- split_V2 = dirV2 split_V ;
|
throw_V2 = dirV2 (mkV "విసురు") ;
|
||||||
-- squeeze_V2 = dirV2 (regV "squeeze") ;
|
tie_V2 = dirV2 (mkV "కట్టు") ;
|
||||||
-- stab_V2 = dirV2 (regDuplV "stab") ;
|
wash_V2 = dirV2 (mkV "కడుగు") ;
|
||||||
-- suck_V2 = dirV2 (regV "suck") ;
|
wipe_V2 = dirV2 (mkV "తుడుచు") ;
|
||||||
-- throw_V2 = dirV2 throw_V ;
|
|
||||||
-- tie_V2 = dirV2 (regV "tie") ;
|
-- other_A = mkA "other" ;
|
||||||
-- wash_V2 = dirV2 (regV "wash") ;
|
|
||||||
-- wipe_V2 = dirV2 (regV "wipe") ;
|
grammar_N = mkN "వ్యాకరణం" ;
|
||||||
--
|
language_N = mkN "భాష" ;
|
||||||
---- other_A = regA "other" ;
|
rule_N = mkN "నియమం" ;
|
||||||
--
|
|
||||||
-- grammar_N = regN "grammar" ;
|
-- added 4/6/2007
|
||||||
-- language_N = regN "language" ;
|
john_PN = mkPN "జాన్" ;
|
||||||
-- rule_N = regN "rule" ;
|
question_N = mkN "ప్రశ్న" ;
|
||||||
--
|
ready_A = mkA "సిద్ధమైన" ;
|
||||||
---- added 4/6/2007
|
reason_N = mkN "కారణం" ;
|
||||||
-- john_PN = mkPN "jon" ;
|
today_Adv = mkAdv "ఈరోజు" ;
|
||||||
-- question_N = regN "question" ;
|
uncertain_A = mkA "అనిశ్చితమైన" ;
|
||||||
-- ready_A = regA "ready" ;
|
|
||||||
-- reason_N = regN "reason" ;
|
oper
|
||||||
-- today_Adv = mkAdv "today" ;
|
aboutP = mkPrep "గురించి" ;
|
||||||
-- uncertain_A = regA "uncertain" ;
|
atP = mkPrep "వద్ద" ;
|
||||||
--
|
forP = mkPrep "కోసం" ;
|
||||||
--oper
|
fromP = mkPrep "నుండి" ;
|
||||||
-- aboutP = mkPrep "about" ;
|
inP = mkPrep "లో" ;
|
||||||
-- atP = mkPrep "at" ;
|
onP = mkPrep "పై" ;
|
||||||
-- forP = mkPrep "for" ;
|
toP = mkPrep "కు" ;
|
||||||
-- fromP = mkPrep "from" ;
|
|
||||||
-- inP = mkPrep "in" ;
|
|
||||||
-- onP = mkPrep "on" ;
|
|
||||||
-- toP = mkPrep "to" ;
|
|
||||||
--
|
|
||||||
}
|
}
|
||||||
|
|||||||
+187
-187
@@ -1,196 +1,196 @@
|
|||||||
----# -path=.:../../prelude
|
--# -path=.:../../prelude
|
||||||
|
--
|
||||||
|
----1 A Simple Telugu Resource Morphology
|
||||||
----
|
----
|
||||||
------1 A Simple Teldi Resource Morphology
|
---- Aarne Ranta 2002 -- 2005
|
||||||
------
|
|
||||||
------ Aarne Ranta 2002 -- 2005
|
|
||||||
------
|
|
||||||
------ This resource morphology contains definitions needed in the resource
|
|
||||||
------ syntax. To build a lexicon, it is better to use $ParadigmsTel$, which
|
|
||||||
------ gives a higher-level access to this module.
|
|
||||||
----
|
----
|
||||||
--resource MorphoTel = ResTel ** open Prelude, (Predef=Predef) in {
|
---- This resource morphology contains definitions needed in the resource
|
||||||
|
---- syntax. To build a lexicon, it is better to use $ParadigmsTel$, which
|
||||||
|
---- gives a higher-level access to this module.
|
||||||
|
--
|
||||||
|
resource MorphoTel = ResTel ** open Prelude, (Predef=Predef) in {
|
||||||
|
--
|
||||||
|
-- flags optimize=all ;
|
||||||
|
--
|
||||||
|
----2 Phonology
|
||||||
----
|
----
|
||||||
---- flags optimize=all ;
|
---- To regulate the use of endings for both nouns, adjectives, and verbs:
|
||||||
|
--
|
||||||
|
--oper
|
||||||
|
-- y2ie : Str -> Str -> Str = \fly,s ->
|
||||||
|
-- let y = last (init fly) in
|
||||||
|
-- case y of {
|
||||||
|
-- "a" => fly + s ;
|
||||||
|
-- "e" => fly + s ;
|
||||||
|
-- "o" => fly + s ;
|
||||||
|
-- "u" => fly + s ;
|
||||||
|
-- _ => init fly + "ie" + s
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
----2 Nouns
|
||||||
----
|
----
|
||||||
------2 Phonology
|
---- For conciseness and abstraction, we define a worst-case macro for
|
||||||
------
|
---- noun inflection. It is used for defining special case that
|
||||||
------ To regulate the use of endings for both nouns, adjectives, and verbs:
|
---- only need one string as argument.
|
||||||
|
--
|
||||||
|
--oper
|
||||||
|
-- CommonNoun : Type = {s : Number => Case => Str} ;
|
||||||
|
--
|
||||||
|
-- nounGen : Str -> CommonNoun = \dog -> case last dog of {
|
||||||
|
-- "y" => nounY "dog" ;
|
||||||
|
-- "s" => nounS (init "dog") ;
|
||||||
|
-- _ => nounReg "dog"
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
---- These are auxiliaries to $nounGen$.
|
||||||
|
--
|
||||||
|
-- nounReg : Str -> CommonNoun = \dog ->
|
||||||
|
-- mkNoun dog (dog + "s") (dog + "'s") (dog + "s'");
|
||||||
|
-- nounS : Str -> CommonNoun = \kiss ->
|
||||||
|
-- mkNoun kiss (kiss + "es") (kiss + "'s") (kiss + "es'") ;
|
||||||
|
-- nounY : Str -> CommonNoun = \fl ->
|
||||||
|
-- mkNoun (fl + "y") (fl + "ies") (fl + "y's") (fl + "ies'") ;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
----3 Proper names
|
||||||
----
|
----
|
||||||
----oper
|
---- Regular proper names are inflected with "'s" in the genitive.
|
||||||
---- y2ie : Str -> Str -> Str = \fly,s ->
|
--
|
||||||
---- let y = last (init fly) in
|
-- nameReg : Str -> Gender -> {s : Case => Str} = \john,g ->
|
||||||
---- case y of {
|
-- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ;
|
||||||
---- "a" => fly + s ;
|
--
|
||||||
---- "e" => fly + s ;
|
----2 Determiners
|
||||||
---- "o" => fly + s ;
|
--
|
||||||
---- "u" => fly + s ;
|
-- mkDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s ->
|
||||||
---- _ => init fly + "ie" + s
|
-- {s = s ; n = n} ;
|
||||||
---- } ;
|
--
|
||||||
|
----2 Pronouns
|
||||||
----
|
----
|
||||||
|
---- Here we define personal pronouns.
|
||||||
----
|
----
|
||||||
------2 Nouns
|
---- We record the form "mine" and the gender for later use.
|
||||||
------
|
--
|
||||||
------ For conciseness and abstraction, we define a worst-case macro for
|
-- Pronoun : Type =
|
||||||
------ noun inflection. It is used for defining special case that
|
-- {s : Case => Str ; a : Agr} ;
|
||||||
------ only need one string as argument.
|
--
|
||||||
|
-- mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun =
|
||||||
|
-- \I,me,my,mine,n,p,g ->
|
||||||
|
-- {s = table {Nom => I ; Acc => me ; Gen => my} ;
|
||||||
|
-- a = toAgr n p g
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
-- human : Gender = Masc ; --- doesn't matter
|
||||||
|
--
|
||||||
|
-- pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ;
|
||||||
|
-- pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK
|
||||||
|
-- pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ;
|
||||||
|
-- pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ;
|
||||||
|
-- pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ;
|
||||||
|
--
|
||||||
|
-- pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ;
|
||||||
|
-- pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ;
|
||||||
|
-- pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; ---
|
||||||
|
--
|
||||||
|
--
|
||||||
|
----2 Adjectives
|
||||||
----
|
----
|
||||||
----oper
|
---- To form the adjectival and the adverbial forms, two strings are needed
|
||||||
---- CommonNoun : Type = {s : Number => Case => Str} ;
|
---- in the worst case. (First without degrees.)
|
||||||
|
--
|
||||||
|
-- Adjective = {s : AForm => Str} ;
|
||||||
|
--
|
||||||
|
---- However, most adjectives can be inflected using the final character.
|
||||||
|
---- N.B. this is not correct for "shy", but $mkAdjective$ has to be used.
|
||||||
|
--
|
||||||
|
-- regAdjective : Str -> Adjective = \free ->
|
||||||
|
-- let
|
||||||
|
-- e = last free ;
|
||||||
|
-- fre = init free ;
|
||||||
|
-- freely = case e of {
|
||||||
|
-- "y" => fre + "ily" ;
|
||||||
|
-- _ => free + "ly"
|
||||||
|
-- } ;
|
||||||
|
-- fre = case e of {
|
||||||
|
-- "e" => fre ;
|
||||||
|
-- "y" => fre + "i" ;
|
||||||
|
-- _ => free
|
||||||
|
-- }
|
||||||
|
-- in
|
||||||
|
-- mkAdjective free (fre + "er") (fre + "est") freely ;
|
||||||
|
--
|
||||||
|
---- Many adjectives are 'inflected' by adding a comparison word.
|
||||||
|
--
|
||||||
|
-- adjDegrLong : Str -> Adjective = \ridiculous ->
|
||||||
|
-- mkAdjective
|
||||||
|
-- ridiculous
|
||||||
|
-- ("more" ++ ridiculous)
|
||||||
|
-- ("most" ++ ridiculous)
|
||||||
|
-- ((regAdjective ridiculous).s ! AAdv) ;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
----3 Verbs
|
||||||
----
|
----
|
||||||
---- nounGen : Str -> CommonNoun = \dog -> case last dog of {
|
---- The worst case needs five forms. (The verb "be" is treated separately.)
|
||||||
---- "y" => nounY "dog" ;
|
--
|
||||||
---- "s" => nounS (init "dog") ;
|
-- mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone ->
|
||||||
---- _ => nounReg "dog"
|
-- let going = case last go of {
|
||||||
---- } ;
|
-- "e" => init go + "ing" ;
|
||||||
----
|
-- _ => go + "ing"
|
||||||
------ These are auxiliaries to $nounGen$.
|
-- }
|
||||||
----
|
-- in
|
||||||
---- nounReg : Str -> CommonNoun = \dog ->
|
-- mkVerb go goes went gone going ;
|
||||||
---- mkNoun dog (dog + "s") (dog + "'s") (dog + "s'");
|
--
|
||||||
---- nounS : Str -> CommonNoun = \kiss ->
|
---- This is what we use to derive the irregular forms in almost all cases
|
||||||
---- mkNoun kiss (kiss + "es") (kiss + "'s") (kiss + "es'") ;
|
--
|
||||||
---- nounY : Str -> CommonNoun = \fl ->
|
-- mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten ->
|
||||||
---- mkNoun (fl + "y") (fl + "ies") (fl + "y's") (fl + "ies'") ;
|
-- let bites = case last bite of {
|
||||||
----
|
-- "y" => y2ie bite "s" ;
|
||||||
----
|
-- "s" => init bite + "es" ;
|
||||||
------3 Proper names
|
-- _ => bite + "s"
|
||||||
------
|
-- }
|
||||||
------ Regular proper names are inflected with "'s" in the genitive.
|
-- in mkVerb4 bite bites bit bitten ;
|
||||||
----
|
--
|
||||||
---- nameReg : Str -> Gender -> {s : Case => Str} = \john,g ->
|
---- This is used to derive regular forms.
|
||||||
---- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ;
|
--
|
||||||
----
|
-- mkVerbReg : Str -> Verb = \soak ->
|
||||||
------2 Determiners
|
-- let
|
||||||
----
|
-- soaks = case last soak of {
|
||||||
---- mkDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s ->
|
-- "y" => y2ie soak "s" ;
|
||||||
---- {s = s ; n = n} ;
|
-- "s" => init soak + "es" ;
|
||||||
----
|
-- _ => soak + "s"
|
||||||
------2 Pronouns
|
-- } ;
|
||||||
------
|
-- soaked = case last soak of {
|
||||||
------ Here we define personal pronouns.
|
-- "e" => init soak + "s" ;
|
||||||
------
|
-- _ => soak + "ed"
|
||||||
------ We record the form "mine" and the gender for later use.
|
-- }
|
||||||
----
|
-- in
|
||||||
---- Pronoun : Type =
|
-- mkVerb4 soak soaks soaked soaked ;
|
||||||
---- {s : Case => Str ; a : Agr} ;
|
--
|
||||||
----
|
-- verbGen : Str -> Verb = \kill -> case last kill of {
|
||||||
---- mkPronoun : (_,_,_,_ : Str) -> Number -> Person -> Gender -> Pronoun =
|
-- "y" => verbP3y (init kill) ;
|
||||||
---- \I,me,my,mine,n,p,g ->
|
-- "e" => verbP3e (init kill) ;
|
||||||
---- {s = table {Nom => I ; Acc => me ; Gen => my} ;
|
-- "s" => verbP3s (init kill) ;
|
||||||
---- a = toAgr n p g
|
-- _ => regVerbP3 kill
|
||||||
---- } ;
|
-- } ;
|
||||||
----
|
--
|
||||||
---- human : Gender = Masc ; --- doesn't matter
|
---- These are just auxiliary to $verbGen$.
|
||||||
----
|
--
|
||||||
---- pronI = mkPronoun "I" "me" "my" "mine" Sg P1 human ;
|
-- regVerbP3 : Str -> Verb = \walk ->
|
||||||
---- pronYouSg = mkPronoun "you" "you" "your" "yours" Sg P2 human ; -- verb agr OK
|
-- mkVerbIrreg walk (walk + "ed") (walk + "ed") ;
|
||||||
---- pronHe = mkPronoun "he" "him" "his" "his" Sg P3 Masc ;
|
-- verbP3s : Str -> Verb = \kiss ->
|
||||||
---- pronShe = mkPronoun "she" "her" "her" "hers" Sg P3 Fem ;
|
-- mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ;
|
||||||
---- pronIt = mkPronoun "it" "it" "its" "it" Sg P3 Neutr ;
|
-- verbP3e : Str -> Verb = \love ->
|
||||||
----
|
-- mkVerb4 love (love + "s") (love + "d") (love + "d") ;
|
||||||
---- pronWe = mkPronoun "we" "us" "our" "ours" Pl P1 human ;
|
-- verbP3y : Str -> Verb = \cr ->
|
||||||
---- pronYouPl = mkPronoun "you" "you" "your" "yours" Pl P2 human ;
|
-- mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ;
|
||||||
---- pronThey = mkPronoun "they" "them" "their" "theirs" Pl P3 human ; ---
|
--
|
||||||
----
|
----- The particle always appears right after the verb.
|
||||||
----
|
--
|
||||||
------2 Adjectives
|
-- verbPart : Verb -> Str -> Verb = \v,p ->
|
||||||
------
|
-- {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ;
|
||||||
------ To form the adjectival and the adverbial forms, two strings are needed
|
--
|
||||||
------ in the worst case. (First without degrees.)
|
-- verbNoPart : Verb -> Verb = \v -> verbPart v [] ;
|
||||||
----
|
--
|
||||||
---- Adjective = {s : AForm => Str} ;
|
--
|
||||||
----
|
}
|
||||||
------ However, most adjectives can be inflected using the final character.
|
|
||||||
------ N.B. this is not correct for "shy", but $mkAdjective$ has to be used.
|
|
||||||
----
|
|
||||||
---- regAdjective : Str -> Adjective = \free ->
|
|
||||||
---- let
|
|
||||||
---- e = last free ;
|
|
||||||
---- fre = init free ;
|
|
||||||
---- freely = case e of {
|
|
||||||
---- "y" => fre + "ily" ;
|
|
||||||
---- _ => free + "ly"
|
|
||||||
---- } ;
|
|
||||||
---- fre = case e of {
|
|
||||||
---- "e" => fre ;
|
|
||||||
---- "y" => fre + "i" ;
|
|
||||||
---- _ => free
|
|
||||||
---- }
|
|
||||||
---- in
|
|
||||||
---- mkAdjective free (fre + "er") (fre + "est") freely ;
|
|
||||||
----
|
|
||||||
------ Many adjectives are 'inflected' by adding a comparison word.
|
|
||||||
----
|
|
||||||
---- adjDegrLong : Str -> Adjective = \ridiculous ->
|
|
||||||
---- mkAdjective
|
|
||||||
---- ridiculous
|
|
||||||
---- ("more" ++ ridiculous)
|
|
||||||
---- ("most" ++ ridiculous)
|
|
||||||
---- ((regAdjective ridiculous).s ! AAdv) ;
|
|
||||||
----
|
|
||||||
----
|
|
||||||
------3 Verbs
|
|
||||||
------
|
|
||||||
------ The worst case needs five forms. (The verb "be" is treated separately.)
|
|
||||||
----
|
|
||||||
---- mkVerb4 : (_,_,_,_: Str) -> Verb = \go,goes,went,gone ->
|
|
||||||
---- let going = case last go of {
|
|
||||||
---- "e" => init go + "ing" ;
|
|
||||||
---- _ => go + "ing"
|
|
||||||
---- }
|
|
||||||
---- in
|
|
||||||
---- mkVerb go goes went gone going ;
|
|
||||||
----
|
|
||||||
------ This is what we use to derive the irregular forms in almost all cases
|
|
||||||
----
|
|
||||||
---- mkVerbIrreg : (_,_,_ : Str) -> Verb = \bite,bit,bitten ->
|
|
||||||
---- let bites = case last bite of {
|
|
||||||
---- "y" => y2ie bite "s" ;
|
|
||||||
---- "s" => init bite + "es" ;
|
|
||||||
---- _ => bite + "s"
|
|
||||||
---- }
|
|
||||||
---- in mkVerb4 bite bites bit bitten ;
|
|
||||||
----
|
|
||||||
------ This is used to derive regular forms.
|
|
||||||
----
|
|
||||||
---- mkVerbReg : Str -> Verb = \soak ->
|
|
||||||
---- let
|
|
||||||
---- soaks = case last soak of {
|
|
||||||
---- "y" => y2ie soak "s" ;
|
|
||||||
---- "s" => init soak + "es" ;
|
|
||||||
---- _ => soak + "s"
|
|
||||||
---- } ;
|
|
||||||
---- soaked = case last soak of {
|
|
||||||
---- "e" => init soak + "s" ;
|
|
||||||
---- _ => soak + "ed"
|
|
||||||
---- }
|
|
||||||
---- in
|
|
||||||
---- mkVerb4 soak soaks soaked soaked ;
|
|
||||||
----
|
|
||||||
---- verbGen : Str -> Verb = \kill -> case last kill of {
|
|
||||||
---- "y" => verbP3y (init kill) ;
|
|
||||||
---- "e" => verbP3e (init kill) ;
|
|
||||||
---- "s" => verbP3s (init kill) ;
|
|
||||||
---- _ => regVerbP3 kill
|
|
||||||
---- } ;
|
|
||||||
----
|
|
||||||
------ These are just auxiliary to $verbGen$.
|
|
||||||
----
|
|
||||||
---- regVerbP3 : Str -> Verb = \walk ->
|
|
||||||
---- mkVerbIrreg walk (walk + "ed") (walk + "ed") ;
|
|
||||||
---- verbP3s : Str -> Verb = \kiss ->
|
|
||||||
---- mkVerb4 kiss (kiss + "es") (kiss + "ed") (kiss + "ed") ;
|
|
||||||
---- verbP3e : Str -> Verb = \love ->
|
|
||||||
---- mkVerb4 love (love + "s") (love + "d") (love + "d") ;
|
|
||||||
---- verbP3y : Str -> Verb = \cr ->
|
|
||||||
---- mkVerb4 (cr + "y") (cr + "ies") (cr + "ied") (cr + "ied") ;
|
|
||||||
----
|
|
||||||
------- The particle always appears right after the verb.
|
|
||||||
----
|
|
||||||
---- verbPart : Verb -> Str -> Verb = \v,p ->
|
|
||||||
---- {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ;
|
|
||||||
----
|
|
||||||
---- verbNoPart : Verb -> Verb = \v -> verbPart v [] ;
|
|
||||||
----
|
|
||||||
----
|
|
||||||
--}
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete NamesTel of Names = CatTel ** open ResTel in {
|
||||||
|
lin
|
||||||
|
GivenName name = {
|
||||||
|
s = \\c => name.s ;
|
||||||
|
a = agrP3 Masc Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MaleSurname name = {
|
||||||
|
s = \\c => name.s ;
|
||||||
|
a = agrP3 Masc Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
FemaleSurname name = {
|
||||||
|
s = \\c => name.s ;
|
||||||
|
a = agrP3 Fem Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
FullName gn sn = {
|
||||||
|
s = \\c => gn.s ++ sn.s ;
|
||||||
|
a = agrP3 Masc Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseLN name = {
|
||||||
|
s = \\c => name.s ;
|
||||||
|
a = agrP3 Neutr Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InLN name = {s = name.s ++ "లో"} ;
|
||||||
|
}
|
||||||
+130
-100
@@ -3,119 +3,149 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in {
|
|||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- DetCN det cn = {
|
DetCN det cn = {
|
||||||
-- s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ;
|
s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ;
|
||||||
-- a = agrP3 cn.g 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 => 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 ! VStem ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
--
|
||||||
|
-- RelNP np rs = {
|
||||||
|
-- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||||
|
-- a = np.a
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
--
|
||||||
-- UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ;
|
AdvNP np adv = {
|
||||||
-- UsePron p = {s = \\c => p.s ! np2pronCase c ; a = p.a} ;
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
----
|
a = np.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 = {
|
DetQuantOrd quant num ord = {
|
||||||
-- s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ;
|
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ++ ord.s ;
|
||||||
-- n = num.n
|
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
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
--
|
||||||
---- DetNP det = {
|
PossPron p = {s = \\_,_,_ => p.s ! PPoss} ;
|
||||||
---- s = \\c => det.s ; ---- case
|
|
||||||
---- a = agrP3 det.n
|
NumSg = {s = []; n = Sg} ;
|
||||||
---- } ;
|
NumPl = {s = []; n = Pl} ;
|
||||||
----
|
|
||||||
-- PossPron p = {s = \\_,_,_ => p.s ! PPoss} ;
|
OrdSuperl a = {s = "అత్యంత" ++ a.s ! Masc ! Sg ! Dir} ;
|
||||||
|
|
||||||
|
NumCard n = {s = n.s ; n = Pl} ;
|
||||||
|
NumDecimal n = {s = n.s ; n = n.n} ;
|
||||||
|
AdNum adn card = {s = adn.s ++ card.s ; n = card.n} ;
|
||||||
|
OrdNumeral numeral = {s = numeral.s} ;
|
||||||
--
|
--
|
||||||
-- NumSg = {s = []; n = Sg} ;
|
-- NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||||
-- NumPl = {s = []; n = Pl} ;
|
-- OrdDigits n = {s = n.s ! NOrd} ;
|
||||||
--
|
--
|
||||||
---- NumCard n = n ** {hasCard = True} ;
|
NumNumeral numeral = {s = numeral.s ; n = Pl} ;
|
||||||
----
|
-- OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
||||||
---- 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 = \\_,_,_ => []} ;
|
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
||||||
-- IndefArt = {s = \\_,_,_ => []} ;
|
|
||||||
--
|
--
|
||||||
---- MassNP cn = {
|
-- OrdSuperl a = {s = a.s ! AAdj Superl} ;
|
||||||
---- s = cn.s ! Sg ;
|
|
||||||
---- a = agrP3 Sg
|
|
||||||
---- } ;
|
|
||||||
--
|
--
|
||||||
|
DetArtOrd art num ord = {
|
||||||
|
s = art.s ++ num.s ++ ord.s ;
|
||||||
|
n = num.n
|
||||||
|
} ;
|
||||||
|
--
|
||||||
|
DetArtCard art card = {s = art.s ++ card.s ; n = card.n} ;
|
||||||
|
|
||||||
|
DetDAP det = {s = det.s ; n = det.n} ;
|
||||||
|
AdjDAP dap ap = {
|
||||||
|
s = \\g,c => ap.s ! g ! dap.n ! c ++ dap.s ! g ! c ;
|
||||||
|
n = dap.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DefArt = {s = \\_,_,_ => []} ;
|
||||||
|
IndefArt = {s = \\_,_,_ => []} ;
|
||||||
|
|
||||||
|
MassNP cn = {s = \\c => cn.s ! Sg ! npcase2case c ; a = agrP3 cn.g Sg} ;
|
||||||
|
|
||||||
UseN n = n ;
|
UseN n = n ;
|
||||||
---- UseN2 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 = {
|
-- Use2N3 f = {
|
||||||
-- s = \\n,c => ap.s ! cn.g ! n ! c ++ cn.s ! n ! c ;
|
-- 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 ! c ++ f.c2 ++ x.s ! NPC 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 => rs.s ++ 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
|
-- 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} ;
|
||||||
|
|
||||||
|
PossNP cn np = {
|
||||||
|
s = \\n,c => np.s ! NPC Obl ++ cn.s ! n ! c ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PartNP cn np = {
|
||||||
|
s = \\n,c => np.s ! NPC Obl ++ cn.s ! n ! c ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ApposCN cn np = {
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ np.s ! NPC Dir ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelNP np rs = {
|
||||||
|
s = \\c => rs.s ++ np.s ! c ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
--
|
||||||
|
-- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! 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} ;
|
|
||||||
----
|
|
||||||
}
|
}
|
||||||
|
|||||||
+141
-89
@@ -1,89 +1,141 @@
|
|||||||
--concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in {
|
concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in {
|
||||||
----
|
lincat
|
||||||
----lincat
|
Digit, Sub10, Sub100, Sub1000, Sub1000000,
|
||||||
---- Digit = {s : DForm => CardOrd => Str} ;
|
Sub1000000000, Sub1000000000000 = {s : Str ; n : Number} ;
|
||||||
---- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
Dig = {s : Str} ;
|
||||||
---- Sub100 = {s : CardOrd => Str ; n : Number} ;
|
|
||||||
---- Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
lin
|
||||||
---- Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
num x = x ;
|
||||||
----
|
n2 = {s = "రెండు" ; n = Pl} ;
|
||||||
----lin num x = x ;
|
n3 = {s = "మూడు" ; n = Pl} ;
|
||||||
----lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in
|
n4 = {s = "నాలుగు" ; n = Pl} ;
|
||||||
---- {s = \\f,c => case <f,c> of {
|
n5 = {s = "ఐదు" ; n = Pl} ;
|
||||||
---- <teen,NOrd> => "twelfth" ;
|
n6 = {s = "ఆరు" ; n = Pl} ;
|
||||||
---- _ => two.s ! f ! c
|
n7 = {s = "ఏడు" ; n = Pl} ;
|
||||||
---- }
|
n8 = {s = "ఎనిమిది" ; n = Pl} ;
|
||||||
---- } ;
|
n9 = {s = "తొమ్మిది" ; n = Pl} ;
|
||||||
----
|
|
||||||
----lin n3 = mkNum "three" "thirteen" "thirty" "third" ;
|
pot01 = {s = "ఒకటి" ; n = Sg} ;
|
||||||
----lin n4 = mkNum "four" "fourteen" "forty" "fourth" ;
|
pot0 d = d ;
|
||||||
----lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ;
|
pot0as1 x = x ;
|
||||||
----lin n6 = regNum "six" ;
|
pot110 = {s = "పది" ; n = Pl} ;
|
||||||
----lin n7 = regNum "seven" ;
|
pot111 = {s = "పదకొండు" ; n = Pl} ;
|
||||||
----lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ;
|
pot1to19 d = {s = "పది" ++ d.s ; n = Pl} ;
|
||||||
----lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ;
|
pot1 d = {s = d.s ++ "పది" ; n = Pl} ;
|
||||||
----
|
pot1plus d x = {s = d.s ++ "పది" ++ x.s ; n = Pl} ;
|
||||||
----lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ;
|
pot1as2 x = x ;
|
||||||
----lin pot0 d = d ** {n = Pl} ;
|
pot21 = {s = "వంద" ; n = Pl} ;
|
||||||
----lin pot110 = regCardOrd "ten" ** {n = Pl} ;
|
pot2 x = {s = x.s ++ "వందలు" ; n = Pl} ;
|
||||||
----lin pot111 = regCardOrd "eleven" ** {n = Pl} ;
|
pot2plus x y = {s = x.s ++ "వందలు" ++ y.s ; n = Pl} ;
|
||||||
----lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
pot2as3 x = x ;
|
||||||
----lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
|
pot31 = {s = "వెయ్యి" ; n = Pl} ;
|
||||||
----lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
pot3 x = {s = x.s ++ "వేలు" ; n = Pl} ;
|
||||||
----lin pot1plus d e = {
|
pot3plus x y = {s = x.s ++ "వేలు" ++ y.s ; n = Pl} ;
|
||||||
---- s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ;
|
pot3as4 x = x ;
|
||||||
----lin pot1as2 n = n ;
|
pot3decimal x = {s = x.s ++ "వేలు" ; n = Pl} ;
|
||||||
----lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ;
|
pot41 = {s = "పది లక్షలు" ; n = Pl} ;
|
||||||
----lin pot2plus d e = {
|
pot4 x = {s = x.s ++ "పది లక్షలు" ; n = Pl} ;
|
||||||
---- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ;
|
pot4plus x y = {s = x.s ++ "పది లక్షలు" ++ y.s ; n = Pl} ;
|
||||||
----lin pot2as3 n = n ;
|
pot4as5 x = x ;
|
||||||
----lin pot3 n = {
|
pot4decimal x = {s = x.s ++ "పది లక్షలు" ; n = Pl} ;
|
||||||
---- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ;
|
pot51 = {s = "వంద కోట్లు" ; n = Pl} ;
|
||||||
----lin pot3plus n m = {
|
pot5 x = {s = x.s ++ "వంద కోట్లు" ; n = Pl} ;
|
||||||
---- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ;
|
pot5plus x y = {s = x.s ++ "వంద కోట్లు" ++ y.s ; n = Pl} ;
|
||||||
----
|
pot5decimal x = {s = x.s ++ "వంద కోట్లు" ; n = Pl} ;
|
||||||
------ numerals as sequences of digits
|
|
||||||
----
|
IDig d = {s = d.s ; n = Pl} ;
|
||||||
---- lincat
|
IIDig d ds = {s = d.s ++ ds.s ; n = Pl} ;
|
||||||
---- Dig = TDigit ;
|
D_0 = {s = "0"} ; D_1 = {s = "1"} ; D_2 = {s = "2"} ;
|
||||||
----
|
D_3 = {s = "3"} ; D_4 = {s = "4"} ; D_5 = {s = "5"} ;
|
||||||
---- lin
|
D_6 = {s = "6"} ; D_7 = {s = "7"} ; D_8 = {s = "8"} ; D_9 = {s = "9"} ;
|
||||||
---- IDig d = d ** {tail = T1} ;
|
PosDecimal ds = ds ;
|
||||||
----
|
NegDecimal ds = {s = "-" ++ ds.s ; n = ds.n} ;
|
||||||
---- IIDig d i = {
|
IFrac dec d = {s = dec.s ++ "." ++ d.s ; n = dec.n} ;
|
||||||
---- s = \\o => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ;
|
--
|
||||||
---- n = Pl ;
|
--lincat
|
||||||
---- tail = inc i.tail
|
-- Digit = {s : DForm => CardOrd => Str} ;
|
||||||
---- } ;
|
-- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||||
----
|
-- Sub100 = {s : CardOrd => Str ; n : Number} ;
|
||||||
---- D_0 = mkDig "0" ;
|
-- Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
---- D_1 = mk3Dig "1" "1st" Sg ;
|
-- Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
---- D_2 = mk2Dig "2" "2nd" ;
|
--
|
||||||
---- D_3 = mk2Dig "3" "3rd" ;
|
--lin num x = x ;
|
||||||
---- D_4 = mkDig "4" ;
|
--lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in
|
||||||
---- D_5 = mkDig "5" ;
|
-- {s = \\f,c => case <f,c> of {
|
||||||
---- D_6 = mkDig "6" ;
|
-- <teen,NOrd> => "twelfth" ;
|
||||||
---- D_7 = mkDig "7" ;
|
-- _ => two.s ! f ! c
|
||||||
---- D_8 = mkDig "8" ;
|
-- }
|
||||||
---- D_9 = mkDig "9" ;
|
-- } ;
|
||||||
----
|
--
|
||||||
---- oper
|
--lin n3 = mkNum "three" "thirteen" "thirty" "third" ;
|
||||||
---- commaIf : DTail -> Str = \t -> case t of {
|
--lin n4 = mkNum "four" "fourteen" "forty" "fourth" ;
|
||||||
---- T3 => BIND++","++BIND ;
|
--lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ;
|
||||||
---- _ => BIND
|
--lin n6 = regNum "six" ;
|
||||||
---- } ;
|
--lin n7 = regNum "seven" ;
|
||||||
----
|
--lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ;
|
||||||
---- mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
--lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ;
|
||||||
---- mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ;
|
--
|
||||||
----
|
--lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ;
|
||||||
---- mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
--lin pot0 d = d ** {n = Pl} ;
|
||||||
---- s = table {NCard => c ; NOrd => o} ;
|
--lin pot110 = regCardOrd "ten" ** {n = Pl} ;
|
||||||
---- n = n
|
--lin pot111 = regCardOrd "eleven" ** {n = Pl} ;
|
||||||
---- } ;
|
--lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
||||||
----
|
--lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
|
||||||
---- TDigit = {
|
--lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
||||||
---- n : Number ;
|
--lin pot1plus d e = {
|
||||||
---- s : CardOrd => Str
|
-- s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ;
|
||||||
---- } ;
|
--lin pot1as2 n = n ;
|
||||||
----
|
--lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ;
|
||||||
--}
|
--lin pot2plus d e = {
|
||||||
|
-- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ;
|
||||||
|
--lin pot2as3 n = n ;
|
||||||
|
--lin pot3 n = {
|
||||||
|
-- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ;
|
||||||
|
--lin pot3plus n m = {
|
||||||
|
-- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ;
|
||||||
|
--
|
||||||
|
---- numerals as sequences of digits
|
||||||
|
--
|
||||||
|
-- lincat
|
||||||
|
-- Dig = TDigit ;
|
||||||
|
--
|
||||||
|
-- lin
|
||||||
|
-- IDig d = d ** {tail = T1} ;
|
||||||
|
--
|
||||||
|
-- IIDig d i = {
|
||||||
|
-- s = \\o => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ;
|
||||||
|
-- n = Pl ;
|
||||||
|
-- tail = inc i.tail
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
-- D_0 = mkDig "0" ;
|
||||||
|
-- D_1 = mk3Dig "1" "1st" Sg ;
|
||||||
|
-- D_2 = mk2Dig "2" "2nd" ;
|
||||||
|
-- D_3 = mk2Dig "3" "3rd" ;
|
||||||
|
-- D_4 = mkDig "4" ;
|
||||||
|
-- D_5 = mkDig "5" ;
|
||||||
|
-- D_6 = mkDig "6" ;
|
||||||
|
-- D_7 = mkDig "7" ;
|
||||||
|
-- D_8 = mkDig "8" ;
|
||||||
|
-- D_9 = mkDig "9" ;
|
||||||
|
--
|
||||||
|
-- oper
|
||||||
|
-- commaIf : DTail -> Str = \t -> case t of {
|
||||||
|
-- T3 => BIND++","++BIND ;
|
||||||
|
-- _ => BIND
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
-- mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
||||||
|
-- mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ;
|
||||||
|
--
|
||||||
|
-- mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||||
|
-- s = table {NCard => c ; NOrd => o} ;
|
||||||
|
-- n = n
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
-- TDigit = {
|
||||||
|
-- n : Number ;
|
||||||
|
-- s : CardOrd => Str
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
}
|
||||||
|
|||||||
+160
-535
@@ -1,556 +1,181 @@
|
|||||||
--# -path=.:../abstract:../../prelude:../common
|
--# -path=.:../abstract:../../prelude:../common
|
||||||
|
|
||||||
--1 Teldi Lexical Paradigms
|
--1 Telugu Lexical Paradigms
|
||||||
|
|
||||||
resource ParadigmsTel = open
|
resource ParadigmsTel = open
|
||||||
(Predef=Predef),
|
(Predef=Predef),
|
||||||
Prelude,
|
Prelude,
|
||||||
ResTel,
|
ResTel,
|
||||||
CatTel
|
CatTel
|
||||||
in {
|
in {
|
||||||
--
|
|
||||||
----2 Parameters
|
--2 Parameters
|
||||||
--
|
|
||||||
oper
|
oper
|
||||||
-- masculine : Gender ;
|
masculine : Gender = Masc ;
|
||||||
-- feminine : Gender ;
|
feminine : Gender = Fem ;
|
||||||
--
|
|
||||||
-- masculine = Masc ; feminine = Fem ; --i
|
|
||||||
--
|
--2 Nouns
|
||||||
--
|
|
||||||
----2 Nouns
|
|
||||||
--
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : Str -> N
|
mkN : Str -> N
|
||||||
= \s -> wallNoun s ** {lock_N = <>} ;
|
= \s -> wallNoun s ** {lock_N = <>} ;
|
||||||
-- mkN : Str -> Gender -> N
|
mkN : Str -> Gender -> N
|
||||||
-- = \s,g -> reggNoun s g ** {lock_N = <>} ;
|
= \s,g -> reggNoun s g ** {lock_N = <>} ;
|
||||||
mkN : (x1,_,_,x4 : Str) -> Gender -> N
|
mkN : Str -> Str -> N
|
||||||
|
= \s,p -> mkNoun s s p p Neutr ** {lock_N = <>} ;
|
||||||
|
mkN : Gender -> N -> N
|
||||||
|
= \g,n -> n ** {g = g} ;
|
||||||
|
mkN : (x1,_,_,x4 : Str) -> Gender -> N
|
||||||
= \sd,so,pd,po,g -> mkNoun sd so pd po g ** {lock_N = <>} ;
|
= \sd,so,pd,po,g -> mkNoun sd so pd po g ** {lock_N = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
----3 Proper names and noun phrases
|
||||||
|
----
|
||||||
|
---- Proper names, with a regular genitive, are formed from strings.
|
||||||
--
|
--
|
||||||
-- mkPN = overload {
|
|
||||||
-- mkPN : Str -> PN = \s -> let n = regNoun s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
mkPN = overload {
|
||||||
-- mkPN : N -> Gender -> PN = \n,g -> {s = n.s ! Sg ; g = g ; lock_PN = <>} ;
|
mkPN : Str -> PN = \s -> let n = regNoun s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||||
-- } ;
|
mkPN : N -> PN = \n -> {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||||
--
|
mkPN : N -> Gender -> PN = \n,g -> {s = n.s ! Sg ; g = g ; lock_PN = <>} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkLN : Str -> LN = \s -> lin LN {s = s} ;
|
||||||
|
mkGN : Str -> GN = \s -> lin GN {s = s} ;
|
||||||
|
mkSN : Str -> SN = \s -> lin SN {s = s} ;
|
||||||
|
|
||||||
----2 Adjectives
|
----2 Adjectives
|
||||||
--
|
--
|
||||||
-- mkA = overload {
|
mkA = overload {
|
||||||
-- mkA : Str -> A
|
---- For regular adjectives
|
||||||
-- = \s -> regAdjective s ** {lock_A = <>} ;
|
mkA : Str -> A
|
||||||
-- mkA : (x1,_,x3 : Str) -> A
|
= \s -> regAdjective s ** {lock_A = <>} ;
|
||||||
-- = \msd,m,f -> mkAdjective msd m f ** {lock_A = <>} ;
|
mkA : (x1,_,x3 : Str) -> A
|
||||||
-- } ;
|
= \msd,m,f -> mkAdjective msd m f ** {lock_A = <>} ;
|
||||||
--
|
} ;
|
||||||
|
|
||||||
----2 Verbs
|
----2 Verbs
|
||||||
|
----
|
||||||
--
|
--
|
||||||
-- mkV = overload {
|
---- Verbs are constructed by the function $mkV$, which takes a varying
|
||||||
-- mkV : Str -> V
|
---- number of arguments.
|
||||||
-- = \s -> regVerb s ** {lock_V = <>} ;
|
|
||||||
-- mkV : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> V
|
|
||||||
-- = \inf,stem,ims,imp,ifs,ifp,pms,pmp,pfs,pfp,ss1,ss2,sp2,sp3,r ->
|
|
||||||
-- mkVerb inf stem ims imp ifs ifp pms pmp pfs pfp ss1 ss2 sp2 sp3 r **
|
|
||||||
-- {lock_V = <>} ;
|
|
||||||
-- } ;
|
|
||||||
--
|
--
|
||||||
|
|
||||||
|
mkV = overload {
|
||||||
|
mkV : Str -> V
|
||||||
|
= \s -> regVerb s ** {lock_V = <>} ;
|
||||||
|
mkV : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> V
|
||||||
|
= \inf,stem,ims,imp,ifs,ifp,pms,pmp,pfs,pfp,ss1,ss2,sp2,sp3,r ->
|
||||||
|
mkVerb inf stem ims imp ifs ifp pms pmp pfs pfp ss1 ss2 sp2 sp3 r **
|
||||||
|
{lock_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 : Str -> V2
|
mkV2 = overload {
|
||||||
-- = \s -> regVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
mkV2 : Str -> V2
|
||||||
-- mkV2 : V -> V2
|
= \s -> regVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
-- = \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
mkV2 : V -> V2
|
||||||
-- mkV2 : V -> Str -> V2
|
= \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
-- = \v,p -> v ** {c2 = {s = p ; c = VTransPost} ; lock_V2 = <>} ;
|
mkV2 : V -> Str -> V2
|
||||||
-- } ;
|
= \v,p -> v ** {c2 = {s = p ; c = VTransPost} ; lock_V2 = <>} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
----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 = \v,p,q -> v ** {
|
||||||
|
c2 = {s = p.s ; c = VTransPost} ;
|
||||||
|
c3 = {s = q.s ; c = VTransPost} ;
|
||||||
|
lock_V3 = <>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
----3 Other complement patterns
|
||||||
|
----
|
||||||
|
---- Verbs and adjectives can take complements such as sentences,
|
||||||
|
---- questions, verb phrases, and adjectives.
|
||||||
--
|
--
|
||||||
------3 Compound nouns
|
mkVS : V -> VS = \v -> v ** {lock_VS = <>} ;
|
||||||
------
|
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False}) ;
|
||||||
------ A compound noun is an uninflected string attached to an inflected noun,
|
mkVQ : V -> VQ = \v -> v ** {lock_VQ = <>} ;
|
||||||
------ such as "baby boom", "chief executive officer".
|
mkVA : V -> VA = \v -> v ** {lock_VA = <>} ;
|
||||||
----
|
mkV0 : V -> V = \v -> v ;
|
||||||
---- mkN : Str -> N -> N
|
mkV2S : V -> Prep -> V2S = \v,p -> v ** {
|
||||||
---- } ;
|
c2 = {s = p.s ; c = VTransPost} ; lock_V2S = <>
|
||||||
----
|
} ;
|
||||||
----
|
mkV2Q : V -> Prep -> V2Q = \v,p -> v ** {
|
||||||
------3 Relational nouns
|
c2 = {s = p.s ; c = VTransPost} ; lock_V2Q = <>
|
||||||
------
|
} ;
|
||||||
------ Relational nouns ("daughter of x") need a preposition.
|
mkV2A : V -> Prep -> V2A = \v,p -> v ** {
|
||||||
----
|
c2 = {s = p.s ; c = VTransPost} ; lock_V2A = <>
|
||||||
---- mkN2 : N -> Prep -> N2 ;
|
} ;
|
||||||
----
|
mkV2V : V -> Prep -> Prep -> V2V = \v,p,_ -> v ** {
|
||||||
------ The most common preposition is "of", and the following is a
|
c2 = {s = p.s ; c = VTransPost} ; lock_V2V = <>
|
||||||
------ shortcut for regular relational nouns with "of".
|
} ;
|
||||||
----
|
|
||||||
---- regN2 : Str -> N2 ;
|
----2 Prepositions
|
||||||
----
|
----
|
||||||
------ Use the function $mkPrep$ or see the section on prepositions below to
|
---- A preposition as used for rection in the lexicon, as well as to
|
||||||
------ form other prepositions.
|
---- build $PP$s in the resource API, just requires a string.
|
||||||
------
|
--
|
||||||
------ Three-place relational nouns ("the connection from x to y") need two prepositions.
|
|
||||||
----
|
noPrep : Prep = {s = [] ; lock_Prep = <>} ;
|
||||||
---- mkN3 : N -> Prep -> Prep -> N3 ;
|
mkPrep : Str -> Prep = \s -> {s = s ; lock_Prep = <>} ;
|
||||||
----
|
|
||||||
----
|
dirV2 : V -> V2 = mkV2 ;
|
||||||
----
|
prepV2 : V -> Prep -> V2 = \v,p -> mkV2 v p.s ;
|
||||||
------3 Proper names and noun phrases
|
partV : V -> Str -> V = \v,_ -> v ;
|
||||||
------
|
|
||||||
------ Proper names, with a regular genitive, are formed from strings.
|
----3 Relational nouns
|
||||||
----
|
----
|
||||||
---- mkPN : overload {
|
---- Relational nouns ("daughter of x") need a preposition.
|
||||||
----
|
--
|
||||||
---- mkPN : Str -> PN ;
|
|
||||||
----
|
mkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p.s ; lock_N2 = <>} ;
|
||||||
------ Sometimes a common noun can be reused as a proper name, e.g. "Bank"
|
|
||||||
----
|
---- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||||
---- mkPN : N -> PN
|
--
|
||||||
---- } ;
|
|
||||||
----
|
mkN3 : N -> Prep -> Prep -> N3 = \n,p,q -> n ** {c2 = p.s ; c3 = q.s ; lock_N3 = <>} ;
|
||||||
----
|
|
||||||
------2 Adjectives
|
----3 Two-place adjectives
|
||||||
----
|
----
|
||||||
---- mkA : overload {
|
---- Two-place adjectives need a preposition for their second argument.
|
||||||
----
|
--
|
||||||
------ For regular adjectives, the adverbial and comparison forms are derived. This holds
|
|
||||||
------ even for cases with the variations "happy - happily - happier - happiest",
|
mkA2 : A -> Prep -> A2 = \a,p -> a ** {c2 = p.s ; lock_A2 = <>} ;
|
||||||
------ "free - freely - freer - freest", and "rude - rudest".
|
mkA2V : A -> Prep -> A2 = mkA2 ;
|
||||||
----
|
mkAS : A -> A = \a -> a ;
|
||||||
---- mkA : (happy : Str) -> A ;
|
mkAV : A -> A = \a -> a ;
|
||||||
----
|
|
||||||
------ However, the duplication of the final consonant cannot be predicted,
|
----2 Adverbs
|
||||||
------ but a separate case is used to give the comparative
|
--
|
||||||
----
|
---- Adverbs are not inflected. Most lexical ones have position
|
||||||
---- mkA : (fat,fatter : Str) -> A ;
|
---- after the verb. Some can be preverbal (e.g. "always").
|
||||||
----
|
--
|
||||||
------ As many as four forms may be needed.
|
|
||||||
----
|
mkAdv : Str -> Adv = \s -> {s = s ; lock_Adv = <>} ;
|
||||||
---- mkA : (good,better,best,well : Str) -> A
|
mkAdV : Str -> AdV = \s -> lin AdV {s = s} ;
|
||||||
---- } ;
|
|
||||||
----
|
---- Adverbs modifying adjectives and sentences can also be formed.
|
||||||
------ To force comparison to be formed by "more - most",
|
--
|
||||||
------ the following function is used:
|
-- mkAdA : Str -> AdA ;
|
||||||
----
|
--
|
||||||
---- compoundA : A -> A ; -- -/more/most ridiculous
|
|
||||||
----
|
mkAdA : Str -> AdA = \s -> lin AdA {s = s} ;
|
||||||
----
|
mkAdN : Str -> AdN = \s -> lin AdN {s = s} ;
|
||||||
----
|
|
||||||
------3 Two-place adjectives
|
mkInterj : Str -> Interj = \s -> lin Interj {s = s} ;
|
||||||
------
|
mkVoc : Str -> Voc = \s -> lin Voc {s = s} ;
|
||||||
------ Two-place adjectives need a preposition for their second argument.
|
|
||||||
----
|
|
||||||
---- mkA2 : A -> Prep -> A2 ;
|
|
||||||
----
|
|
||||||
----
|
|
||||||
----
|
|
||||||
------2 Adverbs
|
|
||||||
----
|
|
||||||
------ Adverbs are not inflected. Most lexical ones have position
|
|
||||||
------ after the verb. Some can be preverbal (e.g. "always").
|
|
||||||
----
|
|
||||||
---- mkAdv : Str -> Adv ;
|
|
||||||
---- mkAdV : Str -> AdV ;
|
|
||||||
----
|
|
||||||
------ Adverbs modifying adjectives and sentences can also be formed.
|
|
||||||
----
|
|
||||||
---- mkAdA : Str -> AdA ;
|
|
||||||
----
|
|
||||||
------2 Prepositions
|
|
||||||
------
|
|
||||||
------ A preposition as used for rection in the lexicon, as well as to
|
|
||||||
------ build $PP$s in the resource API, just requires a string.
|
|
||||||
----
|
|
||||||
---- mkPrep : Str -> Prep ;
|
|
||||||
---- noPrep : Prep ;
|
|
||||||
----
|
|
||||||
------ (These two functions are synonyms.)
|
|
||||||
----
|
|
||||||
------2 Verbs
|
|
||||||
------
|
|
||||||
----
|
|
||||||
------ 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 $IrregularTel$.
|
|
||||||
------ 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 = MorphoTel.Gender ;
|
|
||||||
---- Number = MorphoTel.Number ;
|
|
||||||
---- Case = MorphoTel.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 ;
|
|
||||||
----
|
|
||||||
----
|
|
||||||
----
|
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-24
@@ -1,24 +1,23 @@
|
|||||||
--concrete PhraseTel of Phrase = CatTel ** open Prelude, ResTel in {
|
concrete PhraseTel of Phrase = CatTel ** open Prelude, ResTel in {
|
||||||
----
|
--
|
||||||
---- lin
|
lin
|
||||||
---- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
----
|
|
||||||
---- UttS s = s ;
|
UttS s = s ;
|
||||||
---- UttQS qs = {s = qs.s ! QDir} ;
|
UttQS qs = qs ;
|
||||||
---- UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
UttNP np = {s = np.s ! NPC Dir} ;
|
||||||
---- UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
|
UttCN cn = {s = cn.s ! Sg ! Dir} ;
|
||||||
---- UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
UttAP ap = {s = ap.s ! Masc ! Sg ! Dir} ;
|
||||||
----
|
UttVP vp = {s = let f = vp.s ! Pos ! VPInf in f.inf ++ f.fin} ;
|
||||||
---- UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
UttAdv adv = adv ;
|
||||||
---- UttIAdv iadv = iadv ;
|
UttImpSg pol imp = {s = pol.s ++ imp.s} ;
|
||||||
---- UttNP np = {s = np.s ! Nom} ;
|
UttImpPl pol imp = {s = pol.s ++ imp.s} ;
|
||||||
---- UttVP vp = {s = infVP False vp (agrP3 Sg)} ;
|
UttImpPol pol imp = {s = pol.s ++ imp.s} ;
|
||||||
---- UttAdv adv = adv ;
|
|
||||||
----
|
NoPConj = {s = []} ;
|
||||||
---- NoPConj = {s = []} ;
|
-- PConjConj conj = {s = conj.s2} ; ---
|
||||||
---- PConjConj conj = {s = conj.s2} ; ---
|
--
|
||||||
----
|
NoVoc = {s = []} ;
|
||||||
---- NoVoc = {s = []} ;
|
-- VocNP np = {s = "," ++ np.s ! Nom} ;
|
||||||
---- VocNP np = {s = "," ++ np.s ! Nom} ;
|
--
|
||||||
----
|
}
|
||||||
--}
|
|
||||||
|
|||||||
+68
-55
@@ -1,55 +1,68 @@
|
|||||||
--concrete QuestionTel of Question = CatTel ** open ResTel, Prelude in {
|
concrete QuestionTel of Question = CatTel ** open ResTel, Prelude in {
|
||||||
----
|
--
|
||||||
---- flags optimize=all_subs ;
|
-- flags optimize=all_subs ;
|
||||||
----
|
--
|
||||||
---- lin
|
lin
|
||||||
----
|
QuestCl cl = cl ;
|
||||||
---- QuestCl cl = {
|
|
||||||
---- s = \\t,a,p =>
|
QuestVP ip vp = mkClause {s = \\_ => ip.s ! Dir ; a = agrP3 Neutr ip.n} vp ;
|
||||||
---- let cls = cl.s ! t ! a ! p
|
QuestIAdv iadv cl = cl ** {s = \\t,p => iadv.s ++ cl.s ! t ! p} ;
|
||||||
---- in table {
|
QuestIComp icomp np = mkClause np (predV (regVerb []) ** {comp = \\_ => icomp.s}) ;
|
||||||
---- QDir => cls ! OQuest ;
|
|
||||||
---- QIndir => "if" ++ cls ! ODir
|
PrepIP p ip = {s = ip.s ! Obl ++ p.s} ;
|
||||||
---- } ---- "whether" in ExtTel
|
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 = \\_ => idet.s ; n = idet.n} ;
|
||||||
---- QuestVP qp vp =
|
IdetQuant iq num = {s = iq.s ! num.n ++ num.s ; n = num.n} ;
|
||||||
---- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
|
CompIAdv adv = {s = adv.s} ;
|
||||||
---- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
CompIP ip = {s = ip.s ! Dir} ;
|
||||||
----
|
--
|
||||||
---- QuestSlash ip slash =
|
-- QuestCl cl = {
|
||||||
---- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ;
|
-- s = \\t,a,p =>
|
||||||
---- --- stranding in ExratTel
|
-- let cls = cl.s ! t ! a ! p
|
||||||
----
|
-- in table {
|
||||||
---- QuestIAdv iadv cl = mkQuestion iadv cl ;
|
-- QDir => cls ! OQuest ;
|
||||||
----
|
-- QIndir => "if" ++ cls ! ODir
|
||||||
---- QuestIComp icomp np =
|
-- } ---- "whether" in ExtTel
|
||||||
---- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ;
|
-- } ;
|
||||||
----
|
--
|
||||||
----
|
-- QuestVP qp vp =
|
||||||
---- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ;
|
-- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
|
||||||
----
|
-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
||||||
---- AdvIP ip adv = {
|
--
|
||||||
---- s = \\c => ip.s ! c ++ adv.s ;
|
-- QuestSlash ip slash =
|
||||||
---- n = ip.n
|
-- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ;
|
||||||
---- } ;
|
-- --- stranding in ExratTel
|
||||||
----
|
--
|
||||||
---- IdetCN idet cn = {
|
-- QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||||
---- s = \\c => idet.s ++ cn.s ! idet.n ! c ;
|
--
|
||||||
---- n = idet.n
|
-- QuestIComp icomp np =
|
||||||
---- } ;
|
-- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ;
|
||||||
----
|
--
|
||||||
---- IdetIP idet = {
|
--
|
||||||
---- s = \\c => idet.s ;
|
-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ;
|
||||||
---- n = idet.n
|
--
|
||||||
---- } ;
|
-- AdvIP ip adv = {
|
||||||
----
|
-- s = \\c => ip.s ! c ++ adv.s ;
|
||||||
---- IdetQuant idet num = {
|
-- n = ip.n
|
||||||
---- s = idet.s ! num.n ++ num.s ;
|
-- } ;
|
||||||
---- n = num.n
|
--
|
||||||
---- } ;
|
-- IdetCN idet cn = {
|
||||||
----
|
-- s = \\c => idet.s ++ cn.s ! idet.n ! c ;
|
||||||
---- CompIAdv a = a ;
|
-- n = idet.n
|
||||||
---- CompIP p = ss (p.s ! Nom) ;
|
-- } ;
|
||||||
----
|
--
|
||||||
--}
|
-- 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) ;
|
||||||
|
--
|
||||||
|
}
|
||||||
|
|||||||
+58
-54
@@ -1,54 +1,58 @@
|
|||||||
--concrete RelativeTel of Relative = CatTel ** open ResTel in {
|
concrete RelativeTel of Relative = CatTel ** open ResTel in {
|
||||||
----
|
--
|
||||||
---- flags optimize=all_subs ;
|
-- flags optimize=all_subs ;
|
||||||
----
|
--
|
||||||
---- lin
|
lin
|
||||||
----
|
RelCl cl = cl ;
|
||||||
---- RelCl cl = {
|
RelVP rp vp = mkClause {s = \\_ => rp.s ; a = defaultAgr} vp ;
|
||||||
---- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
IdRP = {s = "ఏ"} ;
|
||||||
---- c = Nom
|
FunRP prep np rp = {s = np.s ! NPC Obl ++ prep.s ++ rp.s} ;
|
||||||
---- } ;
|
--
|
||||||
----
|
-- RelCl cl = {
|
||||||
---- RelVP rp vp = {
|
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
||||||
---- s = \\t,ant,b,ag =>
|
-- c = Nom
|
||||||
---- let
|
-- } ;
|
||||||
---- agr = case rp.a of {
|
--
|
||||||
---- RNoAg => ag ;
|
-- RelVP rp vp = {
|
||||||
---- RAg a => a
|
-- s = \\t,ant,b,ag =>
|
||||||
---- } ;
|
-- let
|
||||||
---- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp
|
-- agr = case rp.a of {
|
||||||
---- in
|
-- RNoAg => ag ;
|
||||||
---- cl.s ! t ! ant ! b ! ODir ;
|
-- RAg a => a
|
||||||
---- c = Nom
|
-- } ;
|
||||||
---- } ;
|
-- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp
|
||||||
----
|
-- in
|
||||||
------ Pied piping: "at which we are looking". Stranding and empty
|
-- cl.s ! t ! ant ! b ! ODir ;
|
||||||
------ relative are defined in $ExtraTel.gf$ ("that we are looking at",
|
-- c = Nom
|
||||||
------ "we are looking at").
|
-- } ;
|
||||||
----
|
--
|
||||||
---- RelSlash rp slash = {
|
---- Pied piping: "at which we are looking". Stranding and empty
|
||||||
---- s = \\t,a,p,agr =>
|
---- relative are defined in $ExtraTel.gf$ ("that we are looking at",
|
||||||
---- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
---- "we are looking at").
|
||||||
---- c = Acc
|
--
|
||||||
---- } ;
|
-- RelSlash rp slash = {
|
||||||
----
|
-- s = \\t,a,p,agr =>
|
||||||
---- FunRP p np rp = {
|
-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
||||||
---- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
-- c = Acc
|
||||||
---- a = RAg np.a
|
-- } ;
|
||||||
---- } ;
|
--
|
||||||
----
|
-- FunRP p np rp = {
|
||||||
---- IdRP =
|
-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||||
---- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
-- a = RAg np.a
|
||||||
---- in {
|
-- } ;
|
||||||
---- s = table {
|
--
|
||||||
---- RC _ Gen => "whose" ;
|
-- IdRP =
|
||||||
---- RC Neutr _ => varr "which" ;
|
-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
||||||
---- RC _ Acc => varr "whom" ;
|
-- in {
|
||||||
---- RC _ Nom => varr "who" ;
|
-- s = table {
|
||||||
---- RPrep Neutr => "which" ;
|
-- RC _ Gen => "whose" ;
|
||||||
---- RPrep _ => "whom"
|
-- RC Neutr _ => varr "which" ;
|
||||||
---- } ;
|
-- RC _ Acc => varr "whom" ;
|
||||||
---- a = RNoAg
|
-- RC _ Nom => varr "who" ;
|
||||||
---- } ;
|
-- RPrep Neutr => "which" ;
|
||||||
----
|
-- RPrep _ => "whom"
|
||||||
--}
|
-- } ;
|
||||||
|
-- a = RNoAg
|
||||||
|
-- } ;
|
||||||
|
--
|
||||||
|
}
|
||||||
|
|||||||
+253
-282
@@ -1,303 +1,274 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
--1 Teldi auxiliary operations.
|
--1 Telugu auxiliary operations.
|
||||||
|
|
||||||
-- This module contains operations that are needed to make the
|
-- This module contains operations that are needed to make the
|
||||||
-- resource syntax work.
|
-- resource syntax work.
|
||||||
--
|
|
||||||
resource ResTel = ParamX ** open Prelude in {
|
resource ResTel = ParamX ** open Prelude in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
param
|
param
|
||||||
Case = Dir | Obl ;
|
Case = Dir | Obl ;
|
||||||
Gender = Masc | Fem | Neutr ;
|
Gender = Masc | Fem | Neutr ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
Noun = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun =
|
mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun =
|
||||||
\sd,so,pd,po,g -> {
|
\sd,so,pd,po,g -> {
|
||||||
s = table Number [table Case [sd;so] ; table Case [pd;po]] ;
|
s = table Number [table Case [sd;so] ; table Case [pd;po]] ;
|
||||||
g = g
|
g = g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
wallNoun : Str -> Noun = \goda ->
|
wallNoun : Str -> Noun = \goda ->
|
||||||
mkNoun goda goda (goda + "lu") (goda + "la") Neutr ;
|
mkNoun goda goda (goda + "లు") (goda + "ల") Neutr ;
|
||||||
|
|
||||||
|
reggNoun : Str -> Gender -> Noun = \s,g ->
|
||||||
|
wallNoun s ** {g = g} ;
|
||||||
|
|
||||||
|
regNoun : Str -> Noun = wallNoun ;
|
||||||
|
|
||||||
|
|
||||||
|
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 -> 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 = \_,_ -> []
|
||||||
|
in table {
|
||||||
|
VInf => inf ;
|
||||||
|
VStem => stem ;
|
||||||
|
VImpf Masc Sg => ims ;
|
||||||
|
VImpf Masc Pl => imp ;
|
||||||
|
VImpf Fem Sg => ifs ;
|
||||||
|
VImpf Fem Pl => ifp ;
|
||||||
|
VImpf Neutr Sg => ifs ;
|
||||||
|
VImpf Neutr Pl => ifp ;
|
||||||
|
VPerf Masc Sg => pms ;
|
||||||
|
VPerf Masc Pl => pmp ;
|
||||||
|
VPerf Fem Sg => pfs ;
|
||||||
|
VPerf Fem Pl => pfp ;
|
||||||
|
VPerf Neutr Sg => pfs ;
|
||||||
|
VPerf Neutr 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 ;
|
||||||
|
VReq => r ;
|
||||||
|
VImp => sp2 ;
|
||||||
|
VReqFut => r
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regVerb : Str -> Verb = \cal ->
|
||||||
|
mkVerb cal cal cal cal cal cal cal cal cal cal cal cal cal cal cal ;
|
||||||
|
|
||||||
|
param
|
||||||
|
CTense = CPresent | CPast | CFuture ;
|
||||||
|
oper
|
||||||
|
copula : CTense -> Number -> Person -> Gender -> Str = \t,n,p,g ->
|
||||||
|
case <t,n,p,g> of {
|
||||||
|
_ => []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
param
|
||||||
|
PronCase = PC Case | PObj | PPoss ;
|
||||||
|
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 => "వారి"}}
|
||||||
|
} ;
|
||||||
|
---- the third is the vocative - is it really this way?
|
||||||
|
|
||||||
|
-- the Telugu 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 : Polarity => VPHForm => {fin, inf, neg : Str} ;
|
||||||
|
obj : {s : Str ; a : Agr} ;
|
||||||
|
subj : VType ;
|
||||||
|
comp : Agr => Str
|
||||||
|
} ;
|
||||||
|
|
||||||
|
predV : Verb -> VPH = \verb -> {
|
||||||
|
s = \\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} ----
|
||||||
|
} ;
|
||||||
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
|
subj = VIntrans ;
|
||||||
|
comp = \\_ => []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
progressive : Gender -> Number -> Str = \_,_ -> [] ;
|
||||||
|
|
||||||
|
VPHSlash = VPH ** {c2 : Compl} ;
|
||||||
|
|
||||||
|
Clause : Type = {s : VPHTense => Polarity => 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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertAdv : Str -> VPH -> VPH = \adv,vp -> vp ** {
|
||||||
|
comp = \\agr => vp.comp ! agr ++ adv
|
||||||
|
} ;
|
||||||
|
|
||||||
|
tenseVPH : Tense -> Anteriority -> VPHTense = \tense,ant ->
|
||||||
|
case <tense,ant> of {
|
||||||
|
<Pres,Simul> => VPGenPres ;
|
||||||
|
<Past,Simul> => VPPerf ;
|
||||||
|
<Fut, Simul> => VPFut ;
|
||||||
|
<Cond,Simul> => VPSubj ;
|
||||||
|
<Pres,Anter> => VPPerfPres ;
|
||||||
|
<Past,Anter> => VPPerfPast ;
|
||||||
|
<Fut, Anter> => VPPerf ;
|
||||||
|
<Cond,Anter> => VPPerf
|
||||||
|
} ;
|
||||||
|
|
||||||
|
positivePolarity : Polarity -> Bool = \pol -> case pol of {
|
||||||
|
Pos => True ;
|
||||||
|
Neg => False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||||
|
|
||||||
|
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||||
|
s = \\vt,b =>
|
||||||
|
let
|
||||||
|
subj = NPC Dir ;
|
||||||
|
agr = np.a ;
|
||||||
|
vps = vp.s ! b ! VPTense vt agr ;
|
||||||
|
in
|
||||||
|
np.s ! subj ++ vp.obj.s ++ vp.comp ! np.a ++ vps.neg ++ vps.inf ++ vps.fin
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- 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 Teldi 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
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-66
@@ -1,66 +1,43 @@
|
|||||||
--concrete SentenceTel of Sentence = CatTel ** open Prelude, ResTel in {
|
concrete SentenceTel of Sentence = CatTel ** open Prelude, ResTel in {
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
--
|
|
||||||
-- lin
|
lin
|
||||||
--
|
|
||||||
-- PredVP np vp = mkClause np vp ;
|
PredVP np vp = mkClause np vp ;
|
||||||
--
|
|
||||||
---- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
PredSCVP sc vp = mkClause {s = \\_ => sc.s ; a = agrP3 Neutr Sg} vp ;
|
||||||
----
|
|
||||||
---- ImpVP vp = {
|
ImpVP vp = {s = let f = vp.s ! Pos ! VPImp in
|
||||||
---- s = \\pol,n =>
|
vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin} ;
|
||||||
---- let
|
|
||||||
---- agr = AgP2 (numImp n) ;
|
AdvImp adv imp = {s = adv.s ++ imp.s} ;
|
||||||
---- verb = infVP True vp agr ;
|
|
||||||
---- dont = case pol of {
|
AdvS a s = {s = a.s ++ s.s} ;
|
||||||
---- CNeg True => "don't" ;
|
|
||||||
---- CNeg False => "do" ++ "not" ;
|
UseCl temp pol cl = {
|
||||||
---- _ => []
|
s = temp.s ++ pol.s ++ cl.s ! tenseVPH temp.t temp.a ! pol.p
|
||||||
---- }
|
} ;
|
||||||
---- in
|
|
||||||
---- dont ++ verb
|
UseQCl temp pol cl = {
|
||||||
---- } ;
|
s = temp.s ++ pol.s ++ cl.s ! tenseVPH temp.t temp.a ! pol.p
|
||||||
----
|
} ;
|
||||||
---- SlashVP np vp =
|
|
||||||
---- mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ;
|
UseRCl temp pol cl = {
|
||||||
----
|
s = cl.s ! tenseVPH temp.t temp.a ! pol.p
|
||||||
---- AdvSlash slash adv = {
|
} ;
|
||||||
---- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
|
||||||
---- c2 = slash.c2
|
ExtAdvS adv sent = {s = adv.s ++ sent.s} ;
|
||||||
---- } ;
|
SSubjS first subj second = {s = first.s ++ subj.s ++ second.s} ;
|
||||||
----
|
EmbedS sent = {s = sent.s} ;
|
||||||
---- SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
EmbedQS sent = {s = sent.s} ;
|
||||||
----
|
|
||||||
---- SlashVS np vs slash =
|
SlashVP np vps = {
|
||||||
---- mkClause (np.s ! Nom) np.a
|
s = (mkClause np vps).s ;
|
||||||
---- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
c2 = vps.c2
|
||||||
---- {c2 = slash.c2} ;
|
} ;
|
||||||
----
|
|
||||||
---- EmbedS s = {s = conjThat ++ s.s} ;
|
AdvSlash slash adv = slash ** {
|
||||||
---- EmbedQS qs = {s = qs.s ! QIndir} ;
|
s = \\t,p => slash.s ! t ! p ++ adv.s
|
||||||
---- 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
|
|
||||||
----
|
|
||||||
--}
|
|
||||||
|
|||||||
+156
-129
@@ -1,132 +1,159 @@
|
|||||||
--concrete StructuralTel of Structural = CatTel **
|
concrete StructuralTel of Structural = CatTel **
|
||||||
-- open MorphoTel, (P = ParadigmsTel), Prelude in {
|
open MorphoTel, (P = ParadigmsTel), Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
all_Predet = {s = "అన్ని"} ;
|
||||||
|
although_Subj = {s = "అయినప్పటికీ"} ;
|
||||||
|
and_Conj = {s1 = [] ; s2 = "మరియు" ; n = Pl} ;
|
||||||
|
because_Subj = {s = "ఎందుకంటే"} ;
|
||||||
|
either7or_DConj = {s1 = "గాని" ; s2 = "లేదా" ; n = Sg} ;
|
||||||
|
both7and_DConj = {s1 = "రెండూ" ; s2 = "మరియు" ; n = Pl} ;
|
||||||
|
every_Det = {s = \\_,_ => "ప్రతి" ; n = Sg} ;
|
||||||
|
if_Subj = {s = "అయితే"} ;
|
||||||
|
it_Pron = {
|
||||||
|
s = table {PC Dir => "అది" ; PC Obl => "దాని" ; PObj => "దానిని" ; PPoss => "దాని"} ;
|
||||||
|
a = Ag Neutr Sg P3
|
||||||
|
} ;
|
||||||
|
or_Conj = {s1 = [] ; s2 = "లేదా" ; n = Sg} ;
|
||||||
|
she_Pron = {
|
||||||
|
s = table {PC Dir => "ఆమె" ; PC Obl => "ఆమె" ; PObj => "ఆమెను" ; PPoss => "ఆమె"} ;
|
||||||
|
a = Ag Fem Sg P3
|
||||||
|
} ;
|
||||||
|
that_Quant = {s = \\_,_,_ => "ఆ"} ;
|
||||||
|
that_Subj = {s = "అని"} ;
|
||||||
|
they_Pron = personalPronoun P3 Pl ** {a = Ag Masc Pl P3} ;
|
||||||
|
this_Quant = {s = \\_,_,_ => "ఈ"} ;
|
||||||
|
very_AdA = {s = "చాలా"} ;
|
||||||
|
when_Subj = {s = "అప్పుడు"} ;
|
||||||
|
with_Prep = {s = "తో"} ;
|
||||||
|
youSg_Pron = personalPronoun P2 Sg ** {a = Ag Masc Sg P2} ;
|
||||||
|
youPl_Pron = personalPronoun P2 Pl ** {a = Ag Masc Pl P2} ;
|
||||||
|
youPol_Pron = personalPronoun P2 Pl ** {a = Ag Masc Pl P2} ;
|
||||||
|
-- above_Prep = ss "above" ;
|
||||||
|
-- after_Prep = ss "after" ;
|
||||||
|
-- all_Predet = ss "all" ;
|
||||||
|
-- almost_AdA, almost_AdN = ss "almost" ;
|
||||||
|
-- although_Subj = ss "although" ;
|
||||||
|
-- always_AdV = ss "always" ;
|
||||||
|
-- and_Conj = sd2 [] "and" ** {n = Pl} ;
|
||||||
|
-----b and_Conj = ss "and" ** {n = Pl} ;
|
||||||
|
-- because_Subj = ss "because" ;
|
||||||
|
-- before_Prep = ss "before" ;
|
||||||
|
-- behind_Prep = ss "behind" ;
|
||||||
|
-- between_Prep = ss "between" ;
|
||||||
|
-- both7and_DConj = sd2 "both" "and" ** {n = Pl} ;
|
||||||
|
-- but_PConj = ss "but" ;
|
||||||
|
-- by8agent_Prep = ss "by" ;
|
||||||
|
-- by8means_Prep = ss "by" ;
|
||||||
|
-- can8know_VV, can_VV = {
|
||||||
|
-- s = table {
|
||||||
|
-- VVF VInf => ["be able to"] ;
|
||||||
|
-- VVF VPres => "can" ;
|
||||||
|
-- VVF VPPart => ["been able to"] ;
|
||||||
|
-- VVF VPresPart => ["being able to"] ;
|
||||||
|
-- VVF VPast => "could" ; --# notpresent
|
||||||
|
-- VVPastNeg => "couldn't" ; --# notpresent
|
||||||
|
-- VVPresNeg => "can't"
|
||||||
|
-- } ;
|
||||||
|
-- isAux = True
|
||||||
|
-- } ;
|
||||||
|
-- during_Prep = ss "during" ;
|
||||||
|
-- either7or_DConj = sd2 "either" "or" ** {n = Sg} ;
|
||||||
|
-- everybody_NP = regNP "everybody" Sg ;
|
||||||
|
-- every_Det = mkDeterminer Sg "every" ;
|
||||||
|
-- everything_NP = regNP "everything" Sg ;
|
||||||
|
-- everywhere_Adv = ss "everywhere" ;
|
||||||
|
-- few_Det = mkDeterminer Pl "few" ;
|
||||||
|
----- first_Ord = ss "first" ; DEPRECATED
|
||||||
|
-- for_Prep = ss "for" ;
|
||||||
|
-- from_Prep = ss "from" ;
|
||||||
|
he_Pron = personalPronoun P3 Sg ** {a = Ag Masc Sg P3} ;
|
||||||
|
-- here_Adv = ss "here" ;
|
||||||
|
-- here7to_Adv = ss ["to here"] ;
|
||||||
|
-- here7from_Adv = ss ["from here"] ;
|
||||||
|
-- how_IAdv = ss "how" ;
|
||||||
|
-- how8many_IDet = mkDeterminer Pl ["how many"] ;
|
||||||
|
-- if_Subj = ss "if" ;
|
||||||
|
-- in8front_Prep = ss ["in front of"] ;
|
||||||
|
i_Pron = personalPronoun P1 Sg ** {a = Ag Masc Sg P1} ;
|
||||||
|
in_Prep = ss "లో" ;
|
||||||
|
-- it_Pron = mkNP "it" "it" "its" Sg P3 Neutr ;
|
||||||
|
-- less_CAdv = ss "less" ;
|
||||||
|
-- many_Det = mkDeterminer Pl "many" ;
|
||||||
|
-- more_CAdv = ss "more" ;
|
||||||
|
-- most_Predet = ss "most" ;
|
||||||
|
-- much_Det = mkDeterminer Sg "much" ;
|
||||||
|
-- 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 "no" ;
|
||||||
|
-- on_Prep = ss "on" ;
|
||||||
|
------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
||||||
|
-- only_Predet = ss "only" ;
|
||||||
|
-- or_Conj = sd2 [] "or" ** {n = Sg} ;
|
||||||
|
-- otherwise_PConj = ss "otherwise" ;
|
||||||
|
-- part_Prep = ss "of" ;
|
||||||
|
-- please_Voc = ss "please" ;
|
||||||
|
-- possess_Prep = ss "of" ;
|
||||||
|
-- quite_Adv = ss "quite" ;
|
||||||
|
-- she_Pron = mkNP "she" "her" "her" Sg P3 Fem ;
|
||||||
|
-- so_AdA = ss "so" ;
|
||||||
|
-- somebody_NP = regNP "somebody" Sg ;
|
||||||
|
-- someSg_Det = mkDeterminer Sg "some" ;
|
||||||
|
-- somePl_Det = mkDeterminer Pl "some" ;
|
||||||
|
-- something_NP = regNP "something" Sg ;
|
||||||
|
-- somewhere_Adv = ss "somewhere" ;
|
||||||
|
-- that_Quant = mkQuant "that" "those" ;
|
||||||
|
-- there_Adv = ss "there" ;
|
||||||
|
-- there7to_Adv = ss "there" ;
|
||||||
|
-- there7from_Adv = ss ["from there"] ;
|
||||||
|
-- therefore_PConj = ss "therefore" ;
|
||||||
|
-- they_Pron = mkNP "they" "them" "their" Pl P3 Masc ; ----
|
||||||
|
-- this_Quant = mkQuant "this" "these" ;
|
||||||
|
-- through_Prep = ss "through" ;
|
||||||
|
-- too_AdA = ss "too" ;
|
||||||
|
-- to_Prep = ss "to" ;
|
||||||
|
-- under_Prep = ss "under" ;
|
||||||
|
-- very_AdA = ss "very" ;
|
||||||
|
-- want_VV = P.mkVV (P.regV "want") ;
|
||||||
|
we_Pron = personalPronoun P1 Pl ** {a = Ag Masc Pl P1} ;
|
||||||
|
|
||||||
|
-- whatPl_IP = mkIP "what" "what" "what's" Sg ;
|
||||||
|
-- whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
||||||
|
-- when_IAdv = ss "when" ;
|
||||||
|
-- when_Subj = ss "when" ;
|
||||||
|
-- where_IAdv = ss "where" ;
|
||||||
|
-- which_IQuant = {s = \\_ => "which"} ;
|
||||||
|
-----b whichPl_IDet = mkDeterminer Pl ["which"] ;
|
||||||
|
-----b whichSg_IDet = mkDeterminer Sg ["which"] ;
|
||||||
|
-- whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
||||||
|
-- whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
||||||
|
-- why_IAdv = ss "why" ;
|
||||||
|
-- without_Prep = ss "without" ;
|
||||||
|
-- with_Prep = ss "with" ;
|
||||||
|
-----b yes_Phr = ss "yes" ;
|
||||||
|
-- yes_Utt = ss "yes" ;
|
||||||
|
-- youSg_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
||||||
|
-- youPl_Pron = mkNP "you" "you" "your" Pl P2 Masc ;
|
||||||
|
-- youPol_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
||||||
--
|
--
|
||||||
-- flags optimize=all ;
|
|
||||||
--
|
--
|
||||||
-- lin
|
--oper
|
||||||
---- above_Prep = ss "above" ;
|
-- mkQuant : Str -> Str -> {s : Number => Str} = \x,y -> {
|
||||||
---- after_Prep = ss "after" ;
|
-- s = table Number [x ; y]
|
||||||
---- all_Predet = ss "all" ;
|
-- } ;
|
||||||
---- almost_AdA, almost_AdN = ss "almost" ;
|
--
|
||||||
---- although_Subj = ss "although" ;
|
}
|
||||||
---- always_AdV = ss "always" ;
|
|
||||||
---- and_Conj = sd2 [] "and" ** {n = Pl} ;
|
|
||||||
-------b and_Conj = ss "and" ** {n = Pl} ;
|
|
||||||
---- because_Subj = ss "because" ;
|
|
||||||
---- before_Prep = ss "before" ;
|
|
||||||
---- behind_Prep = ss "behind" ;
|
|
||||||
---- between_Prep = ss "between" ;
|
|
||||||
---- both7and_DConj = sd2 "both" "and" ** {n = Pl} ;
|
|
||||||
---- but_PConj = ss "but" ;
|
|
||||||
---- by8agent_Prep = ss "by" ;
|
|
||||||
---- by8means_Prep = ss "by" ;
|
|
||||||
---- can8know_VV, can_VV = {
|
|
||||||
---- s = table {
|
|
||||||
---- VVF VInf => ["be able to"] ;
|
|
||||||
---- VVF VPres => "can" ;
|
|
||||||
---- VVF VPPart => ["been able to"] ;
|
|
||||||
---- VVF VPresPart => ["being able to"] ;
|
|
||||||
---- VVF VPast => "could" ; --# notpresent
|
|
||||||
---- VVPastNeg => "couldn't" ; --# notpresent
|
|
||||||
---- VVPresNeg => "can't"
|
|
||||||
---- } ;
|
|
||||||
---- isAux = True
|
|
||||||
---- } ;
|
|
||||||
---- during_Prep = ss "during" ;
|
|
||||||
---- either7or_DConj = sd2 "either" "or" ** {n = Sg} ;
|
|
||||||
---- everybody_NP = regNP "everybody" Sg ;
|
|
||||||
---- every_Det = mkDeterminer Sg "every" ;
|
|
||||||
---- everything_NP = regNP "everything" Sg ;
|
|
||||||
---- everywhere_Adv = ss "everywhere" ;
|
|
||||||
---- few_Det = mkDeterminer Pl "few" ;
|
|
||||||
------- first_Ord = ss "first" ; DEPRECATED
|
|
||||||
---- for_Prep = ss "for" ;
|
|
||||||
---- from_Prep = ss "from" ;
|
|
||||||
-- he_Pron = personalPronoun P3 Sg ** {a = Ag Masc Sg P3} ;
|
|
||||||
---- here_Adv = ss "here" ;
|
|
||||||
---- here7to_Adv = ss ["to here"] ;
|
|
||||||
---- here7from_Adv = ss ["from here"] ;
|
|
||||||
---- how_IAdv = ss "how" ;
|
|
||||||
---- how8many_IDet = mkDeterminer Pl ["how many"] ;
|
|
||||||
---- if_Subj = ss "if" ;
|
|
||||||
---- in8front_Prep = ss ["in front of"] ;
|
|
||||||
-- i_Pron = personalPronoun P1 Sg ** {a = Ag Masc Sg P1} ;
|
|
||||||
-- in_Prep = ss "meN" ;
|
|
||||||
---- it_Pron = mkNP "it" "it" "its" Sg P3 Neutr ;
|
|
||||||
---- less_CAdv = ss "less" ;
|
|
||||||
---- many_Det = mkDeterminer Pl "many" ;
|
|
||||||
---- more_CAdv = ss "more" ;
|
|
||||||
---- most_Predet = ss "most" ;
|
|
||||||
---- much_Det = mkDeterminer Sg "much" ;
|
|
||||||
---- 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 "no" ;
|
|
||||||
---- on_Prep = ss "on" ;
|
|
||||||
-------- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
|
||||||
---- only_Predet = ss "only" ;
|
|
||||||
---- or_Conj = sd2 [] "or" ** {n = Sg} ;
|
|
||||||
---- otherwise_PConj = ss "otherwise" ;
|
|
||||||
---- part_Prep = ss "of" ;
|
|
||||||
---- please_Voc = ss "please" ;
|
|
||||||
---- possess_Prep = ss "of" ;
|
|
||||||
---- quite_Adv = ss "quite" ;
|
|
||||||
---- she_Pron = mkNP "she" "her" "her" Sg P3 Fem ;
|
|
||||||
---- so_AdA = ss "so" ;
|
|
||||||
---- somebody_NP = regNP "somebody" Sg ;
|
|
||||||
---- someSg_Det = mkDeterminer Sg "some" ;
|
|
||||||
---- somePl_Det = mkDeterminer Pl "some" ;
|
|
||||||
---- something_NP = regNP "something" Sg ;
|
|
||||||
---- somewhere_Adv = ss "somewhere" ;
|
|
||||||
---- that_Quant = mkQuant "that" "those" ;
|
|
||||||
---- there_Adv = ss "there" ;
|
|
||||||
---- there7to_Adv = ss "there" ;
|
|
||||||
---- there7from_Adv = ss ["from there"] ;
|
|
||||||
---- therefore_PConj = ss "therefore" ;
|
|
||||||
---- they_Pron = mkNP "they" "them" "their" Pl P3 Masc ; ----
|
|
||||||
---- this_Quant = mkQuant "this" "these" ;
|
|
||||||
---- through_Prep = ss "through" ;
|
|
||||||
---- too_AdA = ss "too" ;
|
|
||||||
---- to_Prep = ss "to" ;
|
|
||||||
---- under_Prep = ss "under" ;
|
|
||||||
---- very_AdA = ss "very" ;
|
|
||||||
---- want_VV = P.mkVV (P.regV "want") ;
|
|
||||||
-- we_Pron = personalPronoun P1 Pl ** {a = Ag Masc Pl P1} ;
|
|
||||||
--
|
--
|
||||||
---- whatPl_IP = mkIP "what" "what" "what's" Sg ;
|
|
||||||
---- whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
|
||||||
---- when_IAdv = ss "when" ;
|
|
||||||
---- when_Subj = ss "when" ;
|
|
||||||
---- where_IAdv = ss "where" ;
|
|
||||||
---- which_IQuant = {s = \\_ => "which"} ;
|
|
||||||
-------b whichPl_IDet = mkDeterminer Pl ["which"] ;
|
|
||||||
-------b whichSg_IDet = mkDeterminer Sg ["which"] ;
|
|
||||||
---- whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
|
||||||
---- whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
|
||||||
---- why_IAdv = ss "why" ;
|
|
||||||
---- without_Prep = ss "without" ;
|
|
||||||
---- with_Prep = ss "with" ;
|
|
||||||
-------b yes_Phr = ss "yes" ;
|
|
||||||
---- yes_Utt = ss "yes" ;
|
|
||||||
---- youSg_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
|
||||||
---- youPl_Pron = mkNP "you" "you" "your" Pl P2 Masc ;
|
|
||||||
---- youPol_Pron = mkNP "you" "you" "your" Sg P2 Masc ;
|
|
||||||
----
|
|
||||||
----
|
|
||||||
----oper
|
|
||||||
---- mkQuant : Str -> Str -> {s : Number => Str} = \x,y -> {
|
|
||||||
---- s = table Number [x ; y]
|
|
||||||
---- } ;
|
|
||||||
----
|
|
||||||
--}
|
|
||||||
----
|
|
||||||
|
|||||||
+58
-50
@@ -1,50 +1,58 @@
|
|||||||
--concrete VerbTel of Verb = CatTel ** open ResTel in {
|
concrete VerbTel of Verb = CatTel ** open ResTel, Prelude in {
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
--
|
|
||||||
-- lin
|
lin
|
||||||
-- UseV = predV ;
|
UseV = predV ;
|
||||||
--
|
|
||||||
-- SlashV2a v = predV v ** {c2 = v.c2} ;
|
SlashV2a v = predV v ** {c2 = v.c2} ;
|
||||||
--
|
|
||||||
---- Slash2V3 v np =
|
SlashV2A v ap = predV v ** {
|
||||||
---- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ;
|
c2 = v.c2 ;
|
||||||
---- Slash3V3 v np =
|
comp = \\agr => case agr of {Ag g n _ => ap.s ! g ! n ! Dir}
|
||||||
---- insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ----
|
} ;
|
||||||
----
|
|
||||||
---- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ;
|
Slash2V3 v np =
|
||||||
---- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
let vp = insertObject np (predV v ** {c2 = v.c2})
|
||||||
---- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
in vp ** {c2 = v.c3} ;
|
||||||
---- ComplVA v ap = insertObj (ap.s) (predV v) ;
|
|
||||||
----
|
Slash3V3 v np =
|
||||||
---- SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ;
|
let vp = insertObject np (predV v ** {c2 = v.c3})
|
||||||
---- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
in vp ** {c2 = v.c2} ;
|
||||||
---- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
|
||||||
---- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
AdvVPSlash vps adv = vps ** {
|
||||||
--
|
comp = \\agr => vps.comp ! agr ++ adv.s
|
||||||
-- ComplSlash vp np = insertObject np vp ;
|
} ;
|
||||||
--
|
|
||||||
---- SlashVV vv vp =
|
AdVVPSlash adv vps = vps ** {
|
||||||
---- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
|
comp = \\agr => adv.s ++ vps.comp ! agr
|
||||||
---- {c2 = vp.c2} ;
|
} ;
|
||||||
---- SlashV2VNP vv np vp =
|
|
||||||
---- insertObjPre (\\_ => vp.c2 ++ np.s ! Acc)
|
ComplSlash vp np = insertObject np vp ;
|
||||||
---- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
|
||||||
---- {c2 = vp.c2} ;
|
ComplVV v vp = predV v ** {
|
||||||
----
|
comp = \\agr => let f = vp.s ! Pos ! VPInf in
|
||||||
---- UseComp comp = insertComplement comp.s (predAux auxBe) ;
|
f.inf ++ f.fin
|
||||||
----
|
} ;
|
||||||
---- AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
|
||||||
----
|
ComplVS v s = predV v ** {comp = \\_ => s.s} ;
|
||||||
---- AdVVP adv vp = insertAdV adv.s vp ;
|
ComplVQ v q = predV v ** {comp = \\_ => q.s} ;
|
||||||
----
|
ComplVA v ap = predV v ** {comp = \\agr => case agr of {
|
||||||
---- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
|
Ag g n _ => ap.s ! g ! n ! Dir
|
||||||
----
|
}} ;
|
||||||
---- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
|
||||||
----
|
AdVVP adv vp = insertAdv adv.s vp ;
|
||||||
----
|
|
||||||
---- CompAP ap = ap ;
|
UseComp comp = predV (regVerb []) ** {comp = comp.s} ;
|
||||||
---- CompNP np = {s = \\_ => np.s ! Acc} ;
|
|
||||||
---- CompAdv a = {s = \\_ => a.s} ;
|
CompAP ap = {s = \\agr => case agr of {
|
||||||
----
|
Ag g n _ => ap.s ! g ! n ! Dir
|
||||||
--}
|
}} ;
|
||||||
|
CompNP np = {s = \\_ => np.s ! NPC Obl} ;
|
||||||
|
CompAdv adv = {s = \\_ => adv.s} ;
|
||||||
|
CompCN cn = {s = \\_ => cn.s ! Sg ! Dir} ;
|
||||||
|
|
||||||
|
AdvVP vp adv = insertAdv adv.s vp ;
|
||||||
|
ExtAdvVP vp adv = insertAdv adv.s vp ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user