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 12338243c5
commit b49a021608
28 changed files with 276 additions and 241 deletions

View File

@@ -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",[]>

View File

@@ -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
} ;

View File

@@ -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