mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 01:52:50 -06:00
change in Romance agreement to produce correct number for polite singular pronouns ; linking functions that involve mkClause now takes a long time and should be revised
This commit is contained in:
BIN
examples/phrasebook/pgraph.png
Normal file
BIN
examples/phrasebook/pgraph.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
@@ -116,6 +116,18 @@ Separate concrete syntaxes.
|
|||||||
<CODE>DisambPhrasebook</CODE>: disambiguation grammars generating feedback phrases if
|
<CODE>DisambPhrasebook</CODE>: disambiguation grammars generating feedback phrases if
|
||||||
the input language is ambiguous.
|
the input language is ambiguous.
|
||||||
</P>
|
</P>
|
||||||
|
<P>
|
||||||
|
Here is the module structure produced by
|
||||||
|
</P>
|
||||||
|
<PRE>
|
||||||
|
> i -retain DisambPhrasebookEng.gf
|
||||||
|
> dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DiffP*,DisambPhrasebookEng
|
||||||
|
> ! dot -Tpng _gfdepgraph.dot >pgraph.png
|
||||||
|
</PRE>
|
||||||
|
<P></P>
|
||||||
|
<P>
|
||||||
|
<IMG ALIGN="middle" SRC="pgraph.png" BORDER="0" ALT="">
|
||||||
|
</P>
|
||||||
<H1>To Do</H1>
|
<H1>To Do</H1>
|
||||||
<P>
|
<P>
|
||||||
Improved translation interface
|
Improved translation interface
|
||||||
|
|||||||
@@ -97,6 +97,15 @@ Separate concrete syntaxes.
|
|||||||
``DisambPhrasebook``: disambiguation grammars generating feedback phrases if
|
``DisambPhrasebook``: disambiguation grammars generating feedback phrases if
|
||||||
the input language is ambiguous.
|
the input language is ambiguous.
|
||||||
|
|
||||||
|
Here is the module structure produced by
|
||||||
|
```
|
||||||
|
> i -retain DisambPhrasebookEng.gf
|
||||||
|
> dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DiffP*,DisambPhrasebookEng
|
||||||
|
> ! dot -Tpng _gfdepgraph.dot >pgraph.png
|
||||||
|
```
|
||||||
|
|
||||||
|
[pgraph.png]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=To Do=
|
=To Do=
|
||||||
|
|||||||
@@ -88,10 +88,11 @@ oper
|
|||||||
infForm _ _ _ _ = True ;
|
infForm _ _ _ _ = True ;
|
||||||
|
|
||||||
mkImperative b p vp = {
|
mkImperative b p vp = {
|
||||||
s = \\pol,aag =>
|
s = \\pol,agr =>
|
||||||
let
|
let
|
||||||
pe = case b of {True => P3 ; _ => p} ;
|
pe = case b of {True => P3 ; _ => p} ;
|
||||||
agr = aag ** {p = pe} ;
|
---- agr = aag ** {p = pe} ;
|
||||||
|
aag = verbAgr agr ; ----
|
||||||
clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||||
----e verb = case <aag.n, pol,pe> of {
|
----e verb = case <aag.n, pol,pe> of {
|
||||||
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ concrete IdiomCat of Idiom = CatCat **
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ImpPl1 vp = {s =
|
ImpPl1 vp = {s =
|
||||||
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
(mkImperative False P1 vp).s ! Pos ! Ag Masc Pl P1 ; --- fem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
|
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ oper
|
|||||||
<Sg,Fem> => sa ;
|
<Sg,Fem> => sa ;
|
||||||
_ => ses
|
_ => ses
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = Ag g n p ;
|
||||||
hasClit = True
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,10 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
|
|
||||||
RelExistNP prep rp np = {
|
RelExistNP prep rp np = {
|
||||||
s = \\t,ant,bo,ag =>
|
s = \\t,ant,bo,ag =>
|
||||||
let cl =
|
let
|
||||||
mkClause
|
n = complNumAgr ag ;
|
||||||
(\_ -> appCompl True Pos prep (rp2np ag.n rp))
|
cl = mkClause
|
||||||
|
(\_ -> appCompl True Pos prep (rp2np n rp))
|
||||||
np.a
|
np.a
|
||||||
(insertObj
|
(insertObj
|
||||||
(\\_,b,_ => np.s ! NPCase Nom)
|
(\\_,b,_ => np.s ! NPCase Nom)
|
||||||
@@ -71,7 +72,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
vai_Conj = {s1 = [] ; s2 = "vai" ; n = Sg} ;
|
vai_Conj = {s1 = [] ; s2 = "vai" ; n = Sg} ;
|
||||||
|
|
||||||
CompPartAP ap = {
|
CompPartAP ap = {
|
||||||
s = \\agr => ap.s ! False ! NCase agr.n Part
|
s = \\agr => ap.s ! False ! NCase (complNumAgr agr) Part
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
|||||||
_ => VPAgrSubj
|
_ => VPAgrSubj
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a0 ->
|
||||||
|
let a = complAgr a0 in
|
||||||
VPAgrClit a.g a.n ;
|
VPAgrClit a.g a.n ;
|
||||||
|
|
||||||
---- pronArg = pronArgGen Neg ; --- takes more space and time
|
---- pronArg = pronArgGen Neg ; --- takes more space and time
|
||||||
@@ -118,14 +119,14 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkImperative b p vp = {
|
mkImperative b p vp = {
|
||||||
s = \\pol,aag =>
|
s = \\pol,ag =>
|
||||||
let
|
let
|
||||||
num = if_then_else Number b Pl aag.n ;
|
agr = verbAgr ag ;
|
||||||
agr = {g = aag.g ; n = num ; p = p} ;
|
num = if_then_else Number b Pl agr.n ;
|
||||||
verb = vp.s.s ! vImperForm agr ;
|
verb = vp.s.s ! vImperForm ag ;
|
||||||
neg = vp.neg ! pol ;
|
neg = vp.neg ! pol ;
|
||||||
clpr = <vp.clit1 ++ vp.clit2, False> ; ---- TODO: True if clit
|
clpr = <vp.clit1 ++ vp.clit2, False> ; ---- TODO: True if clit
|
||||||
compl = vp.comp ! agr ++ vp.ext ! pol
|
compl = vp.comp ! ag ++ vp.ext ! pol
|
||||||
in
|
in
|
||||||
case pol of {
|
case pol of {
|
||||||
Pos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
|
Pos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
|
||||||
|
|||||||
@@ -42,9 +42,8 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
|
|||||||
Fem Sg P2 ;
|
Fem Sg P2 ;
|
||||||
youPl8fem_Pron,
|
youPl8fem_Pron,
|
||||||
youPol8fem_Pron =
|
youPol8fem_Pron =
|
||||||
mkPronoun
|
let vous = mkPronoun "vous" "vous" "vous" "vous" "votre" "votre" "vos" Masc Pl P2
|
||||||
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
in {s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = AgPol Fem} ;
|
||||||
Fem Pl P2 ;
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
prepQue : Case -> Str = \c -> case c of {
|
prepQue : Case -> Str = \c -> case c of {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ concrete IdiomFre of Idiom = CatFre **
|
|||||||
(predV copula) ;
|
(predV copula) ;
|
||||||
|
|
||||||
ImpPl1 vp = {s =
|
ImpPl1 vp = {s =
|
||||||
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
(mkImperative False P1 vp).s ! Pos ! Ag Masc Pl P1 --- fem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ImpP3 np vp = {
|
ImpP3 np vp = {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ oper
|
|||||||
<Sg,Fem> => sa ;
|
<Sg,Fem> => sa ;
|
||||||
_ => ses
|
_ => ses
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = Ag g n p ;
|
||||||
hasClit = True
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -166,10 +166,13 @@ lin
|
|||||||
youSg_Pron = mkPronoun
|
youSg_Pron = mkPronoun
|
||||||
"tu" (elision "t") (elision "t") "toi" "ton" (elisPoss "t") "tes"
|
"tu" (elision "t") (elision "t") "toi" "ton" (elisPoss "t") "tes"
|
||||||
Masc Sg P2 ;
|
Masc Sg P2 ;
|
||||||
youPl_Pron, youPol_Pron =
|
youPl_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
||||||
Masc Pl P2 ;
|
Masc Pl P2 ;
|
||||||
|
youPol_Pron =
|
||||||
|
let vous = mkPronoun "vous" "vous" "vous" "vous" "votre" "votre" "vos" Masc Pl P2
|
||||||
|
in {s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = AgPol Masc} ;
|
||||||
|
|
||||||
not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom ; a = PNoAg} ;
|
not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom ; a = PNoAg} ;
|
||||||
|
|
||||||
|
|||||||
@@ -77,8 +77,9 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
|
|||||||
_ => VPAgrSubj
|
_ => VPAgrSubj
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a0 ->
|
||||||
VPAgrClit a.g a.n ; --- subty
|
let a = complAgr a0 in
|
||||||
|
VPAgrClit a.g a.n ;
|
||||||
|
|
||||||
pronArg = \n,p,acc,dat ->
|
pronArg = \n,p,acc,dat ->
|
||||||
let
|
let
|
||||||
@@ -108,10 +109,11 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
|
|||||||
infForm n p x y = (pronArg n p x y).p3 ;
|
infForm n p x y = (pronArg n p x y).p3 ;
|
||||||
|
|
||||||
mkImperative b p vp = {
|
mkImperative b p vp = {
|
||||||
s = \\pol,aag =>
|
s = \\pol,agr =>
|
||||||
let
|
let
|
||||||
pe = case b of {True => P3 ; _ => p} ;
|
pe = case b of {True => P3 ; _ => p} ;
|
||||||
agr = aag ** {p = pe} ;
|
---- agr = aag ** {p = pe} ;
|
||||||
|
aag = verbAgr agr ; ----
|
||||||
clpr = <vp.clit1 ++ vp.clit2,[],False> ; ---- TODO: True is clit
|
clpr = <vp.clit1 ++ vp.clit2,[],False> ; ---- TODO: True is clit
|
||||||
verb = case <aag.n, pol,pe> of {
|
verb = case <aag.n, pol,pe> of {
|
||||||
<Sg,Neg,P2> => vp.s.s ! VInfin clpr.p3 ; ---- ! aag ;
|
<Sg,Neg,P2> => vp.s.s ! VInfin clpr.p3 ; ---- ! aag ;
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ concrete IdiomIta of Idiom = CatIta **
|
|||||||
(insertComplement (\\_ => ad.s) (predV copula))) ;
|
(insertComplement (\\_ => ad.s) (predV copula))) ;
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkClause [] True (agrP3 np.a.g np.a.n)
|
let npa = complAgr np.a in
|
||||||
|
mkClause [] True (agrP3 npa.g npa.n)
|
||||||
(insertClit3 (elision "ci" "c'" "ci")
|
(insertClit3 (elision "ci" "c'" "ci")
|
||||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||||
(predV copula))) ;
|
(predV copula))) ;
|
||||||
@@ -43,7 +44,7 @@ concrete IdiomIta of Idiom = CatIta **
|
|||||||
(predV (essereV (verboV (stare_16 "stare")))) ;
|
(predV (essereV (verboV (stare_16 "stare")))) ;
|
||||||
|
|
||||||
ImpPl1 vp = {s =
|
ImpPl1 vp = {s =
|
||||||
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
(mkImperative False P1 vp).s ! Pos ! Ag Masc Pl P1 --- fem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ oper
|
|||||||
<Pl,Masc> => ses ;
|
<Pl,Masc> => ses ;
|
||||||
<Pl,Fem> => see
|
<Pl,Fem> => see
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = Ag g n p ;
|
||||||
hasClit = True
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -63,12 +63,12 @@ oper
|
|||||||
_ => Masc
|
_ => Masc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
conjAgr : Agr -> Agr -> Agr = \a,b -> case <a,b> of {
|
||||||
g = conjGender a.g b.g ;
|
<Ag g n p, Ag h m q> => Ag (conjGender g h) (conjNumber n m) (conjPerson p q) ;
|
||||||
n = conjNumber a.n b.n ;
|
<Ag g n p, AgPol h> => Ag (conjGender g h) Pl (conjPerson p P2) ;
|
||||||
p = conjPerson a.p b.p
|
<AgPol h, Ag g n p> => Ag (conjGender g h) Pl (conjPerson p P2) ;
|
||||||
} ;
|
<AgPol g, AgPol h> => AgPol (conjGender g h)
|
||||||
|
} ;
|
||||||
|
|
||||||
--3 Verbs
|
--3 Verbs
|
||||||
--
|
--
|
||||||
@@ -122,7 +122,19 @@ param
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
AAgr : Type = {g : Gender ; n : Number} ;
|
AAgr : Type = {g : Gender ; n : Number} ;
|
||||||
Agr : Type = AAgr ** {p : Person} ;
|
|
||||||
|
param
|
||||||
|
Agr = Ag Gender Number Person | AgPol Gender ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
complAgr : Agr -> {g : Gender ; n : Number} = \a -> case a of {
|
||||||
|
Ag g n _ => {g = g ; n = n} ;
|
||||||
|
AgPol g => {g = g ; n = Sg} -- vous êtes fatiguée
|
||||||
|
} ;
|
||||||
|
verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> case a of {
|
||||||
|
Ag g n p => {g = g ; n = n ; p = p} ;
|
||||||
|
AgPol g => {g = g ; n = Pl ; p = P2}
|
||||||
|
} ;
|
||||||
|
|
||||||
param
|
param
|
||||||
RAgr = RAg {g : Gender ; n : Number} | RNoAg ; --- AAgr
|
RAgr = RAg {g : Gender ; n : Number} | RNoAg ; --- AAgr
|
||||||
@@ -137,7 +149,7 @@ oper
|
|||||||
aagr : Gender -> Number -> AAgr = \g,n ->
|
aagr : Gender -> Number -> AAgr = \g,n ->
|
||||||
{g = g ; n = n} ;
|
{g = g ; n = n} ;
|
||||||
agrP3 : Gender -> Number -> Agr = \g,n ->
|
agrP3 : Gender -> Number -> Agr = \g,n ->
|
||||||
aagr g n ** {p = P3} ;
|
Ag g n P3 ;
|
||||||
|
|
||||||
|
|
||||||
vf2numpers : VF -> (Number * Person) = \v -> case v of {
|
vf2numpers : VF -> (Number * Person) = \v -> case v of {
|
||||||
@@ -156,11 +168,11 @@ oper
|
|||||||
_ => VInfin False
|
_ => VInfin False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vImperForm : Agr -> VF = \a -> case <a.n,a.p> of {
|
vImperForm : Agr -> VF = \a -> case a of {
|
||||||
<Pl,P1> => VImper PlP1 ;
|
Ag _ Pl P1 => VImper PlP1 ;
|
||||||
<_, P3> => VFin (VPres Conjunct) a.n P3 ;
|
Ag _ n P3 => VFin (VPres Conjunct) n P3 ;
|
||||||
<Sg,_> => VImper SgP2 ;
|
Ag _ Sg _ => VImper SgP2 ;
|
||||||
<Pl,_> => VImper PlP2
|
_ => VImper PlP2 -- covers French AgPol
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ incomplete concrete ConjunctionRomance of Conjunction =
|
|||||||
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||||
|
|
||||||
ConjNP conj ss = heavyNP (conjunctDistrTable Case 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 = conjAgr (Ag Masc conj.n P3) ss.a ;
|
||||||
hasClit = False
|
hasClit = False
|
||||||
}) ;
|
}) ;
|
||||||
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
|||||||
|
|
||||||
-- To render imperatives (with their clitics etc).
|
-- To render imperatives (with their clitics etc).
|
||||||
|
|
||||||
oper mkImperative : Bool -> Person -> VP -> {s : Polarity => AAgr => Str} ;
|
oper mkImperative : Bool -> Person -> VP -> {s : Polarity => Agr => Str} ;
|
||||||
|
|
||||||
--2 Constants that must derivatively depend on language
|
--2 Constants that must derivatively depend on language
|
||||||
|
|
||||||
|
|||||||
@@ -18,16 +18,20 @@ incomplete concrete NounRomance of Noun =
|
|||||||
|
|
||||||
UsePron p = p ;
|
UsePron p = p ;
|
||||||
|
|
||||||
PredetNP pred np = heavyNP {
|
PredetNP pred np =
|
||||||
s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! c ++ (np.s ! pred.c).ton ;
|
let agr = complAgr np.a in
|
||||||
a = case pred.a of {PAg n => agrP3 np.a.g n ; _ => np.a} ;
|
heavyNP {
|
||||||
hasClit = False
|
s = \\c => pred.s ! agr ! c ++ (np.s ! pred.c).ton ;
|
||||||
|
a = case pred.a of {PAg n => agrP3 agr.g n ; _ => np.a} ;
|
||||||
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = heavyNP {
|
PPartNP np v2 =
|
||||||
s = \\c => (np.s ! c).ton ++ v2.s ! VPart np.a.g np.a.n ;
|
let agr = complAgr np.a in
|
||||||
a = np.a ;
|
heavyNP {
|
||||||
hasClit = False
|
s = \\c => (np.s ! c).ton ++ v2.s ! VPart agr.g agr.n ;
|
||||||
|
a = np.a ;
|
||||||
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelNP np rs = heavyNP {
|
RelNP np rs = heavyNP {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ incomplete concrete QuestionRomance of Question =
|
|||||||
vp = predV copula ;
|
vp = predV copula ;
|
||||||
cls = (mkClause (np.s ! Nom).comp 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 ! complAgr np.a ;
|
||||||
in why ++ cls
|
in why ++ cls
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ incomplete concrete RelativeRomance of Relative =
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
RelCl cl = {
|
RelCl cl = {
|
||||||
s = \\ag,t,a,p,m => pronSuch ! {g=ag.g; n=ag.n} ++ conjThat ++
|
s = \\ag,t,a,p,m => pronSuch ! complAgr ag ++ conjThat ++
|
||||||
cl.s ! DDir ! t ! a ! p ! m ;
|
cl.s ! DDir ! t ! a ! p ! m ;
|
||||||
c = Nom
|
c = Nom
|
||||||
} ;
|
} ;
|
||||||
@@ -15,12 +15,12 @@ incomplete concrete RelativeRomance of Relative =
|
|||||||
RelVP rp vp = case rp.hasAgr of {
|
RelVP rp vp = case rp.hasAgr of {
|
||||||
True => {s = \\ag =>
|
True => {s = \\ag =>
|
||||||
(mkClause
|
(mkClause
|
||||||
(rp.s ! False ! {g = ag.g ; n = ag.n} ! Nom) False
|
(rp.s ! False ! complAgr ag ! Nom) False
|
||||||
{g = rp.a.g ; n = rp.a.n ; p = P3}
|
(Ag rp.a.g rp.a.n P3)
|
||||||
vp).s ! DDir ; c = Nom} ;
|
vp).s ! DDir ; c = Nom} ;
|
||||||
False => {s = \\ag =>
|
False => {s = \\ag =>
|
||||||
(mkClause
|
(mkClause
|
||||||
(rp.s ! False ! {g = ag.g ; n = ag.n} ! Nom) False
|
(rp.s ! False ! complAgr ag ! Nom) False
|
||||||
ag
|
ag
|
||||||
vp).s ! DDir ; c = Nom
|
vp).s ! DDir ; c = Nom
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ incomplete concrete RelativeRomance of Relative =
|
|||||||
|
|
||||||
RelSlash rp slash = {
|
RelSlash rp slash = {
|
||||||
s = \\ag,t,a,p,m =>
|
s = \\ag,t,a,p,m =>
|
||||||
let aag = {g = ag.g ; n = ag.n}
|
let aag = complAgr ag
|
||||||
in
|
in
|
||||||
slash.c2.s ++
|
slash.c2.s ++
|
||||||
rp.s ! False ! aag ! slash.c2.c ++
|
rp.s ! False ! aag ! slash.c2.c ++
|
||||||
@@ -38,7 +38,7 @@ incomplete concrete RelativeRomance of Relative =
|
|||||||
|
|
||||||
FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
s = \\_,a,c => (np.s ! Nom).ton ++ 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 = complAgr np.a ;
|
||||||
hasAgr = True
|
hasAgr = True
|
||||||
} ;
|
} ;
|
||||||
IdRP = {
|
IdRP = {
|
||||||
|
|||||||
@@ -190,12 +190,13 @@ oper
|
|||||||
|
|
||||||
mkClause : Str -> Bool -> Agr -> VP ->
|
mkClause : Str -> Bool -> Agr -> VP ->
|
||||||
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
|
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
|
||||||
\subj, hasClit, agr, vp -> {
|
\subj, hasClit, ag, vp -> {
|
||||||
s = \\d,te,a,b,m =>
|
s = \\d,te,a,b,m =>
|
||||||
let
|
let
|
||||||
neg = vp.neg ! b ;
|
neg = vp.neg ! b ;
|
||||||
compl = vp.comp ! agr ++ vp.ext ! b ;
|
compl = vp.comp ! ag ++ vp.ext ! b ;
|
||||||
|
|
||||||
|
agr = verbAgr ag ;
|
||||||
gen = agr.g ;
|
gen = agr.g ;
|
||||||
num = agr.n ;
|
num = agr.n ;
|
||||||
per = agr.p ;
|
per = agr.p ;
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ incomplete concrete SentenceRomance of Sentence =
|
|||||||
|
|
||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\p,i,g => case i of {
|
s = \\p,i,g => case i of {
|
||||||
ImpF n b => (mkImperative b P2 vp).s ! p ! (aagr g n)
|
ImpF n b => (mkImperative b P2 vp).s ! p ! (Ag g n P2) ---- AgPol ?
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
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 = \\_ =>
|
||||||
let
|
let
|
||||||
vp = v2
|
vp = v2
|
||||||
----e vp = case <v2.c2.c, v2.c2.isDir> of {
|
----e vp = case <v2.c2.c, v2.c2.isDir> of {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
||||||
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap =
|
ComplVA v ap =
|
||||||
insertComplement (\\a => ap.s ! AF a.g a.n) (predV v) ;
|
insertComplement (\\a => let agr = complAgr a in ap.s ! AF agr.g agr.n) (predV v) ;
|
||||||
|
|
||||||
SlashV2a v = mkVPSlash v.c2 (predV v) ;
|
SlashV2a v = mkVPSlash v.c2 (predV v) ;
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
ReflVP v = case v.c2.isDir of {
|
ReflVP v = case v.c2.isDir of {
|
||||||
True => insertRefl v ;
|
True => insertRefl v ;
|
||||||
False => insertComplement
|
False => insertComplement
|
||||||
(\\a => v.c2.s ++ reflPron a.n a.p v.c2.c) v
|
(\\a => let agr = verbAgr a in v.c2.s ++ reflPron agr.n agr.p v.c2.c) v
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
@@ -73,14 +73,15 @@ 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 => let agr = complAgr ag in ap.s ! AF agr.g agr.n} ;
|
||||||
CompNP np = {s = \\_ => (np.s ! Nom).ton} ;
|
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 ;
|
||||||
AdVVP adv vp = insertAdV adv.s vp ;
|
AdVVP adv vp = insertAdV adv.s vp ;
|
||||||
|
|
||||||
PassV2 v = insertComplement (\\a => v.s ! VPart a.g a.n) (predV auxPassive) ;
|
PassV2 v = insertComplement
|
||||||
|
(\\a => let agr = complAgr a in v.s ! VPart agr.g agr.n) (predV auxPassive) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,10 +91,12 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
|
|||||||
infForm _ _ _ _ = True ;
|
infForm _ _ _ _ = True ;
|
||||||
|
|
||||||
mkImperative b p vp = {
|
mkImperative b p vp = {
|
||||||
s = \\pol,aag =>
|
s = \\pol,agr =>
|
||||||
let
|
let
|
||||||
pe = case b of {True => P3 ; _ => p} ;
|
pe = case b of {True => P3 ; _ => p} ;
|
||||||
agr = aag ** {p = pe} ;
|
---- agr = aag ** {p = pe} ;
|
||||||
|
aag = verbAgr agr ; ----
|
||||||
|
|
||||||
clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||||
----e verb = case <aag.n, pol,pe> of {
|
----e verb = case <aag.n, pol,pe> of {
|
||||||
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ concrete IdiomSpa of Idiom = CatSpa **
|
|||||||
(predV (verboV (estar_2 "estar"))) ;
|
(predV (verboV (estar_2 "estar"))) ;
|
||||||
|
|
||||||
ImpPl1 vp = {s =
|
ImpPl1 vp = {s =
|
||||||
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
(mkImperative False P1 vp).s ! Pos ! Ag Masc Pl P1 ; --- fem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ oper
|
|||||||
<Pl,Fem> => see
|
<Pl,Fem> => see
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = Ag g n p ;
|
||||||
hasClit = True
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user