refactored romance VP. Now it is possible to parse with Spanish and Catalan; for the rest, some Slash rules still pose a problem. Some clitic and agreement things unfinished. All this in next-lib only; resource 1.4 untouched

This commit is contained in:
aarne
2008-10-30 20:38:51 +00:00
parent 4558f2064d
commit bd71b12224
28 changed files with 276 additions and 241 deletions

View File

@@ -50,7 +50,7 @@ langsCoding = [
langs = map fst langsCoding langs = map fst langsCoding
-- languagues for which to compile Lang -- languagues for which to compile Lang
langsLang = langs `except` ["Ara","Bul","Ina","Rus"] langsLang = langs `except` ["Ara","Bul","Ina","Rus","Hin","Tha"]
-- languages for which to compile Try -- languages for which to compile Try
langsAPI = langsLang `except` ["Ara","Bul","Hin","Ina","Rus","Tha"] langsAPI = langsLang `except` ["Ara","Bul","Hin","Ina","Rus","Tha"]

View File

@@ -3,9 +3,9 @@ RUNMAKE=$(RUNGHC) Make.hs
GF_LIB_PATH=.. GF_LIB_PATH=..
.PHONY: all present alltenses lang api math prelude test demo synopsis link compiled clean .PHONY: all present alltenses lang api math prelude test demo synopsis link compiled constructX clean
all: link prelude present alltenses compat all: link prelude constructX present alltenses compat
present: present:
$(RUNMAKE) present lang $(RUNMAKE) present lang
@@ -28,6 +28,10 @@ prelude:
gfc prelude/*.gf gfc prelude/*.gf
cp -p prelude/*.gfo ../prelude cp -p prelude/*.gfo ../prelude
constructX:
gfc common/ConstructX.gf
cp -p common/ConstructX.gfo ../prelude
test: test:
$(RUNMAKE) test $(RUNMAKE) test

View File

@@ -1,6 +1,6 @@
--# -path=.:alltenses:prelude --# -path=.:alltenses:prelude
resource TryEng = SyntaxEng, LexiconEng, ParadigmsEng - [mkAdv] ** resource TryEng = SyntaxEng-[mkAdN], LexiconEng, ParadigmsEng - [mkAdv,mkAdN] **
open (P = ParadigmsEng), in { open (P = ParadigmsEng), in {
oper oper
@@ -9,5 +9,10 @@ oper
mkAdv : Str -> Adv = P.mkAdv ; mkAdv : Str -> Adv = P.mkAdv ;
} ; } ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxEng.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
} }

View File

@@ -86,22 +86,24 @@ oper
-- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ; -- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
infForm _ _ _ _ = True ; infForm _ _ _ _ = True ;
mkImperative _ p vp = { --- politeness mkImperative b p vp = {
s = \\pol,aag => s = \\pol,aag =>
let let
agr = aag ** {p = p} ; pe = case b of {True => P3 ; _ => p} ;
verb = case <aag.n, pol> of { agr = aag ** {p = pe} ;
<Sg,Neg> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ; clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
_ => (vp.s ! VPImperat).fin ! agr ----e verb = case <aag.n, pol,pe> of {
} ; ----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
----e _ => (vp.s ! VPImperat).fin ! agr
----e } ;
verb = (vp.s ! VPImperat).fin ! agr ; ----e
neg = vp.neg ! pol ; neg = vp.neg ! pol ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ; neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
} ; } ;
negation : Polarity => (Str * Str) = table { negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ; Pos => <[],[]> ;
Neg => <"no",[]> Neg => <"no",[]>

View File

@@ -5,7 +5,7 @@ concrete IdiomCat of Idiom = CatCat **
lin lin
ExistNP np = mkClause [] True (agrP3 Masc Sg) ExistNP np = mkClause [] True (agrP3 Masc Sg)
(insertClit2 "hi" (insertComplement (\\_ => np.s ! Ton Acc) (predV haver_V))) ; (insertClit3 "hi" (insertComplement (\\_ => (np.s ! Acc).ton) (predV haver_V))) ;
GenericCl vp = mkClause "hom" True (agrP3 Masc Sg) vp ; GenericCl vp = mkClause "hom" True (agrP3 Masc Sg) vp ;
ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ; ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ;
@@ -14,7 +14,7 @@ concrete IdiomCat of Idiom = CatCat **
insertComplement insertComplement
(\\agr => (\\agr =>
let let
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; clpr = <vp.clit1,vp.clit2> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
in in
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj (vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj
@@ -25,7 +25,7 @@ concrete IdiomCat of Idiom = CatCat **
CleftNP np rs = mkClause [] True (agrP3 Masc Sg) CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a) (insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ; (insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
ExistIP ip = { ExistIP ip = {
@@ -33,7 +33,7 @@ concrete IdiomCat of Idiom = CatCat **
ip.s ! Nom ++ ip.s ! Nom ++
(mkClause [] True (mkClause [] True
(agrP3 Masc Sg) (agrP3 Masc Sg)
(insertClit2 "hi" (insertComplement (\\_ => ip.s ! Acc) (predV haver_V)))) (insertClit3 "hi" (insertComplement (\\_ => ip.s ! Acc) (predV haver_V))))
.s ! DDir ! t ! a ! p ! Indic .s ! DDir ! t ! a ! p ! Indic
} ; } ;

View File

@@ -100,24 +100,31 @@ oper
---- The use of "ne" as atonic genitive is debatable. ---- The use of "ne" as atonic genitive is debatable.
---- We follow the rule that the atonic nominative is empty. ---- We follow the rule that the atonic nominative is empty.
-- --
mkPronoun : (_,_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p -> \il,le,lui,Lui,son,sa,ses,see,g,n,p ->
{s = table { let
Ton Nom => il ; alui : Case -> Str = \x -> prepCase x ++ Lui ;
Ton x => prepCase x ++ Lui ; in {
Aton Nom => strOpt il ; ---- [] ; s = table {
Aton Acc => le ; Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
Aton (CPrep P_a) => lui ; Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p! CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
Poss {n = Sg ; g = Masc} => son ; c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
Poss {n = Sg ; g = Fem} => sa ; } ;
Poss {n = Pl ; g = Masc} => ses ; poss = \\n,g => case <n,g> of {
Poss {n = Pl ; g = Fem} => see <Sg,Masc> => son ;
<Sg,Fem> => sa ;
<Pl,Masc> => ses ;
<Pl,Fem> => see
} ; } ;
a = {g = g ; n = n ; p = p} ;
hasClit = True a = {g = g ; n = n ; p = p} ;
hasClit = True
} ; } ;
-- --
-- --
----2 Determiners ----2 Determiners

View File

@@ -124,8 +124,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
agr = {g = aag.g ; n = num ; p = p} ; agr = {g = aag.g ; n = num ; p = p} ;
verb = (vp.s ! VPImperat).fin ! agr ; verb = (vp.s ! VPImperat).fin ! agr ;
neg = vp.neg ! pol ; neg = vp.neg ! pol ;
hascl = (pronArg agr.n agr.p vp.clAcc vp.clDat).p3 ; hascl = False ; ----e(pronArg agr.n agr.p vp.clAcc vp.clDat).p3 ;
clpr = pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ; clpr = <[],[]> ; ----e pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in in
case pol of { case pol of {

View File

@@ -9,19 +9,19 @@ concrete IdiomFre of Idiom = CatFre **
ExistNP np = ExistNP np =
mkClause "il" True (agrP3 Masc Sg) mkClause "il" True (agrP3 Masc Sg)
(insertClit2 "y" (insertComplement (\\_ => np.s ! Ton Acc) (predV avoir_V))) ; (insertClit3 "y" (insertComplement (\\_ => (np.s ! Acc).ton) (predV avoir_V))) ;
ExistIP ip = { ExistIP ip = {
s = \\t,a,p,_ => s = \\t,a,p,_ =>
ip.s ! Nom ++ ip.s ! Nom ++
(mkClause "il" True (agrP3 Masc Sg) (mkClause "il" True (agrP3 Masc Sg)
(insertClit2 "y" (predV avoir_V))).s (insertClit3 "y" (predV avoir_V))).s
! DDir ! t ! a ! p ! Indic ---- DInv ! DDir ! t ! a ! p ! Indic ---- DInv
} ; } ;
CleftNP np rs = mkClause elisCe True (agrP3 Masc Sg) CleftNP np rs = mkClause elisCe True (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a) (insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ; (insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
CleftAdv ad s = mkClause elisCe True (agrP3 Masc Sg) CleftAdv ad s = mkClause elisCe True (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic) (insertComplement (\\_ => conjThat ++ s.s ! Indic)

View File

@@ -163,18 +163,22 @@ oper
mkPronoun : (_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,g,n,p -> \il,le,lui,Lui,son,sa,ses,g,n,p ->
{s = table { let
Ton x => prepCase x ++ Lui ; alui : Case -> Str = \x -> prepCase x ++ Lui ;
Aton Nom => il ; in {
Aton Acc => le ; s = table {
Aton (CPrep P_de) => "en" ; --- hmm Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
Aton (CPrep _) => lui ; Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
Poss {n = Sg ; g = Masc} => son ; CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
Poss {n = Sg ; g = Fem} => sa ; c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
Poss {n = Pl} => ses } ;
} ; poss = \\n,g => case <n,g> of {
a = {g = g ; n = n ; p = p} ; <Sg,Masc> => son ;
hasClit = True <Sg,Fem> => sa ;
_ => ses
} ;
a = {g = g ; n = n ; p = p} ;
hasClit = True
} ; } ;
elisPoss : Str -> Str = \s -> elisPoss : Str -> Str = \s ->

View File

@@ -112,11 +112,12 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
let let
pe = case b of {True => P3 ; _ => p} ; pe = case b of {True => P3 ; _ => p} ;
agr = aag ** {p = pe} ; agr = aag ** {p = pe} ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
verb = case <aag.n, pol,pe> of { ----e verb = case <aag.n, pol,pe> of {
<Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ; ----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
_ => (vp.s ! VPImperat).fin ! agr ----e _ => (vp.s ! VPImperat).fin ! agr
} ; ----e } ;
verb = (vp.s ! VPImperat).fin ! agr ; ----e
neg = vp.neg ! pol ; neg = vp.neg ! pol ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in in

View File

@@ -11,7 +11,7 @@ concrete IdiomIta of Idiom = CatIta **
CleftNP np rs = mkClause [] True (agrP3 Masc Sg) CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a) (insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ; (insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg) CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic) (insertComplement (\\_ => conjThat ++ s.s ! Indic)
@@ -19,15 +19,15 @@ concrete IdiomIta of Idiom = CatIta **
ExistNP np = ExistNP np =
mkClause [] True (agrP3 np.a.g np.a.n) mkClause [] True (agrP3 np.a.g np.a.n)
(insertClit2 (elision "ci" "c'" "ci") (insertClit3 (elision "ci" "c'" "ci")
(insertComplement (\\_ => np.s ! Ton Nom) (insertComplement (\\_ => (np.s ! Nom).ton)
(predV copula))) ; (predV copula))) ;
ExistIP ip = { ExistIP ip = {
s = \\t,a,p,_ => s = \\t,a,p,_ =>
ip.s ! Nom ++ ip.s ! Nom ++
(mkClause [] True (agrP3 ip.a.g ip.a.n) (mkClause [] True (agrP3 ip.a.g ip.a.n)
(insertClit2 (elision "ci" "c'" "ci") (insertClit3 (elision "ci" "c'" "ci")
(predV copula))).s ! DDir ! t ! a ! p ! Indic (predV copula))).s ! DDir ! t ! a ! p ! Indic
} ; } ;
@@ -36,7 +36,7 @@ concrete IdiomIta of Idiom = CatIta **
insertComplement insertComplement
(\\agr => (\\agr =>
let let
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
in in
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj (vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj

View File

@@ -135,6 +135,30 @@ oper
-- given in $DiffIta.argPron$ and therefore wouldn't be needed in the -- given in $DiffIta.argPron$ and therefore wouldn't be needed in the
-- pronoun itself.) -- pronoun itself.)
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
let
alui : Case -> Str = \x -> prepCase x ++ Lui ;
in {
s = table {
Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
} ;
----e glie??
poss = \\n,g => case <n,g> of {
<Sg,Masc> => son ;
<Sg,Fem> => sa ;
<Pl,Masc> => ses ;
<Pl,Fem> => see
} ;
a = {g = g ; n = n ; p = p} ;
hasClit = True
} ;
{- --e
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p -> \il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
@@ -154,6 +178,7 @@ oper
a = {g = g ; n = n ; p = p} ; a = {g = g ; n = n ; p = p} ;
hasClit = True hasClit = True
} ; } ;
-}
--2 Determiners --2 Determiners
-- --

View File

@@ -8,7 +8,7 @@ incomplete concrete AdjectiveRomance of Adjective =
isPre = a.isPre isPre = a.isPre
} ; } ;
ComparA a np = { ComparA a np = {
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Ton Nom ; s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ;
isPre = False isPre = False
} ; } ;
UseComparA a = { UseComparA a = {
@@ -26,7 +26,7 @@ incomplete concrete AdjectiveRomance of Adjective =
-- $SuperlA$ belongs to determiner syntax in $Noun$. -- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 adj np = { ComplA2 adj np = {
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np.s ; s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ;
isPre = False isPre = False
} ; } ;

View File

@@ -6,20 +6,19 @@ incomplete concrete AdverbRomance of Adverb =
s = a.s ! Posit ! AA s = a.s ! Posit ! AA
} ; } ;
ComparAdvAdj cadv a np = { ComparAdvAdj cadv a np = {
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ np.s ! Ton Nom s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ (np.s ! Nom).ton
} ; } ;
ComparAdvAdjS cadv a s = { ComparAdvAdjS cadv a s = {
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ s.s ! Conjunct --- ne s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ s.s ! Conjunct --- ne
} ; } ;
PrepNP prep np = {s = prep.s ++ np.s ! case2npform prep.c} ; PrepNP prep np = {s = prep.s ++ (np.s ! prep.c).ton} ;
AdAdv = cc2 ; AdAdv = cc2 ;
SubjS subj s = { SubjS subj s = {
s = subj.s ++ s.s ! subj.m s = subj.s ++ s.s ! subj.m
} ; } ;
---b AdvSC s = s ;
AdnCAdv cadv = {s = cadv.s ++ conjThan} ; AdnCAdv cadv = {s = cadv.s ++ conjThan} ;

View File

@@ -55,7 +55,8 @@ incomplete concrete CatRomance of Cat =
-- Noun -- Noun
CN = {s : Number => Str ; g : Gender} ; CN = {s : Number => Str ; g : Gender} ;
NP,Pron = Pronoun ; Pron = Pronoun ;
NP = NounPhrase ;
Det = { Det = {
s : Gender => Case => Str ; s : Gender => Case => Str ;
n : Number ; n : Number ;

View File

@@ -203,9 +203,9 @@ oper
} ; } ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas neg : Polarity => (Str * Str) ; -- ne-pas
clAcc : CAgr ; -- le/se clit1 : Str ; -- le/se
clDat : CAgr ; -- lui clit2 : Str ; -- lui
clit2 : Str ; -- y en clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme ext : Polarity => Str ; -- que je dors / que je dorme
} ; } ;

View File

@@ -5,38 +5,14 @@ incomplete concrete ConjunctionRomance of Conjunction =
lin lin
{---b
ConjS conj ss = conjunctTable Mood conj ss ;
DConjS conj ss = conjunctDistrTable Mood conj ss ;
ConjAdv conj ss = conjunctSS conj ss ;
DConjAdv conj ss = conjunctDistrSS conj ss ;
ConjNP conj ss = conjunctTable NPForm conj ss ** {
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
hasClit = False
} ;
DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
hasClit = False
} ;
ConjAP conj ss = conjunctTable AForm conj ss ** {
isPre = ss.isPre
} ;
DConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre
} ;
---}
ConjS conj ss = conjunctDistrTable Mood conj ss ; ConjS conj ss = conjunctDistrTable Mood conj ss ;
ConjAdv conj ss = conjunctDistrSS conj ss ; ConjAdv conj ss = conjunctDistrSS conj ss ;
ConjNP conj ss = conjunctDistrTable NPForm conj ss ** { ConjNP conj ss = heavyNP (conjunctDistrTable Case conj ss ** {
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ; a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
hasClit = False hasClit = False
} ; }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** { ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre isPre = ss.isPre
} ; } ;
@@ -49,13 +25,13 @@ incomplete concrete ConjunctionRomance of Conjunction =
BaseAdv = twoSS ; BaseAdv = twoSS ;
ConsAdv = consrSS comma ; ConsAdv = consrSS comma ;
BaseNP x y = { BaseNP x y = {
s1 = \\c => x.s ! stressedCase c ; s1 = \\c => (x.s ! c).ton ;
s2 = \\c => y.s ! (conjunctCase c) ; s2 = \\c => (y.s ! c).ton ; ----e (conjunctCase c) ;
a = conjAgr x.a y.a a = conjAgr x.a y.a
} ; } ;
ConsNP x xs = { ConsNP x xs = {
s1 = \\c => x.s ! stressedCase c ++ comma ++ xs.s1 ! (conjunctCase c) ; s1 = \\c => (x.s ! c).ton ++ comma ++ xs.s1 ! c ; ----e (conjunctCase c) ;
s2 = \\c => xs.s2 ! (conjunctCase c) ; s2 = \\c => xs.s2 ! c ; ----e (conjunctCase c) ;
a = conjAgr x.a xs.a a = conjAgr x.a xs.a
} ; } ;
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ; BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
@@ -64,7 +40,7 @@ incomplete concrete ConjunctionRomance of Conjunction =
lincat lincat
[S] = {s1,s2 : Mood => Str} ; [S] = {s1,s2 : Mood => Str} ;
[Adv] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ; [NP] = {s1,s2 : Case => Str ; a : Agr} ;
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ; [AP] = {s1,s2 : AForm => Str ; isPre : Bool} ;
} }

View File

@@ -8,9 +8,8 @@ incomplete concrete NounRomance of Noun =
let let
g = cn.g ; g = cn.g ;
n = det.n n = det.n
in { in heavyNP {
s = \\c => let cs = npform2case c in s = \\c => det.s ! g ! c ++ cn.s ! n ++ det.s2 ;
det.s ! g ! cs ++ cn.s ! n ++ det.s2 ;
a = agrP3 g n ; a = agrP3 g n ;
hasClit = False hasClit = False
} ; } ;
@@ -19,27 +18,26 @@ incomplete concrete NounRomance of Noun =
UsePron p = p ; UsePron p = p ;
PredetNP pred np = { PredetNP pred np = heavyNP {
s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! npform2case c ++ --- subtype s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! c ++ (np.s ! pred.c).ton ;
np.s ! case2npform pred.c ;
a = np.a ; a = np.a ;
hasClit = False hasClit = False
} ; } ;
PPartNP np v2 = { PPartNP np v2 = heavyNP {
s = \\c => np.s ! c ++ v2.s ! VPart np.a.g np.a.n ; s = \\c => (np.s ! c).ton ++ v2.s ! VPart np.a.g np.a.n ;
a = np.a ; a = np.a ;
hasClit = False hasClit = False
} ; } ;
RelNP np rs = { RelNP np rs = heavyNP {
s = \\c => np.s ! c ++ rs.s ! Indic ! np.a ; s = \\c => (np.s ! c).ton ++ rs.s ! Indic ! np.a ;
a = np.a ; a = np.a ;
hasClit = False hasClit = False
} ; } ;
AdvNP np adv = { AdvNP np adv = heavyNP {
s = \\c => np.s ! c ++ adv.s ; s = \\c => (np.s ! c).ton ++ adv.s ;
a = np.a ; a = np.a ;
hasClit = False hasClit = False
} ; } ;
@@ -65,16 +63,15 @@ incomplete concrete NounRomance of Noun =
let let
g = Masc ; ---- Fem in Extra g = Masc ; ---- Fem in Extra
n = det.n n = det.n
in { in heavyNP {
s = \\c => let cs = npform2case c in s = det.sp ! g ;
det.sp ! g ! cs ;
a = agrP3 g n ; a = agrP3 g n ;
hasClit = False hasClit = False
} ; } ;
PossPron p = { PossPron p = {
s = \\_,n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ; ---- il mio! s = \\_,n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- il mio!
sp = \\ n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ; ---- not for Fre sp = \\ n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- not for Fre
s2 = [] s2 = []
} ; } ;
@@ -108,8 +105,8 @@ incomplete concrete NounRomance of Noun =
MassNP cn = let MassNP cn = let
g = cn.g ; g = cn.g ;
n = Sg n = Sg
in { in heavyNP {
s = \\c => partitive g (npform2case c) ++ cn.s ! n ; s = \\c => partitive g c ++ cn.s ! n ;
a = agrP3 g n ; a = agrP3 g n ;
hasClit = False hasClit = False
} ; } ;
@@ -117,19 +114,18 @@ incomplete concrete NounRomance of Noun =
-- This is based on record subtyping. -- This is based on record subtyping.
UseN, UseN2 = \noun -> noun ; UseN, UseN2 = \noun -> noun ;
---b UseN3 = \noun -> noun ;
Use2N3 f = f ; Use2N3 f = f ;
Use3N3 f = f ** {c2 = f.c3} ; Use3N3 f = f ** {c2 = f.c3} ;
ComplN2 f x = { ComplN2 f x = {
s = \\n => f.s ! n ++ appCompl f.c2 x.s ; s = \\n => f.s ! n ++ appCompl f.c2 x ;
g = f.g ; g = f.g ;
} ; } ;
ComplN3 f x = { ComplN3 f x = {
s = \\n => f.s ! n ++ appCompl f.c2 x.s ; s = \\n => f.s ! n ++ appCompl f.c2 x ;
g = f.g ; g = f.g ;
c2 = f.c3 c2 = f.c3
} ; } ;
@@ -156,7 +152,7 @@ incomplete concrete NounRomance of Noun =
} ; } ;
ApposCN cn np = let g = cn.g in { ApposCN cn np = let g = cn.g in {
s = \\n => cn.s ! n ++ np.s ! Ton Nom ; s = \\n => cn.s ! n ++ (np.s ! Nom).ton ;
g = g g = g
} ; } ;

View File

@@ -14,7 +14,7 @@ incomplete concrete PhraseRomance of Phrase =
UttIP ip = {s = ip.s ! Nom} ; --- Acc also UttIP ip = {s = ip.s ! Nom} ; --- Acc also
UttIAdv iadv = iadv ; UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! Ton Nom} ; UttNP np = {s = (np.s ! Nom).ton} ;
UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
UttAdv adv = adv ; UttAdv adv = adv ;
@@ -22,6 +22,6 @@ incomplete concrete PhraseRomance of Phrase =
PConjConj conj = {s = conj.s2} ; PConjConj conj = {s = conj.s2} ;
NoVoc = {s = []} ; NoVoc = {s = []} ;
VocNP np = {s = "," ++ np.s ! Ton Nom} ; VocNP np = {s = "," ++ (np.s ! Nom).ton} ;
} }

View File

@@ -50,7 +50,7 @@ incomplete concrete QuestionRomance of Question =
s = \\t,a,p,_ => s = \\t,a,p,_ =>
let let
vp = predV copula ; vp = predV copula ;
cls = (mkClause (np.s ! Aton Nom) np.hasClit np.a vp).s ! cls = (mkClause (np.s ! Nom).comp np.hasClit np.a vp).s !
DInv ! t ! a ! p ! Indic ; DInv ! t ! a ! p ! Indic ;
why = icomp.s ! {g = np.a.g ; n = np.a.n} why = icomp.s ! {g = np.a.g ; n = np.a.n}
in why ++ cls in why ++ cls

View File

@@ -37,7 +37,7 @@ incomplete concrete RelativeRomance of Relative =
} ; } ;
FunRP p np rp = { FunRP p np rp = {
s = \\_,a,c => np.s ! Ton Nom ++ p.s ++ rp.s ! True ! a ! p.c ; s = \\_,a,c => (np.s ! Nom).ton ++ p.s ++ rp.s ! True ! a ! p.c ;
a = {g = np.a.g ; n = np.a.n} ; a = {g = np.a.g ; n = np.a.n} ;
hasAgr = True hasAgr = True
} ; } ;

View File

@@ -12,7 +12,22 @@ oper
nominative : Case = Nom ; nominative : Case = Nom ;
accusative : Case = Acc ; accusative : Case = Acc ;
Pronoun = {s : NPForm => Str ; a : Agr ; hasClit : Bool} ; --e Pronoun = {s : NPForm => Str ; a : Agr ; hasClit : Bool} ;
NounPhrase : Type = {
s : Case => {c1,c2,comp,ton : Str} ;
a : Agr ;
hasClit : Bool
} ;
Pronoun : Type = NounPhrase ** {
poss : Number => Gender => Str ---- also: substantival
} ;
heavyNP : {s : Case => Str ; a : Agr} -> NounPhrase = \np -> {
s = \\c => {comp,ton = np.s ! c ; c1,c2 = []} ;
a = np.a ;
hasClit = False
} ;
--e
Compl : Type = {s : Str ; c : Case ; isDir : Bool} ; Compl : Type = {s : Str ; c : Case ; isDir : Bool} ;
@@ -20,11 +35,11 @@ oper
complGen : Compl = {s = [] ; c = genitive ; isDir = False} ; complGen : Compl = {s = [] ; c = genitive ; isDir = False} ;
complDat : Compl = {s = [] ; c = dative ; isDir = True} ; complDat : Compl = {s = [] ; c = dative ; isDir = True} ;
pn2np : {s : Str ; g : Gender} -> Pronoun = \pn -> { --e
s = \\c => prepCase (npform2case c) ++ pn.s ; pn2np : {s : Str ; g : Gender} -> NounPhrase = \pn -> heavyNP {
a = agrP3 pn.g Sg ; s = \\c => prepCase c ++ pn.s ;
hasClit = False a = agrP3 pn.g Sg
} ; } ;
npform2case : NPForm -> Case = \p -> case p of { npform2case : NPForm -> Case = \p -> case p of {
Ton x => x ; Ton x => x ;
@@ -45,21 +60,23 @@ oper
_ => c _ => c
} ; } ;
appCompl : Compl -> (NPForm => Str) -> Str = \comp,np -> appCompl : Compl -> NounPhrase -> Str = \comp,np ->
comp.s ++ np ! Ton comp.c ; comp.s ++ (np.s ! comp.c).ton ;
--e appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
--e comp.s ++ np ! Ton comp.c ;
oper oper
VP : Type = { VP : Type = {
s : Verb ; s : Verb ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas neg : Polarity => (Str * Str) ; -- ne-pas
clAcc : CAgr ; -- le/se clit1 : Str ; -- le/se
clDat : CAgr ; -- lui clit2 : Str ; -- lui
clit2 : Str ; -- y en clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme ext : Polarity => Str ; -- que je dors / que je dorme
} ; } ;
useVP : VP -> VPC = \vp -> useVP : VP -> VPC = \vp ->
@@ -101,16 +118,13 @@ oper
VPGerund => vf (\_ -> []) (\_ -> vger) ; VPGerund => vf (\_ -> []) (\_ -> vger) ;
VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b) VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b)
} ; } ;
agr = vp.agr ; -- partAgr typ ; agr = vp.agr ;
neg = vp.neg ; -- negation ; neg = vp.neg ;
clAcc = vp.clAcc ; -- case isVRefl typ of { clit1 = vp.clit1 ;
-- True => CRefl ; clit2 = vp.clit2 ;
-- _ => CNone clit3 = vp.clit3 ;
-- } ; comp = vp.comp ;
clDat = vp.clDat ; -- CNone ; --- no dative refls ext = vp.ext
clit2 = vp.clit2 ; -- [] ;
comp = vp.comp ; -- \\a => [] ;
ext = vp.ext -- \\p => []
} ; } ;
predV : Verb -> VP = \verb -> predV : Verb -> VP = \verb ->
@@ -120,18 +134,24 @@ oper
s = {s = verb.s ; vtyp = typ} ; s = {s = verb.s ; vtyp = typ} ;
agr = partAgr typ ; agr = partAgr typ ;
neg = negation ; neg = negation ;
{- ----e
clAcc = case isVRefl typ of { clAcc = case isVRefl typ of {
True => CRefl ; True => CRefl ;
_ => CNone _ => CNone
} ; } ;
clDat = CNone ; --- no dative refls -}
clit1 = [] ;
clit2 = [] ; clit2 = [] ;
clit3 = [] ;
comp = \\a => [] ; comp = \\a => [] ;
ext = \\p => [] ext = \\p => []
} ; } ;
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp -> insertObject : Compl -> NounPhrase -> VP -> VP = \c,np,vp ->
let let
obj = np.s ! c.c ;
{- ----e
vpacc = vp.clAcc ; vpacc = vp.clAcc ;
vpdat = vp.clDat ; vpdat = vp.clDat ;
vpagr = vp.agr ; vpagr = vp.agr ;
@@ -146,24 +166,29 @@ oper
} ; } ;
_ => noNewClit _ => noNewClit
} ; } ;
-} ----e
in { in {
s = vp.s ; s = vp.s ;
agr = cc.p4 ; agr = vp.agr ; ----e
clAcc = cc.p1 ; clit1 = vp.clit1 ++ obj.c1 ;
clDat = cc.p2 ; clit2 = vp.clit2 ++ obj.c2 ;
clit2 = vp.clit2 ; clit3 = vp.clit3 ;
comp = \\a => vp.comp ! a ++ c.s ++ obj.comp ;
----e agr = cc.p4 ;
---- clAcc = cc.p1 ;
---- clDat = cc.p2 ;
----e comp = \\a => cc.p3 ++ vp.comp ! a ;
neg = vp.neg ; neg = vp.neg ;
comp = \\a => cc.p3 ++ vp.comp ! a ;
ext = vp.ext ; ext = vp.ext ;
} ; } ;
insertComplement : (Agr => Str) -> VP -> VP = \co,vp -> { insertComplement : (Agr => Str) -> VP -> VP = \co,vp -> {
s = vp.s ; s = vp.s ;
agr = vp.agr ; agr = vp.agr ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = vp.neg ; neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ! a ; comp = \\a => vp.comp ! a ++ co ! a ;
ext = vp.ext ; ext = vp.ext ;
@@ -176,20 +201,21 @@ oper
insertAgr : AAgr -> VP -> VP = \ag,vp -> { insertAgr : AAgr -> VP -> VP = \ag,vp -> {
s = vp.s ; s = vp.s ;
agr = vpAgrClit (agrP3 ag.g ag.n) ; agr = vpAgrClit (agrP3 ag.g ag.n) ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = vp.neg ; neg = vp.neg ;
comp = vp.comp ; comp = vp.comp ;
ext = vp.ext ; ext = vp.ext ;
} ; } ;
----e
insertRefl : VP -> VP = \vp -> { insertRefl : VP -> VP = \vp -> {
s = {s = vp.s.s ; vtyp = vRefl} ; s = {s = vp.s.s ; vtyp = vRefl} ;
agr = vp.agr ; agr = vp.agr ;
clAcc = CRefl ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = vp.neg ; neg = vp.neg ;
comp = vp.comp ; comp = vp.comp ;
ext = vp.ext ; ext = vp.ext ;
@@ -198,9 +224,9 @@ oper
insertAdv : Str -> VP -> VP = \co,vp -> { insertAdv : Str -> VP -> VP = \co,vp -> {
s = vp.s ; s = vp.s ;
agr = vp.agr ; agr = vp.agr ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = vp.neg ; neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ; comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext ; ext = vp.ext ;
@@ -209,20 +235,20 @@ oper
insertAdV : Str -> VP -> VP = \co,vp -> { insertAdV : Str -> VP -> VP = \co,vp -> {
s = vp.s ; s = vp.s ;
agr = vp.agr ; agr = vp.agr ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = \\b => let vpn = vp.neg ! b in {p1 = vpn.p1 ; p2 = vpn.p2 ++ co} ; neg = \\b => let vpn = vp.neg ! b in {p1 = vpn.p1 ; p2 = vpn.p2 ++ co} ;
comp = vp.comp ; comp = vp.comp ;
ext = vp.ext ; ext = vp.ext ;
} ; } ;
insertClit2 : Str -> VP -> VP = \co,vp -> { insertClit3 : Str -> VP -> VP = \co,vp -> {
s = vp.s ; s = vp.s ;
agr = vp.agr ; agr = vp.agr ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ; clit2 = vp.clit2 ;
clit2 = vp.clit2 ++ co ; ---- y en clit3 = vp.clit3 ++ co ;
neg = vp.neg ; neg = vp.neg ;
comp = vp.comp ; comp = vp.comp ;
ext = vp.ext ; ext = vp.ext ;
@@ -231,9 +257,9 @@ oper
insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> { insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> {
s = vp.s ; s = vp.s ;
agr = vp.agr ; agr = vp.agr ;
clAcc = vp.clAcc ; clit1 = vp.clit1 ;
clDat = vp.clDat ;
clit2 = vp.clit2 ; clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
neg = vp.neg ; neg = vp.neg ;
comp = vp.comp ; comp = vp.comp ;
ext = \\p => vp.ext ! p ++ co ! p ; ext = \\p => vp.ext ! p ++ co ! p ;
@@ -258,15 +284,16 @@ oper
verb = vps.fin ! agr ; verb = vps.fin ! agr ;
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
neg = vp.neg ! b ; neg = vp.neg ! b ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; --e clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! b --e compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! b
clit = vp.clit1 ++ vp.clit2 ++ vp.clit3 ;
compl = vp.comp ! agr ++ vp.ext ! b
in in
case d of { case d of {
DDir => DDir =>
subj ++ neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p2 ++ inf ; subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ;
DInv => DInv =>
neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p1 ++ clit ++ verb ++ preOrPost hasClit subj (neg.p2 ++ inf)
preOrPost hasClit subj (neg.p2 ++ inf)
} }
++ compl ++ compl
} ; } ;
@@ -277,14 +304,15 @@ oper
infVP : VP -> Agr -> Str = \vpr,agr -> infVP : VP -> Agr -> Str = \vpr,agr ->
let let
vp = useVP vpr ; vp = useVP vpr ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; ----e clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
iform = infForm agr.n agr.p vp.clAcc vp.clDat ; -- iform = infForm agr.n agr.p vp.clAcc vp.clDat ;
iform = False ;
inf = (vp.s ! VPInfinit Simul iform).inf ! (aagr agr.g agr.n) ; inf = (vp.s ! VPInfinit Simul iform).inf ! (aagr agr.g agr.n) ;
neg = vp.neg ! Pos ; --- Neg not in API -- neg = vp.neg ! Pos ; --- Neg not in API
obj = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol -- obj = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
in in
clitInf clpr.p3 (clpr.p1 ++ vp.clit2) inf ++ obj ; ----e clitInf clpr.p3 (clpr.p1 ++ vp.clit2) inf ++ obj ;
inf ;
} }
-- insertObject: -- insertObject:

View File

@@ -4,7 +4,7 @@ incomplete concrete SentenceRomance of Sentence =
flags optimize=all_subs ; flags optimize=all_subs ;
lin lin
PredVP np vp = mkClause (np.s ! Aton Nom) np.hasClit np.a vp ; PredVP np vp = mkClause (np.s ! Nom).comp np.hasClit np.a vp ;
PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ; PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ;
@@ -17,34 +17,16 @@ incomplete concrete SentenceRomance of Sentence =
SlashVP np v2 = SlashVP np v2 =
-- agreement decided afterwards: la fille qu'il a trouvée -- agreement decided afterwards: la fille qu'il a trouvée
{s = \\ag => {s = \\ag =>
let vp = case <v2.c2.c, v2.c2.isDir> of { let
<Acc,True> => insertAgr ag v2 ; vp = v2
_ => v2 ----e vp = case <v2.c2.c, v2.c2.isDir> of {
} ---- <Acc,True> => insertAgr ag v2 ;
in (mkClause (np.s ! Aton Nom) np.hasClit np.a vp).s ; ---- _ => v2
----e }
in (mkClause (np.s ! Nom).comp np.hasClit np.a vp).s ;
c2 = v2.c2 c2 = v2.c2
} ; } ;
{---b
SlashV2 np v2 =
{s = \\d,ag =>case <v2.c2.c,v2.c2.isDir> of {
<Acc,True> =>
(mkClause (np.s ! Aton Nom) np.hasClit np.a
(insertAgr ag (predV v2))).s ! d ;
_ => (mkClause (np.s ! Aton Nom) np.hasClit np.a (predV v2)).s ! d
} ;
c2 = v2.c2
} ;
SlashVVV2 np vv v2 =
{s = \\d,_ =>
(mkClause
(np.s ! Aton Nom) np.hasClit np.a
(insertComplement
(\\a => prepCase vv.c2.c ++ v2.s ! VInfin False) (predV vv))).s ! d;
c2 = v2.c2
} ;
-}
AdvSlash slash adv = { AdvSlash slash adv = {
s = \\ag,d,t,a,b,m => slash.s ! ag ! d ! t ! a ! b ! m ++ adv.s ; s = \\ag,d,t,a,b,m => slash.s ! ag ! d ! t ! a ! b ! m ++ adv.s ;
c2 = slash.c2 c2 = slash.c2
@@ -58,7 +40,7 @@ incomplete concrete SentenceRomance of Sentence =
SlashVS np vs slash = SlashVS np vs slash =
{s = \\ag => {s = \\ag =>
(mkClause (mkClause
(np.s ! Aton Nom) np.hasClit np.a (np.s ! Nom).comp np.hasClit np.a
(insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b)) (insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b))
(predV vs)) (predV vs))
).s ; ).s ;

View File

@@ -7,18 +7,18 @@ lin
FloatPN i = {s = i.s ; g = Masc} ; FloatPN i = {s = i.s ; g = Masc} ;
NumPN i = {s = i.s!Masc ; g = Masc} ; NumPN i = {s = i.s!Masc ; g = Masc} ;
CNIntNP cn i = { CNIntNP cn i = heavyNP {
s = \\c => cn.s ! Sg ++ i.s ; s = \\c => prepCase c ++ cn.s ! Sg ++ i.s ;
a = agrP3 cn.g Sg ; a = agrP3 cn.g Sg ;
hasClit = False hasClit = False
} ; } ;
CNSymbNP det cn xs = let g = cn.g in { CNSymbNP det cn xs = let g = cn.g in heavyNP {
s = \\c => det.s ! g ! npform2case c ++ cn.s ! det.n ++ xs.s ; s = \\c => det.s ! g ! c ++ cn.s ! det.n ++ xs.s ;
a = agrP3 g det.n ; a = agrP3 g det.n ;
hasClit = False hasClit = False
} ; } ;
CNNumNP cn i = { CNNumNP cn i = heavyNP {
s = \\c => artDef cn.g Sg (npform2case c) ++ cn.s ! Sg ++ i.s ! Masc ; s = \\c => artDef cn.g Sg c ++ cn.s ! Sg ++ i.s ! Masc ;
a = agrP3 cn.g Sg ; a = agrP3 cn.g Sg ;
hasClit = False hasClit = False
} ; } ;

View File

@@ -74,7 +74,7 @@ incomplete concrete VerbRomance of Verb =
UseComp comp = insertComplement comp.s (predV copula) ; UseComp comp = insertComplement comp.s (predV copula) ;
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n} ; CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n} ;
CompNP np = {s = \\_ => np.s ! Ton Acc} ; CompNP np = {s = \\_ => (np.s ! Nom).ton} ;
CompAdv a = {s = \\_ => a.s} ; CompAdv a = {s = \\_ => a.s} ;
AdvVP vp adv = insertAdv adv.s vp ; AdvVP vp adv = insertAdv adv.s vp ;

View File

@@ -95,12 +95,13 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
let let
pe = case b of {True => P3 ; _ => p} ; pe = case b of {True => P3 ; _ => p} ;
agr = aag ** {p = pe} ; agr = aag ** {p = pe} ;
verb = case <aag.n, pol, pe> of { clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
<Sg,Neg,P2> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ; ----e verb = case <aag.n, pol,pe> of {
_ => (vp.s ! VPImperat).fin ! agr ----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
} ; ----e _ => (vp.s ! VPImperat).fin ! agr
----e } ;
verb = (vp.s ! VPImperat).fin ! agr ; ----e
neg = vp.neg ! pol ; neg = vp.neg ! pol ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ; neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;

View File

@@ -11,7 +11,7 @@ concrete IdiomSpa of Idiom = CatSpa **
CleftNP np rs = mkClause [] True (agrP3 Masc Sg) CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a) (insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ; (insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg) CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic) (insertComplement (\\_ => conjThat ++ s.s ! Indic)
@@ -20,7 +20,7 @@ concrete IdiomSpa of Idiom = CatSpa **
ExistNP np = ExistNP np =
mkClause [] True (agrP3 Masc Sg) mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => np.s ! Ton Acc) (predV (verboV (hay_3 "haber")))) ; (insertComplement (\\_ => (np.s ! Acc).ton) (predV (verboV (hay_3 "haber")))) ;
ExistIP ip = { ExistIP ip = {
s = \\t,a,p,_ => s = \\t,a,p,_ =>
ip.s ! Nom ++ ip.s ! Nom ++
@@ -31,7 +31,7 @@ concrete IdiomSpa of Idiom = CatSpa **
insertComplement insertComplement
(\\agr => (\\agr =>
let let
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; clpr = <vp.clit1,vp.clit2> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
in in
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj (vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj

View File

@@ -94,20 +94,24 @@ oper
mkPronoun : (_,_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p -> \il,le,lui,Lui,son,sa,ses,see,g,n,p ->
{s = table { let
Ton Nom => il ; alui : Case -> Str = \x -> prepCase x ++ Lui ;
Ton x => prepCase x ++ Lui ; in {
Aton Nom => strOpt il ; ---- [] ; s = table {
Aton Acc => le ; Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
Aton (CPrep P_a) => lui ; Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p! CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
Poss {n = Sg ; g = Masc} => son ; c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
Poss {n = Sg ; g = Fem} => sa ; } ;
Poss {n = Pl ; g = Masc} => ses ; poss = \\n,g => case <n,g> of {
Poss {n = Pl ; g = Fem} => see <Sg,Masc> => son ;
<Sg,Fem> => sa ;
<Pl,Masc> => ses ;
<Pl,Fem> => see
} ; } ;
a = {g = g ; n = n ; p = p} ;
hasClit = True a = {g = g ; n = n ; p = p} ;
hasClit = True
} ; } ;