mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
Merge branch 'latin'
This commit is contained in:
@@ -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" ++ np.s ! Nom ;
|
||||
s = \\ag => a.s ! Compar ! ag ++ "quam" ++ (combineNounPhrase np) ! PronNonDrop ! Nom ;
|
||||
} ;
|
||||
|
||||
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a np = {
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ np.s ! a.c.c ;
|
||||
s = \\ag => a.s ! Posit ! ag ++ a.c.s ++ (combineNounPhrase np) ! PronNonDrop ! 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 ++ np.s ! Nom } ;
|
||||
{ s = \\ag => cadv.s ++ ap.s ! ag ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom } ;
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
|
||||
@@ -8,13 +8,12 @@ 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 ++ np.det.s ! np.g ! prep.c ++ np.preap.s ! (Ag np.g np.n prep.c) ++
|
||||
np.s ! prep.c ++ np.postap.s ! (Ag np.g np.n prep.c ) ++ np.det.sp ! np.g ! prep.c ) ;
|
||||
mkAdv (prep.s ++ np.adv ++ (combineNounPhrase np) ! PronNonDrop ! prep.c ) ;
|
||||
|
||||
|
||||
-- ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||
ComparAdvAdj cadv a np =
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ np.s ! Nom) ;
|
||||
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ (combineNounPhrase np) ! PronNonDrop ! Nom) ;
|
||||
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
ComparAdvAdjS cadv a s =
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
--concrete BackwardLat of Backward = CatLat ** open ResLat in {
|
||||
--
|
||||
-- flags optimize=all_subs ;
|
||||
--
|
||||
-- lin
|
||||
--
|
||||
---- A repository of obsolete constructs, needed for backward compatibility.
|
||||
---- They create spurious ambiguities if used in combination with Lang.
|
||||
--
|
||||
---- from Verb 19/4/2008
|
||||
--
|
||||
-- ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ;
|
||||
-- ComplV3 v np np2 =
|
||||
-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ;
|
||||
-- ComplV2V v np vp =
|
||||
-- insertObj (\\a => infVP v.isAux vp a)
|
||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
-- ComplV2S v np s =
|
||||
-- insertObj (\\_ => conjThat ++ s.s)
|
||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
-- ComplV2Q v np q =
|
||||
-- insertObj (\\_ => q.s ! QIndir)
|
||||
-- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
-- ComplV2A v np ap =
|
||||
-- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ;
|
||||
--
|
||||
-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
||||
--
|
||||
---- from Sentence 19/4/2008
|
||||
--
|
||||
-- SlashV2 np v2 =
|
||||
-- mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ;
|
||||
--
|
||||
-- SlashVVV2 np vv v2 =
|
||||
-- mkClause (np.s ! Nom) np.a
|
||||
-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) **
|
||||
-- {c2 = v2.c2} ;
|
||||
--
|
||||
---- from Noun 19/4/2008
|
||||
--
|
||||
-- NumInt n = {s = n.s ; n = Pl} ;
|
||||
-- OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED
|
||||
--
|
||||
-- DetSg quant ord = {
|
||||
-- s = quant.s ! Sg ++ ord.s ;
|
||||
-- n = Sg
|
||||
-- } ;
|
||||
--
|
||||
-- DetPl quant num ord = {
|
||||
-- s = quant.s ! num.n ++ num.s ++ ord.s ;
|
||||
-- n = num.n
|
||||
-- } ;
|
||||
--
|
||||
-- NoNum = {s = []; n = Pl } ;
|
||||
--
|
||||
-- DefArt = {s = \\_ => artDef} ;
|
||||
--
|
||||
-- IndefArt = {
|
||||
-- s = table {
|
||||
-- Sg => artIndef ;
|
||||
-- Pl => []
|
||||
-- }
|
||||
-- } ;
|
||||
--
|
||||
-- MassDet = {s = \\_ => []} ;
|
||||
--
|
||||
--
|
||||
--
|
||||
---- from Structural 19/4/2008
|
||||
--
|
||||
-- that_NP = regNP "that" Sg ;
|
||||
-- these_NP = regNP "these" Pl ;
|
||||
-- this_NP = regNP "this" Sg ;
|
||||
-- those_NP = regNP "those" Pl ;
|
||||
--
|
||||
--}
|
||||
@@ -83,11 +83,11 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
|
||||
N = Noun ;
|
||||
N2 = Noun ** { c : Prep } ;
|
||||
N3 = Noun ** { c : Prep ; c2 : Prep } ;
|
||||
PN = Noun ;
|
||||
PN = { s : Case => Str ; n : Number ; g : Gender } ;
|
||||
A2 = Adjective ** { c : Prep} ;
|
||||
|
||||
linref
|
||||
NP = \np -> np.preap.s ! Ag np.g np.n Nom ++ np.s ! Nom ++ np.postap.s ! Ag np.g np.n Nom ;
|
||||
NP = \np -> combineNounPhrase np ! PronNonDrop ! Nom ;
|
||||
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
|
||||
S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
||||
V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
|
||||
|
||||
@@ -34,7 +34,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- } ;
|
||||
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||
-- } ;
|
||||
s = \\ca => conj.s1 ++ (nps.s ! conj.c).init ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! ca++ conj.s3 ;
|
||||
s = \\pd,ca => conj.s1 ++ (nps.s ! conj.c).init ! pd ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! pd ! ca ++ conj.s3 ;
|
||||
n = case conj.c of { Et => Pl ; _ => nps.n } ;
|
||||
g = nps.g ;
|
||||
p = nps.p ;
|
||||
@@ -113,7 +113,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||
ConsNP x xs = {
|
||||
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
|
||||
s = \\co => { init = \\ca => coord co { init = (xs.s ! co).init ! ca ; last = (xs.s ! co).last ! ca} ; last = x.s } ;
|
||||
s = \\co => { init = \\pd,ca => coord co { init = (xs.s ! co).init ! pd ! ca ; last = (xs.s ! co).last ! pd ! ca} ; last = x.s } ;
|
||||
n = matchNumber x.n xs.n ;
|
||||
g = xs.g ;
|
||||
p = xs.p ;
|
||||
@@ -134,7 +134,7 @@ concrete ConjunctionLat of Conjunction =
|
||||
lincat
|
||||
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
|
||||
[Adv] = { s: Coordinator => {init,last : Str}} ;
|
||||
[NP] = { s : Coordinator => {init,last : Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
||||
[NP] = { s : Coordinator => {init,last : PronDropForm => Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
|
||||
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
|
||||
|
||||
oper
|
||||
|
||||
@@ -7,38 +7,37 @@ concrete ExtraLat of ExtraLatAbs =
|
||||
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
||||
|
||||
UsePronNonDrop p = -- Pron -> NP
|
||||
{
|
||||
g = p.pers.g ;
|
||||
n = p.pers.n ;
|
||||
p = p.p ;
|
||||
s = p.pers.s ! PronNonDrop ! PronNonRefl ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
} ;
|
||||
-- UsePronNonDrop p = -- Pron -> NP
|
||||
-- p.pers **
|
||||
-- {
|
||||
-- p = p.p ;
|
||||
-- s = \\_ => p.pers.s ! PronNonDrop ! PronNonRefl ;
|
||||
-- adv = "" ;
|
||||
-- preap, postap = { s = \\_ => "" } ;
|
||||
-- det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
-- } ;
|
||||
|
||||
AdjCNPre ap cn = -- AP -> CN -> CN
|
||||
addAdjToCN (lin AP ap) (lin CN cn) Post ;
|
||||
|
||||
-- ConjNP : Conj -> ListNP -> NP ; -- she or we
|
||||
ConjNPque conj nps =
|
||||
{
|
||||
s = case conj.c of {
|
||||
Et => case nps.isBase of {
|
||||
False => \\cse => coord conj.c {init = (nps.s ! Et).init ! cse ; last = (nps.s ! Et).last ! cse } ;-- (conjunctDistrTable Case conj (nps.s ! Et)).s ;
|
||||
True => \\cse => (nps.s ! Et).init ! cse ++ (nps.s ! Et).last ! cse ++ BIND ++ "que"
|
||||
} ;
|
||||
c => \\cse => coord conj.c {init = (nps.s ! c).init ! cse ; last = (nps.s ! c).last ! cse } -- (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||
} ;
|
||||
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 = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = nps.n };
|
||||
} ;
|
||||
-- -- ConjNP : Conj -> ListNP -> NP ; -- she or we
|
||||
-- ConjNPque conj nps =
|
||||
-- {
|
||||
-- s = case conj.c of {
|
||||
-- Et => case nps.isBase of {
|
||||
-- False => \\cse => coord conj.c {init = (nps.s ! Et).init ! cse ; last = (nps.s ! Et).last ! cse } ;-- (conjunctDistrTable Case conj (nps.s ! Et)).s ;
|
||||
-- True => \\cse => (nps.s ! Et).init ! cse ++ (nps.s ! Et).last ! cse ++ BIND ++ "que"
|
||||
-- } ;
|
||||
-- c => \\cse => coord conj.c {init = (nps.s ! c).init ! cse ; last = (nps.s ! c).last ! cse } -- (conjunctDistrTable Case conj (nps.l ! Et)).s
|
||||
-- } ;
|
||||
-- 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 = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = nps.n };
|
||||
-- } ;
|
||||
|
||||
everybodyFem_NP = regNP "quisque" "quemque" "cuiusque" "cuique" "quoque" "quisque" Fem Sg ;-- regNP "quisquae" Sg ; -- L...
|
||||
somebodyFem_NP = regNP "aliquis" "aliquem" "alicuius" "clicui" "aliquo" "aliquis" Fem Sg ; -- Bayer-Lindauer 60.1
|
||||
|
||||
@@ -8,7 +8,7 @@ concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in {
|
||||
--
|
||||
-- CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||
-- (insertObj (\\_ => rs.s ! np.a)
|
||||
-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
||||
-- (insertObj (\\_ => combineNounPhrase np ! PronNonDrop ! rs.c) (predAux auxBe))) ;
|
||||
--
|
||||
-- CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
||||
-- (insertObj (\\_ => conjThat ++ s.s)
|
||||
@@ -16,7 +16,7 @@ concrete IdiomLat of Idiom = CatLat ** open Prelude, ResLat in {
|
||||
--
|
||||
-- ExistNP np =
|
||||
-- mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
-- (insertObj (\\_ => np.s ! Acc) (predAux auxBe)) ;
|
||||
-- (insertObj (\\_ => combineNounPhrase np ! PronNonDrop ! Acc) (predAux auxBe)) ;
|
||||
--
|
||||
-- ExistIP ip =
|
||||
-- mkQuestion (ss (ip.s ! Nom))
|
||||
|
||||
@@ -154,7 +154,7 @@ lin
|
||||
open_V2 = mkV2 (mkV "aperire") ; -- aperio, aperui, apertum 4 (Langenscheidts)
|
||||
paint_V2A = mkV2A (mkV "pingere" "pingo" "pinxi" "pictum" ) Acc_Prep ; -- pingo, pinxi, pictum 3 (Langenscheidts)
|
||||
paper_N = mkN "charta" ; -- -ae f. (http://la.wikipedia.org/wiki/Charta / Pons)
|
||||
paris_PN = mkPN (mkN "Lutetia") ; -- -ae f. (http://la.wikipedia.org/wiki/Lutetia)
|
||||
paris_PN = mkPN (mkN "Lutetia") singular ; -- -ae f. (http://la.wikipedia.org/wiki/Lutetia)
|
||||
peace_N = mkN "pax" "pacis" feminine ; -- pacis f. (Langenscheidts)
|
||||
pen_N = mkN "stilus" ; -- -i m. (Langenscheidts)
|
||||
planet_N = mkN "planeta" ; -- -ae m. (http://la.wikipedia.org/wiki/Planeta)
|
||||
@@ -384,7 +384,7 @@ lin
|
||||
rule_N = mkN "regula" ; -- -ae f. (Langenscheidts)
|
||||
|
||||
-- added 4/6/2007
|
||||
john_PN = mkPN (mkN "Iohannes") ; -- (http://en.wikipedia.org/wiki/John_(given_name))
|
||||
john_PN = mkPN (mkN "Iohannes") singular ; -- (http://en.wikipedia.org/wiki/John_(given_name))
|
||||
question_N = mkN "rogatio" "rogationis" feminine; -- -onis f. (Langenscheidts)
|
||||
ready_A = mkA "paratus" ; -- 3 (Langenscheidts)
|
||||
reason_N = mkN "causa" ; -- -ae f. (Langenscheidts)
|
||||
|
||||
@@ -6,7 +6,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- DetCN : Det -> CN -> NP ; -- the man
|
||||
DetCN det cn =
|
||||
{
|
||||
s = \\c => cn.s ! det.n ! c ;
|
||||
s = \\_,c => cn.s ! det.n ! c ;
|
||||
n = det.n ; g = cn.g ; p = P3 ;
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
@@ -16,32 +16,26 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- UsePN : PN -> NP ; -- John
|
||||
UsePN pn =
|
||||
lin NP
|
||||
{
|
||||
s = pn.s ! Sg ;
|
||||
g = pn.g ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg }
|
||||
} ;
|
||||
pn **
|
||||
{
|
||||
s = \\_ => pn.s ;
|
||||
p = P3 ;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg }
|
||||
} ;
|
||||
|
||||
-- UsePron : Pron -> NP ; -- he
|
||||
UsePron p =
|
||||
{
|
||||
g = p.pers.g ;
|
||||
n = p.pers.n ;
|
||||
p.pers **
|
||||
{
|
||||
p = p.p ;
|
||||
s = \\c => case c of {
|
||||
Nom => p.pers.s ! PronDrop ! PronNonRefl ; -- Drop pronoun in nominative case
|
||||
_ => p.pers.s ! PronNonDrop ! PronNonRefl -- but don't drop it otherwise
|
||||
} ! c ;
|
||||
s = \\pd,c => p.pers.s ! pd ! PronNonRefl ! c;
|
||||
adv = "" ;
|
||||
preap, postap = { s = \\_ => "" } ;
|
||||
det = { s,sp = \\_,_ => "" ; n = p.pers.n } ;
|
||||
} ;
|
||||
|
||||
|
||||
-- PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np =
|
||||
np ** {
|
||||
@@ -50,7 +44,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||
-- PPartNP np v2 = {
|
||||
-- s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! c ++ v2.s ! VPPart ;
|
||||
-- a = np.a
|
||||
-- } ;
|
||||
--
|
||||
@@ -58,7 +52,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
-- AdvNP : NP -> Adv -> NP ; -- Paris today
|
||||
AdvNP np adv = np ** { adv = np.adv ++ (adv.s ! Posit) } ;
|
||||
-- {
|
||||
-- s = \\c => np.s ! c ;
|
||||
-- s = \\pd,c => combineNounPhrase np ! pd ! c ;
|
||||
-- g = np.g ; n = np.n; p = np.p ;
|
||||
-- adv = cc2 np.adv adv ;
|
||||
-- preap = np.preap ;
|
||||
@@ -74,7 +68,7 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
|
||||
-- DetNP : Det -> NP ; -- these five
|
||||
DetNP det = {
|
||||
s = det.s ! Neutr ;
|
||||
s = \\_ => det.s ! Neutr ;
|
||||
g = Neutr ;
|
||||
n = det.n ;
|
||||
p = P3 ;
|
||||
@@ -129,15 +123,11 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
} ;
|
||||
|
||||
MassNP cn =
|
||||
{
|
||||
s = cn.s ! Sg ;
|
||||
cn ** {
|
||||
s = \\_ => cn.s ! Sg ;
|
||||
-- s = case cn.massable of { True => cn.s ! Sg ; False => \\_ => nonExist } ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
adv = cn.adv ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
det = { s,sp = \\_,_ => "" ; n = Sg } ;
|
||||
};
|
||||
|
||||
@@ -183,11 +173,8 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
|
||||
--
|
||||
-- ApposCN : CN -> NP -> CN
|
||||
ApposCN cn np =
|
||||
cn **
|
||||
{
|
||||
s = \\n,c => cn.s ! n ! c ++ np.det.s ! np.g ! c ++ np.preap.s ! (Ag np.g n c) ++ np.s ! c ++ np.postap .s ! (Ag np.g n c) ++ np.det.sp ! np.g ! c ;
|
||||
g = cn.g ;
|
||||
preap = cn.preap ;
|
||||
postap = cn.postap ;
|
||||
adv = cn.adv
|
||||
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! c ;
|
||||
} ; -- massable = cn.massable } ;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ oper
|
||||
-- } ;
|
||||
|
||||
-- To be implemented, just place holders
|
||||
mkPN : N -> PN = \n -> lin PN n ;
|
||||
mkPN : N -> Number -> PN = \noun,num -> lin PN (noun ** { s = noun.s ! num ; n = num } ) ;
|
||||
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 ( n ** { c = p } );
|
||||
mkN3 : N -> Prep -> Prep -> N3 = \n,p1,p2 -> lin N3 ( n **{ c = p1 ; c2 = p2 } ) ;
|
||||
mkV2S : V -> Prep -> V2S = \v,p -> lin V2S ( v ** { c = p } ) ;
|
||||
|
||||
@@ -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 ++ np.det.s ! np.g ! Nom ++ np.preap.s ! (Ag np.g np.n Nom) ++ np.s ! Nom ++ np.postap.s ! (Ag np.g np.n Nom) ++ np.det.sp ! np.g ! Nom} ;
|
||||
UttNP np = {s = np.adv ++ (combineNounPhrase np) ! PronNonDrop ! 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 = "," ++ np.s ! ResLat.Voc} ; ---- what is the compiler error here? AR 1/2/2014 -- answer: clash with the type name Voc 3/2
|
||||
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
|
||||
--
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
|
||||
s = \\_ => "" ;
|
||||
adv = "" ;
|
||||
neg = \\_,_ => "" ;
|
||||
o = \\_ => np.s ! Nom ;
|
||||
o = \\_ => combineNounPhrase np ! PronNonDrop ! 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 ;
|
||||
} ;
|
||||
|
||||
@@ -33,7 +33,7 @@ concrete RelativeLat of Relative = CatLat ** open ResLat in {
|
||||
-- } ;
|
||||
--
|
||||
-- FunRP p np rp = {
|
||||
-- s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- s = \\c => (combineNounPhrase np) ! PronNonDrop ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
-- a = RAg np.a
|
||||
-- } ;
|
||||
--
|
||||
|
||||
@@ -15,7 +15,7 @@ param
|
||||
Noun : Type = {s : Number => Case => Str ; g : Gender } ; -- massable : Bool } ;
|
||||
NounPhrase : Type =
|
||||
{
|
||||
s : Case => Str ;
|
||||
s : PronDropForm => Case => Str ;
|
||||
g : Gender ;
|
||||
n : Number ;
|
||||
p : Person ;
|
||||
@@ -135,7 +135,7 @@ param
|
||||
regNP : (_,_,_,_,_,_ : Str) -> Gender -> Number -> NounPhrase =
|
||||
\nom,acc,gen,dat,abl,voc,g,n ->
|
||||
{
|
||||
s = table Case [ nom ; acc ; gen ; dat ; abl ; voc ] ;
|
||||
s = \\_ => table Case [ nom ; acc ; gen ; dat ; abl ; voc ] ;
|
||||
g = g ;
|
||||
n = n ;
|
||||
p = P3;
|
||||
@@ -146,7 +146,10 @@ param
|
||||
|
||||
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 = P1 ; 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 ;
|
||||
-- also used for adjectives and so on
|
||||
|
||||
-- adjectives
|
||||
@@ -1066,7 +1069,7 @@ param
|
||||
|
||||
param
|
||||
PronReflForm = PronRefl | PronNonRefl ;
|
||||
PronDropForm = PronDrop | PronNonDrop;
|
||||
PronDropForm = PronDrop | PronNonDrop ;
|
||||
-- PronIndefUsage = PronSubst | PronAdj ;
|
||||
-- PronIndefPol = PronPos | PronNeg ;
|
||||
-- PronIndefMeaning = PronSomeone | PronCertainOne | PronEvery ;
|
||||
@@ -1253,7 +1256,7 @@ oper
|
||||
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) ++ np.postap.s ! (Ag np.g np.n prep.c) ++ np.det.sp ! np.g ! prep.c ++ vp.obj ;
|
||||
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 ;
|
||||
compl = vp.compl ;
|
||||
adv = vp.adv ++ np.adv
|
||||
} ;
|
||||
@@ -1263,7 +1266,7 @@ oper
|
||||
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) ++ 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 ! 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 ;
|
||||
compl = vp.compl ;
|
||||
c = vp.c ;
|
||||
adv = vp.adv ++ np.adv
|
||||
@@ -1327,7 +1330,7 @@ oper
|
||||
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 ! Nom ++ -- the noun of the subject noun phrase in nominative
|
||||
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
|
||||
-- verb part of the clause:
|
||||
|
||||
@@ -36,7 +36,7 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
--
|
||||
-- SlashVS np vs slash =
|
||||
-- mkClause (np.s ! Nom) np.a
|
||||
-- mkClause (combineNounPhrase np ! PronNonDrop ! Nom) np.a
|
||||
-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
||||
-- {c2 = slash.c2} ;
|
||||
--
|
||||
@@ -50,9 +50,10 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
|
||||
-- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion
|
||||
UseQCl t p cl =
|
||||
{
|
||||
s = \\q => case q of {
|
||||
QDir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
|
||||
QIndir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
|
||||
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
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
concrete SymbolLat of Symbol = CatLat ** open Prelude, ResLat, ParadigmsLat, TenseX in {
|
||||
|
||||
lin
|
||||
SymbPN i = {s = \\n,c => i.s ; g = Neutr} ; --- c
|
||||
IntPN i = {s = \\n,c => i.s ; g = Neutr} ; --- c
|
||||
FloatPN i = {s = \\n,c => i.s ; g = Neutr} ; --- c
|
||||
NumPN i = {s = \\n,c => i.s ! Neutr ! c; g = Neutr} ; --- c
|
||||
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) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
@@ -18,7 +18,7 @@ lin
|
||||
preap = { s = \\_ => [] } ;
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ xs.s ) ;
|
||||
g = cn.g ;
|
||||
n = det.n ;
|
||||
adv = [] ;
|
||||
@@ -32,7 +32,7 @@ lin
|
||||
-- } ;
|
||||
-- } ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
s = \\_,c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
adv = [] ;
|
||||
|
||||
@@ -17,10 +17,21 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
} ;
|
||||
|
||||
-- ComplVS : VS -> S -> VP ; -- say that she runs
|
||||
ComplVS v s = insertObj ( dummyNP (S.that_Subj.s ++ s.s ! PreS)) Nom_Prep (predV v) ;
|
||||
|
||||
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 ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
} ;
|
||||
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
||||
ComplVQ v q = insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||
ComplVQ vq qs = -- insertObj (dummyNP (q.s ! QIndir)) Nom_Prep (predV v) ;
|
||||
vq ** {
|
||||
s = \\af,qf => vq.act ! af ;
|
||||
compl = \\ag => qs.s ! QIndir ;
|
||||
adv = [] ;
|
||||
obj = []
|
||||
} ;
|
||||
|
||||
-- ComplVA : VA -> AP -> VP ; -- they become red
|
||||
ComplVA v ap = (predV v) ** { compl = ap.s } ;
|
||||
@@ -57,7 +68,7 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
|
||||
-- SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
-- SlashV2VNP vv np vp =
|
||||
-- insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
||||
-- insertObjPre (\\_ => vv.c2 ++ (combineNounPhrase np) ! PronNonDrop ! Acc)
|
||||
-- (insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||
-- {c2 = vp.c2} ;
|
||||
|
||||
@@ -103,7 +114,9 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
|
||||
CompAP ap = ap ;
|
||||
|
||||
-- CompNP : NP -> Comp ; -- (be) the man
|
||||
CompNP np = {s = \\_ => let a = Ag np.g np.n Nom in np.adv ++ np.det.s ! np.g ! Nom ++ np.preap.s ! a ++ np.s ! Nom ++ np.postap.s ! a } ;
|
||||
CompNP np = {s = \\_ =>
|
||||
(combineNounPhrase np) ! PronNonDrop ! Nom
|
||||
} ;
|
||||
|
||||
-- CompAdv : Adv -> Comp ; -- (be) here
|
||||
CompAdv a = {s = \\_ => a.s ! Posit } ;
|
||||
|
||||
Reference in New Issue
Block a user