summaryrefslogtreecommitdiff
path: root/next-lib/src
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-10-30 20:38:51 +0000
committeraarne <aarne@cs.chalmers.se>2008-10-30 20:38:51 +0000
commitb49a021608d1e15a17ffd54195aa812dbed2948f (patch)
treeada8fb5fad6f41d3df7b9e1fd8fe74089ed90407 /next-lib/src
parent12338243c5198288ba42276b4d76a783c263e7c1 (diff)
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
Diffstat (limited to 'next-lib/src')
-rw-r--r--next-lib/src/Make.hs2
-rw-r--r--next-lib/src/Makefile8
-rw-r--r--next-lib/src/api/TryEng.gf7
-rw-r--r--next-lib/src/catalan/DiffCat.gf20
-rw-r--r--next-lib/src/catalan/IdiomCat.gf8
-rw-r--r--next-lib/src/catalan/MorphoCat.gf33
-rw-r--r--next-lib/src/french/DiffFre.gf4
-rw-r--r--next-lib/src/french/IdiomFre.gf6
-rw-r--r--next-lib/src/french/MorphoFre.gf28
-rw-r--r--next-lib/src/italian/DiffIta.gf11
-rw-r--r--next-lib/src/italian/IdiomIta.gf10
-rw-r--r--next-lib/src/italian/MorphoIta.gf25
-rw-r--r--next-lib/src/romance/AdjectiveRomance.gf4
-rw-r--r--next-lib/src/romance/AdverbRomance.gf5
-rw-r--r--next-lib/src/romance/CatRomance.gf3
-rw-r--r--next-lib/src/romance/CommonRomance.gf6
-rw-r--r--next-lib/src/romance/ConjunctionRomance.gf38
-rw-r--r--next-lib/src/romance/NounRomance.gf42
-rw-r--r--next-lib/src/romance/PhraseRomance.gf4
-rw-r--r--next-lib/src/romance/QuestionRomance.gf2
-rw-r--r--next-lib/src/romance/RelativeRomance.gf2
-rw-r--r--next-lib/src/romance/ResRomance.gf152
-rw-r--r--next-lib/src/romance/SentenceRomance.gf36
-rw-r--r--next-lib/src/romance/SymbolRomance.gf12
-rw-r--r--next-lib/src/romance/VerbRomance.gf2
-rw-r--r--next-lib/src/spanish/DiffSpa.gf11
-rw-r--r--next-lib/src/spanish/IdiomSpa.gf6
-rw-r--r--next-lib/src/spanish/MorphoSpa.gf30
28 files changed, 276 insertions, 241 deletions
diff --git a/next-lib/src/Make.hs b/next-lib/src/Make.hs
index df85d5a4a..93b92e3dc 100644
--- a/next-lib/src/Make.hs
+++ b/next-lib/src/Make.hs
@@ -50,7 +50,7 @@ langsCoding = [
langs = map fst langsCoding
-- 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
langsAPI = langsLang `except` ["Ara","Bul","Hin","Ina","Rus","Tha"]
diff --git a/next-lib/src/Makefile b/next-lib/src/Makefile
index fad7db343..dab5a8a00 100644
--- a/next-lib/src/Makefile
+++ b/next-lib/src/Makefile
@@ -3,9 +3,9 @@ RUNMAKE=$(RUNGHC) Make.hs
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:
$(RUNMAKE) present lang
@@ -28,6 +28,10 @@ prelude:
gfc prelude/*.gf
cp -p prelude/*.gfo ../prelude
+constructX:
+ gfc common/ConstructX.gf
+ cp -p common/ConstructX.gfo ../prelude
+
test:
$(RUNMAKE) test
diff --git a/next-lib/src/api/TryEng.gf b/next-lib/src/api/TryEng.gf
index e5be9b580..79251b3da 100644
--- a/next-lib/src/api/TryEng.gf
+++ b/next-lib/src/api/TryEng.gf
@@ -1,6 +1,6 @@
--# -path=.:alltenses:prelude
-resource TryEng = SyntaxEng, LexiconEng, ParadigmsEng - [mkAdv] **
+resource TryEng = SyntaxEng-[mkAdN], LexiconEng, ParadigmsEng - [mkAdv,mkAdN] **
open (P = ParadigmsEng), in {
oper
@@ -9,5 +9,10 @@ oper
mkAdv : Str -> Adv = P.mkAdv ;
} ;
+ mkAdN = overload {
+ mkAdN : CAdv -> AdN = SyntaxEng.mkAdN ;
+ mkAdN : Str -> AdN = P.mkAdN ;
+ } ;
+
}
diff --git a/next-lib/src/catalan/DiffCat.gf b/next-lib/src/catalan/DiffCat.gf
index 1b41659f3..201124e37 100644
--- a/next-lib/src/catalan/DiffCat.gf
+++ b/next-lib/src/catalan/DiffCat.gf
@@ -86,22 +86,24 @@ oper
-- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
infForm _ _ _ _ = True ;
-
- mkImperative _ p vp = { --- politeness
+
+ mkImperative b p vp = {
s = \\pol,aag =>
let
- agr = aag ** {p = p} ;
- verb = case <aag.n, pol> of {
- <Sg,Neg> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ;
- _ => (vp.s ! VPImperat).fin ! agr
- } ;
+ pe = case b of {True => P3 ; _ => p} ;
+ agr = aag ** {p = pe} ;
+ clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
+----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 ;
- clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
} ;
-
+
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"no",[]>
diff --git a/next-lib/src/catalan/IdiomCat.gf b/next-lib/src/catalan/IdiomCat.gf
index 5b82047aa..d449a73eb 100644
--- a/next-lib/src/catalan/IdiomCat.gf
+++ b/next-lib/src/catalan/IdiomCat.gf
@@ -5,7 +5,7 @@ concrete IdiomCat of Idiom = CatCat **
lin
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 ;
ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ;
@@ -14,7 +14,7 @@ concrete IdiomCat of Idiom = CatCat **
insertComplement
(\\agr =>
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
in
(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)
(insertComplement (\\_ => rs.s ! Indic ! np.a)
- (insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ;
+ (insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
ExistIP ip = {
@@ -33,7 +33,7 @@ concrete IdiomCat of Idiom = CatCat **
ip.s ! Nom ++
(mkClause [] True
(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
} ;
diff --git a/next-lib/src/catalan/MorphoCat.gf b/next-lib/src/catalan/MorphoCat.gf
index abcb757cf..05d10cb8e 100644
--- a/next-lib/src/catalan/MorphoCat.gf
+++ b/next-lib/src/catalan/MorphoCat.gf
@@ -100,24 +100,31 @@ oper
---- The use of "ne" as atonic genitive is debatable.
---- We follow the rule that the atonic nominative is empty.
--
+
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p ->
- {s = table {
- Ton Nom => il ;
- Ton x => prepCase x ++ Lui ;
- Aton Nom => strOpt il ; ---- [] ;
- Aton Acc => le ;
- Aton (CPrep P_a) => lui ;
- Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
- Poss {n = Sg ; g = Masc} => son ;
- Poss {n = Sg ; g = Fem} => sa ;
- Poss {n = Pl ; g = Masc} => ses ;
- Poss {n = Pl ; g = Fem} => see
+ 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}
+ } ;
+ 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
+
+ a = {g = g ; n = n ; p = p} ;
+ hasClit = True
} ;
+
+
--
--
----2 Determiners
diff --git a/next-lib/src/french/DiffFre.gf b/next-lib/src/french/DiffFre.gf
index 7abd2f76b..4d28796b1 100644
--- a/next-lib/src/french/DiffFre.gf
+++ b/next-lib/src/french/DiffFre.gf
@@ -124,8 +124,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
agr = {g = aag.g ; n = num ; p = p} ;
verb = (vp.s ! VPImperat).fin ! agr ;
neg = vp.neg ! pol ;
- hascl = (pronArg agr.n agr.p vp.clAcc vp.clDat).p3 ;
- clpr = pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ;
+ hascl = False ; ----e(pronArg agr.n agr.p vp.clAcc vp.clDat).p3 ;
+ clpr = <[],[]> ; ----e pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
case pol of {
diff --git a/next-lib/src/french/IdiomFre.gf b/next-lib/src/french/IdiomFre.gf
index bb38c8774..e8abaac21 100644
--- a/next-lib/src/french/IdiomFre.gf
+++ b/next-lib/src/french/IdiomFre.gf
@@ -9,19 +9,19 @@ concrete IdiomFre of Idiom = CatFre **
ExistNP np =
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 = {
s = \\t,a,p,_ =>
ip.s ! Nom ++
(mkClause "il" True (agrP3 Masc Sg)
- (insertClit2 "y" (predV avoir_V))).s
+ (insertClit3 "y" (predV avoir_V))).s
! DDir ! t ! a ! p ! Indic ---- DInv
} ;
CleftNP np rs = mkClause elisCe True (agrP3 Masc Sg)
(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)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
diff --git a/next-lib/src/french/MorphoFre.gf b/next-lib/src/french/MorphoFre.gf
index 96ce22850..1bd470097 100644
--- a/next-lib/src/french/MorphoFre.gf
+++ b/next-lib/src/french/MorphoFre.gf
@@ -163,18 +163,22 @@ oper
mkPronoun : (_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,g,n,p ->
- {s = table {
- Ton x => prepCase x ++ Lui ;
- Aton Nom => il ;
- Aton Acc => le ;
- Aton (CPrep P_de) => "en" ; --- hmm
- Aton (CPrep _) => lui ;
- Poss {n = Sg ; g = Masc} => son ;
- Poss {n = Sg ; g = Fem} => sa ;
- Poss {n = Pl} => ses
- } ;
- a = {g = g ; n = n ; p = p} ;
- hasClit = True
+ 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}
+ } ;
+ poss = \\n,g => case <n,g> of {
+ <Sg,Masc> => son ;
+ <Sg,Fem> => sa ;
+ _ => ses
+ } ;
+ a = {g = g ; n = n ; p = p} ;
+ hasClit = True
} ;
elisPoss : Str -> Str = \s ->
diff --git a/next-lib/src/italian/DiffIta.gf b/next-lib/src/italian/DiffIta.gf
index 7eef2109e..a54520fa9 100644
--- a/next-lib/src/italian/DiffIta.gf
+++ b/next-lib/src/italian/DiffIta.gf
@@ -112,11 +112,12 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
let
pe = case b of {True => P3 ; _ => p} ;
agr = aag ** {p = pe} ;
- clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
- verb = case <aag.n, pol,pe> of {
- <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
- _ => (vp.s ! VPImperat).fin ! agr
- } ;
+ clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
+----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 ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
diff --git a/next-lib/src/italian/IdiomIta.gf b/next-lib/src/italian/IdiomIta.gf
index 2f1bb118d..bac30d741 100644
--- a/next-lib/src/italian/IdiomIta.gf
+++ b/next-lib/src/italian/IdiomIta.gf
@@ -11,7 +11,7 @@ concrete IdiomIta of Idiom = CatIta **
CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(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)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
@@ -19,15 +19,15 @@ concrete IdiomIta of Idiom = CatIta **
ExistNP np =
mkClause [] True (agrP3 np.a.g np.a.n)
- (insertClit2 (elision "ci" "c'" "ci")
- (insertComplement (\\_ => np.s ! Ton Nom)
+ (insertClit3 (elision "ci" "c'" "ci")
+ (insertComplement (\\_ => (np.s ! Nom).ton)
(predV copula))) ;
ExistIP ip = {
s = \\t,a,p,_ =>
ip.s ! Nom ++
(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
} ;
@@ -36,7 +36,7 @@ concrete IdiomIta of Idiom = CatIta **
insertComplement
(\\agr =>
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
in
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj
diff --git a/next-lib/src/italian/MorphoIta.gf b/next-lib/src/italian/MorphoIta.gf
index 669e1300b..43f58fa0e 100644
--- a/next-lib/src/italian/MorphoIta.gf
+++ b/next-lib/src/italian/MorphoIta.gf
@@ -138,6 +138,30 @@ oper
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) ->
+ Gender -> Number -> Person -> Pronoun =
+ \il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
{s = table {
Ton Nom => il ;
Ton x => prepCase x ++ Lui ;
@@ -154,6 +178,7 @@ oper
a = {g = g ; n = n ; p = p} ;
hasClit = True
} ;
+-}
--2 Determiners
--
diff --git a/next-lib/src/romance/AdjectiveRomance.gf b/next-lib/src/romance/AdjectiveRomance.gf
index eec0783a7..359e4088a 100644
--- a/next-lib/src/romance/AdjectiveRomance.gf
+++ b/next-lib/src/romance/AdjectiveRomance.gf
@@ -8,7 +8,7 @@ incomplete concrete AdjectiveRomance of Adjective =
isPre = a.isPre
} ;
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
} ;
UseComparA a = {
@@ -26,7 +26,7 @@ incomplete concrete AdjectiveRomance of Adjective =
-- $SuperlA$ belongs to determiner syntax in $Noun$.
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
} ;
diff --git a/next-lib/src/romance/AdverbRomance.gf b/next-lib/src/romance/AdverbRomance.gf
index 4fe30e707..bfd55f776 100644
--- a/next-lib/src/romance/AdverbRomance.gf
+++ b/next-lib/src/romance/AdverbRomance.gf
@@ -6,20 +6,19 @@ incomplete concrete AdverbRomance of Adverb =
s = a.s ! Posit ! AA
} ;
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 = {
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 ;
SubjS subj s = {
s = subj.s ++ s.s ! subj.m
} ;
----b AdvSC s = s ;
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
diff --git a/next-lib/src/romance/CatRomance.gf b/next-lib/src/romance/CatRomance.gf
index a64e84568..188f535f5 100644
--- a/next-lib/src/romance/CatRomance.gf
+++ b/next-lib/src/romance/CatRomance.gf
@@ -55,7 +55,8 @@ incomplete concrete CatRomance of Cat =
-- Noun
CN = {s : Number => Str ; g : Gender} ;
- NP,Pron = Pronoun ;
+ Pron = Pronoun ;
+ NP = NounPhrase ;
Det = {
s : Gender => Case => Str ;
n : Number ;
diff --git a/next-lib/src/romance/CommonRomance.gf b/next-lib/src/romance/CommonRomance.gf
index f167f38fa..82da3b824 100644
--- a/next-lib/src/romance/CommonRomance.gf
+++ b/next-lib/src/romance/CommonRomance.gf
@@ -203,9 +203,9 @@ oper
} ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas
- clAcc : CAgr ; -- le/se
- clDat : CAgr ; -- lui
- clit2 : Str ; -- y en
+ clit1 : Str ; -- le/se
+ clit2 : Str ; -- lui
+ clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme
} ;
diff --git a/next-lib/src/romance/ConjunctionRomance.gf b/next-lib/src/romance/ConjunctionRomance.gf
index 894fccefa..219ce5c58 100644
--- a/next-lib/src/romance/ConjunctionRomance.gf
+++ b/next-lib/src/romance/ConjunctionRomance.gf
@@ -5,38 +5,14 @@ incomplete concrete ConjunctionRomance of Conjunction =
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 ;
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} ;
hasClit = False
- } ;
+ }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre
} ;
@@ -49,13 +25,13 @@ incomplete concrete ConjunctionRomance of Conjunction =
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
BaseNP x y = {
- s1 = \\c => x.s ! stressedCase c ;
- s2 = \\c => y.s ! (conjunctCase c) ;
+ s1 = \\c => (x.s ! c).ton ;
+ s2 = \\c => (y.s ! c).ton ; ----e (conjunctCase c) ;
a = conjAgr x.a y.a
} ;
ConsNP x xs = {
- s1 = \\c => x.s ! stressedCase c ++ comma ++ xs.s1 ! (conjunctCase c) ;
- s2 = \\c => xs.s2 ! (conjunctCase c) ;
+ s1 = \\c => (x.s ! c).ton ++ comma ++ xs.s1 ! c ; ----e (conjunctCase c) ;
+ s2 = \\c => xs.s2 ! c ; ----e (conjunctCase c) ;
a = conjAgr x.a xs.a
} ;
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
@@ -64,7 +40,7 @@ incomplete concrete ConjunctionRomance of Conjunction =
lincat
[S] = {s1,s2 : Mood => 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} ;
}
diff --git a/next-lib/src/romance/NounRomance.gf b/next-lib/src/romance/NounRomance.gf
index a5de71f99..8bf8651ab 100644
--- a/next-lib/src/romance/NounRomance.gf
+++ b/next-lib/src/romance/NounRomance.gf
@@ -8,9 +8,8 @@ incomplete concrete NounRomance of Noun =
let
g = cn.g ;
n = det.n
- in {
- s = \\c => let cs = npform2case c in
- det.s ! g ! cs ++ cn.s ! n ++ det.s2 ;
+ in heavyNP {
+ s = \\c => det.s ! g ! c ++ cn.s ! n ++ det.s2 ;
a = agrP3 g n ;
hasClit = False
} ;
@@ -19,27 +18,26 @@ incomplete concrete NounRomance of Noun =
UsePron p = p ;
- PredetNP pred np = {
- s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! npform2case c ++ --- subtype
- np.s ! case2npform pred.c ;
+ PredetNP pred np = heavyNP {
+ s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! c ++ (np.s ! pred.c).ton ;
a = np.a ;
hasClit = False
} ;
- PPartNP np v2 = {
- s = \\c => np.s ! c ++ v2.s ! VPart np.a.g np.a.n ;
+ PPartNP np v2 = heavyNP {
+ s = \\c => (np.s ! c).ton ++ v2.s ! VPart np.a.g np.a.n ;
a = np.a ;
hasClit = False
} ;
- RelNP np rs = {
- s = \\c => np.s ! c ++ rs.s ! Indic ! np.a ;
+ RelNP np rs = heavyNP {
+ s = \\c => (np.s ! c).ton ++ rs.s ! Indic ! np.a ;
a = np.a ;
hasClit = False
} ;
- AdvNP np adv = {
- s = \\c => np.s ! c ++ adv.s ;
+ AdvNP np adv = heavyNP {
+ s = \\c => (np.s ! c).ton ++ adv.s ;
a = np.a ;
hasClit = False
} ;
@@ -65,16 +63,15 @@ incomplete concrete NounRomance of Noun =
let
g = Masc ; ---- Fem in Extra
n = det.n
- in {
- s = \\c => let cs = npform2case c in
- det.sp ! g ! cs ;
+ in heavyNP {
+ s = det.sp ! g ;
a = agrP3 g n ;
hasClit = False
} ;
PossPron p = {
- s = \\_,n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ; ---- il mio!
- sp = \\ n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ; ---- not for Fre
+ s = \\_,n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- il mio!
+ sp = \\ n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- not for Fre
s2 = []
} ;
@@ -108,8 +105,8 @@ incomplete concrete NounRomance of Noun =
MassNP cn = let
g = cn.g ;
n = Sg
- in {
- s = \\c => partitive g (npform2case c) ++ cn.s ! n ;
+ in heavyNP {
+ s = \\c => partitive g c ++ cn.s ! n ;
a = agrP3 g n ;
hasClit = False
} ;
@@ -117,19 +114,18 @@ incomplete concrete NounRomance of Noun =
-- This is based on record subtyping.
UseN, UseN2 = \noun -> noun ;
----b UseN3 = \noun -> noun ;
Use2N3 f = f ;
Use3N3 f = f ** {c2 = f.c3} ;
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 ;
} ;
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 ;
c2 = f.c3
} ;
@@ -156,7 +152,7 @@ incomplete concrete NounRomance of Noun =
} ;
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
} ;
diff --git a/next-lib/src/romance/PhraseRomance.gf b/next-lib/src/romance/PhraseRomance.gf
index 4de6b28e5..e9416284b 100644
--- a/next-lib/src/romance/PhraseRomance.gf
+++ b/next-lib/src/romance/PhraseRomance.gf
@@ -14,7 +14,7 @@ incomplete concrete PhraseRomance of Phrase =
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
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
UttAdv adv = adv ;
@@ -22,6 +22,6 @@ incomplete concrete PhraseRomance of Phrase =
PConjConj conj = {s = conj.s2} ;
NoVoc = {s = []} ;
- VocNP np = {s = "," ++ np.s ! Ton Nom} ;
+ VocNP np = {s = "," ++ (np.s ! Nom).ton} ;
}
diff --git a/next-lib/src/romance/QuestionRomance.gf b/next-lib/src/romance/QuestionRomance.gf
index 6d2fa8669..09a6e5e9e 100644
--- a/next-lib/src/romance/QuestionRomance.gf
+++ b/next-lib/src/romance/QuestionRomance.gf
@@ -50,7 +50,7 @@ incomplete concrete QuestionRomance of Question =
s = \\t,a,p,_ =>
let
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 ;
why = icomp.s ! {g = np.a.g ; n = np.a.n}
in why ++ cls
diff --git a/next-lib/src/romance/RelativeRomance.gf b/next-lib/src/romance/RelativeRomance.gf
index 40b83c1b3..f8d3f466f 100644
--- a/next-lib/src/romance/RelativeRomance.gf
+++ b/next-lib/src/romance/RelativeRomance.gf
@@ -37,7 +37,7 @@ incomplete concrete RelativeRomance of Relative =
} ;
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} ;
hasAgr = True
} ;
diff --git a/next-lib/src/romance/ResRomance.gf b/next-lib/src/romance/ResRomance.gf
index 198db0c2b..483c217f1 100644
--- a/next-lib/src/romance/ResRomance.gf
+++ b/next-lib/src/romance/ResRomance.gf
@@ -12,7 +12,22 @@ oper
nominative : Case = Nom ;
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} ;
@@ -20,11 +35,11 @@ oper
complGen : Compl = {s = [] ; c = genitive ; isDir = False} ;
complDat : Compl = {s = [] ; c = dative ; isDir = True} ;
- pn2np : {s : Str ; g : Gender} -> Pronoun = \pn -> {
- s = \\c => prepCase (npform2case c) ++ pn.s ;
- a = agrP3 pn.g Sg ;
- hasClit = False
- } ;
+--e
+ pn2np : {s : Str ; g : Gender} -> NounPhrase = \pn -> heavyNP {
+ s = \\c => prepCase c ++ pn.s ;
+ a = agrP3 pn.g Sg
+ } ;
npform2case : NPForm -> Case = \p -> case p of {
Ton x => x ;
@@ -45,21 +60,23 @@ oper
_ => c
} ;
- appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
- comp.s ++ np ! Ton comp.c ;
+ appCompl : Compl -> NounPhrase -> Str = \comp,np ->
+ comp.s ++ (np.s ! comp.c).ton ;
+--e appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
+--e comp.s ++ np ! Ton comp.c ;
oper
VP : Type = {
- s : Verb ;
- agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
- neg : Polarity => (Str * Str) ; -- ne-pas
- clAcc : CAgr ; -- le/se
- clDat : CAgr ; -- lui
- clit2 : Str ; -- y en
- comp : Agr => Str ; -- content(e) ; à ma mère ; hier
- ext : Polarity => Str ; -- que je dors / que je dorme
- } ;
+ s : Verb ;
+ agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
+ neg : Polarity => (Str * Str) ; -- ne-pas
+ clit1 : Str ; -- le/se
+ clit2 : Str ; -- lui
+ clit3 : Str ; -- y en
+ comp : Agr => Str ; -- content(e) ; à ma mère ; hier
+ ext : Polarity => Str ; -- que je dors / que je dorme
+ } ;
useVP : VP -> VPC = \vp ->
@@ -101,16 +118,13 @@ oper
VPGerund => vf (\_ -> []) (\_ -> vger) ;
VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b)
} ;
- agr = vp.agr ; -- partAgr typ ;
- neg = vp.neg ; -- negation ;
- clAcc = vp.clAcc ; -- case isVRefl typ of {
- -- True => CRefl ;
- -- _ => CNone
- -- } ;
- clDat = vp.clDat ; -- CNone ; --- no dative refls
- clit2 = vp.clit2 ; -- [] ;
- comp = vp.comp ; -- \\a => [] ;
- ext = vp.ext -- \\p => []
+ agr = vp.agr ;
+ neg = vp.neg ;
+ clit1 = vp.clit1 ;
+ clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
+ comp = vp.comp ;
+ ext = vp.ext
} ;
predV : Verb -> VP = \verb ->
@@ -120,18 +134,24 @@ oper
s = {s = verb.s ; vtyp = typ} ;
agr = partAgr typ ;
neg = negation ;
+{- ----e
clAcc = case isVRefl typ of {
True => CRefl ;
_ => CNone
} ;
- clDat = CNone ; --- no dative refls
+-}
+ clit1 = [] ;
clit2 = [] ;
+ clit3 = [] ;
comp = \\a => [] ;
ext = \\p => []
} ;
- insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
+ insertObject : Compl -> NounPhrase -> VP -> VP = \c,np,vp ->
let
+ obj = np.s ! c.c ;
+
+{- ----e
vpacc = vp.clAcc ;
vpdat = vp.clDat ;
vpagr = vp.agr ;
@@ -146,24 +166,29 @@ oper
} ;
_ => noNewClit
} ;
+-} ----e
in {
- s = vp.s ;
- agr = cc.p4 ;
- clAcc = cc.p1 ;
- clDat = cc.p2 ;
- clit2 = vp.clit2 ;
+ s = vp.s ;
+ agr = vp.agr ; ----e
+ clit1 = vp.clit1 ++ obj.c1 ;
+ clit2 = vp.clit2 ++ obj.c2 ;
+ 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 ;
- comp = \\a => cc.p3 ++ vp.comp ! a ;
ext = vp.ext ;
} ;
insertComplement : (Agr => Str) -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ! a ;
ext = vp.ext ;
@@ -176,20 +201,21 @@ oper
insertAgr : AAgr -> VP -> VP = \ag,vp -> {
s = vp.s ;
agr = vpAgrClit (agrP3 ag.g ag.n) ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
} ;
+----e
insertRefl : VP -> VP = \vp -> {
s = {s = vp.s.s ; vtyp = vRefl} ;
agr = vp.agr ;
- clAcc = CRefl ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
@@ -198,9 +224,9 @@ oper
insertAdv : Str -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext ;
@@ -209,20 +235,20 @@ oper
insertAdV : Str -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = \\b => let vpn = vp.neg ! b in {p1 = vpn.p1 ; p2 = vpn.p2 ++ co} ;
comp = vp.comp ;
ext = vp.ext ;
} ;
- insertClit2 : Str -> VP -> VP = \co,vp -> {
+ insertClit3 : Str -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
- clit2 = vp.clit2 ++ co ; ---- y en
+ clit1 = vp.clit1 ;
+ clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ++ co ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
@@ -231,9 +257,9 @@ oper
insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
- clAcc = vp.clAcc ;
- clDat = vp.clDat ;
+ clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
+ clit3 = vp.clit3 ;
neg = vp.neg ;
comp = vp.comp ;
ext = \\p => vp.ext ! p ++ co ! p ;
@@ -258,15 +284,16 @@ oper
verb = vps.fin ! agr ;
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
neg = vp.neg ! b ;
- clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
- compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! b
+--e clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
+--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
case d of {
DDir =>
- subj ++ neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p2 ++ inf ;
+ subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ;
DInv =>
- neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++
- preOrPost hasClit subj (neg.p2 ++ inf)
+ neg.p1 ++ clit ++ verb ++ preOrPost hasClit subj (neg.p2 ++ inf)
}
++ compl
} ;
@@ -277,14 +304,15 @@ oper
infVP : VP -> Agr -> Str = \vpr,agr ->
let
vp = useVP vpr ;
- clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
- iform = infForm 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 = False ;
inf = (vp.s ! VPInfinit Simul iform).inf ! (aagr agr.g agr.n) ;
- neg = vp.neg ! Pos ; --- Neg not in API
- obj = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
+-- neg = vp.neg ! Pos ; --- Neg not in API
+-- obj = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
in
- clitInf clpr.p3 (clpr.p1 ++ vp.clit2) inf ++ obj ;
-
+----e clitInf clpr.p3 (clpr.p1 ++ vp.clit2) inf ++ obj ;
+ inf ;
}
-- insertObject:
diff --git a/next-lib/src/romance/SentenceRomance.gf b/next-lib/src/romance/SentenceRomance.gf
index 311c64c34..beb393df8 100644
--- a/next-lib/src/romance/SentenceRomance.gf
+++ b/next-lib/src/romance/SentenceRomance.gf
@@ -4,7 +4,7 @@ incomplete concrete SentenceRomance of Sentence =
flags optimize=all_subs ;
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 ;
@@ -17,34 +17,16 @@ incomplete concrete SentenceRomance of Sentence =
SlashVP np v2 =
-- agreement decided afterwards: la fille qu'il a trouvée
{s = \\ag =>
- let vp = case <v2.c2.c, v2.c2.isDir> of {
- <Acc,True> => insertAgr ag v2 ;
- _ => v2
- }
- in (mkClause (np.s ! Aton Nom) np.hasClit np.a vp).s ;
+ let
+ vp = v2
+----e vp = case <v2.c2.c, v2.c2.isDir> of {
+---- <Acc,True> => insertAgr ag v2 ;
+---- _ => v2
+----e }
+ in (mkClause (np.s ! Nom).comp np.hasClit np.a vp).s ;
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 = {
s = \\ag,d,t,a,b,m => slash.s ! ag ! d ! t ! a ! b ! m ++ adv.s ;
c2 = slash.c2
@@ -58,7 +40,7 @@ incomplete concrete SentenceRomance of Sentence =
SlashVS np vs slash =
{s = \\ag =>
(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))
(predV vs))
).s ;
diff --git a/next-lib/src/romance/SymbolRomance.gf b/next-lib/src/romance/SymbolRomance.gf
index 64b4e1a34..7319b1010 100644
--- a/next-lib/src/romance/SymbolRomance.gf
+++ b/next-lib/src/romance/SymbolRomance.gf
@@ -7,18 +7,18 @@ lin
FloatPN i = {s = i.s ; g = Masc} ;
NumPN i = {s = i.s!Masc ; g = Masc} ;
- CNIntNP cn i = {
- s = \\c => cn.s ! Sg ++ i.s ;
+ CNIntNP cn i = heavyNP {
+ s = \\c => prepCase c ++ cn.s ! Sg ++ i.s ;
a = agrP3 cn.g Sg ;
hasClit = False
} ;
- CNSymbNP det cn xs = let g = cn.g in {
- s = \\c => det.s ! g ! npform2case c ++ cn.s ! det.n ++ xs.s ;
+ CNSymbNP det cn xs = let g = cn.g in heavyNP {
+ s = \\c => det.s ! g ! c ++ cn.s ! det.n ++ xs.s ;
a = agrP3 g det.n ;
hasClit = False
} ;
- CNNumNP cn i = {
- s = \\c => artDef cn.g Sg (npform2case c) ++ cn.s ! Sg ++ i.s ! Masc ;
+ CNNumNP cn i = heavyNP {
+ s = \\c => artDef cn.g Sg c ++ cn.s ! Sg ++ i.s ! Masc ;
a = agrP3 cn.g Sg ;
hasClit = False
} ;
diff --git a/next-lib/src/romance/VerbRomance.gf b/next-lib/src/romance/VerbRomance.gf
index 96992bd35..691905d3b 100644
--- a/next-lib/src/romance/VerbRomance.gf
+++ b/next-lib/src/romance/VerbRomance.gf
@@ -74,7 +74,7 @@ incomplete concrete VerbRomance of Verb =
UseComp comp = insertComplement comp.s (predV copula) ;
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} ;
AdvVP vp adv = insertAdv adv.s vp ;
diff --git a/next-lib/src/spanish/DiffSpa.gf b/next-lib/src/spanish/DiffSpa.gf
index 668aa79c0..b1ea05af6 100644
--- a/next-lib/src/spanish/DiffSpa.gf
+++ b/next-lib/src/spanish/DiffSpa.gf
@@ -95,12 +95,13 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
let
pe = case b of {True => P3 ; _ => p} ;
agr = aag ** {p = pe} ;
- verb = case <aag.n, pol, pe> of {
- <Sg,Neg,P2> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ;
- _ => (vp.s ! VPImperat).fin ! agr
- } ;
+ clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
+----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 ;
- clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
diff --git a/next-lib/src/spanish/IdiomSpa.gf b/next-lib/src/spanish/IdiomSpa.gf
index 209d66c0a..d870f79fa 100644
--- a/next-lib/src/spanish/IdiomSpa.gf
+++ b/next-lib/src/spanish/IdiomSpa.gf
@@ -11,7 +11,7 @@ concrete IdiomSpa of Idiom = CatSpa **
CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(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)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
@@ -20,7 +20,7 @@ concrete IdiomSpa of Idiom = CatSpa **
ExistNP np =
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 = {
s = \\t,a,p,_ =>
ip.s ! Nom ++
@@ -31,7 +31,7 @@ concrete IdiomSpa of Idiom = CatSpa **
insertComplement
(\\agr =>
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
in
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj
diff --git a/next-lib/src/spanish/MorphoSpa.gf b/next-lib/src/spanish/MorphoSpa.gf
index cb33777c9..a78e45e03 100644
--- a/next-lib/src/spanish/MorphoSpa.gf
+++ b/next-lib/src/spanish/MorphoSpa.gf
@@ -94,20 +94,24 @@ oper
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p ->
- {s = table {
- Ton Nom => il ;
- Ton x => prepCase x ++ Lui ;
- Aton Nom => strOpt il ; ---- [] ;
- Aton Acc => le ;
- Aton (CPrep P_a) => lui ;
- Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
- Poss {n = Sg ; g = Masc} => son ;
- Poss {n = Sg ; g = Fem} => sa ;
- Poss {n = Pl ; g = Masc} => ses ;
- Poss {n = Pl ; g = Fem} => see
+ 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}
+ } ;
+ 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
+
+ a = {g = g ; n = n ; p = p} ;
+ hasClit = True
} ;