1
0
forked from GitHub/gf-core

missing constructs in ParseSpa, some not so certain. Present participles should be added to the morphology.

This commit is contained in:
aarne
2013-04-29 13:36:48 +00:00
parent d2627125e6
commit 20d63050a4
2 changed files with 52 additions and 34 deletions

View File

@@ -166,4 +166,8 @@ incomplete concrete NounRomance of Noun =
g = g
} ;
PossNP cn np = {
s = \\n => cn.s ! n ++ appCompl {s = [] ; c = genitive ; isDir = False} np ;
g = cn.g ;
} ;
}

View File

@@ -20,15 +20,41 @@ concrete ParseSpa of ParseEngAbs =
ClSlash, RCl, EmptyRelSlash],
DictEngSpa **
open MorphoSpa, ResSpa, ParadigmsSpa, Prelude in {
open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, Prelude in {
flags
literal=Symb ;
beam_size=0.95 ;
coding = utf8 ;
{-
lin
-- missing from ExtraSpa; should not really be there either
GenNP np =
let denp = (np.s ! ResSpa.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
that_RP = which_RP ;
UncNeg = negativePol ;
-- lexical entries
another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
each_Det = SyntaxSpa.every_Det ;
but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
{-
myself_NP = regNP "myself" singular ;
yourselfSg_NP = regNP "yourself" singular ;
himself_NP = regNP "himself" singular ;
@@ -38,12 +64,14 @@ lin
yourselfPl_NP = regNP "yourself" plural ;
themself_NP = regNP "themself" plural ;
themselves_NP = regNP "themselves" plural ;
-}
CompoundCN num noun cn = {
s = \\n,c => num.s ! Nom ++ noun.s ! num.n ! Nom ++ cn.s ! n ! c ;
s = \\n => cn.s ! n ++ "de" ++ noun.s ! num.n ;
g = cn.g
} ;
{-
DashCN noun1 noun2 = {
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
g = noun2.g
@@ -58,16 +86,23 @@ lin
s = \\agr => v.s ! VPresPart ;
isPre = True
} ;
-}
PastPartAP v = {
s = \\agr => v.s ! VPPart ;
s = table {
AF g n => v.s ! VPart g n ;
_ => v.s ! VPart Masc Sg ---- the adverb form
} ;
isPre = True
} ;
{-
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
-}
PositAdVAdj a = {s = a.s ! AAdv} ;
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
{-
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
@@ -81,37 +116,16 @@ lin
ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp a.a p.p agr)
(predVV v) ;
-}
PredVPosv np vp = {
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ vp.ad ++ verb.fin ++ verb.adv ++ verb.inf ;
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
}
} ;
PredVPovs np vp = {
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! np.a ;
compl = vp.s2 ! np.a
in
case o of {
ODir => compl ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom ;
OQuest => verb.aux ++ compl ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom
}
} ;
---- TODO: find proper expressions for OSV and OVS in Spa
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
that_RP = {
s = \\_ => "that" ;
a = RNoAg
} ;
CompS s = {s = \\_ => "that" ++ s.s} ;
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic} ; ---- de ?
{-
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ;