diff --git a/src/telugu/AdjectiveTel.gf b/src/telugu/AdjectiveTel.gf index b016a2b9..280011ca 100644 --- a/src/telugu/AdjectiveTel.gf +++ b/src/telugu/AdjectiveTel.gf @@ -1,36 +1,37 @@ -concrete AdjectiveHin of Adjective = CatHin ** open ResHin, Prelude in { +concrete AdjectiveTel of Adjective = CatTel ** open ResTel, Prelude in { lin PositA a = a ; --- ComparA a np = { --- s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ; --- isPre = False --- } ; --- ----- $SuperlA$ belongs to determiner syntax in $Noun$. --- --- ComplA2 a np = { --- s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ; --- isPre = False --- } ; --- --- ReflA2 a = { --- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ; --- isPre = False --- } ; --- --- SentAP ap sc = { --- s = \\a => ap.s ! a ++ sc.s ; --- isPre = False --- } ; --- --- AdAP ada ap = { --- s = \\a => ada.s ++ ap.s ! a ; --- isPre = ap.isPre --- } ; --- --- UseA2 a = a ; --- + UseComparA a = a ; + + ComparA a np = { + s = \\g,n,c => a.s ! g ! n ! c ++ "కంటే" ++ np.s ! NPC Obl + } ; + +-- $SuperlA$ belongs to determiner syntax in $Noun$. + + ComplA2 a np = { + s = \\g,n,c => a.s ! g ! n ! c ++ a.c2 ++ np.s ! NPC Obl + } ; + + ReflA2 a = { + s = a.s + } ; + + SentAP ap sc = { + s = \\g,n,c => ap.s ! g ! n ! c ++ sc.s + } ; + + AdAP ada ap = { + s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c + } ; + + AdvAP ap adv = { + s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s + } ; + + UseA2 a = a ; + } diff --git a/src/telugu/AdverbTel.gf b/src/telugu/AdverbTel.gf index f43d03c9..73dd1a67 100644 --- a/src/telugu/AdverbTel.gf +++ b/src/telugu/AdverbTel.gf @@ -1,20 +1,20 @@ ---concrete AdverbTel of Adverb = CatTel ** open ResTel, Prelude in { ----- ----- lin ----- PositAdvAdj a = {s = a.s ! AAdv} ; ----- ComparAdvAdj cadv a np = { ----- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom ----- } ; ----- ComparAdvAdjS cadv a s = { ----- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s ----- } ; ----- ----- PrepNP prep np = {s = prep.s ++ np.s ! Acc} ; ----- ----- AdAdv = cc2 ; ----- ----- SubjS = cc2 ; ----- ----- AdnCAdv cadv = {s = cadv.s ++ "than"} ; ----- ---} +concrete AdverbTel of Adverb = CatTel ** open ResTel, Prelude in { + lin + PositAdvAdj a = {s = a.s ! Masc ! Sg ! Dir} ; + PositAdAAdj a = {s = a.s ! Masc ! Sg ! Dir} ; +-- ComparAdvAdj cadv a np = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ np.s ! Nom +-- } ; +-- ComparAdvAdjS cadv a s = { +-- s = cadv.s ++ a.s ! AAdv ++ "than" ++ s.s +-- } ; +-- + PrepNP prep np = {s = np.s ! NPC Obl ++ prep.s} ; +-- + AdAdv ada adv = {s = ada.s ++ adv.s} ; +-- + SubjS subj sent = {s = sent.s ++ subj.s} ; +-- +-- AdnCAdv cadv = {s = cadv.s ++ "than"} ; +-- +} diff --git a/src/telugu/AllTel.gf b/src/telugu/AllTel.gf index 87699dd8..88d7eb88 100644 --- a/src/telugu/AllTel.gf +++ b/src/telugu/AllTel.gf @@ -1,3 +1,3 @@ -----# -path=.:../abstract:../common:../prelude --- ---concrete AllTel of AllTelAbs = LangTel ; +--# -path=.:../abstract:../common:../prelude + +concrete AllTel of AllTelAbs = LangTel ; diff --git a/src/telugu/AllTelAbs.gf b/src/telugu/AllTelAbs.gf index 89cdaef5..38e188ec 100644 --- a/src/telugu/AllTelAbs.gf +++ b/src/telugu/AllTelAbs.gf @@ -1 +1 @@ -abstract AllHinAbs = Lang ; \ No newline at end of file +abstract AllTelAbs = Lang ; diff --git a/src/telugu/CatTel.gf b/src/telugu/CatTel.gf index 6413b684..5eef716e 100644 --- a/src/telugu/CatTel.gf +++ b/src/telugu/CatTel.gf @@ -3,88 +3,83 @@ concrete CatTel of Cat = CommonX ** open ResTel, Prelude in { flags optimize=all_subs ; lincat ----- ------- Tensed/Untensed ----- ----- S = {s : Str} ; ----- QS = {s : QForm => Str} ; ----- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts ----- SSlash = {s : Str ; c2 : Str} ; ----- ------- Sentence ----- --- Cl = ResTel.Clause ; ----- ClSlash = { ----- s : ResTel.Tense => Anteriority => CPolarity => Order => Str ; ----- c2 : Str ----- } ; ----- Imp = {s : CPolarity => ImpForm => Str} ; ----- ------- Question ----- ----- QCl = {s : ResTel.Tense => Anteriority => CPolarity => QForm => Str} ; ----- IP = {s : Case => Str ; n : Number} ; ----- IComp = {s : Str} ; ----- IDet = {s : Str ; n : Number} ; ----- IQuant = {s : Number => Str} ; ----- ------- Relative ----- ----- RCl = { ----- s : ResTel.Tense => Anteriority => CPolarity => Agr => Str ; ----- c : Case ----- } ; ----- RP = {s : RCase => Str ; a : RAgr} ; ----- ------- Verb ----- --- VP = ResTel.VPH ; --- VPSlash = ResTel.VPHSlash ; ----- Comp = {s : Agr => Str} ; ----- ------- Adjective ----- --- AP = ResTel.Adjective ; ----- ------- Noun ----- +-- +---- Tensed/Untensed +-- + S = {s : Str} ; + QS = {s : Str} ; + RS = {s : Str} ; + SSlash = {s : Str} ; +-- +---- Sentence +-- + Cl = ResTel.Clause ; + ClSlash = {s : VPHTense => Polarity => Str ; c2 : Compl} ; + Imp = {s : Str} ; +-- +---- Question +-- + QCl = ResTel.Clause ; + IP = {s : Case => Str ; n : Number} ; + IComp = {s : Str} ; + IDet = {s : Str ; n : Number} ; + IQuant = {s : Number => Str} ; +-- +---- Relative +-- + RCl = ResTel.Clause ; + RP = {s : Str} ; +-- +---- Verb +-- + VP = ResTel.VPH ; + VPSlash = ResTel.VPHSlash ; + Comp = {s : Agr => Str} ; +-- +---- Adjective +-- + AP = ResTel.Adjective ; +-- +---- Noun +-- CN = ResTel.Noun ; --- NP = ResTel.NP ; --- Pron = {s : PronCase => Str ; a : Agr} ; --- Det = {s : Gender => Case => Str ; n : Number} ; ----- Predet, Ord = {s : Str} ; --- Num = {s : Str ; n : Number} ; ----- Card = {s : Str; n : Number} ; --- Quant = {s : Number => Gender => Case => Str} ; --- Art = {s : Str} ; ----- ------- Numeral ----- ----- Numeral = {s : CardOrd => Str ; n : Number} ; ----- Digits = {s : CardOrd => Str ; n : Number ; tail : DTail} ; ----- ------- Structural ----- ----- Conj = {s1,s2 : Str ; n : Number} ; --------b Conj = {s : Str ; n : Number} ; --------b DConj = {s1,s2 : Str ; n : Number} ; ----- Subj = {s : Str} ; ----- Prep = {s : Str} ; ----- ------- Open lexical classes, e.g. Lexicon ----- --- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; --- V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ; ----- V3 = Verb ** {c2, c3 : Str} ; ----- VV = {s : VVForm => Str ; isAux : Bool} ; ----- V2V = Verb ** {c2 : Str ; isAux : Bool} ; ----- --- A = ResTel.Adjective ; --- {s : Gender => Number => Case => Str} ; ----- A2 = {s : AForm => Str ; c2 : Str} ; ----- + NP = ResTel.NP ; + Pron = {s : PronCase => Str ; a : Agr} ; + Det = {s : Gender => Case => Str ; n : Number} ; + Predet, Ord = {s : Str} ; + Num = {s : Str ; n : Number} ; + Card, ACard = {s : Str; n : Number} ; + DAP = {s : Gender => Case => Str ; n : Number} ; + Quant = {s : Number => Gender => Case => Str} ; + Art = {s : Str} ; +-- +---- Numeral +-- + Numeral, Digits, Decimal = {s : Str ; n : Number} ; + LN, GN, SN = {s : Str} ; +-- +---- Structural +-- + Conj = {s1,s2 : Str ; n : Number} ; +-----b Conj = {s : Str ; n : Number} ; +-----b DConj = {s1,s2 : Str ; n : Number} ; + Subj = {s : Str} ; + Prep = {s : Str} ; +-- +---- Open lexical classes, e.g. Lexicon +-- + V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; + V2, V2A, V2Q, V2S = Verb ** {c2 : Compl} ; + V3 = Verb ** {c2, c3 : Compl} ; + VV = Verb ** {isAux : Bool} ; + V2V = Verb ** {c2 : Compl} ; +-- + A = ResTel.Adjective ; --- {s : Gender => Number => Case => Str} ; + A2 = ResTel.Adjective ** {c2 : Str} ; +-- N = ResTel.Noun ; --{s : Number => Case => Str ; g : Gender} ; ----- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; ----- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; --- PN = {s : Case => Str ; g : Gender} ; ----- + N2 = ResTel.Noun ** {c2 : Str} ; + N3 = ResTel.Noun ** {c2,c3 : Str} ; + PN = {s : Case => Str ; g : Gender} ; +-- } diff --git a/src/telugu/ConjunctionTel.gf b/src/telugu/ConjunctionTel.gf index 79e0e76b..42a26383 100644 --- a/src/telugu/ConjunctionTel.gf +++ b/src/telugu/ConjunctionTel.gf @@ -1,37 +1,57 @@ ---concrete ConjunctionTel of Conjunction = --- CatTel ** open ResTel, Coordination, Prelude in { ----- ----- flags optimize=all_subs ; ----- ----- lin ----- ----- ConjS = conjunctDistrSS ; ----- ----- ConjAdv = conjunctDistrSS ; ----- ----- ConjNP conj ss = conjunctDistrTable Case conj ss ** { ----- a = conjAgr (agrP3 conj.n) ss.a ----- } ; ----- ----- ConjAP conj ss = conjunctDistrTable Agr conj ss ** { ----- isPre = ss.isPre ----- } ; ----- ------- These fun's are generated from the list cat's. ----- ----- BaseS = twoSS ; ----- ConsS = consrSS comma ; ----- BaseAdv = twoSS ; ----- ConsAdv = consrSS comma ; ----- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; ----- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; ----- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; ----- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; ----- ----- lincat ----- [S] = {s1,s2 : Str} ; ----- [Adv] = {s1,s2 : Str} ; ----- [NP] = {s1,s2 : Case => Str ; a : Agr} ; ----- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; ----- ---} +concrete ConjunctionTel of Conjunction = + CatTel ** open ResTel, Coordination, Prelude in { + lin + BaseS x y = {s1 = x.s ; s2 = y.s} ; + ConsS x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ; + ConjS conj xs = {s = xs.s1 ++ conj.s2 ++ xs.s2} ; + + BaseAdv x y = {s1 = x.s ; s2 = y.s} ; + ConsAdv x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ; + ConjAdv conj xs = {s = xs.s1 ++ conj.s2 ++ xs.s2} ; + + BaseNP x y = {s1 = x.s ; s2 = y.s ; a = x.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 ; + a = case xs.a of {Ag g _ p => Ag g Pl p} + } ; + + BaseAP x y = {s1 = x.s ; s2 = y.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} ; + + BaseCN x y = {s1 = x.s ; s2 = y.s ; g = y.g} ; + ConsCN x xs = {s1 = \\n,c => x.s ! n ! c ++ "," ++ xs.s1 ! n ! c ; s2 = xs.s2 ; g = xs.g} ; + ConjCN conj xs = {s = \\n,c => xs.s1 ! n ! c ++ conj.s2 ++ xs.s2 ! n ! c ; g = xs.g} ; +-- +-- ConjS = conjunctDistrSS ; +-- +-- ConjAdv = conjunctDistrSS ; +-- +-- ConjNP conj ss = conjunctDistrTable Case conj ss ** { +-- a = conjAgr (agrP3 conj.n) ss.a +-- } ; +-- +-- ConjAP conj ss = conjunctDistrTable Agr conj ss ** { +-- isPre = ss.isPre +-- } ; +-- +---- These fun's are generated from the list cat's. +-- +-- BaseS = twoSS ; +-- ConsS = consrSS comma ; +-- BaseAdv = twoSS ; +-- ConsAdv = consrSS comma ; +-- BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ; +-- ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ; +-- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; +-- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; +-- + lincat + [S] = {s1,s2 : Str} ; + [Adv] = {s1,s2 : Str} ; + [NP] = {s1,s2 : NPCase => Str ; a : Agr} ; + [AP] = {s1,s2 : Gender => Number => Case => Str} ; + [CN] = {s1,s2 : Number => Case => Str ; g : Gender} ; +-- +} diff --git a/src/telugu/DocumentationTel.gf b/src/telugu/DocumentationTel.gf new file mode 100644 index 00000000..12f2e097 --- /dev/null +++ b/src/telugu/DocumentationTel.gf @@ -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 ("నిర్వచనం:" ++ title.s ++ definition.s) + } ; + MkDefinitionEx title definition example = { + s = paragraph ("నిర్వచనం:" ++ title.s ++ definition.s) ++ + paragraph ("ఉదాహరణ:" ++ 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)) + ) ; +} diff --git a/src/telugu/GrammarTel.gf b/src/telugu/GrammarTel.gf index e257291f..637ecab8 100644 --- a/src/telugu/GrammarTel.gf +++ b/src/telugu/GrammarTel.gf @@ -1,18 +1,19 @@ --# -path=.:../abstract:../common -concrete GrammarTel of Grammar = - NounTel --- VerbTel, --- AdjectiveTel, --- AdverbTel, --- NumeralTel, --- SentenceTel, --- QuestionTel, --- RelativeTel, --- ConjunctionTel, --- PhraseTel, --- TextX, --- StructuralTel, --- IdiomTel +concrete GrammarTel of Grammar = + NounTel, + VerbTel, + AdjectiveTel, + AdverbTel, + NumeralTel, + SentenceTel, + QuestionTel, + RelativeTel, + ConjunctionTel, + PhraseTel, + TextX - [Adv,AdN,SC], + StructuralTel, + TenseX - [Adv,AdN,SC], + IdiomTel ** { } diff --git a/src/telugu/IdiomTel.gf b/src/telugu/IdiomTel.gf index f41ae1a9..834cb89c 100644 --- a/src/telugu/IdiomTel.gf +++ b/src/telugu/IdiomTel.gf @@ -1,30 +1,9 @@ ---concrete IdiomTel of Idiom = CatTel ** open Prelude, ResTel in { ----- ----- flags optimize=all_subs ; ----- ----- lin ----- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ; ----- GenericCl vp = mkClause "one" (agrP3 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)} ; ----- ---} --- +concrete IdiomTel of Idiom = CatTel ** open Prelude, ResTel in { + lin + ProgrVP vp = vp ; + + ImpersCl vp = mkClause { + s = \\_ => "అది" ; + a = agrP3 Neutr Sg + } vp ; +} diff --git a/src/telugu/LangTel.gf b/src/telugu/LangTel.gf index 1d655fbe..0a8447bf 100644 --- a/src/telugu/LangTel.gf +++ b/src/telugu/LangTel.gf @@ -1,7 +1,8 @@ --# -path=.:../abstract:../common -concrete LangTel of Lang = +concrete LangTel of Lang = GrammarTel, LexiconTel + ,DocumentationTel --# notpresent ** { } diff --git a/src/telugu/LexiconTel.gf b/src/telugu/LexiconTel.gf index 9ede31bd..d292b901 100644 --- a/src/telugu/LexiconTel.gf +++ b/src/telugu/LexiconTel.gf @@ -1,375 +1,371 @@ --# -path=.:prelude -concrete LexiconTel of Lexicon = CatTel ** +concrete LexiconTel of Lexicon = CatTel ** open ParadigmsTel, Prelude in { --- --- flags --- optimize=values ; --- - lin --- airplane_N = regN "airplane" ; --- answer_V2S = mkV2S (regV "answer") toP ; --- apartment_N = regN "apartment" ; --- apple_N = mkN "seb" ; --- art_N = regN "art" ; --- ask_V2Q = mkV2Q (regV "ask") noPrep ; --- baby_N = regN "baby" ; --- bad_A = mkADeg "bad" "worse" "worst" "badly" ; --- bank_N = regN "bank" ; --- beautiful_A = compoundADeg (regA "beautiful") ; --- become_VA = mkVA (irregV "become" "became" "become") ; --- beer_N = regN "beer" ; --- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; --- big_A = mkA "baRA" ; --- bike_N = regN "bike" ; --- bird_N = regN "bird" ; --- black_A = regADeg "black" ; --- blue_A = regADeg "blue" ; --- boat_N = regN "boat" ; --- book_N = regN "book" ; --- boot_N = regN "boot" ; --- boss_N = mkN human (regN "boss") ; --- boy_N = mkN "lar.kA" ; --- bread_N = mkN "rot.I" ; --- break_V2 = dirV2 (irregV "break" "broke" "broken") ; --- broad_A = regADeg "broad" ; --- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ; --- brown_A = regADeg "brown" ; --- butter_N = regN "butter" ; --- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ; --- camera_N = regN "camera" ; --- cap_N = regN "cap" ; --- car_N = regN "car" ; --- carpet_N = regN "carpet" ; --- cat_N = regN "cat" ; --- ceiling_N = regN "ceiling" ; --- chair_N = regN "chair" ; --- cheese_N = regN "cheese" ; --- child_N = mk2N "child" "children" ; --- church_N = regN "church" ; --- city_N = regN "city" ; --- clean_A = regADeg "clean" ; --- clever_A = regADeg "clever" ; --- close_V2 = dirV2 (regV "close") ; --- coat_N = regN "coat" ; --- cold_A = regADeg "cold" ; --- come_V = (irregV "come" "came" "come") ; --- computer_N = regN "computer" ; --- country_N = regN "country" ; --- cousin_N = mkN human (regN "cousin") ; --- cow_N = regN "cow" ; --- die_V = (regV "die") ; --- dirty_A = regADeg "dirty" ; --- distance_N3 = mkN3 (regN "distance") fromP toP ; --- doctor_N = mkN human (regN "doctor") ; --- dog_N = regN "dog" ; --- door_N = regN "door" ; --- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ; --- easy_A2V = mkA2V (regA "easy") forP ; --- eat_V2 = mkV2 "KA" ; --- empty_A = regADeg "empty" ; --- enemy_N = regN "enemy" ; --- factory_N = regN "factory" ; --- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ; --- fear_VS = mkVS (regV "fear") ; --- find_V2 = dirV2 (irregV "find" "found" "found") ; --- fish_N = mk2N "fish" "fish" ; --- floor_N = regN "floor" ; --- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ; --- fridge_N = regN "fridge" ; --- friend_N = mkN human (regN "friend") ; --- fruit_N = regN "fruit" ; --- fun_AV = mkAV (regA "fun") ; --- garden_N = regN "garden" ; --- girl_N = mkN "lar.kI" ; --- glove_N = regN "glove" ; --- gold_N = regN "gold" ; --- good_A = mkA "a-cCA" ; --- go_V = mkV "cal" ; --- green_A = regADeg "green" ; --- harbour_N = regN "harbour" ; --- hate_V2 = dirV2 (regV "hate") ; --- hat_N = regN "hat" ; --- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ; --- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ; --- hill_N = regN "hill" ; --- hope_VS = mkVS (regV "hope") ; --- horse_N = regN "horse" ; --- hot_A = duplADeg "hot" ; --- house_N = regN "house" ; --- important_A = compoundADeg (regA "important") ; --- industry_N = regN "industry" ; --- iron_N = regN "iron" ; --- king_N = mkN masculine (regN "king") ; --- know_V2 = dirV2 (irregV "know" "knew" "known") ; --- lake_N = regN "lake" ; --- lamp_N = regN "lamp" ; --- learn_V2 = dirV2 (regV "learn") ; --- leather_N = regN "leather" ; --- leave_V2 = dirV2 (irregV "leave" "left" "left") ; --- like_V2 = dirV2 (regV "like") ; --- listen_V2 = prepV2 (regV "listen") toP ; --- live_V = mkV "CU" ; -- touch --- long_A = regADeg "long" ; --- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ; --- love_N = regN "love" ; --- love_V2 = dirV2 (regV "love") ; --- man_N = mkN masculine (mk2N "man" "men") ; --- married_A2 = mkA2 (regA "married") toP ; --- meat_N = regN "meat" ; --- milk_N = regN "milk" ; --- moon_N = regN "moon" ; --- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ; --- mountain_N = regN "mountain" ; --- music_N = regN "music" ; --- narrow_A = regADeg "narrow" ; --- new_A = regADeg "new" ; --- newspaper_N = regN "newspaper" ; --- oil_N = regN "oil" ; --- old_A = regADeg "old" ; --- open_V2 = dirV2 (regV "open") ; --- paint_V2A = mkV2A (regV "paint") noPrep ; --- paper_N = regN "paper" ; --- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ; --- peace_N = regN "peace" ; --- pen_N = regN "pen" ; --- planet_N = regN "planet" ; --- plastic_N = regN "plastic" ; --- play_V2 = dirV2 (regV "play") ; --- policeman_N = mkN masculine (mkN "policeman" "policemen") ; --- priest_N = mkN human (regN "priest") ; --- probable_AS = mkAS (regA "probable") ; --- queen_N = mkN feminine (regN "queen") ; --- radio_N = regN "radio" ; --- rain_V0 = mkV0 (regV "rain") ; --- read_V2 = dirV2 (irregV "read" "read" "read") ; --- red_A = mkA "lAl" ; --- religion_N = regN "religion" ; --- restaurant_N = regN "restaurant" ; --- river_N = regN "river" ; --- rock_N = regN "rock" ; --- roof_N = regN "roof" ; --- rubber_N = regN "rubber" ; --- run_V = (irregDuplV "run" "ran" "run") ; --- say_VS = mkVS (irregV "say" "said" "said") ; --- school_N = regN "school" ; --- science_N = regN "science" ; --- sea_N = regN "sea" ; --- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ; --- see_V2 = dirV2 (irregV "see" "saw" "seen") ; --- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ; --- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ; --- sheep_N = mk2N "sheep" "sheep" ; --- ship_N = regN "ship" ; --- shirt_N = regN "shirt" ; --- shoe_N = regN "shoe" ; --- shop_N = regN "shop" ; --- short_A = regADeg "short" ; --- silver_N = regN "silver" ; --- sister_N = mkN2 (mkN feminine (mkN "sister")) (mkPrep "of") ; --- sleep_V = (irregV "sleep" "slept" "slept") ; --- small_A = regADeg "small" ; --- snake_N = regN "snake" ; --- sock_N = regN "sock" ; --- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ; --- star_N = regN "star" ; --- steel_N = regN "steel" ; --- stone_N = regN "stone" ; --- stove_N = regN "stove" ; --- student_N = mkN human (regN "student") ; --- stupid_A = regADeg "stupid" ; --- sun_N = regN "sun" ; --- switch8off_V2 = dirV2 (partV (regV "switch") "off") ; --- switch8on_V2 = dirV2 (partV (regV "switch") "on") ; --- table_N = regN "table" ; --- talk_V3 = mkV3 (regV "talk") toP aboutP ; --- teacher_N = mkN human (regN "teacher") ; --- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ; --- television_N = regN "television" ; --- thick_A = regADeg "thick" ; --- thin_A = duplADeg "thin" ; --- train_N = regN "train" ; --- travel_V = (regDuplV "travel") ; --- tree_N = regN "tree" ; --- -- trousers_N = regN "trousers" ; --- ugly_A = regADeg "ugly" ; --- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; --- university_N = regN "university" ; --- village_N = regN "village" ; --- wait_V2 = prepV2 (regV "wait") forP ; --- walk_V = (regV "walk") ; --- warm_A = regADeg "warm" ; --- war_N = regN "war" ; --- watch_V2 = dirV2 (regV "watch") ; --- water_N = regN "water" ; --- white_A = regADeg "white" ; - window_N = mkN "kiTiki:" ; --- wine_N = regN "wine" ; --- win_V2 = dirV2 (irregDuplV "win" "won" "won") ; --- woman_N = mkN feminine (mk2N "woman" "women") ; --- wonder_VQ = mkVQ (regV "wonder") ; --- wood_N = regN "wood" ; --- write_V2 = dirV2 (irregV "write" "wrote" "written") ; --- yellow_A = regADeg "yellow" ; --- young_A = regADeg "young" ; --- --- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; --- now_Adv = mkAdv "now" ; --- already_Adv = mkAdv "already" ; --- song_N = regN "song" ; --- add_V3 = dirV3 (regV "add") toP ; --- number_N = regN "number" ; --- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ; --- stop_V = regDuplV "stop" ; --- jump_V = regV "jump" ; --- --- left_Ord = ss "left" ; --- right_Ord = ss "right" ; --- far_Adv = mkAdv "far" ; --- correct_A = (regA "correct") ; --- dry_A = regA "dry" ; --- dull_A = regA "dull" ; --- full_A = regA "full" ; --- heavy_A = regA "heavy" ; --- near_A = regA "near" ; --- rotten_A = (regA "rotten") ; --- round_A = regA "round" ; --- sharp_A = regA "sharp" ; --- smooth_A = regA "smooth" ; --- straight_A = regA "straight" ; --- wet_A = regA "wet" ; -- --- wide_A = regA "wide" ; --- animal_N = regN "animal" ; --- ashes_N = regN "ash" ; -- FIXME: plural only? --- back_N = regN "back" ; --- bark_N = regN "bark" ; --- belly_N = regN "belly" ; --- blood_N = regN "blood" ; --- bone_N = regN "bone" ; --- breast_N = regN "breast" ; --- cloud_N = regN "cloud" ; --- day_N = regN "day" ; --- dust_N = regN "dust" ; --- ear_N = regN "ear" ; --- earth_N = regN "earth" ; --- egg_N = regN "egg" ; --- eye_N = regN "eye" ; --- fat_N = regN "fat" ; --- feather_N = regN "feather" ; --- fingernail_N = regN "fingernail" ; --- fire_N = regN "fire" ; --- flower_N = regN "flower" ; --- fog_N = regN "fog" ; --- foot_N = mk2N "foot" "feet" ; --- forest_N = regN "forest" ; --- grass_N = regN "grass" ; --- guts_N = regN "gut" ; -- FIXME: no singular --- hair_N = regN "hair" ; --- hand_N = regN "hand" ; --- head_N = regN "head" ; --- heart_N = regN "heart" ; --- horn_N = regN "horn" ; --- husband_N = mkN masculine (regN "husband") ; --- ice_N = regN "ice" ; --- knee_N = regN "knee" ; --- leaf_N = mk2N "leaf" "leaves" ; --- leg_N = regN "leg" ; --- liver_N = regN "liver" ; --- louse_N = mk2N "louse" "lice" ; --- mouth_N = regN "mouth" ; --- name_N = regN "name" ; --- neck_N = regN "neck" ; --- night_N = regN "night" ; --- nose_N = regN "nose" ; --- person_N = mkN human (regN "person") ; --- rain_N = regN "rain" ; --- road_N = regN "road" ; --- root_N = regN "root" ; --- rope_N = regN "rope" ; --- salt_N = regN "salt" ; --- sand_N = regN "sand" ; --- seed_N = regN "seed" ; --- skin_N = regN "skin" ; --- sky_N = regN "sky" ; --- smoke_N = regN "smoke" ; --- snow_N = regN "snow" ; --- stick_N = regN "stick" ; --- tail_N = regN "tail" ; --- tongue_N = regN "tongue" ; --- tooth_N = mk2N "tooth" "teeth" ; --- wife_N = mkN feminine (mk2N "wife" "wives") ; --- wind_N = regN "wind" ; --- wing_N = regN "wing" ; --- worm_N = regN "worm" ; --- year_N = regN "year" ; --- blow_V = IrregTel.blow_V ; --- breathe_V = dirV2 (regV "breathe") ; --- burn_V = IrregTel.burn_V ; --- dig_V = IrregTel.dig_V ; --- fall_V = IrregTel.fall_V ; --- float_V = regV "float" ; --- flow_V = regV "flow" ; --- fly_V = IrregTel.fly_V ; --- freeze_V = IrregTel.freeze_V ; --- give_V3 = dirV3 give_V toP ; --- laugh_V = regV "laugh" ; --- lie_V = IrregTel.lie_V ; --- play_V = regV "play" ; --- sew_V = mkV "sI" ; --- sing_V = IrregTel.sing_V ; --- sit_V = IrregTel.sit_V ; --- smell_V = regV "smell" ; --- spit_V = IrregTel.spit_V ; --- stand_V = IrregTel.stand_V ; --- swell_V = IrregTel.swell_V ; --- swim_V = IrregTel.swim_V ; --- think_V = IrregTel.think_V ; --- turn_V = regV "turn" ; --- vomit_V = regV "vomit" ; --- --- bite_V2 = dirV2 IrregTel.bite_V ; --- count_V2 = dirV2 (regV "count") ; --- cut_V2 = dirV2 IrregTel.cut_V ; --- fear_V2 = dirV2 (regV "fear") ; --- fight_V2 = dirV2 fight_V ; --- hit_V2 = mkV2 (mkV "mAr") "ko" ; --- hold_V2 = dirV2 hold_V ; --- hunt_V2 = dirV2 (regV "hunt") ; --- kill_V2 = dirV2 (regV "kill") ; --- pull_V2 = dirV2 (regV "pull") ; --- push_V2 = dirV2 (regV "push") ; --- rub_V2 = dirV2 (regDuplV "rub") ; --- scratch_V2 = dirV2 (regV "scratch") ; --- split_V2 = dirV2 split_V ; --- squeeze_V2 = dirV2 (regV "squeeze") ; --- stab_V2 = dirV2 (regDuplV "stab") ; --- suck_V2 = dirV2 (regV "suck") ; --- throw_V2 = dirV2 throw_V ; --- tie_V2 = dirV2 (regV "tie") ; --- wash_V2 = dirV2 (regV "wash") ; --- wipe_V2 = dirV2 (regV "wipe") ; --- ----- other_A = regA "other" ; --- --- grammar_N = regN "grammar" ; --- language_N = regN "language" ; --- rule_N = regN "rule" ; --- ----- added 4/6/2007 --- john_PN = mkPN "jon" ; --- question_N = regN "question" ; --- ready_A = regA "ready" ; --- reason_N = regN "reason" ; --- today_Adv = mkAdv "today" ; --- uncertain_A = regA "uncertain" ; --- ---oper --- aboutP = mkPrep "about" ; --- atP = mkPrep "at" ; --- forP = mkPrep "for" ; --- fromP = mkPrep "from" ; --- inP = mkPrep "in" ; --- onP = mkPrep "on" ; --- toP = mkPrep "to" ; --- + +lin + airplane_N = mkN "విమానం" ; + answer_V2S = mkV2S (mkV "సమాధానం చెప్పు") toP ; + apartment_N = mkN "నివాసగృహం" ; + apple_N = mkN "ఆపిల్" ; + art_N = mkN "కళ" ; + ask_V2Q = mkV2Q (mkV "అడుగు") noPrep ; + baby_N = mkN "శిశువు" ; + bad_A = mkA "చెడ్డ" ; + bank_N = mkN "బ్యాంకు" ; + beautiful_A = mkA "అందమైన"; + become_VA = mkVA (mkV "అవు") ; + beer_N = mkN "బీరు" ; + beg_V2V = mkV2V (mkV "వేడుకో") noPrep toP ; + big_A = mkA "పెద్ద" ; + bike_N = mkN "సైకిల్" ; + bird_N = mkN "పక్షి" ; + black_A = mkA "నలుపు" ; + blue_A = mkA "నీలం" ; + boat_N = mkN "పడవ" ; + book_N = mkN "పుస్తకం" ; + boot_N = mkN "బూటు" ; + boss_N = mkN masculine (mkN "యజమాని") ; + boy_N = mkN "బాలుడు" ; + bread_N = mkN "రొట్టె" ; + break_V2 = dirV2 (mkV "విరగగొట్టు") ; + broad_A = mkA "విశాలమైన" ; + brother_N2 = mkN2 (mkN masculine (mkN "సోదరుడు")) (mkPrep "యొక్క") ; + brown_A = mkA "గోధుమరంగు" ; + butter_N = mkN "వెన్న" ; + buy_V2 = dirV2 (mkV "కొను") ; + camera_N = mkN "కెమెరా" ; + cap_N = mkN "టోపీ" ; + car_N = mkN "కారు" ; + carpet_N = mkN "తివాచీ" ; + cat_N = mkN "పిల్లి" ; + ceiling_N = mkN "పైకప్పు" ; + chair_N = mkN "కుర్చీ" ; + cheese_N = mkN "జున్ను" ; + child_N = mkN "పిల్లవాడు" ; + church_N = mkN "చర్చి" ; + city_N = mkN "నగరం" ; + clean_A = mkA "శుభ్రమైన" ; + clever_A = mkA "తెలివైన" ; + close_V2 = dirV2 (mkV "మూయు") ; + coat_N = mkN "కోటు" ; + cold_A = mkA "చల్లని" ; + come_V = (mkV "వచ్చు") ; + computer_N = mkN "కంప్యూటర్" ; + country_N = mkN "దేశం" ; + cousin_N = mkN masculine (mkN "బంధువు") ; + cow_N = mkN "ఆవు" ; + die_V = (mkV "చనిపోవు") ; + dirty_A = mkA "మురికైన" ; + distance_N3 = mkN3 (mkN "దూరం") fromP toP ; + doctor_N = mkN masculine (mkN "వైద్యుడు") ; + dog_N = mkN "కుక్క" ; + door_N = mkN "తలుపు" ; + drink_V2 = dirV2 (mkV "తాగు") ; + easy_A2V = mkA2V (mkA "సులభమైన") forP ; + eat_V2 = mkV2 "తిను" ; + empty_A = mkA "ఖాళీ" ; + enemy_N = mkN "శత్రువు" ; + factory_N = mkN "కర్మాగారం" ; + father_N2 = mkN2 (mkN masculine (mkN "తండ్రి")) (mkPrep "యొక్క") ; + fear_VS = mkVS (mkV "భయపడు") ; + find_V2 = dirV2 (mkV "కనుగొను") ; + fish_N = mkN "చేప" ; + floor_N = mkN "నేల" ; + forget_V2 = dirV2 (mkV "మర్చిపోవు") ; + fridge_N = mkN "శీతలపేటిక" ; + friend_N = mkN masculine (mkN "స్నేహితుడు") ; + fruit_N = mkN "పండు" ; + fun_AV = mkAV (mkA "సరదా") ; + garden_N = mkN "తోట" ; + girl_N = mkN "బాలిక" ; + glove_N = mkN "చేతితొడుగు" ; + gold_N = mkN "బంగారం" ; + good_A = mkA "మంచి" ; + go_V = mkV "వెళ్ళు" ; + green_A = mkA "ఆకుపచ్చ" ; + harbour_N = mkN "నౌకాశ్రయం" ; + hate_V2 = dirV2 (mkV "ద్వేషించు") ; + hat_N = mkN "టోపీ" ; + hear_V2 = dirV2 (mkV "విను") ; + hill_N = mkN "కొండ" ; + hope_VS = mkVS (mkV "ఆశించు") ; + horse_N = mkN "గుర్రం" ; + hot_A = mkA "వేడి" ; + house_N = mkN "ఇల్లు" ; + important_A = mkA "ముఖ్యమైన"; + industry_N = mkN "పరిశ్రమ" ; + iron_N = mkN "ఇనుము" ; + king_N = mkN masculine (mkN "రాజు") ; + know_V2 = dirV2 (mkV "తెలుసు") ; + lake_N = mkN "సరస్సు" ; + lamp_N = mkN "దీపం" ; + learn_V2 = dirV2 (mkV "నేర్చుకో") ; + leather_N = mkN "తోలు" ; + leave_V2 = dirV2 (mkV "విడిచిపెట్టు") ; + like_V2 = dirV2 (mkV "ఇష్టపడు") ; + listen_V2 = prepV2 (mkV "విను") toP ; + live_V = mkV "జీవించు" ; -- touch + long_A = mkA "పొడవైన" ; + lose_V2 = dirV2 (mkV "కోల్పోవు") ; + love_N = mkN "ప్రేమ" ; + love_V2 = dirV2 (mkV "ప్రేమించు") ; + man_N = mkN masculine (mkN "మనిషి") ; + married_A2 = mkA2 (mkA "వివాహిత") toP ; + meat_N = mkN "మాంసం" ; + milk_N = mkN "పాలు" ; + moon_N = mkN "చంద్రుడు" ; + mother_N2 = mkN2 (mkN feminine (mkN "తల్లి")) (mkPrep "యొక్క") ; + mountain_N = mkN "పర్వతం" ; + music_N = mkN "సంగీతం" ; + narrow_A = mkA "ఇరుకైన" ; + new_A = mkA "కొత్త" ; + newspaper_N = mkN "వార్తాపత్రిక" ; + oil_N = mkN "నూనె" ; + old_A = mkA "పాత" ; + open_V2 = dirV2 (mkV "తెరువు") ; + paint_V2A = mkV2A (mkV "రంగువేయు") noPrep ; + paper_N = mkN "కాగితం" ; + paris_PN = mkPN (mkN "పారిస్") ; + peace_N = mkN "శాంతి" ; + pen_N = mkN "కలం" ; + planet_N = mkN "గ్రహం" ; + plastic_N = mkN "ప్లాస్టిక్" ; + play_V2 = dirV2 (mkV "ఆడు") ; + policeman_N = mkN masculine (mkN "పోలీసు" "పోలీసు") ; + priest_N = mkN masculine (mkN "పూజారి") ; + probable_AS = mkAS (mkA "సంభావ్యమైన") ; + queen_N = mkN feminine (mkN "రాణి") ; + radio_N = mkN "రేడియో" ; + rain_V0 = mkV0 (mkV "వర్షించు") ; + read_V2 = dirV2 (mkV "చదువు") ; + red_A = mkA "ఎరుపు" ; + religion_N = mkN "మతం" ; + restaurant_N = mkN "భోజనశాల" ; + river_N = mkN "నది" ; + rock_N = mkN "రాయి" ; + roof_N = mkN "కప్పు" ; + rubber_N = mkN "రబ్బరు" ; + run_V = (mkV "పరుగెత్తు") ; + say_VS = mkVS (mkV "చెప్పు") ; + school_N = mkN "పాఠశాల" ; + science_N = mkN "విజ్ఞానం" ; + sea_N = mkN "సముద్రం" ; + seek_V2 = dirV2 (mkV "వెతుకు") ; + see_V2 = dirV2 (mkV "చూడు") ; + sell_V3 = mkV3 (mkV "అమ్ము") noPrep toP ; + send_V3 = mkV3 (mkV "పంపు") noPrep toP ; + sheep_N = mkN "గొర్రె" ; + ship_N = mkN "ఓడ" ; + shirt_N = mkN "చొక్కా" ; + shoe_N = mkN "చెప్పు" ; + shop_N = mkN "దుకాణం" ; + short_A = mkA "పొట్టి" ; + silver_N = mkN "వెండి" ; + sister_N = mkN2 (mkN feminine (mkN "సోదరి")) (mkPrep "యొక్క") ; + sleep_V = (mkV "నిద్రపోవు") ; + small_A = mkA "చిన్న" ; + snake_N = mkN "పాము" ; + sock_N = mkN "మేజోడు" ; + speak_V2 = dirV2 (mkV "మాట్లాడు") ; + star_N = mkN "నక్షత్రం" ; + steel_N = mkN "ఉక్కు" ; + stone_N = mkN "రాయి" ; + stove_N = mkN "పొయ్యి" ; + student_N = mkN masculine (mkN "విద్యార్థి") ; + stupid_A = mkA "మూర్ఖమైన" ; + sun_N = mkN "సూర్యుడు" ; + switch8off_V2 = dirV2 (partV (mkV "ఆపివేయు") "ఆపివేయు") ; + switch8on_V2 = dirV2 (partV (mkV "ప్రారంభించు") "ప్రారంభించు") ; + table_N = mkN "బల్ల" ; + talk_V3 = mkV3 (mkV "మాట్లాడు") toP aboutP ; + teacher_N = mkN masculine (mkN "ఉపాధ్యాయుడు") ; + teach_V2 = dirV2 (mkV "బోధించు") ; + television_N = mkN "దూరదర్శిని" ; + thick_A = mkA "మందమైన" ; + thin_A = mkA "సన్నని" ; + train_N = mkN "రైలు" ; + travel_V = (mkV "ప్రయాణించు") ; + tree_N = mkN "చెట్టు" ; + -- trousers_N = mkN "trousers" ; + ugly_A = mkA "వికారమైన" ; + understand_V2 = dirV2 (mkV "అర్థంచేసుకో") ; + university_N = mkN "విశ్వవిద్యాలయం" ; + village_N = mkN "గ్రామం" ; + wait_V2 = prepV2 (mkV "వేచిఉండు") forP ; + walk_V = (mkV "నడుచు") ; + warm_A = mkA "వెచ్చని" ; + war_N = mkN "యుద్ధం" ; + watch_V2 = dirV2 (mkV "చూడు") ; + water_N = mkN "నీరు" ; + white_A = mkA "తెలుపు" ; + window_N = mkN "కిటికీ" ; + wine_N = mkN "ద్రాక్షారసం" ; + win_V2 = dirV2 (mkV "గెలుచు") ; + woman_N = mkN feminine (mkN "స్త్రీ") ; + wonder_VQ = mkVQ (mkV "ఆశ్చర్యపడు") ; + wood_N = mkN "కలప" ; + write_V2 = dirV2 (mkV "వ్రాయు") ; + yellow_A = mkA "పసుపు" ; + young_A = mkA "యువ" ; + + do_V2 = dirV2 (mkV "చేయు") ; + now_Adv = mkAdv "ఇప్పుడు" ; + already_Adv = mkAdv "ఇప్పటికే" ; + song_N = mkN "పాట" ; + add_V3 = mkV3 (mkV "కలుపు") noPrep toP ; + number_N = mkN "సంఖ్య" ; + put_V2 = prepV2 (mkV "పెట్టు") noPrep ; + stop_V = mkV "ఆపు" ; + jump_V = mkV "దూకు" ; + + left_Ord = ss "ఎడమ" ; + right_Ord = ss "కుడి" ; + far_Adv = mkAdv "దూరంగా" ; + correct_A = (mkA "సరైన") ; + dry_A = mkA "పొడి" ; + dull_A = mkA "మొద్దైన" ; + full_A = mkA "నిండిన" ; + heavy_A = mkA "బరువైన" ; + near_A = mkA "దగ్గర" ; + rotten_A = (mkA "కుళ్ళిన") ; + round_A = mkA "గుండ్రని" ; + sharp_A = mkA "పదునైన" ; + smooth_A = mkA "మృదువైన" ; + straight_A = mkA "నేరుగా" ; + wet_A = mkA "తడి" ; -- + wide_A = mkA "వెడల్పైన" ; + animal_N = mkN "జంతువు" ; + ashes_N = mkN "బూడిద" ; -- FIXME: plural only? + back_N = mkN "వీపు" ; + bark_N = mkN "చెట్టు బెరడు" ; + belly_N = mkN "కడుపు" ; + blood_N = mkN "రక్తం" ; + bone_N = mkN "ఎముక" ; + breast_N = mkN "రొమ్ము" ; + cloud_N = mkN "మేఘం" ; + day_N = mkN "రోజు" ; + dust_N = mkN "దుమ్ము" ; + ear_N = mkN "చెవి" ; + earth_N = mkN "భూమి" ; + egg_N = mkN "గుడ్డు" ; + eye_N = mkN "కన్ను" ; + fat_N = mkN "కొవ్వు" ; + feather_N = mkN "ఈక" ; + fingernail_N = mkN "గోరు" ; + fire_N = mkN "నిప్పు" ; + flower_N = mkN "పువ్వు" ; + fog_N = mkN "పొగమంచు" ; + foot_N = mkN "పాదం" ; + forest_N = mkN "అడవి" ; + grass_N = mkN "గడ్డి" ; + guts_N = mkN "పేగులు" ; -- FIXME: no singular + hair_N = mkN "వెంట్రుక" ; + hand_N = mkN "చెయ్యి" ; + head_N = mkN "తల" ; + heart_N = mkN "గుండె" ; + horn_N = mkN "కొమ్ము" ; + husband_N = mkN masculine (mkN "భర్త") ; + ice_N = mkN "మంచు" ; + knee_N = mkN "మోకాలు" ; + leaf_N = mkN "ఆకు" ; + leg_N = mkN "కాలు" ; + liver_N = mkN "కాలేయం" ; + louse_N = mkN "పేను" ; + mouth_N = mkN "నోరు" ; + name_N = mkN "పేరు" ; + neck_N = mkN "మెడ" ; + night_N = mkN "రాత్రి" ; + nose_N = mkN "ముక్కు" ; + person_N = mkN masculine (mkN "వ్యక్తి") ; + rain_N = mkN "వర్షం" ; + road_N = mkN "రోడ్డు" ; + root_N = mkN "వేరు" ; + rope_N = mkN "తాడు" ; + salt_N = mkN "ఉప్పు" ; + sand_N = mkN "ఇసుక" ; + seed_N = mkN "విత్తనం" ; + skin_N = mkN "చర్మం" ; + sky_N = mkN "ఆకాశం" ; + smoke_N = mkN "పొగ" ; + snow_N = mkN "హిమం" ; + stick_N = mkN "కర్ర" ; + tail_N = mkN "తోక" ; + tongue_N = mkN "నాలుక" ; + tooth_N = mkN "పన్ను" ; + wife_N = mkN feminine (mkN "భార్య") ; + wind_N = mkN "గాలి" ; + wing_N = mkN "రెక్క" ; + worm_N = mkN "పురుగు" ; + year_N = mkN "సంవత్సరం" ; + blow_V = mkV "ఊదు" ; + breathe_V = dirV2 (mkV "శ్వాసించు") ; + burn_V = mkV "కాల్చు" ; + dig_V = mkV "త్రవ్వు" ; + fall_V = mkV "పడు" ; + float_V = mkV "తేలు" ; + flow_V = mkV "ప్రవహించు" ; + fly_V = mkV "ఎగురు" ; + freeze_V = mkV "గడ్డకట్టు" ; + give_V3 = mkV3 (mkV "ఇచ్చు") noPrep toP ; + laugh_V = mkV "నవ్వు" ; + lie_V = mkV "పడుకొను" ; + play_V = mkV "ఆడు" ; + sew_V = mkV "కుట్టు" ; + sing_V = mkV "పాడు" ; + sit_V = mkV "కూర్చు" ; + smell_V = mkV "వాసనచూడు" ; + spit_V = mkV "ఉమ్ము" ; + stand_V = mkV "నిలుచు" ; + swell_V = mkV "ఉబ్బు" ; + swim_V = mkV "ఈదు" ; + think_V = mkV "ఆలోచించు" ; + turn_V = mkV "తిరుగు" ; + vomit_V = mkV "వాంతిచేయు" ; + + bite_V2 = dirV2 (mkV "కొరుకు") ; + count_V2 = dirV2 (mkV "లెక్కించు") ; + cut_V2 = dirV2 (mkV "కోయు") ; + fear_V2 = dirV2 (mkV "భయపడు") ; + fight_V2 = dirV2 (mkV "పోరాడు") ; + hit_V2 = mkV2 (mkV "కొట్టు") "ను" ; + hold_V2 = dirV2 (mkV "పట్టుకొను") ; + hunt_V2 = dirV2 (mkV "వేటాడు") ; + kill_V2 = dirV2 (mkV "చంపు") ; + pull_V2 = dirV2 (mkV "లాగు") ; + push_V2 = dirV2 (mkV "తోయు") ; + rub_V2 = dirV2 (mkV "రుద్దు") ; + scratch_V2 = dirV2 (mkV "గోకు") ; + split_V2 = dirV2 (mkV "చీల్చు") ; + squeeze_V2 = dirV2 (mkV "పిండు") ; + stab_V2 = dirV2 (mkV "పొడుచు") ; + suck_V2 = dirV2 (mkV "చీకు") ; + throw_V2 = dirV2 (mkV "విసురు") ; + tie_V2 = dirV2 (mkV "కట్టు") ; + wash_V2 = dirV2 (mkV "కడుగు") ; + wipe_V2 = dirV2 (mkV "తుడుచు") ; + +-- other_A = mkA "other" ; + + grammar_N = mkN "వ్యాకరణం" ; + language_N = mkN "భాష" ; + rule_N = mkN "నియమం" ; + +-- added 4/6/2007 + john_PN = mkPN "జాన్" ; + question_N = mkN "ప్రశ్న" ; + ready_A = mkA "సిద్ధమైన" ; + reason_N = mkN "కారణం" ; + today_Adv = mkAdv "ఈరోజు" ; + uncertain_A = mkA "అనిశ్చితమైన" ; + +oper + aboutP = mkPrep "గురించి" ; + atP = mkPrep "వద్ద" ; + forP = mkPrep "కోసం" ; + fromP = mkPrep "నుండి" ; + inP = mkPrep "లో" ; + onP = mkPrep "పై" ; + toP = mkPrep "కు" ; + } diff --git a/src/telugu/MorphoTel.gf b/src/telugu/MorphoTel.gf index a56a736f..a569cd53 100644 --- a/src/telugu/MorphoTel.gf +++ b/src/telugu/MorphoTel.gf @@ -1,196 +1,196 @@ -----# -path=.:../../prelude +--# -path=.:../../prelude +-- +----1 A Simple Telugu Resource Morphology ---- -------1 A Simple Teldi Resource Morphology ------- ------- 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. +---- Aarne Ranta 2002 -- 2005 ---- ---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 ------- ------- To regulate the use of endings for both nouns, adjectives, and verbs: +---- For conciseness and abstraction, we define a worst-case macro for +---- noun inflection. It is used for defining special case that +---- only need one string as argument. +-- +--oper +-- 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 ----- 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 ----- } ; +---- Regular proper names are inflected with "'s" in the genitive. +-- +-- nameReg : Str -> Gender -> {s : Case => Str} = \john,g -> +-- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ; +-- +----2 Determiners +-- +-- mkDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s -> +-- {s = s ; n = n} ; +-- +----2 Pronouns ---- +---- Here we define personal pronouns. ---- -------2 Nouns ------- ------- For conciseness and abstraction, we define a worst-case macro for ------- noun inflection. It is used for defining special case that ------- only need one string as argument. +---- We record the form "mine" and the gender for later use. +-- +-- Pronoun : Type = +-- {s : Case => Str ; a : Agr} ; +-- +-- 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 ----- CommonNoun : Type = {s : Number => Case => Str} ; +---- To form the adjectival and the adverbial forms, two strings are needed +---- 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 { ----- "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 ------- ------- Regular proper names are inflected with "'s" in the genitive. ----- ----- nameReg : Str -> Gender -> {s : Case => Str} = \john,g -> ----- {s = table {Gen => john + "'s" ; _ => john} ; g = g} ; ----- -------2 Determiners ----- ----- mkDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s -> ----- {s = s ; n = n} ; ----- -------2 Pronouns ------- ------- Here we define personal pronouns. ------- ------- We record the form "mine" and the gender for later use. ----- ----- Pronoun : Type = ----- {s : Case => Str ; a : Agr} ; ----- ----- 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 ------- ------- To form the adjectival and the adverbial forms, two strings are needed ------- 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 ------- ------- 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 [] ; ----- ----- ---} +---- 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 [] ; +-- +-- +} diff --git a/src/telugu/NounTel.gf b/src/telugu/NounTel.gf index a6b70d72..c20fae48 100644 --- a/src/telugu/NounTel.gf +++ b/src/telugu/NounTel.gf @@ -3,119 +3,149 @@ concrete NounTel of Noun = CatTel ** open ResTel, Prelude in { flags optimize=all_subs ; lin --- DetCN det cn = { --- s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ; --- a = agrP3 cn.g det.n + DetCN det cn = { + s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ; + a = agrP3 cn.g det.n + } ; + + UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ; + UsePron p = {s = \\c => p.s ! np2pronCase c ; a = p.a} ; +-- + PredetNP pred np = { + s = \\c => pred.s ++ np.s ! c ; + a = np.a + } ; +-- + PPartNP np v2 = { + s = \\c => np.s ! c ++ v2.s ! 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} ; --- UsePron p = {s = \\c => p.s ! np2pronCase c ; a = p.a} ; ----- ----- PredetNP pred np = { ----- s = \\c => pred.s ++ np.s ! c ; ----- a = np.a ----- } ; ----- ----- PPartNP np v2 = { ----- s = \\c => np.s ! c ++ v2.s ! VPPart ; ----- a = np.a ----- } ; ----- ----- RelNP np rs = { ----- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; ----- a = np.a ----- } ; ----- ----- AdvNP np adv = { ----- s = \\c => np.s ! c ++ adv.s ; ----- a = np.a ----- } ; ----- ----- DetQuantOrd quant num ord = { ----- s = quant.s ! num.n ++ num.s ++ ord.s ; ----- n = num.n ----- } ; + AdvNP np adv = { + s = \\c => np.s ! c ++ adv.s ; + a = np.a + } ; -- --- DetQuant quant num = { --- s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ; --- n = num.n + DetQuantOrd quant num ord = { + s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ++ ord.s ; + n = num.n + } ; + + DetQuant quant num = { + s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ; + n = num.n + } ; + +-- DetNP det = { +-- s = \\c => det.s ; ---- case +-- a = agrP3 det.n -- } ; -- ----- DetNP det = { ----- s = \\c => det.s ; ---- case ----- a = agrP3 det.n ----- } ; ----- --- PossPron p = {s = \\_,_,_ => p.s ! PPoss} ; + PossPron p = {s = \\_,_,_ => p.s ! PPoss} ; + + NumSg = {s = []; n = Sg} ; + NumPl = {s = []; n = Pl} ; + + 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} ; --- NumPl = {s = []; n = Pl} ; +-- NumDigits n = {s = n.s ! NCard ; n = n.n} ; +-- OrdDigits n = {s = n.s ! NOrd} ; -- ----- NumCard n = n ** {hasCard = True} ; ----- ----- NumDigits n = {s = n.s ! NCard ; n = n.n} ; ----- OrdDigits n = {s = n.s ! NOrd} ; ----- ----- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ; ----- OrdNumeral numeral = {s = numeral.s ! NOrd} ; ----- ----- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ; ----- ----- OrdSuperl a = {s = a.s ! AAdj Superl} ; ----- ----- DetArtOrd art num ord = { ----- s = art.s ! num.hasCard ! num.n ++ num.s ++ ord.s ; ----- n = num.n ----- } ; ----- ----- DetArtCard art card = { ----- s = art.s ! True ! card.n ++ card.s ; ----- n = card.n ----- } ; + NumNumeral numeral = {s = numeral.s ; n = Pl} ; +-- OrdNumeral numeral = {s = numeral.s ! NOrd} ; -- --- DefArt = {s = \\_,_,_ => []} ; --- IndefArt = {s = \\_,_,_ => []} ; +-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ; -- ----- MassNP cn = { ----- s = cn.s ! Sg ; ----- a = agrP3 Sg ----- } ; +-- OrdSuperl a = {s = a.s ! AAdj Superl} ; -- + 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 ; ----- 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 ----- } ; + UseN2 n = n ; -- --- AdjCN ap cn = { --- s = \\n,c => ap.s ! cn.g ! n ! c ++ cn.s ! n ! c ; +-- 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 ! 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 -- } ; + 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} ; ----- } diff --git a/src/telugu/NumeralTel.gf b/src/telugu/NumeralTel.gf index 75a40369..4fa1cedf 100644 --- a/src/telugu/NumeralTel.gf +++ b/src/telugu/NumeralTel.gf @@ -1,89 +1,141 @@ ---concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in { ----- -----lincat ----- Digit = {s : DForm => CardOrd => Str} ; ----- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; ----- Sub100 = {s : CardOrd => Str ; n : Number} ; ----- Sub1000 = {s : CardOrd => Str ; n : Number} ; ----- Sub1000000 = {s : CardOrd => Str ; n : Number} ; ----- -----lin num x = x ; -----lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in ----- {s = \\f,c => case of { ----- => "twelfth" ; ----- _ => two.s ! f ! c ----- } ----- } ; ----- -----lin n3 = mkNum "three" "thirteen" "thirty" "third" ; -----lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; -----lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; -----lin n6 = regNum "six" ; -----lin n7 = regNum "seven" ; -----lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; -----lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; ----- -----lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; -----lin pot0 d = d ** {n = Pl} ; -----lin pot110 = regCardOrd "ten" ** {n = Pl} ; -----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} ; -----lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; -----lin pot1plus d e = { ----- 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 ----- } ; ----- ---} +concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in { + lincat + Digit, Sub10, Sub100, Sub1000, Sub1000000, + Sub1000000000, Sub1000000000000 = {s : Str ; n : Number} ; + Dig = {s : Str} ; + + lin + num x = x ; + n2 = {s = "రెండు" ; n = Pl} ; + n3 = {s = "మూడు" ; n = Pl} ; + n4 = {s = "నాలుగు" ; n = Pl} ; + n5 = {s = "ఐదు" ; n = Pl} ; + n6 = {s = "ఆరు" ; n = Pl} ; + n7 = {s = "ఏడు" ; n = Pl} ; + n8 = {s = "ఎనిమిది" ; n = Pl} ; + n9 = {s = "తొమ్మిది" ; n = Pl} ; + + pot01 = {s = "ఒకటి" ; n = Sg} ; + pot0 d = d ; + pot0as1 x = x ; + pot110 = {s = "పది" ; n = Pl} ; + pot111 = {s = "పదకొండు" ; n = Pl} ; + pot1to19 d = {s = "పది" ++ d.s ; n = Pl} ; + pot1 d = {s = d.s ++ "పది" ; n = Pl} ; + pot1plus d x = {s = d.s ++ "పది" ++ x.s ; n = Pl} ; + pot1as2 x = x ; + pot21 = {s = "వంద" ; n = Pl} ; + pot2 x = {s = x.s ++ "వందలు" ; n = Pl} ; + pot2plus x y = {s = x.s ++ "వందలు" ++ y.s ; n = Pl} ; + pot2as3 x = x ; + pot31 = {s = "వెయ్యి" ; n = Pl} ; + pot3 x = {s = x.s ++ "వేలు" ; n = Pl} ; + pot3plus x y = {s = x.s ++ "వేలు" ++ y.s ; n = Pl} ; + pot3as4 x = x ; + pot3decimal x = {s = x.s ++ "వేలు" ; n = Pl} ; + pot41 = {s = "పది లక్షలు" ; n = Pl} ; + pot4 x = {s = x.s ++ "పది లక్షలు" ; n = Pl} ; + pot4plus x y = {s = x.s ++ "పది లక్షలు" ++ y.s ; n = Pl} ; + pot4as5 x = x ; + pot4decimal x = {s = x.s ++ "పది లక్షలు" ; n = Pl} ; + pot51 = {s = "వంద కోట్లు" ; n = Pl} ; + pot5 x = {s = x.s ++ "వంద కోట్లు" ; n = Pl} ; + pot5plus x y = {s = x.s ++ "వంద కోట్లు" ++ y.s ; n = Pl} ; + pot5decimal x = {s = x.s ++ "వంద కోట్లు" ; n = Pl} ; + + IDig d = {s = d.s ; n = Pl} ; + IIDig d ds = {s = d.s ++ ds.s ; n = Pl} ; + D_0 = {s = "0"} ; D_1 = {s = "1"} ; D_2 = {s = "2"} ; + D_3 = {s = "3"} ; D_4 = {s = "4"} ; D_5 = {s = "5"} ; + D_6 = {s = "6"} ; D_7 = {s = "7"} ; D_8 = {s = "8"} ; D_9 = {s = "9"} ; + PosDecimal ds = ds ; + NegDecimal ds = {s = "-" ++ ds.s ; n = ds.n} ; + IFrac dec d = {s = dec.s ++ "." ++ d.s ; n = dec.n} ; +-- +--lincat +-- Digit = {s : DForm => CardOrd => Str} ; +-- Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; +-- Sub100 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000 = {s : CardOrd => Str ; n : Number} ; +-- Sub1000000 = {s : CardOrd => Str ; n : Number} ; +-- +--lin num x = x ; +--lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in +-- {s = \\f,c => case of { +-- => "twelfth" ; +-- _ => two.s ! f ! c +-- } +-- } ; +-- +--lin n3 = mkNum "three" "thirteen" "thirty" "third" ; +--lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; +--lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; +--lin n6 = regNum "six" ; +--lin n7 = regNum "seven" ; +--lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; +--lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; +-- +--lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; +--lin pot0 d = d ** {n = Pl} ; +--lin pot110 = regCardOrd "ten" ** {n = Pl} ; +--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} ; +--lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; +--lin pot1plus d e = { +-- 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 +-- } ; +-- +} diff --git a/src/telugu/ParadigmsTel.gf b/src/telugu/ParadigmsTel.gf index 70b1cb11..0853cfd0 100644 --- a/src/telugu/ParadigmsTel.gf +++ b/src/telugu/ParadigmsTel.gf @@ -1,556 +1,181 @@ --# -path=.:../abstract:../../prelude:../common ---1 Teldi Lexical Paradigms +--1 Telugu Lexical Paradigms -resource ParadigmsTel = open - (Predef=Predef), - Prelude, +resource ParadigmsTel = open + (Predef=Predef), + Prelude, ResTel, CatTel in { --- -----2 Parameters --- + +--2 Parameters + oper --- masculine : Gender ; --- feminine : Gender ; --- --- masculine = Masc ; feminine = Fem ; --i --- --- -----2 Nouns --- + masculine : Gender = Masc ; + feminine : Gender = Fem ; + + +--2 Nouns + mkN = overload { - mkN : Str -> N + mkN : Str -> N = \s -> wallNoun s ** {lock_N = <>} ; --- mkN : Str -> Gender -> N --- = \s,g -> reggNoun s g ** {lock_N = <>} ; - mkN : (x1,_,_,x4 : Str) -> Gender -> N + mkN : Str -> Gender -> N + = \s,g -> reggNoun s g ** {lock_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 = <>} ; } ; + + +----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 : N -> Gender -> PN = \n,g -> {s = n.s ! Sg ; g = g ; lock_PN = <>} ; --- } ; --- + + mkPN = overload { + 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 -- --- mkA = overload { --- mkA : Str -> A --- = \s -> regAdjective s ** {lock_A = <>} ; --- mkA : (x1,_,x3 : Str) -> A --- = \msd,m,f -> mkAdjective msd m f ** {lock_A = <>} ; --- } ; --- + mkA = overload { + ---- For regular adjectives + mkA : Str -> A + = \s -> regAdjective s ** {lock_A = <>} ; + mkA : (x1,_,x3 : Str) -> A + = \msd,m,f -> mkAdjective msd m f ** {lock_A = <>} ; + } ; + ----2 Verbs +---- -- --- 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 = <>} ; --- } ; +---- Verbs are constructed by the function $mkV$, which takes a varying +---- number of arguments. -- + + 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 --- = \s -> regVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ; --- mkV2 : V -> V2 --- = \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ; --- mkV2 : V -> Str -> V2 --- = \v,p -> v ** {c2 = {s = p ; c = VTransPost} ; lock_V2 = <>} ; --- } ; + + mkV2 = overload { + mkV2 : Str -> V2 + = \s -> regVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ; + mkV2 : V -> V2 + = \v -> v ** {c2 = {s = [] ; c = VTrans} ; 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 ------- ------- A compound noun is an uninflected string attached to an inflected noun, ------- such as "baby boom", "chief executive officer". ----- ----- mkN : Str -> N -> N ----- } ; ----- ----- -------3 Relational nouns ------- ------- Relational nouns ("daughter of x") need a preposition. ----- ----- mkN2 : N -> Prep -> N2 ; ----- ------- The most common preposition is "of", and the following is a ------- shortcut for regular relational nouns with "of". ----- ----- regN2 : Str -> N2 ; ----- ------- Use the function $mkPrep$ or see the section on prepositions below to ------- form other prepositions. ------- ------- Three-place relational nouns ("the connection from x to y") need two prepositions. ----- ----- mkN3 : N -> Prep -> Prep -> N3 ; ----- ----- ----- -------3 Proper names and noun phrases ------- ------- Proper names, with a regular genitive, are formed from strings. ----- ----- mkPN : overload { ----- ----- mkPN : Str -> PN ; ----- ------- Sometimes a common noun can be reused as a proper name, e.g. "Bank" ----- ----- mkPN : N -> PN ----- } ; ----- ----- -------2 Adjectives ----- ----- mkA : overload { ----- ------- For regular adjectives, the adverbial and comparison forms are derived. This holds ------- even for cases with the variations "happy - happily - happier - happiest", ------- "free - freely - freer - freest", and "rude - rudest". ----- ----- mkA : (happy : Str) -> A ; ----- ------- However, the duplication of the final consonant cannot be predicted, ------- but a separate case is used to give the comparative ----- ----- mkA : (fat,fatter : Str) -> A ; ----- ------- As many as four forms may be needed. ----- ----- mkA : (good,better,best,well : Str) -> A ----- } ; ----- ------- To force comparison to be formed by "more - most", ------- the following function is used: ----- ----- compoundA : A -> A ; -- -/more/most ridiculous ----- ----- ----- -------3 Two-place adjectives ------- ------- 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 ; ----- ----- ----- + mkVS : V -> VS = \v -> v ** {lock_VS = <>} ; + mkVV : V -> VV = \v -> lin VV (v ** {isAux = False}) ; + mkVQ : V -> VQ = \v -> v ** {lock_VQ = <>} ; + mkVA : V -> VA = \v -> v ** {lock_VA = <>} ; + mkV0 : V -> V = \v -> v ; + mkV2S : V -> Prep -> V2S = \v,p -> v ** { + c2 = {s = p.s ; c = VTransPost} ; lock_V2S = <> + } ; + mkV2Q : V -> Prep -> V2Q = \v,p -> v ** { + c2 = {s = p.s ; c = VTransPost} ; lock_V2Q = <> + } ; + mkV2A : V -> Prep -> V2A = \v,p -> v ** { + c2 = {s = p.s ; c = VTransPost} ; lock_V2A = <> + } ; + mkV2V : V -> Prep -> Prep -> V2V = \v,p,_ -> v ** { + c2 = {s = p.s ; c = VTransPost} ; lock_V2V = <> + } ; + +----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. +-- + + noPrep : Prep = {s = [] ; lock_Prep = <>} ; + mkPrep : Str -> Prep = \s -> {s = s ; lock_Prep = <>} ; + + dirV2 : V -> V2 = mkV2 ; + prepV2 : V -> Prep -> V2 = \v,p -> mkV2 v p.s ; + partV : V -> Str -> V = \v,_ -> v ; + +----3 Relational nouns +---- +---- Relational nouns ("daughter of x") need a preposition. +-- + + mkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p.s ; lock_N2 = <>} ; + +---- Three-place relational nouns ("the connection from x to y") need two prepositions. +-- + + mkN3 : N -> Prep -> Prep -> N3 = \n,p,q -> n ** {c2 = p.s ; c3 = q.s ; lock_N3 = <>} ; + +----3 Two-place adjectives +---- +---- Two-place adjectives need a preposition for their second argument. +-- + + mkA2 : A -> Prep -> A2 = \a,p -> a ** {c2 = p.s ; lock_A2 = <>} ; + mkA2V : A -> Prep -> A2 = mkA2 ; + mkAS : A -> A = \a -> a ; + mkAV : A -> A = \a -> a ; + +----2 Adverbs +-- +---- Adverbs are not inflected. Most lexical ones have position +---- after the verb. Some can be preverbal (e.g. "always"). +-- + + mkAdv : Str -> Adv = \s -> {s = s ; lock_Adv = <>} ; + mkAdV : Str -> AdV = \s -> lin AdV {s = s} ; + +---- Adverbs modifying adjectives and sentences can also be formed. +-- +-- mkAdA : Str -> AdA ; +-- + + mkAdA : Str -> AdA = \s -> lin AdA {s = s} ; + mkAdN : Str -> AdN = \s -> lin AdN {s = s} ; + + mkInterj : Str -> Interj = \s -> lin Interj {s = s} ; + mkVoc : Str -> Voc = \s -> lin Voc {s = s} ; + } diff --git a/src/telugu/PhraseTel.gf b/src/telugu/PhraseTel.gf index 0605cef6..a9fcc51d 100644 --- a/src/telugu/PhraseTel.gf +++ b/src/telugu/PhraseTel.gf @@ -1,24 +1,23 @@ ---concrete PhraseTel of Phrase = CatTel ** open Prelude, ResTel in { ----- ----- lin ----- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; ----- ----- UttS s = s ; ----- UttQS qs = {s = qs.s ! QDir} ; ----- UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ; ----- UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ; ----- UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ; ----- ----- UttIP ip = {s = ip.s ! Nom} ; --- Acc also ----- UttIAdv iadv = iadv ; ----- UttNP np = {s = np.s ! Nom} ; ----- UttVP vp = {s = infVP False vp (agrP3 Sg)} ; ----- UttAdv adv = adv ; ----- ----- NoPConj = {s = []} ; ----- PConjConj conj = {s = conj.s2} ; --- ----- ----- NoVoc = {s = []} ; ----- VocNP np = {s = "," ++ np.s ! Nom} ; ----- ---} +concrete PhraseTel of Phrase = CatTel ** open Prelude, ResTel in { +-- + lin + PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; + + UttS s = s ; + UttQS qs = qs ; + UttNP np = {s = np.s ! NPC Dir} ; + UttCN cn = {s = cn.s ! Sg ! Dir} ; + UttAP ap = {s = ap.s ! Masc ! Sg ! Dir} ; + UttVP vp = {s = let f = vp.s ! Pos ! VPInf in f.inf ++ f.fin} ; + UttAdv adv = adv ; + UttImpSg pol imp = {s = pol.s ++ imp.s} ; + UttImpPl pol imp = {s = pol.s ++ imp.s} ; + UttImpPol pol imp = {s = pol.s ++ imp.s} ; + + NoPConj = {s = []} ; +-- PConjConj conj = {s = conj.s2} ; --- +-- + NoVoc = {s = []} ; +-- VocNP np = {s = "," ++ np.s ! Nom} ; +-- +} diff --git a/src/telugu/QuestionTel.gf b/src/telugu/QuestionTel.gf index 3ad83bda..6b21b151 100644 --- a/src/telugu/QuestionTel.gf +++ b/src/telugu/QuestionTel.gf @@ -1,55 +1,68 @@ ---concrete QuestionTel of Question = CatTel ** open ResTel, Prelude in { ----- ----- flags optimize=all_subs ; ----- ----- lin ----- ----- QuestCl cl = { ----- s = \\t,a,p => ----- let cls = cl.s ! t ! a ! p ----- in table { ----- QDir => cls ! OQuest ; ----- QIndir => "if" ++ cls ! ODir ----- } ---- "whether" in ExtTel ----- } ; ----- ----- QuestVP qp vp = ----- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp ----- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; ----- ----- QuestSlash ip slash = ----- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ; ----- --- stranding in ExratTel ----- ----- QuestIAdv iadv cl = mkQuestion iadv cl ; ----- ----- QuestIComp icomp np = ----- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ; ----- ----- ----- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; ----- ----- AdvIP ip adv = { ----- s = \\c => ip.s ! c ++ adv.s ; ----- n = ip.n ----- } ; ----- ----- IdetCN idet cn = { ----- s = \\c => idet.s ++ cn.s ! idet.n ! c ; ----- n = idet.n ----- } ; ----- ----- IdetIP idet = { ----- s = \\c => idet.s ; ----- n = idet.n ----- } ; ----- ----- IdetQuant idet num = { ----- s = idet.s ! num.n ++ num.s ; ----- n = num.n ----- } ; ----- ----- CompIAdv a = a ; ----- CompIP p = ss (p.s ! Nom) ; ----- ---} +concrete QuestionTel of Question = CatTel ** open ResTel, Prelude in { +-- +-- flags optimize=all_subs ; +-- + lin + QuestCl cl = cl ; + + QuestVP ip vp = mkClause {s = \\_ => ip.s ! Dir ; a = agrP3 Neutr ip.n} vp ; + QuestIAdv iadv cl = cl ** {s = \\t,p => iadv.s ++ cl.s ! t ! p} ; + QuestIComp icomp np = mkClause np (predV (regVerb []) ** {comp = \\_ => icomp.s}) ; + + PrepIP p ip = {s = ip.s ! Obl ++ p.s} ; + 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} ; + IdetQuant iq num = {s = iq.s ! num.n ++ num.s ; n = num.n} ; + CompIAdv adv = {s = adv.s} ; + CompIP ip = {s = ip.s ! Dir} ; +-- +-- QuestCl cl = { +-- s = \\t,a,p => +-- let cls = cl.s ! t ! a ! p +-- in table { +-- QDir => cls ! OQuest ; +-- QIndir => "if" ++ cls ! ODir +-- } ---- "whether" in ExtTel +-- } ; +-- +-- QuestVP qp vp = +-- let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp +-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; +-- +-- QuestSlash ip slash = +-- mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ; +-- --- stranding in ExratTel +-- +-- QuestIAdv iadv cl = mkQuestion iadv cl ; +-- +-- QuestIComp icomp np = +-- mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ; +-- +-- +-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; +-- +-- AdvIP ip adv = { +-- s = \\c => ip.s ! c ++ adv.s ; +-- n = ip.n +-- } ; +-- +-- IdetCN idet cn = { +-- s = \\c => idet.s ++ cn.s ! idet.n ! c ; +-- n = idet.n +-- } ; +-- +-- IdetIP idet = { +-- s = \\c => idet.s ; +-- n = idet.n +-- } ; +-- +-- IdetQuant idet num = { +-- s = idet.s ! num.n ++ num.s ; +-- n = num.n +-- } ; +-- +-- CompIAdv a = a ; +-- CompIP p = ss (p.s ! Nom) ; +-- +} diff --git a/src/telugu/RelativeTel.gf b/src/telugu/RelativeTel.gf index 961624f2..ced36ea2 100644 --- a/src/telugu/RelativeTel.gf +++ b/src/telugu/RelativeTel.gf @@ -1,54 +1,58 @@ ---concrete RelativeTel of Relative = CatTel ** open ResTel in { ----- ----- flags optimize=all_subs ; ----- ----- lin ----- ----- RelCl cl = { ----- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; ----- c = Nom ----- } ; ----- ----- RelVP rp vp = { ----- s = \\t,ant,b,ag => ----- let ----- agr = case rp.a of { ----- RNoAg => ag ; ----- RAg a => a ----- } ; ----- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp ----- in ----- cl.s ! t ! ant ! b ! ODir ; ----- c = Nom ----- } ; ----- ------- Pied piping: "at which we are looking". Stranding and empty ------- relative are defined in $ExtraTel.gf$ ("that we are looking at", ------- "we are looking at"). ----- ----- RelSlash rp slash = { ----- s = \\t,a,p,agr => ----- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; ----- c = Acc ----- } ; ----- ----- FunRP p np rp = { ----- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; ----- a = RAg np.a ----- } ; ----- ----- IdRP = ----- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc ----- in { ----- s = table { ----- RC _ Gen => "whose" ; ----- RC Neutr _ => varr "which" ; ----- RC _ Acc => varr "whom" ; ----- RC _ Nom => varr "who" ; ----- RPrep Neutr => "which" ; ----- RPrep _ => "whom" ----- } ; ----- a = RNoAg ----- } ; ----- ---} +concrete RelativeTel of Relative = CatTel ** open ResTel in { +-- +-- flags optimize=all_subs ; +-- + lin + RelCl cl = cl ; + RelVP rp vp = mkClause {s = \\_ => rp.s ; a = defaultAgr} vp ; + IdRP = {s = "ఏ"} ; + FunRP prep np rp = {s = np.s ! NPC Obl ++ prep.s ++ rp.s} ; +-- +-- RelCl cl = { +-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; +-- c = Nom +-- } ; +-- +-- RelVP rp vp = { +-- s = \\t,ant,b,ag => +-- let +-- agr = case rp.a of { +-- RNoAg => ag ; +-- RAg a => a +-- } ; +-- cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp +-- in +-- cl.s ! t ! ant ! b ! ODir ; +-- c = Nom +-- } ; +-- +---- Pied piping: "at which we are looking". Stranding and empty +---- relative are defined in $ExtraTel.gf$ ("that we are looking at", +---- "we are looking at"). +-- +-- RelSlash rp slash = { +-- s = \\t,a,p,agr => +-- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; +-- c = Acc +-- } ; +-- +-- FunRP p np rp = { +-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; +-- a = RAg np.a +-- } ; +-- +-- IdRP = +-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc +-- in { +-- s = table { +-- RC _ Gen => "whose" ; +-- RC Neutr _ => varr "which" ; +-- RC _ Acc => varr "whom" ; +-- RC _ Nom => varr "who" ; +-- RPrep Neutr => "which" ; +-- RPrep _ => "whom" +-- } ; +-- a = RNoAg +-- } ; +-- +} diff --git a/src/telugu/ResTel.gf b/src/telugu/ResTel.gf index 20e05f96..989ce209 100644 --- a/src/telugu/ResTel.gf +++ b/src/telugu/ResTel.gf @@ -1,303 +1,274 @@ --# -path=.:../abstract:../common:../../prelude ---1 Teldi auxiliary operations. +--1 Telugu auxiliary operations. -- This module contains operations that are needed to make the --- resource syntax work. --- +-- resource syntax work. + resource ResTel = ParamX ** open Prelude in { flags optimize=all ; - param + param Case = Dir | Obl ; Gender = Masc | Fem | Neutr ; oper Noun = {s : Number => Case => Str ; g : Gender} ; - mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun = + mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun = \sd,so,pd,po,g -> { s = table Number [table Case [sd;so] ; table Case [pd;po]] ; g = g } ; - wallNoun : Str -> Noun = \goda -> - mkNoun goda goda (goda + "lu") (goda + "la") Neutr ; + wallNoun : Str -> Noun = \goda -> + 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 of { + => smd ; + => 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 of { + _ => [] + } ; + + param + PronCase = PC Case | PObj | PPoss ; + oper + personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n -> + case of { + => {s = table {PC Dir => "నేను" ; PC Obl => "నా" ; PObj => "నన్ను" ; PPoss => "నా"}} ; + => {s = table {PC Dir => "మేము" ; PC Obl => "మా" ; PObj => "మమ్మల్ని" ; PPoss => "మా"}} ; + => {s = table {PC Dir => "నువ్వు" ; PC Obl => "నీ" ; PObj => "నిన్ను" ; PPoss => "నీ"}} ; + => {s = table {PC Dir => "మీరు" ; PC Obl => "మీ" ; PObj => "మిమ్మల్ని" ; PPoss => "మీ"}} ; + => {s = table {PC Dir => "అతను" ; PC Obl => "అతని" ; PObj => "అతన్ని" ; PPoss => "అతని"}} ; + => {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 of { + => VPGenPres ; + => VPPerf ; + => VPFut ; + => VPSubj ; + => VPPerfPres ; + => VPPerfPast ; + => VPPerf ; + => 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 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 of { --- => smd ; --- => 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 of { --- => "hUM" ; --- => "hE" ; --- => "hE" ; --- => "hEN" ; --- => "ho" ; --- => "hEN" ; --- => "TA" ; --- => "TI" ; --- => "Te" ; --- => "TIN" ; --- => "hUNgA" ; --- => "hUNgI" ; --- => "hogA" ; --- => "hogI" ; --- => "hoge" ; --- => "hoNge" ; --- => "hogi:" ; --- => "hoNgi:" --- } ; --- --- param --- PronCase = PC Case | PObj | PPoss ; --- oper --- personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n -> --- case of { --- => {s = table PronCase ["mEN" ; "muJ" ; "muJ" ; "muJe" ; "merA"]} ; --- => {s = table PronCase ["ham" ; "ham" ; "ham" ; "hameN" ; "hamArA"]} ; --- => {s = table PronCase ["tU" ; "tuJ" ; "tuJ" ; "tuJe" ; "terA"]} ; --- => {s = table PronCase ["tum" ; "tum" ; "tum" ; "tum" ; "tumhArA"]} ; --- => {s = table PronCase ["vah" ; "u-s" ; "u-s" ; "u-se" ; "u-skA"]} ; --- => {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 => ; --- VTransPost => ; --- _ => --- } ; --- _ => --- } ; --- 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 --- } ; --- --- } diff --git a/src/telugu/SentenceTel.gf b/src/telugu/SentenceTel.gf index b067131a..ed484c61 100644 --- a/src/telugu/SentenceTel.gf +++ b/src/telugu/SentenceTel.gf @@ -1,66 +1,43 @@ ---concrete SentenceTel of Sentence = CatTel ** open Prelude, ResTel in { --- --- flags optimize=all_subs ; --- --- lin --- --- PredVP np vp = mkClause np vp ; --- ----- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; ----- ----- ImpVP vp = { ----- s = \\pol,n => ----- let ----- agr = AgP2 (numImp n) ; ----- verb = infVP True vp agr ; ----- dont = case pol of { ----- CNeg True => "don't" ; ----- CNeg False => "do" ++ "not" ; ----- _ => [] ----- } ----- in ----- dont ++ verb ----- } ; ----- ----- SlashVP np vp = ----- mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ; ----- ----- AdvSlash slash adv = { ----- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; ----- c2 = slash.c2 ----- } ; ----- ----- SlashPrep cl prep = cl ** {c2 = prep.s} ; ----- ----- SlashVS np vs slash = ----- mkClause (np.s ! Nom) np.a ----- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) ** ----- {c2 = slash.c2} ; ----- ----- EmbedS s = {s = conjThat ++ s.s} ; ----- EmbedQS qs = {s = qs.s ! QIndir} ; ----- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr ----- ----- UseCl t a p cl = { ----- s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir ----- } ; ----- UseQCl t a p cl = { ----- s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! q ----- } ; ----- UseRCl t a p cl = { ----- s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! r ; ----- c = cl.c ----- } ; ----- UseSlash t a p cl = { ----- s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir ; ----- c2 = cl.c2 ----- } ; ----- ----- AdvS a s = {s = a.s ++ "," ++ s.s} ; ----- ----- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; ----- ----- oper ----- ctr = contrNeg True ; -- contracted negations ----- ---} +concrete SentenceTel of Sentence = CatTel ** open Prelude, ResTel in { + + flags optimize=all_subs ; + + lin + + PredVP np vp = mkClause np vp ; + + PredSCVP sc vp = mkClause {s = \\_ => sc.s ; a = agrP3 Neutr Sg} vp ; + + ImpVP vp = {s = let f = vp.s ! Pos ! VPImp in + vp.obj.s ++ vp.comp ! defaultAgr ++ f.neg ++ f.inf ++ f.fin} ; + + AdvImp adv imp = {s = adv.s ++ imp.s} ; + + AdvS a s = {s = a.s ++ s.s} ; + + UseCl temp pol cl = { + s = temp.s ++ pol.s ++ cl.s ! tenseVPH temp.t temp.a ! pol.p + } ; + + UseQCl temp pol cl = { + s = temp.s ++ pol.s ++ cl.s ! tenseVPH temp.t temp.a ! pol.p + } ; + + UseRCl temp pol cl = { + s = cl.s ! tenseVPH temp.t temp.a ! pol.p + } ; + + ExtAdvS adv sent = {s = adv.s ++ sent.s} ; + SSubjS first subj second = {s = first.s ++ subj.s ++ second.s} ; + EmbedS sent = {s = sent.s} ; + EmbedQS sent = {s = sent.s} ; + + SlashVP np vps = { + s = (mkClause np vps).s ; + c2 = vps.c2 + } ; + + AdvSlash slash adv = slash ** { + s = \\t,p => slash.s ! t ! p ++ adv.s + } ; +} diff --git a/src/telugu/StructuralTel.gf b/src/telugu/StructuralTel.gf index 6e070127..73928963 100644 --- a/src/telugu/StructuralTel.gf +++ b/src/telugu/StructuralTel.gf @@ -1,132 +1,159 @@ ---concrete StructuralTel of Structural = CatTel ** --- open MorphoTel, (P = ParadigmsTel), Prelude in { +concrete StructuralTel of Structural = CatTel ** + 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 ----- 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 "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} ; +--oper +-- mkQuant : Str -> Str -> {s : Number => Str} = \x,y -> { +-- s = table Number [x ; y] +-- } ; +-- +} -- ----- 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] ----- } ; ----- ---} ----- diff --git a/src/telugu/VerbTel.gf b/src/telugu/VerbTel.gf index f047ba2c..22bb15ff 100644 --- a/src/telugu/VerbTel.gf +++ b/src/telugu/VerbTel.gf @@ -1,50 +1,58 @@ ---concrete VerbTel of Verb = CatTel ** open ResTel in { --- --- flags optimize=all_subs ; --- --- lin --- UseV = predV ; --- --- SlashV2a v = predV v ** {c2 = v.c2} ; --- ----- Slash2V3 v np = ----- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ; ----- Slash3V3 v np = ----- insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ---- ----- ----- ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ; ----- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; ----- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; ----- ComplVA v ap = insertObj (ap.s) (predV v) ; ----- ----- SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ; ----- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; ----- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; ----- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- --- --- ComplSlash vp np = insertObject np vp ; --- ----- SlashVV vv vp = ----- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) ** ----- {c2 = vp.c2} ; ----- SlashV2VNP vv np vp = ----- insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) ----- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) ** ----- {c2 = vp.c2} ; ----- ----- UseComp comp = insertComplement comp.s (predAux auxBe) ; ----- ----- AdvVP vp adv = insertObj (\\_ => adv.s) vp ; ----- ----- AdVVP adv vp = insertAdV adv.s vp ; ----- ----- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ; ----- ----- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ; ----- ----- ----- CompAP ap = ap ; ----- CompNP np = {s = \\_ => np.s ! Acc} ; ----- CompAdv a = {s = \\_ => a.s} ; ----- ---} +concrete VerbTel of Verb = CatTel ** open ResTel, Prelude in { + + flags optimize=all_subs ; + + lin + UseV = predV ; + + SlashV2a v = predV v ** {c2 = v.c2} ; + + SlashV2A v ap = predV v ** { + c2 = v.c2 ; + comp = \\agr => case agr of {Ag g n _ => ap.s ! g ! n ! Dir} + } ; + + Slash2V3 v np = + let vp = insertObject np (predV v ** {c2 = v.c2}) + in vp ** {c2 = v.c3} ; + + Slash3V3 v np = + let vp = insertObject np (predV v ** {c2 = v.c3}) + in vp ** {c2 = v.c2} ; + + AdvVPSlash vps adv = vps ** { + comp = \\agr => vps.comp ! agr ++ adv.s + } ; + + AdVVPSlash adv vps = vps ** { + comp = \\agr => adv.s ++ vps.comp ! agr + } ; + + ComplSlash vp np = insertObject np vp ; + + ComplVV v vp = predV v ** { + comp = \\agr => let f = vp.s ! Pos ! VPInf in + f.inf ++ f.fin + } ; + + ComplVS v s = predV v ** {comp = \\_ => s.s} ; + ComplVQ v q = predV v ** {comp = \\_ => q.s} ; + ComplVA v ap = predV v ** {comp = \\agr => case agr of { + Ag g n _ => ap.s ! g ! n ! Dir + }} ; + + AdVVP adv vp = insertAdv adv.s vp ; + + UseComp comp = predV (regVerb []) ** {comp = comp.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 ; + +}