forked from GitHub/gf-rgl
@@ -8,12 +8,12 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
||||
|
||||
-- ComparA : A -> NP -> AP ; -- warmer than I
|
||||
ComparA a np = {
|
||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! Nom ;
|
||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom ;
|
||||
} ;
|
||||
|
||||
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a np = {
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! a.c.c ;
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! a.c.c ;
|
||||
} ;
|
||||
|
||||
-- ReflA2 : A2 -> AP -- married to myself
|
||||
@@ -31,7 +31,7 @@ concrete AdjectiveLat of Adjective = CatLat ** open ResLat, Prelude in {
|
||||
|
||||
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
CAdvAP cadv ap np =
|
||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom } ;
|
||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom } ;
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
|
||||
|
||||
-- PrepNP : Prep -> NP -> Adv ; -- in the house
|
||||
PrepNP prep np =
|
||||
mkAdv (prep.s ++ np.adv ++ (combineNounPhrase np) ! PronNonDrop ! prep.c ) ;
|
||||
mkAdv (prep.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! prep.c ) ;
|
||||
|
||||
|
||||
-- ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||
ComparAdvAdj cadv a np =
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom) ;
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom) ;
|
||||
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
ComparAdvAdjS cadv a s =
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ defaultSentence s ! SOV ) ;
|
||||
|
||||
-- AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
||||
AdAdv ada adv = mkAdv (ada.s ++ (adv.s ! Posit) ) ;
|
||||
@@ -29,7 +29,7 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
|
||||
-- Subordinate clauses can function as adverbs.
|
||||
|
||||
-- SubjS : Subj -> S -> Adv ; -- when she sleeps
|
||||
SubjS subj s = mkAdv (subj.s ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
|
||||
SubjS subj s = mkAdv (subj.s ++ defaultSentence s ! SOV ) ;
|
||||
|
||||
-- AdnCAdv : CAdv -> AdN ; -- less (than five)
|
||||
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
|
||||
|
||||
@@ -8,6 +8,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
||||
--
|
||||
S = Sentence ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = { s : Gender => Number => Str } ; -- Sentence ;
|
||||
-- RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
||||
-- SSlash = {s : Str ; c2 : Str} ;
|
||||
--
|
||||
@@ -28,11 +29,11 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
||||
--
|
||||
---- Relative
|
||||
--
|
||||
-- RCl = {
|
||||
RCl = { s : Gender => Number => Clause };
|
||||
-- s : ResLat.Tense => Anteriority => CPolarity => Agr => Str ;
|
||||
-- c : Case
|
||||
-- } ;
|
||||
-- RP = {s : RCase => Str ; a : RAgr} ;
|
||||
RP = {s : Agr => Str } ;
|
||||
--
|
||||
---- Verb
|
||||
--
|
||||
@@ -87,9 +88,9 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
||||
A2 = Adjective ** { c : Prep} ;
|
||||
|
||||
linref
|
||||
NP = \np -> combineNounPhrase np ! PronNonDrop ! Nom ;
|
||||
NP = \np -> combineNounPhrase np ! PronNonDrop ! APreN ! DPostN ! Nom ;
|
||||
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
|
||||
S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
||||
S = \s -> defaultSentence s ! SOV ;
|
||||
V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||
V2, V2A, V2Q, V2S = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||
Pron = \p -> p.pers.s ! PronNonDrop ! PronNonRefl ! Nom ;
|
||||
|
||||
@@ -11,14 +11,16 @@ concrete ConjunctionLat of Conjunction =
|
||||
ConjS conj ss = {
|
||||
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
|
||||
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
|
||||
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ++ conj.s2 ++
|
||||
(ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV ++ conj.s3 ;
|
||||
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s2 ++
|
||||
(ss.s ! conj.c).last ! SAPreS ! apos ! DPreN ! VReg ! CPreV ! SOV ++ conj.s3 ;
|
||||
o = \\_ => [] ;
|
||||
v = \\_,_ => [] ;
|
||||
v = \\_ => [] ;
|
||||
neg = \\_ => [] ;
|
||||
compl = [] ;
|
||||
p = ss.p ;
|
||||
sadv = [] ;
|
||||
t = ss.t
|
||||
t = ss.t ;
|
||||
det = { s, sp = \\_ => [] } ;
|
||||
} ;
|
||||
|
||||
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
||||
@@ -34,14 +36,13 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- } ;
|
||||
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||
-- } ;
|
||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! ca ++ conj.s3 ;
|
||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! APreN ! DPreN ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! APreN ! DPreN ! ca ++ conj.s3;
|
||||
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
||||
g = nps.g ;
|
||||
p = nps.p ;
|
||||
adv = nps.adv ;
|
||||
preap = nps.preap ;
|
||||
postap = nps.postap ;
|
||||
det = nps.det
|
||||
adv = "" ;
|
||||
preap , postap = { s = \\_ => "" };
|
||||
det = { s , sp = \\_ => ""} ;
|
||||
} ;
|
||||
|
||||
-- ConjAP : Conj -> ListAP -> AP ;
|
||||
@@ -61,8 +62,12 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
---}
|
||||
--
|
||||
---- These fun's are generated from the list cat's.
|
||||
--
|
||||
|
||||
-- ConjRS : Conj -> ListRS -> RS
|
||||
ConjRS conj rss = { s = \\g,n => conj.s1 ++ (rss.s ! conj.c).init ! g ! n ++ conj.s2 ++ (rss.s ! conj.c).last ! g ! n++ conj.s3 };
|
||||
|
||||
---- These fun's are generated from the list cat's.
|
||||
--
|
||||
|
||||
-- BaseS : S -> S -> ListS
|
||||
@@ -77,7 +82,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
|
||||
ConsS s ss = {
|
||||
s = \\co =>
|
||||
{ init = \\s,a,c,o => coord co { init = (ss.s ! co).init ! s ! a ! c ! o ; last = (ss.s ! co).last ! s ! a ! c ! o } ;
|
||||
{ init = \\s,a,d,v,c,o => coord co { init = (ss.s ! co).init ! s ! a ! d ! v ! c ! o ; last = (ss.s ! co).last ! s ! a ! d ! v ! c ! o } ;
|
||||
last = combineSentence s } ;
|
||||
p = s.p ;
|
||||
t = s.t
|
||||
@@ -99,29 +104,21 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
||||
BaseNP x y = {
|
||||
-- s = \\c => twoTable Case x y ;
|
||||
s = \\c => { init = x.s ; last = y.s } ;
|
||||
g = Masc ; -- Just guessing (but maybe sexist bullshit)
|
||||
s = \\c => { init = combineNounPhrase x ; last = combineNounPhrase y } ;
|
||||
g = Neutr ; -- Trying to avoid trouble by choosing a gender
|
||||
n = matchNumber x.n y.n ;
|
||||
p = P3 ;
|
||||
adv = x.adv ++ y.adv ;
|
||||
preap = lin AP { s = \\a => x.preap.s ! a ++ y.preap.s ! a } ;
|
||||
postap = lin AP { s = \\a => x.postap.s ! a ++ y.postap.s ! a } ;
|
||||
isBase = True ;
|
||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ y.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ y.det.sp ! g ! c ; n = matchNumber x.det.n y.det.n } ;
|
||||
} ;
|
||||
|
||||
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||
ConsNP x xs = {
|
||||
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
||||
s = \\co => { init = \\pd,ca => coord co { init = (xs.s ! co).init ! pd ! ca ; last = (xs.s ! co).last ! pd ! ca} ; last = x.s } ;
|
||||
s = \\co => { init = \\pd,ap,dp,ca => coord co { init = (xs.s ! co).init ! pd ! ap ! dp ! ca ; last = (xs.s ! co).last ! pd ! ap ! dp ! ca} ; last = combineNounPhrase x } ;
|
||||
n = matchNumber x.n xs.n ;
|
||||
g = xs.g ;
|
||||
p = xs.p ;
|
||||
adv = x.adv ++ xs.adv ;
|
||||
preap = lin AP { s = \\a => x.preap.s ! a ++ xs.preap.s ! a } ;
|
||||
postap = lin AP { s = \\a => x.postap.s ! a ++ xs.postap.s ! a } ;
|
||||
isBase = False ;
|
||||
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ xs.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ xs.det.sp ! g ! c ; n = matchNumber x.det.n xs.det.n } ; -- try to combine the determiners, probably not what we want
|
||||
} ;
|
||||
|
||||
-- -- BaseAP : AP -> AP -> ListAP
|
||||
@@ -130,13 +127,21 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- -- ConsAP : AP -> ListAP -> ListAP
|
||||
-- ConsAP x xs =
|
||||
-- { l = \\_ => consrTable Agr and_Conj.s2 x (xs.l ! Comma ) } ;
|
||||
|
||||
-- BaseRS : RS -> RS -> ListRS ;
|
||||
BaseRS rs1 rs2 = { s = \\co => { init = rs1.s ; last = rs2.s }} ;
|
||||
|
||||
-- ConsRS : RS -> List RS -> ListRS ;
|
||||
ConsRS rs rss = { s = \\co => { init = rs.s ; last = \\g,n => coord co { init = (rss.s ! co).init ! g ! n ; last = (rss.s ! co).last ! g ! n } } } ;
|
||||
|
||||
|
||||
--
|
||||
lincat
|
||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
||||
[NP] = { s : Coordinator => {init,last : PronDropForm => Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
||||
[NP] = { s : Coordinator => {init,last : PronDropForm => AdvPos => DetPos => Case => Str} ; g : Gender ; n : Number ; p : Person ; isBase : Bool } ;
|
||||
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
||||
|
||||
[RS] = { s : Coordinator => { init, last : Gender => Number => Str }} ;
|
||||
oper
|
||||
-- Generates a new number value given two number values.
|
||||
-- Pl if any of the two is Pl
|
||||
|
||||
21027
src/latin/DictLat.gf
21027
src/latin/DictLat.gf
File diff suppressed because it is too large
Load Diff
74126
src/latin/DictLatAbs.gf
74126
src/latin/DictLatAbs.gf
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,262 @@
|
||||
concrete ExtendLat of Extend = CatLat ** ExtendFunctor-[VPS,ComplDirectVQ,ComplDirectVS,CompIQuant,EmptyRelSlash,ExistsNP,ExistCN,ExistMassCN,ExistPluralCN,GenModNP,PredAPVP,PredIAdvVP,SlashBareV2S,StrandQuestSlash,StrandRelSlash] with (Grammar=GrammarLat) ** open MissingLat in {
|
||||
lincat
|
||||
VPS = Comp ;
|
||||
--1 Extensions of core RGL syntax (the Grammar module)
|
||||
|
||||
-- This module defines syntax rules that are not yet implemented in all
|
||||
-- languages, and perhaps never implementable either. But all rules are given
|
||||
-- a default implementation in common/ExtendFunctor.gf so that they can be included
|
||||
-- in the library API. The default implementations are meant to be overridden in each
|
||||
-- xxxxx/ExtendXxx.gf when the work proceeds.
|
||||
--
|
||||
-- This module is aimed to replace the original Extra.gf, which is kept alive just
|
||||
-- for backwardcommon compatibility. It will also replace translator/Extensions.gf
|
||||
-- and thus eliminate the often duplicated work in those two modules.
|
||||
--
|
||||
-- (c) Aarne Ranta 2017-08-20 under LGPL and BSD
|
||||
|
||||
|
||||
concrete ExtendLat of Extend = CatLat ** open ResLat in {
|
||||
|
||||
lin
|
||||
-- ComplDirectVS : VS -> Utt -> VP ; -- say: "today"
|
||||
ComplDirectVS vs utt = AdvVP (UseV <lin V vs : V>) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
|
||||
-- ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when"
|
||||
ComplDirectVQ vq utt = AdvVP (UseV <lin V vq : V>) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
|
||||
} ;
|
||||
-- GenNP : NP -> Quant ; -- this man's
|
||||
GenNP np = { s = \\_ => combineNounPhrase np ! PronNonDrop ! APostN ! DPreN ! Gen ; sp = \\_ => ""} ;
|
||||
-- GenIP : IP -> IQuant ; -- whose
|
||||
-- GenRP : Num -> CN -> RP ; -- whose car
|
||||
|
||||
-- -- In case the first two are not available, the following applications should in any case be.
|
||||
|
||||
-- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s)
|
||||
-- GenModIP : Num -> IP -> CN -> IP ; -- whose car(s)
|
||||
|
||||
-- CompBareCN : CN -> Comp ; -- (is) teacher
|
||||
|
||||
-- StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||
-- StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||
-- EmptyRelSlash : ClSlash -> RCl ; -- he lives in
|
||||
|
||||
|
||||
-- -- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
|
||||
-- -- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
|
||||
|
||||
-- cat
|
||||
-- VPS ; -- finite VP's with tense and polarity
|
||||
-- [VPS] {2} ;
|
||||
-- VPI ;
|
||||
-- [VPI] {2} ; -- infinitive VP's (TODO: with anteriority and polarity)
|
||||
|
||||
-- fun
|
||||
-- MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||
-- ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||
-- PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||
|
||||
-- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||
-- ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
||||
-- ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
|
||||
|
||||
-- -- the same for VPSlash, taking a complement with shared V2 verbs
|
||||
|
||||
-- cat
|
||||
-- VPS2 ; -- have loved (binary version of VPS)
|
||||
-- [VPS2] {2} ; -- has loved, hates"
|
||||
-- VPI2 ; -- to love (binary version of VPI)
|
||||
-- [VPI2] {2} ; -- to love, to hate
|
||||
|
||||
-- fun
|
||||
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||
-- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
|
||||
|
||||
-- MkVPI2 : VPSlash -> VPI2 ; -- to love
|
||||
-- ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
|
||||
-- ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||
|
||||
-- fun
|
||||
-- ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
|
||||
|
||||
-- ICompAP : AP -> IComp ; -- "how old"
|
||||
-- IAdvAdv : Adv -> IAdv ; -- "how often"
|
||||
|
||||
-- CompIQuant : IQuant -> IComp ; -- which (is it) [agreement to NP]
|
||||
|
||||
-- PrepCN : Prep -> CN -> Adv ; -- by accident [Prep + CN without article]
|
||||
|
||||
-- -- fronted/focal constructions, only for main clauses
|
||||
|
||||
-- fun
|
||||
-- FocusObj : NP -> SSlash -> Utt ; -- her I love
|
||||
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||
-- FocusAP : AP -> NP -> Utt ; -- green was the tree
|
||||
|
||||
-- -- participle constructions
|
||||
-- PresPartAP : VP -> AP ; -- (the man) looking at Mary
|
||||
-- EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
|
||||
|
||||
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
PastPartAP vp = { s = \\ag => vp.part ! VPassPerf ! ag ++ vp.adv ++ vp.c.s} ; -- TODO
|
||||
-- PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||
|
||||
-- -- this is a generalization of Verb.PassV2 and should replace it in the future.
|
||||
|
||||
-- PassVPSlash : VPSlash -> VP ; -- be forced to sleep
|
||||
PassVPSlash vp = vp ** {
|
||||
s = \\a => case a of { VAct _ t n p => vp.pass ! VPass t n p } ;
|
||||
} ;
|
||||
|
||||
-- -- the form with an agent may result in a different linearization
|
||||
-- -- from an adverbial modification by an agent phrase.
|
||||
|
||||
-- PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
|
||||
|
||||
-- -- publishing of the document
|
||||
|
||||
-- NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
||||
|
||||
-- -- counterpart to ProgrVP, for VPSlash
|
||||
|
||||
-- ProgrVPSlash : VPSlash -> VPSlash;
|
||||
|
||||
-- -- existential for mathematics
|
||||
|
||||
-- ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
|
||||
|
||||
-- -- existentials with a/no variation
|
||||
|
||||
-- ExistCN : CN -> Cl ; -- there is a car / there is no car
|
||||
-- ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
|
||||
-- ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
|
||||
|
||||
-- -- generalisation of existential, with adverb as a parameter
|
||||
-- AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
|
||||
-- AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented
|
||||
|
||||
-- -- infinitive for purpose AR 21/8/2013
|
||||
|
||||
-- PurposeVP : VP -> Adv ; -- to become happy
|
||||
|
||||
-- -- object S without "that"
|
||||
|
||||
-- ComplBareVS : VS -> S -> VP ; -- say she runs
|
||||
-- SlashBareV2S : V2S -> S -> VPSlash ; -- answer (to him) it is good
|
||||
|
||||
-- ComplDirectVS : VS -> Utt -> VP ; -- say: "today"
|
||||
-- ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when"
|
||||
|
||||
-- -- front the extraposed part
|
||||
|
||||
-- FrontComplDirectVS : NP -> VS -> Utt -> Cl ; -- "I am here", she said
|
||||
-- FrontComplDirectVQ : NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
||||
|
||||
-- -- proper structure of "it is AP to VP"
|
||||
|
||||
-- PredAPVP : AP -> VP -> Cl ; -- it is good to walk
|
||||
|
||||
-- -- to use an AP as CN or NP without CN
|
||||
|
||||
-- AdjAsCN : AP -> CN ; -- a green one ; en grön (Swe)
|
||||
-- AdjAsNP : AP -> NP ; -- green (is good)
|
||||
AdjAsNP ap = {
|
||||
s = \\_,c => ap.s ! (Ag Neutr Sg c) ;
|
||||
adv = "" ;
|
||||
det = { s, sp = \\_ => "" } ;
|
||||
g = Neutr ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
postap = { s = \\_ => "" } ;
|
||||
preap = { s = \\_ => "" } ;
|
||||
} ;
|
||||
|
||||
-- -- infinitive complement for IAdv
|
||||
|
||||
-- PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk?
|
||||
|
||||
-- -- alternative to EmbedQS. For English, EmbedQS happens to work,
|
||||
-- -- because "what" introduces question and relative. The default linearization
|
||||
-- -- could be e.g. "the thing we did (was fun)".
|
||||
|
||||
-- EmbedSSlash : SSlash -> SC ; -- what we did (was fun)
|
||||
|
||||
-- -- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
|
||||
-- -- This is necessary in languages like Swedish, which have special reflexive possessives.
|
||||
-- -- However, it is also needed in application grammars that want to treat "brush one's teeth" as a one-place predicate.
|
||||
|
||||
-- cat
|
||||
-- RNP ; -- reflexive noun phrase, e.g. "my family and myself"
|
||||
-- RNPList ; -- list of reflexives to be coordinated, e.g. "my family, myself, everyone"
|
||||
|
||||
-- -- Notice that it is enough for one NP in RNPList to be RNP.
|
||||
|
||||
-- fun
|
||||
-- ReflRNP : VPSlash -> RNP -> VP ; -- love my family and myself
|
||||
|
||||
-- ReflPron : RNP ; -- myself
|
||||
-- ReflPoss : Num -> CN -> RNP ; -- my car(s)
|
||||
|
||||
-- PredetRNP : Predet -> RNP -> RNP ; -- all my brothers
|
||||
|
||||
-- ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
|
||||
|
||||
-- Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
|
||||
-- Base_nr_RNP : NP -> RNP -> RNPList ; -- John, myself
|
||||
-- Base_rn_RNP : RNP -> NP -> RNPList ; -- myself, John
|
||||
-- Cons_rr_RNP : RNP -> RNPList -> RNPList ; -- my family, myself, John
|
||||
-- Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself
|
||||
-- ---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary
|
||||
|
||||
|
||||
-- --- from Extensions
|
||||
|
||||
-- ComplGenVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
|
||||
-- ---- SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
|
||||
|
||||
-- CompoundN : N -> N -> N ; -- control system / controls system / control-system
|
||||
-- CompoundAP : N -> A -> AP ; -- language independent / language-independent
|
||||
|
||||
-- GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
|
||||
-- GerundNP : VP -> NP ; -- publishing the document (by nature definite)
|
||||
-- GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
|
||||
|
||||
-- WithoutVP : VP -> Adv ; -- without publishing the document
|
||||
-- ByVP : VP -> Adv ; -- by publishing the document
|
||||
-- InOrderToVP : VP -> Adv ; -- (in order) to publish the document
|
||||
|
||||
-- ApposNP : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||
|
||||
-- AdAdV : AdA -> AdV -> AdV ; -- almost always
|
||||
-- UttAdV : AdV -> Utt ; -- always(!)
|
||||
-- PositAdVAdj : A -> AdV ; -- (that she) positively (sleeps)
|
||||
|
||||
-- CompS : S -> Comp ; -- (the fact is) that she sleeps
|
||||
-- CompQS : QS -> Comp ; -- (the question is) who sleeps
|
||||
-- CompVP : Ant -> Pol -> VP -> Comp ; -- (she is) to go
|
||||
|
||||
-- -- very language-specific things
|
||||
|
||||
-- -- Eng
|
||||
-- UncontractedNeg : Pol ; -- do not, etc, as opposed to don't
|
||||
-- UttVPShort : VP -> Utt ; -- have fun, as opposed to "to have fun"
|
||||
-- ComplSlashPartLast : VPSlash -> NP -> VP ; -- set it apart, as opposed to "set apart it"
|
||||
|
||||
-- -- Romance
|
||||
-- DetNPMasc : Det -> NP ;
|
||||
-- DetNPFem : Det -> NP ;
|
||||
|
||||
-- UseComp_estar : Comp -> VP ; -- (Cat, Spa, Por) "está cheio" instead of "é cheio"
|
||||
|
||||
-- SubjRelNP : NP -> RS -> NP ; -- Force RS in subjunctive: lo que les *resulte* mejor
|
||||
|
||||
-- iFem_Pron : Pron ; -- I (Fem)
|
||||
-- youFem_Pron : Pron ; -- you (Fem)
|
||||
-- weFem_Pron : Pron ; -- we (Fem)
|
||||
-- youPlFem_Pron : Pron ; -- you plural (Fem)
|
||||
-- theyFem_Pron : Pron ; -- they (Fem)
|
||||
-- youPolFem_Pron : Pron ; -- you polite (Fem)
|
||||
-- youPolPl_Pron : Pron ; -- you polite plural (Masc)
|
||||
-- youPolPlFem_Pron : Pron ; -- you polite plural (Fem)
|
||||
|
||||
-- -- German
|
||||
-- UttAccNP : NP -> Utt ; -- him (accusative)
|
||||
-- UttDatNP : NP -> Utt ; -- him (dative)
|
||||
-- UttAccIP : IP -> Utt ; -- whom (accusative)
|
||||
-- UttDatIP : IP -> Utt ; -- whom (dative)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
concrete ExtraLat of ExtraLatAbs =
|
||||
CatLat, ConjunctionLat **
|
||||
open ResLat, ParadigmsLat, Coordination, Prelude in {
|
||||
lincat CS = Str ;
|
||||
open ResLat, ParadigmsLat, RelativeLat, NounLat, Prelude in {
|
||||
lincat CS = SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ;
|
||||
TestRS = { s : Gender => Number => SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str } ;
|
||||
lin
|
||||
useS s = combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
||||
useS s = combineSentence s ;
|
||||
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
||||
|
||||
@@ -50,4 +51,83 @@ concrete ExtraLat of ExtraLatAbs =
|
||||
Abl_Prep = mkPrep "" Abl ;
|
||||
inAbl_Prep = mkPrep "in" Abl ;
|
||||
onAbl_Prep = mkPrep "in" Abl ; -- L...
|
||||
|
||||
-- UttS_SVO : S -> Utt
|
||||
UttS_SVO s = { s = defaultSentence s ! SVO };
|
||||
-- UttS_VInS : S -> Utt
|
||||
UttS_VInS s = { s = combineSentence s ! SAPreS ! APreV ! DPostN ! VInS ! CPostV ! SVO } ;
|
||||
|
||||
TestRCl t p cl = {
|
||||
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ;
|
||||
} ;
|
||||
|
||||
-- UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_OSV t p cl = {
|
||||
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OSV ;
|
||||
} ;
|
||||
-- UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_OVS t p cl = {
|
||||
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OVS ; -- SAPreO APreV DPreN VReg CPostV OVS
|
||||
} ;
|
||||
-- UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_SOV t p cl = {
|
||||
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SOV ;
|
||||
} ;
|
||||
-- UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_SVO t p cl = {
|
||||
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SVO ;
|
||||
} ;
|
||||
-- PrepNP_DPostN : Prep -> NP -> Adv ; -- in the house
|
||||
PrepNP_DPostN prep np =
|
||||
mkAdv (prep.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! prep.c ) ;
|
||||
|
||||
-- ApposCN_DPostN : CN -> NP -> CN
|
||||
ApposCN_DPostN cn np =
|
||||
cn **
|
||||
{
|
||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! c ;
|
||||
} ; -- massable = cn.massable } ;
|
||||
|
||||
-- CompNP_DPostN : NP -> Comp ; -- (be) the man
|
||||
CompNP np = {s = \\_ =>
|
||||
(combineNounPhrase np) ! PronNonDrop ! DPostN ! Nom
|
||||
} ;
|
||||
|
||||
-- DetNP_Fem : Det -> NP ; -- these five
|
||||
DetNP_Fem det = {
|
||||
s = \\_ => det.s ! Fem ;
|
||||
g = Fem ;
|
||||
n = det.n ;
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_ => "" ; n = det.n } ;
|
||||
} ;
|
||||
|
||||
-- AdjAsNP_Fem : AP -> NP ; -- green (is good)
|
||||
AdjAsNP_Fem ap = {
|
||||
s = \\_,c => ap.s ! (Ag Fem Sg c) ;
|
||||
adv = "" ;
|
||||
det = { s, sp = \\_ => "" } ;
|
||||
g = Fem ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
postap = { s = \\_ => "" } ;
|
||||
preap = { s = \\_ => "" } ;
|
||||
} ;
|
||||
|
||||
-- PredVP_VP_Ellipsis : NP -> VP -> Cl
|
||||
PredVP_VP_Ellipsis np =
|
||||
mkClause np emptyVP ;
|
||||
|
||||
-- SlashVP_VP_Ellipsis : NP -> VPSlash -> ClSlash ; -- (whom) he sees
|
||||
SlashVP_VP_Ellipsis np =
|
||||
mkClause np emptyVP ;
|
||||
|
||||
-- FunRP_RP_Ellipsis : Prep -> NP -> RP ;
|
||||
FunRP_RP_Ellipsis p np = FunRP p np (lin RP { s = \\_ => "" }) ;
|
||||
|
||||
RelNP_NP_Ellipsis rs = RelNP emptyNP rs ;
|
||||
|
||||
comma_Conj = mkConj "" "," "" Pl Comma ;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
abstract ExtraLatAbs =
|
||||
Extra, Conjunction
|
||||
Conjunction
|
||||
** {
|
||||
cat CS ;
|
||||
cat CS ;
|
||||
TestRS ;
|
||||
fun
|
||||
useS : S -> CS ;
|
||||
-- do not drop pronouns
|
||||
@@ -29,4 +30,27 @@ abstract ExtraLatAbs =
|
||||
-- Preposition with alternate case
|
||||
inAbl_Prep : Prep ;
|
||||
onAbl_Prep : Prep ;
|
||||
|
||||
-- Add other word orders
|
||||
UttS_SVO : S -> Utt ;
|
||||
UttS_VInS : S -> Utt ;
|
||||
TestRCl : Temp -> Pol -> RCl -> TestRS ;
|
||||
UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
|
||||
|
||||
PrepNP_DPostN : Prep -> NP -> Adv ;
|
||||
ApposCN_DPostN : CN -> NP -> CN ;
|
||||
|
||||
-- More genders
|
||||
DetNP_Fem : Det -> NP ;
|
||||
AdjAsNP_Fem : AP -> NP ;
|
||||
|
||||
-- Ellipsis
|
||||
PredVP_VP_Ellipsis : NP -> Cl ;
|
||||
SlashVP_VP_Ellipsis : NP -> ClSlash ;
|
||||
FunRP_RP_Ellipsis : Prep -> NP -> RP ;
|
||||
RelNP_NP_Ellipsis : RS -> NP ;
|
||||
comma_Conj : Conj ;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ concrete GrammarLat of Grammar =
|
||||
NumeralLat,
|
||||
SentenceLat,
|
||||
QuestionLat,
|
||||
-- RelativeLat,
|
||||
RelativeLat,
|
||||
ConjunctionLat,
|
||||
PhraseLat,
|
||||
TextX-[Adv],
|
||||
|
||||
@@ -2,142 +2,78 @@ resource MissingLat = open GrammarLat, Prelude in {
|
||||
|
||||
-- temporary definitions to enable the compilation of RGL API
|
||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
||||
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||
oper BaseDAP : DAP -> DAP -> ListDAP = notYet "BaseDAP" ;
|
||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
||||
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
||||
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||
-- Error: No type found for ConjNPque
|
||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||
oper ConsDAP : DAP -> ListDAP -> ListDAP = notYet "ConsDAP" ;
|
||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
||||
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
||||
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||
oper IdRP : RP = notYet "IdRP" ;
|
||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
||||
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||
oper PartNP : CN -> NP -> CN = notYet "PartNP" ;
|
||||
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
||||
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
||||
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
|
||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||
oper BaseDAP : DAP -> DAP -> ListDAP = notYet "BaseDAP" ;
|
||||
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
||||
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
||||
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
||||
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
||||
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
||||
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
||||
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||
oper ConsDAP : DAP -> ListDAP -> ListDAP = notYet "ConsDAP" ;
|
||||
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
||||
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
||||
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
||||
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
||||
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||
oper PartNP : CN -> NP -> CN = notYet "PartNP" ;
|
||||
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
||||
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||
oper RelS : S -> RS -> S = notYet "RelS" ;
|
||||
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
||||
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
|
||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
||||
-- Error: No type found for UsePronNonDrop
|
||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
det = det
|
||||
det = { s = det.s ! cn.g ; sp = det.sp ! cn.g } ;
|
||||
} ;
|
||||
|
||||
-- UsePN : PN -> NP ; -- John
|
||||
@@ -22,7 +22,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg }
|
||||
det = { s,sp = \\_ => "" ; n = Sg }
|
||||
} ;
|
||||
|
||||
-- UsePron : Pron -> NP ; -- he
|
||||
@@ -33,13 +33,13 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
det = { s,sp = \\_ => "" ; n = p.pers.n } ;
|
||||
} ;
|
||||
|
||||
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np =
|
||||
np ** {
|
||||
det = np.det ** { s = \\g,c => predet.s ++ np.det.s ! g ! c }
|
||||
det = { s = \\c => predet.s ++ np.det.s ! c ; sp = np.det.sp }
|
||||
} ;
|
||||
|
||||
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||
@@ -64,7 +64,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
ExtAdvNP = AdvNP ;
|
||||
|
||||
-- RelNP : NP -> RS -> NP ; -- Paris, which is here
|
||||
RelNP np rs = np ** { adv = rs.s ++ np.adv } ;
|
||||
RelNP np rs = np ** { adv = bindComma ++ rs.s ! np.g ! np.n ++ np.adv } ;
|
||||
|
||||
-- DetNP : Det -> NP ; -- these five
|
||||
DetNP det = {
|
||||
@@ -74,7 +74,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = det.n } ;
|
||||
det = { s,sp = \\_ => "" ; n = det.n } ;
|
||||
} ;
|
||||
--
|
||||
-- DetQuantOrd quant num ord = {
|
||||
@@ -85,13 +85,13 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
--
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => quant.s ! Ag g num.n c ++ num.s ! g ! c ;
|
||||
sp = \\g,c => quant.sp ! Ag g num.n c ++ num.s ! g ! c ;
|
||||
sp = \\g,c => quant.sp ! Ag g num.n c ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
-- PossPron p = {
|
||||
PossPron p = { s = \\a => p.poss.s ! PronNonRefl ! a ; sp = \\_ => "" } ;
|
||||
-- s = \\_,_ => p.s ! Gen ;
|
||||
-- sp = \\_,_ => p.sp
|
||||
-- } ;
|
||||
@@ -105,8 +105,10 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- OrdDigits n = {s = n.s ! NOrd} ;
|
||||
--
|
||||
lin
|
||||
-- NumNumeral numeral = numeral.s ;
|
||||
-- OrdNumeral numeral = numeral.ord ;
|
||||
-- NumNumeral : Numeral -> Card ; -- fifty-one
|
||||
NumNumeral numeral = { s = numeral.s ; n = numeral.n } ;
|
||||
-- OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
OrdNumeral numeral = { s = numeral.ord } ;
|
||||
--
|
||||
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
||||
--
|
||||
@@ -128,7 +130,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg } ;
|
||||
det = { s,sp = \\_ => "" ; n = Sg } ;
|
||||
};
|
||||
|
||||
UseN n = -- N -> CN
|
||||
@@ -175,6 +177,11 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
ApposCN cn np =
|
||||
cn **
|
||||
{
|
||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! c ;
|
||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! c ;
|
||||
} ; -- massable = cn.massable } ;
|
||||
}
|
||||
|
||||
-- CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||
CountNP det np = np ** {
|
||||
det = { s = \\c => det.s ! np.g ! c ++ np.det.s ! c ; sp = \\c => det.sp ! np.g ! c ++ np.det.sp ! c } ;
|
||||
};
|
||||
}
|
||||
@@ -18,111 +18,136 @@ concrete NumeralLat of Numeral = CatLat, ParamX[Number] ** open ParadigmsLat, Pr
|
||||
n9 = lin Digit ( mkDigit "novem" "undeviginti" "nonaginta" "nongenti" "nonus" "centum" No9 ) ;
|
||||
|
||||
-- 1
|
||||
pot01 = { s = n1.s ! one ; d = n1.s ; n = singular ; below8 = n1.below8 } ;
|
||||
pot01 = {
|
||||
s = n1.s ! one ;
|
||||
d = { num, ord = n1.s } ;
|
||||
n = singular ;
|
||||
below8 = n1.below8 ;
|
||||
ord = n1.ord ! one
|
||||
} ;
|
||||
-- d * 1
|
||||
pot0 d = {
|
||||
s = d.s ! one ;
|
||||
d = table {
|
||||
thousand => \\g,c => d.s ! one ! g ! c ++ d.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
} ;
|
||||
d = { num,ord = table {
|
||||
thousand => \\g,c => d.s ! one ! g ! c ++ d.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
}
|
||||
};
|
||||
n = plural ;
|
||||
below8 = d.below8
|
||||
below8 = d.below8 ;
|
||||
ord = d.ord ! one ;
|
||||
} ;
|
||||
-- 10
|
||||
pot110 = {
|
||||
s = n1.s ! ten ;
|
||||
d = table {
|
||||
thousand => \\g,c => n1.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n1.s ! u ! g ! c
|
||||
} ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => n1.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n1.s ! u ! g ! c
|
||||
}
|
||||
};
|
||||
n = singular ;
|
||||
below8 = Yes
|
||||
below8 = Yes ;
|
||||
ord = n1.ord ! ten
|
||||
} ;
|
||||
-- 11
|
||||
pot111 = pot1to19 n1 ;
|
||||
-- 10 + d
|
||||
pot1to19 d = {
|
||||
s = d.s ! eleven ;
|
||||
d = table {
|
||||
thousand => \\g,c => d.s ! eleven ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
} ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => d.s ! eleven ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
}
|
||||
};
|
||||
n = plural ;
|
||||
below8 = Ign
|
||||
below8 = Ign ;
|
||||
ord = n1.ord ! eleven
|
||||
} ;
|
||||
-- coercion of 1..9
|
||||
pot0as1 n = n ;
|
||||
-- d * 10
|
||||
pot1 d = {
|
||||
s = d.s ! ten ;
|
||||
d = table {
|
||||
thousand => \\g,c => d.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
} ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => d.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => d.s ! u ! g ! c
|
||||
}
|
||||
};
|
||||
n = plural ;
|
||||
below8 = Yes
|
||||
below8 = Yes ;
|
||||
ord = d.ord ! ten
|
||||
} ;
|
||||
-- d * 10 + n
|
||||
pot1plus d n =
|
||||
let
|
||||
newS : Gender => Case => Str = \\g,c => case n.below8 of {
|
||||
No8 => "duo" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ;
|
||||
No9 => "un" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ;
|
||||
No8 => "duo" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ d.tenNext ;
|
||||
No9 => "un" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ d.tenNext ;
|
||||
_ => d.s ! ten ! g ! c ++ n.s ! g ! c
|
||||
} in
|
||||
{
|
||||
s = newS ;
|
||||
d = table {
|
||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d ! u ! g ! c
|
||||
} ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d.num ! u ! g ! c
|
||||
}
|
||||
};
|
||||
below8 = Ign ;
|
||||
n = plural
|
||||
n = plural ;
|
||||
ord = \\_,_,_ => nonExist -- TODO
|
||||
} ;
|
||||
-- coercion of 1..99
|
||||
pot1as2 n = n ;
|
||||
-- m * 100
|
||||
pot2 n = {
|
||||
s = n.d ! hundred ;
|
||||
d = table {
|
||||
thousand => \\g,c => n.d ! hundred ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d ! u ! g ! c
|
||||
} ;
|
||||
s = n.d.num ! hundred ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => n.d.num ! hundred ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d.num ! u ! g ! c
|
||||
}
|
||||
};
|
||||
n = plural ;
|
||||
below8 = Yes} ;
|
||||
below8 = Yes ;
|
||||
ord = \\_,_,_ => nonExist -- TODO
|
||||
} ;
|
||||
-- d * 100 + n
|
||||
pot2plus d n =
|
||||
let
|
||||
newS : Gender => Case => Str = \\g,c => d.d ! hundred ! g ! c ++ "et" ++ n.s ! g ! c
|
||||
newS : Gender => Case => Str = \\g,c => d.d.num ! hundred ! g ! c ++ "et" ++ n.s ! g ! c
|
||||
in
|
||||
{
|
||||
s = newS ;
|
||||
d = table {
|
||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d ! u ! g ! c
|
||||
} ;
|
||||
d = { num, ord = table {
|
||||
thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d.num ! u ! g ! c
|
||||
}
|
||||
};
|
||||
below8 = Ign ;
|
||||
n = plural
|
||||
n = plural;
|
||||
ord = \\_,_,_ => nonExist -- TODO
|
||||
} ;
|
||||
-- coercion of 1..999
|
||||
pot2as3 n = n ;
|
||||
-- m * 1000
|
||||
pot3 n = {
|
||||
s = \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ;
|
||||
d = table { thousand => \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d ! u ! g ! c
|
||||
s = \\g,c => n.s ! g ! c ++ n.d.num ! thousand ! g ! c ;
|
||||
d = { num,ord = table {
|
||||
thousand => \\g,c => n.s ! g ! c ++ n.d.num ! thousand ! g ! c ;
|
||||
u => \\g,c => n.d.num ! u ! g ! c
|
||||
}
|
||||
} ;
|
||||
below8 = Ign ;
|
||||
n = plural
|
||||
n = plural ;
|
||||
ord = \\_,_,_ => nonExist -- TODO
|
||||
} ;
|
||||
|
||||
-- d * 1000 + n
|
||||
pot3plus d n = {
|
||||
s = \\g,c => d.d ! thousand ! g ! c ++ "et" ++ n.s ! g ! c ;
|
||||
d = n.d ;
|
||||
s = \\g,c => d.d.num ! thousand ! g ! c ++ "et" ++ n.s ! g ! c ;
|
||||
d = n.d ; -- ???
|
||||
below8 = Ign ;
|
||||
n = plural
|
||||
n = plural ;
|
||||
ord = \\_,_,_ => nonExist -- TODO
|
||||
} ;
|
||||
|
||||
oper
|
||||
@@ -146,14 +171,15 @@ concrete NumeralLat of Numeral = CatLat, ParamX[Number] ** open ParadigmsLat, Pr
|
||||
hundred_thousand => \\_,_ => nonExist
|
||||
} ;
|
||||
-- n = case ones of { "unus" => singular ; _ => plural } ;
|
||||
-- ord =
|
||||
-- \\_,_ => [] ;
|
||||
-- -- table { one => (mkA ord1).s ! Posit;
|
||||
-- -- ten => (mkA ord10).s ! Posit ;
|
||||
-- -- hundred => (mkA ord100).s ! Posit ;
|
||||
-- -- thousand => \\_,_ => nonExist ;
|
||||
-- -- ten_thousand => \\_ => nonExist ;
|
||||
-- -- hundred_thousand => \\_ => nonExist } ;
|
||||
ord =
|
||||
table { one => ordFlex ord1 ;
|
||||
eleven => \\_,_,_ => nonExist ;
|
||||
ten => ordFlex ord10 ;
|
||||
hundred => ordFlex ord100 ;
|
||||
thousand => \\_,_,_ => nonExist ;
|
||||
ten_thousand => \\_,_,_ => nonExist ;
|
||||
hundred_thousand => \\_,_,_ => nonExist
|
||||
} ;
|
||||
tenNext = tenNext ;
|
||||
below8 = b8
|
||||
} ;
|
||||
|
||||
@@ -3,7 +3,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
--
|
||||
-- UttS : S -> Utt
|
||||
UttS s = { s = combineSentence s ! SPreS ! PreS ! CPreV ! SOV };
|
||||
UttS s = { s = defaultSentence s ! SOV };
|
||||
|
||||
-- UttQS : QS -> Utt
|
||||
UttQS qs = {s = qs.s ! QDir } ;
|
||||
@@ -18,7 +18,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
||||
-- UttIAdv : IAdv -> Utt
|
||||
UttIAdv iadv = iadv ;
|
||||
-- UttNP : NP -> Utt
|
||||
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! Nom} ;
|
||||
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom} ;
|
||||
-- UttVP : VP -> Utt
|
||||
UttVP vp = ss (vp.inf ! VInfActPres) ;
|
||||
|
||||
@@ -36,6 +36,6 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
|
||||
PConjConj conj = {s = conj.s2} ; ---
|
||||
--
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ (combineNounPhrase np) ! PronNonDrop ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||
VocNP np = {s = bindComma ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||
--
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
lin
|
||||
-- QuestCl : Cl -> QCl ; -- does John walk
|
||||
QuestCl cl = cl ** {
|
||||
v = \\t,a,_,ap,cp => cl.v ! t ! a ! VQTrue ! ap ! cp ;
|
||||
v = \\t,a,_,ap => cl.v ! t ! a ! VQTrue ! ap ;
|
||||
q = ""
|
||||
} ;
|
||||
|
||||
@@ -17,7 +17,9 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => vp.obj ;
|
||||
q = ip.s ! Nom ;
|
||||
v = \\t,a,_,ap,cp => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse
|
||||
v = \\t,a,_,ap => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse ;
|
||||
compl = vp.compl ! Ag Masc ip.n Nom ; -- default gender masculine
|
||||
det = { s, sp = \\_ => [] ; n = ip.n } ;
|
||||
} ;
|
||||
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
|
||||
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
|
||||
@@ -37,9 +39,11 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
s = \\_ => "" ;
|
||||
adv = "" ;
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! Nom ; -- Should probably not go into the object field
|
||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! APostN ! DPreN ! Nom ; -- Should probably not go into the object field
|
||||
q = icomp.s ;
|
||||
v = \\t,a,_,ap,cp => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
||||
v = \\t,a,_,ap => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
|
||||
det = { s , sp = \\_=> [] ; n = Sg } ; -- default number singilar
|
||||
compl = "" ;
|
||||
} ;
|
||||
--
|
||||
--
|
||||
|
||||
@@ -2,14 +2,14 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
||||
--
|
||||
-- flags optimize=all_subs ;
|
||||
--
|
||||
-- lin
|
||||
lin
|
||||
--
|
||||
-- RelCl cl = {
|
||||
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
||||
-- c = Nom
|
||||
-- } ;
|
||||
--
|
||||
-- RelVP rp vp = {
|
||||
RelVP rp vp = { s = \\g,n => mkClause (emptyNP ** { s = \\_,c => rp.s ! (Ag g n c) ; g = g ; n = n } ) vp };
|
||||
-- s = \\t,ant,b,ag =>
|
||||
-- let
|
||||
-- agr = case rp.a of {
|
||||
@@ -25,19 +25,43 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
||||
---- Pied piping: "at which we are looking". Stranding and empty
|
||||
---- relative are defined in $ExtraLat.gf$ ("that we are looking at",
|
||||
---- "we are looking at").
|
||||
--
|
||||
-- RelSlash rp slash = {
|
||||
--
|
||||
-- RelSlash : RP -> ClSlash -> RCl ;
|
||||
RelSlash rp slash = { s = \\g,n => slash ** { adv = rp.s ! Ag g n Gen } } ; -- abuse adverbs again
|
||||
-- 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 => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- a = RAg np.a
|
||||
-- } ;
|
||||
FunRP p np rp = {
|
||||
s = \\a => case a of { Ag g n c => rp.s ! a ++ p.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Acc };
|
||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- a = RAg np.a
|
||||
} ;
|
||||
--
|
||||
-- IdRP =
|
||||
IdRP = {
|
||||
s = table {
|
||||
Ag Masc Sg (Nom | Voc) => "qui" ;
|
||||
Ag Fem Sg (Nom | Voc) => "quae" ;
|
||||
Ag Neutr Sg (Nom | Voc) => "quod" ;
|
||||
Ag _ Sg Gen => "cuius" ;
|
||||
Ag _ Sg Dat => "cui" ;
|
||||
Ag Masc Sg Acc => "quem" ;
|
||||
Ag Fem Sg Acc => "quam" ;
|
||||
Ag Neutr Sg Acc => "quod" ;
|
||||
Ag (Masc | Neutr) Sg Abl => "quo" ;
|
||||
Ag Fem Sg Abl => "qua" ;
|
||||
Ag Masc Pl (Nom | Voc) => "qui" ;
|
||||
Ag (Fem | Neutr) Pl (Nom | Voc) => "quae" ;
|
||||
Ag (Masc | Neutr) Pl Gen => "quorum" ;
|
||||
Ag Fem Pl Gen => "quarum" ;
|
||||
Ag _ Pl Dat => "quibus" ;
|
||||
Ag Masc Pl Acc => "quos" ;
|
||||
Ag Fem Pl Acc => "quas" ;
|
||||
Ag Neutr Pl Acc => "quae" ;
|
||||
Ag _ Pl Abl => "cui"
|
||||
}
|
||||
}
|
||||
;
|
||||
-- let varr : Str -> Str = \x -> variants {x ; "that"} --- for bwc
|
||||
-- in {
|
||||
-- s = table {
|
||||
|
||||
@@ -22,13 +22,22 @@ param
|
||||
adv : Str ;
|
||||
preap : {s : Agr => Str } ;
|
||||
postap : {s : Agr => Str } ;
|
||||
det : Determiner
|
||||
det : { s, sp : Case => Str } ;
|
||||
} ;
|
||||
param
|
||||
-- Parameters to determine word order
|
||||
-- top level order, e.g. subject verb object
|
||||
Order = SVO | VSO | VOS | OSV | OVS | SOV ;
|
||||
AdvPos = PreS | PreV | PreO | PreNeg | InV | InS ; -- | InO
|
||||
-- determiner position in a noun phrase, e.g. before or after noun
|
||||
DetPos = DPreN | DPostN ;
|
||||
-- verb position, eithe regular or interleaved in the subject
|
||||
VPos = VReg | VInS ;
|
||||
-- (verb-modifying) adverb position
|
||||
AdvPos = APreS | APreV | APreO | APreNeg | AInV | AInS | APreN | APostN ; -- | InO
|
||||
-- verb complement position in relation to verb
|
||||
ComplPos = CPreV | CPostV ;
|
||||
SAdvPos = SPreS | SPreV | SPreO | SPreNeg ;
|
||||
-- sentence adverb position
|
||||
SAdvPos = SAPreS | SAPreV | SAPreO | SAPreNeg ;
|
||||
param
|
||||
Agr = Ag Gender Number Case ; -- Agreement for NP et al.
|
||||
oper
|
||||
@@ -141,15 +150,20 @@ param
|
||||
p = P3;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = n} ;
|
||||
det = { s,sp = \\_ => "" ; n = n} ;
|
||||
} ;
|
||||
|
||||
dummyNP : Str -> NounPhrase = \s -> regNP s s s s s s Masc Sg ;
|
||||
|
||||
emptyNP : NounPhrase = { s = \\_,_ => ""; g = Masc; n = Sg; p = P1 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = Sg } ;};
|
||||
emptyNP : NounPhrase = { s = \\_,_ => ""; g = Masc; n = Sg; p = P3 ; adv = "" ; preap, postap = { s = \\_ => "" } ; det = { s , sp = \\_ => "" ; n = Sg } ;};
|
||||
|
||||
combineNounPhrase : NounPhrase -> PronDropForm => Case => Str = \np ->
|
||||
\\pd,c => np.det.s ! np.g ! c ++ np.adv ++ np.preap.s ! (Ag np.g np.n c) ++ np.s ! pd ! c ++ np.postap.s ! (Ag np.g np.n c) ++ np.det.sp ! np.g ! c ;
|
||||
combineNounPhrase : NounPhrase -> PronDropForm => AdvPos => DetPos => Case => Str = \np ->
|
||||
let detpren : DetPos -> { s , sp : Case => Str} = \dp -> case dp of { DPreN => np.det ; _ => { s, sp = \\_ => [] } } ;
|
||||
detpostn : DetPos -> { s , sp : Case => Str} = \dp -> case dp of { DPostN => np.det ; _ => { s, sp = \\_ => [] } } ;
|
||||
apren : AdvPos -> Str = \ap -> case ap of { APreN => np.adv ; _ => [] } ;
|
||||
apostn : AdvPos -> Str = \ap -> case ap of { APostN => np.adv ; _ => [] } ;
|
||||
in
|
||||
\\pd,ap,dp,c => apren ap ++ (detpren dp).s ! c ++ np.preap.s ! (Ag np.g np.n c) ++ np.s ! pd ! c ++ np.postap.s ! (Ag np.g np.n c) ++ (detpren dp).sp ! c ++ (detpostn dp).s ! c ++ apostn ap ;
|
||||
-- also used for adjectives and so on
|
||||
|
||||
-- adjectives
|
||||
@@ -264,7 +278,8 @@ param
|
||||
oper
|
||||
VerbPhrase : Type = {
|
||||
s : VActForm => VQForm => Str ;
|
||||
part : VPartForm =>Agr => Str ;
|
||||
pass : VPassForm => VQForm => Str ;
|
||||
part : VPartForm => Agr => Str ;
|
||||
inf : VInfForm => Str ;
|
||||
imp : VImpForm => Str ;
|
||||
obj : Str ;
|
||||
@@ -274,6 +289,17 @@ param
|
||||
|
||||
ObjectVerbPhrase : Type = VerbPhrase ** {c : Preposition} ;
|
||||
|
||||
emptyVP : VerbPhrase = {
|
||||
s = \\_,_ => "" ;
|
||||
pass = \\_,_ => "" ;
|
||||
part = \\_,_ => "" ;
|
||||
inf = \\_ => "" ;
|
||||
imp = \\_ => "" ;
|
||||
obj = "";
|
||||
compl = \\_ => "" ;
|
||||
adv = ""
|
||||
} ;
|
||||
|
||||
Verb : Type = {
|
||||
act : VActForm => Str ;
|
||||
pass : VPassForm => Str ;
|
||||
@@ -351,6 +377,7 @@ param
|
||||
VAct VSim (VPres VInd) Sg P1 => -- Present Indicative
|
||||
( case pres_ind_base of {
|
||||
_ + "a" => ( init pres_ind_base ) ;
|
||||
-- | _ + "ui" => ( init pres_ind_base ) ;
|
||||
_ => pres_ind_base
|
||||
}
|
||||
) + "o" ; --actPresEnding Sg P1 ;
|
||||
@@ -1235,6 +1262,7 @@ oper
|
||||
|
||||
predV : Verb -> VerbPhrase = \v -> {
|
||||
s = \\a,q => v.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
pass = \\p,q => v.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
part = v.part;
|
||||
imp = v.imp ;
|
||||
inf = v.inf ;
|
||||
@@ -1253,20 +1281,22 @@ oper
|
||||
|
||||
insertObj : NounPhrase -> Preposition -> VerbPhrase -> VerbPhrase = \np,prep,vp -> {
|
||||
s = vp.s ;
|
||||
pass = vp.pass ;
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
obj = np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! np.g ! prep.c ++ vp.obj ;
|
||||
obj = np.det.s ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++ (appPrep prep (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! prep.c ++ vp.obj ;
|
||||
compl = vp.compl ;
|
||||
adv = vp.adv ++ np.adv
|
||||
} ;
|
||||
|
||||
insertObjc: NounPhrase -> VPSlash -> VPSlash = \np,vp -> {
|
||||
s = vp.s ;
|
||||
pass = vp.pass ;
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
obj = np.det.s ! np.g ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! np.g ! vp.c.c ++ vp.obj ;
|
||||
obj = np.det.s ! vp.c.c ++ np.preap.s ! (Ag np.g np.n vp.c.c) ++ (appPrep vp.c (np.s ! PronNonDrop)) ++ np.postap.s ! (Ag np.g np.n vp.c.c) ++ np.det.sp ! vp.c.c ++ vp.obj ;
|
||||
compl = vp.compl ;
|
||||
c = vp.c ;
|
||||
adv = vp.adv ++ np.adv
|
||||
@@ -1274,6 +1304,7 @@ oper
|
||||
|
||||
insertAdj : (Agr => Str) -> VerbPhrase -> VerbPhrase = \adj,vp -> {
|
||||
s = vp.s ;
|
||||
pass = vp.pass ;
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
@@ -1284,6 +1315,7 @@ oper
|
||||
|
||||
insertAdv : Adverb -> VerbPhrase -> VerbPhrase = \a,vp -> {
|
||||
s = vp.s ;
|
||||
pass = vp.pass ;
|
||||
part = vp.part ;
|
||||
imp = vp.imp ;
|
||||
inf = vp.inf ;
|
||||
@@ -1296,13 +1328,22 @@ oper
|
||||
Sentence =
|
||||
{
|
||||
s,o,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
|
||||
v : AdvPos => ComplPos => Str ;
|
||||
v : AdvPos => Str ;
|
||||
t : C.Tense ; -- tense marker
|
||||
p : C.Pol ; -- polarity marker
|
||||
sadv : Str -- sentence adverb¡
|
||||
sadv : Str ; -- sentence adverb¡
|
||||
det : { s , sp : Case => Str } ;
|
||||
compl : Str -- verb complement
|
||||
} ;
|
||||
|
||||
Clause = {s,o : AdvPos => Str ; v : Tense => Anteriority => VQForm => AdvPos => ComplPos => Str ; neg : Polarity => AdvPos => Str ; adv : Str } ;
|
||||
Clause =
|
||||
{s : AdvPos => Str ;
|
||||
o : AdvPos => Str ;
|
||||
v : Tense => Anteriority => VQForm => AdvPos => Str ;
|
||||
det : { s , sp : Case => Str } ;
|
||||
compl : Str ;
|
||||
neg : Polarity => AdvPos => Str ;
|
||||
adv : Str } ;
|
||||
QClause = {s : C.Tense => Anteriority => C.Pol => QForm => Str} ;
|
||||
|
||||
mkClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
|
||||
@@ -1313,39 +1354,35 @@ oper
|
||||
compl = vp.compl ! Ag np.g np.n Nom ;
|
||||
-- helper functions to either place the adverb in the designated position
|
||||
-- or an empty string instead
|
||||
pres : AdvPos -> Str = \ap -> case ap of { PreS => adv ; _ => [] } ;
|
||||
prev : AdvPos -> Str = \ap -> case ap of { PreV => adv ; _ => [] } ;
|
||||
preo : AdvPos -> Str = \ap -> case ap of { PreO => adv ; _ => [] } ;
|
||||
preneg : AdvPos -> Str = \ap -> case ap of { PreNeg => adv ; _ => [] } ;
|
||||
ins : AdvPos -> Str = \ap -> case ap of { InS => adv ; _ => [] } ;
|
||||
inv : AdvPos -> Str = \ap -> case ap of { InV => adv ; _ => [] } ;
|
||||
cprev : ComplPos -> Str = \cp -> case cp of { CPreV => compl ; _ => [] } ;
|
||||
cpostv : ComplPos -> Str = \cp -> case cp of { CPostV => compl ; _ => [] }
|
||||
pres : AdvPos -> Str = \ap -> case ap of { APreS => adv ; _ => [] } ;
|
||||
prev : AdvPos -> Str = \ap -> case ap of { APreV => adv ; _ => [] } ;
|
||||
preo : AdvPos -> Str = \ap -> case ap of { APreO => adv ; _ => [] } ;
|
||||
preneg : AdvPos -> Str = \ap -> case ap of { APreNeg => adv ; _ => [] } ;
|
||||
ins : AdvPos -> Str = \ap -> case ap of { AInS => adv ; _ => [] } ;
|
||||
inv : AdvPos -> Str = \ap -> case ap of { AInV => adv ; _ => [] } ;
|
||||
in
|
||||
{
|
||||
-- subject part of the clause:
|
||||
-- advpos is the adverb position in the clause
|
||||
s = \\advpos =>
|
||||
pres advpos ++ -- adverbs can be placed in the beginning of the clause
|
||||
np.det.s ! np.g ! Nom ++ -- the determiner, if any
|
||||
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
|
||||
ins advpos ++ -- adverbs can be placed within the subject noun phrase
|
||||
np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative
|
||||
np.postap .s ! (Ag np.g np.n Nom) ++ -- adjectives which come after the subject noun, agreeing with it
|
||||
np.det.sp ! np.g ! Nom ; -- second part of split determiners
|
||||
np.postap .s ! (Ag np.g np.n Nom) ; -- adjectives which come after the subject noun, agreeing with it
|
||||
-- verb part of the clause:
|
||||
-- tense and anter(ority) for the verb tense
|
||||
-- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used
|
||||
-- advposis the adverb position in the clause
|
||||
-- comppos is the position of the verb complement
|
||||
v = \\tense,anter,vqf,advpos,complpos =>
|
||||
v = \\tense,anter,vqf,advpos =>
|
||||
prev advpos ++ -- adverbs can be placed in the before the verb phrase
|
||||
cprev complpos ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject, can go before the verb
|
||||
inv advpos ++ -- adverbs can be placed within the verb phrase
|
||||
-- verb form with conversion between different forms of tense and aspect
|
||||
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ++
|
||||
cpostv complpos ; -- complement can also go after the verb
|
||||
|
||||
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ; -- ++
|
||||
det = np.det ;
|
||||
-- verb complement
|
||||
compl = compl ;
|
||||
-- object part of the clause
|
||||
o = \\advpos => preo advpos ++ vp.obj ;
|
||||
-- optional negation particle, adverbs can be placed before the negation
|
||||
@@ -1354,41 +1391,79 @@ oper
|
||||
} ;
|
||||
|
||||
combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf ->
|
||||
{ s = cl.s ;
|
||||
o = cl.o ;
|
||||
v = cl.v ! tense.t ! anter ! vqf ;
|
||||
cl **
|
||||
{
|
||||
v = \\advpos => cl.v ! tense.t ! anter ! vqf ! advpos ;
|
||||
neg = cl.neg ! pol.p ;
|
||||
sadv = "" ;
|
||||
sadv = cl.adv ;
|
||||
t = tense ;
|
||||
p = pol
|
||||
p = pol ;
|
||||
} ;
|
||||
|
||||
combineSentence : Sentence -> ( SAdvPos => AdvPos => ComplPos => Order => Str ) = \s ->
|
||||
combineSentence : Sentence -> ( SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ) = \s ->
|
||||
let
|
||||
pres : SAdvPos -> Str = \ap -> case ap of { SPreS => s.sadv ; _ => [] } ;
|
||||
prev : SAdvPos -> Str = \ap -> case ap of { SPreV => s.sadv ; _ => [] } ;
|
||||
preo : SAdvPos -> Str = \ap -> case ap of { SPreO => s.sadv ; _ => [] } ;
|
||||
preneg : SAdvPos -> Str = \ap -> case ap of { SPreNeg => s.sadv ; _ => [] }
|
||||
advpres : SAdvPos -> Str = \ap -> case ap of { SAPreS => s.sadv ; _ => [] } ;
|
||||
advprev : SAdvPos -> Str = \ap -> case ap of { SAPreV => s.sadv ; _ => [] } ;
|
||||
advpreo : SAdvPos -> Str = \ap -> case ap of { SAPreO => s.sadv ; _ => [] } ;
|
||||
advpreneg : SAdvPos -> Str = \ap -> case ap of { SAPreNeg => s.sadv ; _ => [] } ;
|
||||
detpren : DetPos -> { s, sp : Case => Str } = \dp -> case dp of { DPreN => s.det; _ => { s,sp = \\_ => [] } } ;
|
||||
detpostn : DetPos -> { s, sp : Case => Str } = \dp -> case dp of { DPostN => s.det ; _ => { s , sp = \\_ => [] } } ;
|
||||
verbins : VPos -> ResLat.AdvPos => Str = \vp -> case vp of { VInS => s.v ; _ => \\_ => [] } ;
|
||||
verbreg : VPos -> ResLat.AdvPos => Str = \vp -> case vp of { VReg => s.v ; _ => \\_ => [] } ;
|
||||
complprev : ComplPos -> Str = \cp -> case cp of { CPreV => s.compl ; _ => [] } ;
|
||||
complpostv : ComplPos -> Str = \cp -> case cp of { CPostV => s.compl ; _ => [] }
|
||||
in
|
||||
-- sap is the position of the sentence adverbial
|
||||
-- ap is the position of the adverb
|
||||
-- cp is the position of the verb complement
|
||||
\\sap,ap,cp,order => case order of {
|
||||
SVO => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap;
|
||||
VSO => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap;
|
||||
VOS => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ;
|
||||
OSV => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp;
|
||||
OVS => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ;
|
||||
SOV => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp
|
||||
-- sadvpos is the position of the sentence adverbial
|
||||
-- advpos is the position of the adverb
|
||||
-- detpos is the position of the determiner (relative to the noun)
|
||||
-- vpos is the position of the main verb (either regular or interleaved)
|
||||
-- complosp is the position of the verb complement
|
||||
\\sadvpos,advpos,detpos,verbpos,complpos,order => case order of {
|
||||
SVO =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||
advpreo sadvpos ++ s.o ! advpos;
|
||||
VSO =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||
advpreo sadvpos ++ s.o ! advpos;
|
||||
VOS =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||
advpreo sadvpos ++ s.o ! advpos ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
|
||||
OSV =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpreo sadvpos ++ s.o ! advpos ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ;
|
||||
OVS =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpreo sadvpos ++ s.o ! advpos ++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
|
||||
SOV =>
|
||||
s.t.s ++ s.p.s ++
|
||||
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
|
||||
advpreo sadvpos ++ s.o ! advpos ++
|
||||
advpreneg sadvpos ++ s.neg ! advpos ++
|
||||
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos)
|
||||
} ;
|
||||
|
||||
|
||||
defaultSentence : Sentence -> Order => Str = \s -> combineSentence s ! SAPreS ! APreV ! DPreN ! VReg ! CPreV ;
|
||||
|
||||
-- questions
|
||||
mkQuestion : SS -> Clause -> QClause = \ss,cl -> {
|
||||
s = \\tense,anter,pol,form => case form of {
|
||||
QDir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreS ! PreS ! CPreV ! OVS ;
|
||||
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreO ! PreO ! CPreV ! OSV
|
||||
QDir => ss.s ++ (defaultSentence (combineClause cl tense anter pol VQFalse)) ! OVS ;
|
||||
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SAPreO ! APreO ! DPreN ! VReg ! CPreV ! OSV
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1472,8 +1547,8 @@ oper
|
||||
Below8 = Yes | No8 | No9 | Ign ;
|
||||
oper
|
||||
-- Numerals are by default cardinal numbers but have a field for ordinal numbers
|
||||
TDigit : Type = { s : Unit => Gender => Case => Str ; tenNext : Str ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ;
|
||||
TNumeral : Type = { s : Gender => Case => Str ; d : Unit => Gender => Case => Str ; n : Number ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ;
|
||||
TDigit : Type = { s : Unit => Gender => Case => Str ; tenNext : Str ; below8 : Below8 ; ord : Unit => Gender => Number => Case => Str } ;
|
||||
TNumeral : Type = { s : Gender => Case => Str ; d : { num, ord : Unit => Gender => Case => Str } ; n : Number ; below8 : Below8 ; ord : Gender => Number => Case => Str } ;
|
||||
|
||||
-- Inflection for cardinal numbers
|
||||
cardFlex : Str -> Gender => Case => Str =
|
||||
@@ -1496,21 +1571,21 @@ oper
|
||||
} ;
|
||||
_ => \\_,_ => c
|
||||
} ;
|
||||
-- ordFlex : Gender => Number => Case => Str =
|
||||
-- case o of {
|
||||
-- stem + "us" => table {
|
||||
-- Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
|
||||
-- table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
|
||||
-- ];
|
||||
-- Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
|
||||
-- table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
|
||||
-- ] ;
|
||||
-- Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
|
||||
-- table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
|
||||
-- ]
|
||||
-- } ;
|
||||
-- _ => error "unsupported ordinal form"
|
||||
-- }
|
||||
ordFlex : Str -> Gender => Number => Case => Str =
|
||||
\o -> case o of {
|
||||
stem + "us" => table {
|
||||
Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
|
||||
table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
|
||||
];
|
||||
Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
|
||||
table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
|
||||
] ;
|
||||
Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
|
||||
table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
|
||||
]
|
||||
} ;
|
||||
_ => error "unsupported ordinal form"
|
||||
} ;
|
||||
-- in
|
||||
-- { s = cardFlex ; n = case c of { "unus" => Sg ; _ => Pl } ; ord = ordFlex } ;
|
||||
|
||||
|
||||
@@ -52,29 +52,31 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
||||
{
|
||||
s = let qs = combineClause cl t t.a p VQTrue in
|
||||
\\q => case q of {
|
||||
QDir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||
QIndir => cl.q ++ combineSentence qs ! SPreS ! PreV ! CPostV ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||
QDir => cl.q ++ defaultSentence qs ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||
QIndir => cl.q ++ defaultSentence qs ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||
}
|
||||
} ;
|
||||
|
||||
-- UseRCl t p cl = {
|
||||
-- UseRCl : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl t p cl = {
|
||||
s = \\g,n => defaultSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SOV ;
|
||||
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
|
||||
-- c = cl.c
|
||||
-- } ;
|
||||
} ;
|
||||
-- UseSlash t p cl = {
|
||||
-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ;
|
||||
-- c2 = cl.c2
|
||||
-- } ;
|
||||
--
|
||||
-- AdvS : Adv -> S -> S
|
||||
AdvS adv s = { s = s.s ; o = s.o ; v = s.v ; neg = s.neg ; t = s.t ; p = s.p ; sadv = adv.s ! Posit ++ s.sadv } ;
|
||||
AdvS adv s = -- { s = s.s ; o = s.o ; v = s.v ; neg = s.neg ; t = s.t ; p = s.p ; sadv = adv.s ! Posit ++ s.sadv } ;
|
||||
s ** { sadv = adv.s ! Posit ++ s.sadv } ;
|
||||
|
||||
-- This covers subjunctive clauses, but they can also be added to the end.
|
||||
-- SSubjS : S -> Subj -> S -> S ; -- I go home if she comes
|
||||
-- TO FIX
|
||||
-- SSubjS s1 subj s2 = { s = \\_ => subj.s ++ s2.s ! PreS ++ s1.s ! PreS ; sadv = lin Adv (mkAdverb []) } ;
|
||||
|
||||
-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ;
|
||||
-- RelS s r = {s = s.s ! APreV ++ "," ++ r.s } ;
|
||||
--
|
||||
-- oper
|
||||
-- ctr = contrNeg True ; -- contracted negations
|
||||
|
||||
@@ -2,51 +2,58 @@
|
||||
|
||||
concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat, ParadigmsLat, TenseX in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
NumPN i = {s = \\c => i.s ! Neutr ! c; g = Neutr ; n = Pl } ; --- c
|
||||
CNIntNP cn i = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ;
|
||||
p = P3 ;
|
||||
postap = { s = \\_ => [] } ;
|
||||
preap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
g = cn.g ;
|
||||
n = det.n ;
|
||||
adv = [] ;
|
||||
det = det ;
|
||||
p = P3 ;
|
||||
postap = { s = \\_ => [] } ;
|
||||
preap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
lin
|
||||
-- SymbPN : Symb -> PN ;
|
||||
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
-- IntPN : Int -> PN ;
|
||||
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
-- FloatPN : Float -> PN ;
|
||||
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg } ; --- c
|
||||
-- NumPN : Num -> PN ;
|
||||
NumPN i = {s = \\c => i.s ! Neutr ! c; g = Neutr ; n = Pl } ; --- c
|
||||
-- CNIntNP : CN -> Int -> NP ;
|
||||
CNIntNP cn i = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
det = { s , sp = \\_ => [] ; n = Sg } ;
|
||||
p = P3 ;
|
||||
preap , postap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
--CNSymbNP : CN -> Symb -> NP ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
g = cn.g ;
|
||||
n = det.n ;
|
||||
adv = [] ;
|
||||
det = { s = det.s ! cn.g ; sp = det.sp ! cn.g } ;
|
||||
p = P3 ;
|
||||
preap , postap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
-- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ;
|
||||
-- a = agrgP3 det.n cn.g
|
||||
-- } ;
|
||||
-- } ;
|
||||
CNNumNP cn i = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ;
|
||||
p = P3 ;
|
||||
postap = { s = \\_ => [] } ;
|
||||
preap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
-- } ;
|
||||
|
||||
-- CNNumNP : CN -> Num -> NP ;
|
||||
CNNumNP cn i = {
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
det = { s , sp = \\_ => [] ; n = Sg };
|
||||
p = P3 ;
|
||||
preap , postap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
--
|
||||
-- SymbS : Symb -> S ;
|
||||
SymbS sy = { s = \\_ => sy.s ; o , neg = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_ => "" ; compl = "" ; det = { s , sp = \\_ => [] ; n = Sg } } ;
|
||||
|
||||
SymbS sy = { s = \\_ => sy.s ; neg = \\_ => "" ; o = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_,_ => "" } ;
|
||||
--
|
||||
SymbNum sy = {s = \\_,_ => sy.s ; n = Pl } ;
|
||||
SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly
|
||||
-- SymbNum : Symb -> Num
|
||||
SymbNum sy = {s = \\_,_ => sy.s ; n = Pl } ;
|
||||
-- SymbOrd : Symb -> Ord
|
||||
SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly
|
||||
|
||||
lincat
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
@@ -19,15 +19,17 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
-- ComplVS : VS -> S -> VP ; -- say that she runs
|
||||
ComplVS vs s = -- insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
||||
vs ** {
|
||||
s = \\af,qf => vs.act ! af ;
|
||||
compl = \\ag => combineSentence s ! SPreS ! PreV ! CPostV ! SOV ; -- s.s ! QIndir ;
|
||||
s = \\a,q => vs.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
pass = \\p,q => vs.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
compl = \\ag => defaultSentence s ! SOV ; -- s.s ! QIndir ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
} ;
|
||||
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
||||
ComplVQ vq qs = -- insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||
vq ** {
|
||||
s = \\af,qf => vq.act ! af ;
|
||||
s = \\a,q => vq.act ! a ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
pass = \\p,q => vq.pass ! p ++ case q of { VQTrue => Prelude.BIND ++ "ne"; VQFalse => "" };
|
||||
compl = \\ag => qs.s ! QIndir ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
@@ -115,7 +117,7 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
|
||||
-- CompNP : NP -> Comp ; -- (be) the man
|
||||
CompNP np = {s = \\_ =>
|
||||
(combineNounPhrase np) ! PronNonDrop ! Nom
|
||||
(combineNounPhrase np) ! PronNonDrop ! APostN ! DPreN ! Nom ;
|
||||
} ;
|
||||
|
||||
-- CompAdv : Adv -> Comp ; -- (be) here
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import PGF
|
||||
import System.Environment
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
main =
|
||||
do
|
||||
args <- getArgs -- first one should be pgf file and second one should be the file containing the errors/warnings about missing things
|
||||
pgf <- PGF.readPGF (args !! 0) -- "tmp/Lang.pgf"
|
||||
ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . map (last . words) . lines
|
||||
let ts = [PGF.showType [] t | m <- ms, Just t <- [PGF.functionType pgf (PGF.mkCId m)]]
|
||||
putStrLn $ unlines ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts]
|
||||
ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . nub . sort . map (last . words) . lines
|
||||
let ts = [maybe ("-- Error: No type found for " ++ m) (\t -> "oper " ++ m ++ " : " ++ PGF.showType [] t ++ " = notYet \"" ++ m ++ "\" ;") $ PGF.functionType pgf (PGF.mkCId m) | m <- ms ]
|
||||
putStrLn $ unlines ts -- ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
echo "Create tmp dir"
|
||||
mkdir tmp/
|
||||
echo "Remove old file"
|
||||
rm -Rfv tmp/*
|
||||
echo "resource MissingLat = {} " > MissingLat.gf
|
||||
echo "Look for missing functions"
|
||||
# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp
|
||||
|
||||
Reference in New Issue
Block a user