summaryrefslogtreecommitdiff
path: root/next-lib/src/romance
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/romance
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/romance')
-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
13 files changed, 145 insertions, 163 deletions
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 ;