Merge pull request #219 from inariksit/spanish

Spanish/Romance: imperative, A2
This commit is contained in:
Inari Listenmaa
2019-04-08 15:30:35 +02:00
committed by GitHub
4 changed files with 43 additions and 25 deletions

View File

@@ -6,7 +6,7 @@ incomplete concrete AdjectiveRomance of Adjective =
PositA a = { PositA a = {
s = a.s ! Posit ; s = a.s ! Posit ;
isPre = a.isPre ; isPre = a.isPre ;
copTyp = a.copTyp copTyp = a.copTyp
} ; } ;
ComparA a np = { ComparA a np = {
s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ; s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ;
@@ -34,7 +34,7 @@ incomplete concrete AdjectiveRomance of Adjective =
ComplA2 adj np = { ComplA2 adj np = {
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ; s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ;
isPre = False ; isPre = False ;
copTyp = serCopula copTyp = adj.copTyp
} ; } ;
ReflA2 adj = { ReflA2 adj = {
@@ -42,7 +42,7 @@ incomplete concrete AdjectiveRomance of Adjective =
adj.s ! Posit ! af ++ adj.s ! Posit ! af ++
adj.c2.s ++ prepCase adj.c2.c ++ reflPron Sg P3 Nom ; --- agr adj.c2.s ++ prepCase adj.c2.c ++ reflPron Sg P3 Nom ; --- agr
isPre = False ; isPre = False ;
copTyp = serCopula copTyp = adj.copTyp
} ; } ;
SentAP ap sc = { SentAP ap sc = {
@@ -60,7 +60,7 @@ incomplete concrete AdjectiveRomance of Adjective =
UseA2 a = { UseA2 a = {
s = a.s ! Posit ; s = a.s ! Posit ;
isPre = False ; ---- A2 has no isPre isPre = False ; ---- A2 has no isPre
copTyp = serCopula ---- A2 has no copTyp (yet) copTyp = a.copTyp
} ; } ;
AdvAP ap adv = { AdvAP ap adv = {

View File

@@ -106,7 +106,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
VS = Verb ** {m : RPolarity => Mood} ; VS = Verb ** {m : RPolarity => Mood} ;
A = {s : Degree => AForm => Str ; isPre : Bool ; copTyp : CopulaType} ; A = {s : Degree => AForm => Str ; isPre : Bool ; copTyp : CopulaType} ;
A2 = {s : Degree => AForm => Str ; c2 : Compl} ; A2 = {s : Degree => AForm => Str ; c2 : Compl ; copTyp : CopulaType} ;
N = Noun ; N = Noun ;
N2 = Noun ** {c2 : Compl} ; N2 = Noun ** {c2 : Compl} ;

View File

@@ -13,7 +13,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
contractInf : Bool -> Bool -> Bool = orB ; --- the effect of this is that the clitic is bound to the infinitive: matarte contractInf : Bool -> Bool -> Bool = orB ; --- the effect of this is that the clitic is bound to the infinitive: matarte
-------------------------------- --------------------------------
param param
Prepos = P_de | P_a ; Prepos = P_de | P_a ;
VType = VHabere | VRefl ; VType = VHabere | VRefl ;
@@ -23,7 +23,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
prepCase = \c -> case c of { prepCase = \c -> case c of {
Nom => [] ; Nom => [] ;
Acc => [] ; Acc => [] ;
CPrep P_de => "de" ; CPrep P_de => "de" ;
CPrep P_a => "a" CPrep P_a => "a"
} ; } ;
@@ -52,11 +52,11 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
artIndef = \isNP,g,n,c -> case isNP of { artIndef = \isNP,g,n,c -> case isNP of {
True => case n of { True => case n of {
Sg => prepCase c ++ genForms "uno" "una" ! g ; Sg => prepCase c ++ genForms "uno" "una" ! g ;
_ => prepCase c ++ genForms "unos" "unas" ! g _ => prepCase c ++ genForms "unos" "unas" ! g
} ; } ;
_ => case n of { _ => case n of {
Sg => prepCase c ++ genForms "un" "una" ! g ; Sg => prepCase c ++ genForms "un" "una" ! g ;
_ => prepCase c _ => prepCase c
} }
} ; } ;
@@ -73,7 +73,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
conjunctCase : Case -> Case = \c -> case c of { conjunctCase : Case -> Case = \c -> case c of {
Nom => Nom ; Nom => Nom ;
_ => Acc _ => Acc
} ; } ;
auxVerb : VType -> (VF => Str) = \_ -> haber_V.s ; auxVerb : VType -> (VF => Str) = \_ -> haber_V.s ;
@@ -81,8 +81,8 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
vpAgrClit : Agr -> VPAgr = \a -> vpAgrClit : Agr -> VPAgr = \a ->
vpAgrNone ; vpAgrNone ;
pronArg = \n,p,acc,dat -> pronArg = \n,p,acc,dat ->
let let
paccp = case acc of { paccp = case acc of {
CRefl => <reflPron n p Acc, p,True> ; CRefl => <reflPron n p Acc, p,True> ;
CPron ag an ap => <argPron ag an ap Acc, ap,True> ; CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
@@ -101,7 +101,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
} ; } ;
defaultPronArg = <pdatp.p1 ++ paccp.p1, [], peither> defaultPronArg = <pdatp.p1 ++ paccp.p1, [], peither>
---- defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3> ---- defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3>
in in
---- case <<paccp.p2, pdatp.p2> : Person * Person> of { ---- case <<paccp.p2, pdatp.p2> : Person * Person> of {
---- <P3,P3> => <"se" ++ paccp.p1, [], True> ; ---- <P3,P3> => <"se" ++ paccp.p1, [], True> ;
---- _ => defaultPronArg ---- _ => defaultPronArg
@@ -116,14 +116,15 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
mkImperative isPol p vp = mkImperative isPol p vp =
\\pol,g,n => case pol of { \\pol,g,n => case pol of {
RPos => neg.p1 ++ imper ++ bindIf refl.isRefl ++ refl.pron RPos => neg.p1 ++ imper ++ bindIf refl.isRefl ++ refl.pron
++ bindIf hasClit ++ clit ++ compl ; ++ bindIf hasClit ++ clit ++ particle ++ compl ;
RNeg _ => neg.p1 ++ refl.pron ++ clit ++ subj ++ compl RNeg _ => neg.p1 ++ refl.pron ++ clit ++ subj ++ particle ++ compl
} where { } where {
pe = case isPol of {True => P3 ; _ => p} ; pe = case isPol of {True => P3 ; _ => p} ;
refl = case vp.s.vtyp of { refl = case vp.s.vtyp of {
VRefl => {pron = reflPron n pe Acc ; isRefl = True} ; VRefl => {pron = reflPron n pe Acc ; isRefl = True} ;
_ => {pron = [] ; isRefl = False} _ => {pron = [] ; isRefl = False}
} ; } ;
particle = vp.s.p ;
clit = vp.clit1 ++ vp.clit2 ; clit = vp.clit1 ++ vp.clit2 ;
hasClit = vp.clit3.hasClit ; hasClit = vp.clit3.hasClit ;
imper = vp.s.s ! vImper n pe ; imper = vp.s.s ! vImper n pe ;
@@ -154,7 +155,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
clitInf b cli inf = inf ++ bindIf b ++ cli ; clitInf b cli inf = inf ++ bindIf b ++ cli ;
relPron : Bool => AAgr => Case => Str = \\b,a,c => relPron : Bool => AAgr => Case => Str = \\b,a,c =>
case c of { case c of {
Nom | Acc => "que" ; Nom | Acc => "que" ;
CPrep P_a => "cuyo" ; CPrep P_a => "cuyo" ;
@@ -167,19 +168,19 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
partQIndir = [] ; ---- ? partQIndir = [] ; ---- ?
reflPron : Number -> Person -> Case -> Str = \n,p,c -> reflPron : Number -> Person -> Case -> Str = \n,p,c ->
let pro = argPron Fem n p c let pro = argPron Fem n p c
in in
case p of { case p of {
P3 => case c of { P3 => case c of {
Acc | CPrep P_a => "se" ; Acc | CPrep P_a => "se" ;
_ => "sí" _ => "sí"
} ; } ;
_ => pro _ => pro
} ; } ;
argPron : Gender -> Number -> Person -> Case -> Str = argPron : Gender -> Number -> Person -> Case -> Str =
let let
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of { cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
Acc | CPrep P_a => me ; Acc | CPrep P_a => me ;
_ => moi _ => moi
@@ -189,8 +190,8 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
CPrep P_a => leur ; CPrep P_a => leur ;
_ => eux _ => eux
} ; } ;
in in
\g,n,p -> case <<g,n,p> : Gender * Number * Person> of { \g,n,p -> case <<g,n,p> : Gender * Number * Person> of {
<_,Sg,P1> => cases "me" "mí" ; <_,Sg,P1> => cases "me" "mí" ;
<_,Sg,P2> => cases "te" "tí" ; <_,Sg,P2> => cases "te" "tí" ;
<_,Pl,P1> => cases "nos" "nosotras" ; --- nosotros <_,Pl,P1> => cases "nos" "nosotras" ; --- nosotros
@@ -210,7 +211,7 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg
copula, essere_V : Verb = verbBeschH (ser_1 "ser") ; copula, essere_V : Verb = verbBeschH (ser_1 "ser") ;
estar_V, stare_V, auxPassive : Verb = verbBeschH (estar_2 "estar") ; estar_V, stare_V, auxPassive : Verb = verbBeschH (estar_2 "estar") ;
haber_V : Verb = verbBeschH (haber_3 "haber") ; haber_V : Verb = verbBeschH (haber_3 "haber") ;
verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere ; p = []} ; verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere ; p = []} ;

View File

@@ -436,6 +436,23 @@ oper
_ => verboV (regAlternVEr x y) _ => verboV (regAlternVEr x y)
} ; } ;
-- hack for verbs like parecer.
-- NB. doesn't work properly for gustar, which agrees with the object.
dativeV : V -> V = \parecer -> parecer ** {
s = table {
VFin m n p => case <n,p> of {
<Sg,P1> => "me" ;
<Sg,P2> => "te" ;
<Sg,P3> => "le" ;
<Pl,P1> => "nos" ;
<Pl,P2> => "os" ;
<Pl,P3> => "les" } ++ parecer.s ! VFin m Sg P3 ;
VImper n => case n of {
SgP2 => "que te" ;
PlP1 => "que nos" ;
PlP2 => "que os" } ++ parecer.s ! VFin (VPres Conjunct) Sg P3 ;
x => parecer.s ! x }
} ;
mk2V2 v p = lin V2 (v ** {c2 = p}) ; mk2V2 v p = lin V2 (v ** {c2 = p}) ;