diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-10-30 20:38:51 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-10-30 20:38:51 +0000 |
| commit | b49a021608d1e15a17ffd54195aa812dbed2948f (patch) | |
| tree | ada8fb5fad6f41d3df7b9e1fd8fe74089ed90407 /next-lib/src/spanish | |
| parent | 12338243c5198288ba42276b4d76a783c263e7c1 (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/spanish')
| -rw-r--r-- | next-lib/src/spanish/DiffSpa.gf | 11 | ||||
| -rw-r--r-- | next-lib/src/spanish/IdiomSpa.gf | 6 | ||||
| -rw-r--r-- | next-lib/src/spanish/MorphoSpa.gf | 30 |
3 files changed, 26 insertions, 21 deletions
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 } ; |
