mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
Romance clitics almost OK ; bug fix in tb -c
This commit is contained in:
@@ -4,6 +4,7 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
Prep = P_de | P_a ;
|
Prep = P_de | P_a ;
|
||||||
|
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
|
||||||
VType = VHabere | VEsse | VRefl ;
|
VType = VHabere | VEsse | VRefl ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -56,6 +57,14 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
|||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a ->
|
||||||
VPAgrClit (aagr a.g a.n) ; --- subty
|
VPAgrClit (aagr a.g a.n) ; --- subty
|
||||||
|
|
||||||
|
placeNewClitic = \ci,c,pro,isc,old ->
|
||||||
|
let new = if_then_Str isc (pro.s ! Aton c) []
|
||||||
|
in
|
||||||
|
case pro.a.p of {
|
||||||
|
P1 | P2 => new ++ old ;
|
||||||
|
_ => old ++ new
|
||||||
|
} ;
|
||||||
|
|
||||||
negation : Polarity => (Str * Str) = table {
|
negation : Polarity => (Str * Str) = table {
|
||||||
Pos => <[],[]> ;
|
Pos => <[],[]> ;
|
||||||
Neg => <elisNe,"pas">
|
Neg => <elisNe,"pas">
|
||||||
|
|||||||
@@ -161,8 +161,8 @@ oper
|
|||||||
-- The use of "en" as atonic genitive is debatable.
|
-- The use of "en" as atonic genitive is debatable.
|
||||||
|
|
||||||
mkPronoun : (_,_,_,_,_,_,_ : Str) ->
|
mkPronoun : (_,_,_,_,_,_,_ : Str) ->
|
||||||
Gender -> Number -> Person -> ClitType -> Pronoun =
|
Gender -> Number -> Person -> Pronoun =
|
||||||
\il,le,lui,Lui,son,sa,ses,g,n,p,c ->
|
\il,le,lui,Lui,son,sa,ses,g,n,p ->
|
||||||
{s = table {
|
{s = table {
|
||||||
Ton x => prepCase x ++ Lui ;
|
Ton x => prepCase x ++ Lui ;
|
||||||
Aton Nom => il ;
|
Aton Nom => il ;
|
||||||
@@ -174,128 +174,13 @@ oper
|
|||||||
Poss {n = Pl} => ses
|
Poss {n = Pl} => ses
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = {g = g ; n = n ; p = p} ;
|
||||||
c = c
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
elisPoss : Str -> Str = \s ->
|
elisPoss : Str -> Str = \s ->
|
||||||
pre {s + "a" ; s + "on" / voyelle} ;
|
pre {s + "a" ; s + "on" / voyelle} ;
|
||||||
{-
|
|
||||||
pronJe = mkPronoun
|
|
||||||
(elision "j")
|
|
||||||
(elision "m")
|
|
||||||
(elision "m")
|
|
||||||
"moi"
|
|
||||||
"mon" (elisPoss "m") "mes"
|
|
||||||
PNoGen -- gender cannot be known from pronoun alone
|
|
||||||
Sg
|
|
||||||
P1
|
|
||||||
Clit1 ;
|
|
||||||
|
|
||||||
pronTu = mkPronoun
|
|
||||||
"tu"
|
|
||||||
(elision "t")
|
|
||||||
(elision "t")
|
|
||||||
"toi"
|
|
||||||
"ton" (elisPoss "t") "tes"
|
|
||||||
PNoGen
|
|
||||||
Sg
|
|
||||||
P2
|
|
||||||
Clit1 ;
|
|
||||||
|
|
||||||
pronIl = mkPronoun
|
|
||||||
"il"
|
|
||||||
(elision "l")
|
|
||||||
"lui"
|
|
||||||
"lui"
|
|
||||||
"son" (elisPoss "s") "ses"
|
|
||||||
(PGen Masc)
|
|
||||||
Sg
|
|
||||||
P3
|
|
||||||
Clit2 ;
|
|
||||||
|
|
||||||
---- A hack to get the dative form "y".
|
|
||||||
pronY = mkPronoun
|
|
||||||
"il"
|
|
||||||
(elision "l")
|
|
||||||
"y"
|
|
||||||
"lui"
|
|
||||||
"en" "en" "en"
|
|
||||||
(PGen Masc)
|
|
||||||
Sg
|
|
||||||
P3
|
|
||||||
Clit2 ;
|
|
||||||
|
|
||||||
pronElle = mkPronoun
|
|
||||||
"elle"
|
|
||||||
elisLa
|
|
||||||
"lui"
|
|
||||||
"elle"
|
|
||||||
"son" (elisPoss "s") "ses"
|
|
||||||
(PGen Fem)
|
|
||||||
Sg
|
|
||||||
P3
|
|
||||||
Clit2 ;
|
|
||||||
|
|
||||||
pronNous = mkPronoun
|
|
||||||
"nous"
|
|
||||||
"nous"
|
|
||||||
"nous"
|
|
||||||
"nous"
|
|
||||||
"notre" "notre" "nos"
|
|
||||||
PNoGen
|
|
||||||
Pl
|
|
||||||
P1
|
|
||||||
Clit3 ;
|
|
||||||
|
|
||||||
pronVous = mkPronoun
|
|
||||||
"vous"
|
|
||||||
"vous"
|
|
||||||
"vous"
|
|
||||||
"vous"
|
|
||||||
"votre" "votre" "vos"
|
|
||||||
PNoGen
|
|
||||||
Pl --- depends!
|
|
||||||
P2
|
|
||||||
Clit3 ;
|
|
||||||
|
|
||||||
pronIls = mkPronoun
|
|
||||||
"ils"
|
|
||||||
"les"
|
|
||||||
"leur"
|
|
||||||
"eux"
|
|
||||||
"leur" "leur" "leurs"
|
|
||||||
(PGen Masc)
|
|
||||||
Pl
|
|
||||||
P3
|
|
||||||
Clit1 ;
|
|
||||||
|
|
||||||
pronElles = mkPronoun
|
|
||||||
"elles"
|
|
||||||
"les"
|
|
||||||
"leur"
|
|
||||||
"elles"
|
|
||||||
"leur" "leur" "leurs"
|
|
||||||
(PGen Fem)
|
|
||||||
Pl
|
|
||||||
P3
|
|
||||||
Clit1 ;
|
|
||||||
|
|
||||||
personPron : Gender -> Number -> Person -> Pronoun = \g,n,p ->
|
|
||||||
case <n,p> of {
|
|
||||||
<Sg,P1> => pronJe ;
|
|
||||||
<Sg,P2> => pronTu ;
|
|
||||||
<Sg,P3> => case g of {
|
|
||||||
Masc => pronIl ;
|
|
||||||
Fem => pronElle
|
|
||||||
} ;
|
|
||||||
<Pl,P1> => pronNous ;
|
|
||||||
<Pl,P2> => pronVous ;
|
|
||||||
<Pl,P3> => case g of {
|
|
||||||
Masc => pronIls ;
|
|
||||||
Fem => pronElles
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
--
|
--
|
||||||
-- Determiners, traditionally called indefinite pronouns, are inflected
|
-- Determiners, traditionally called indefinite pronouns, are inflected
|
||||||
|
|||||||
@@ -167,10 +167,6 @@ oper
|
|||||||
|
|
||||||
compADeg : A -> A ;
|
compADeg : A -> A ;
|
||||||
|
|
||||||
-- From a given $A$, it is possible to get back to $A$.
|
|
||||||
|
|
||||||
adegA : A -> A ;
|
|
||||||
|
|
||||||
-- For prefixed adjectives, the following function is
|
-- For prefixed adjectives, the following function is
|
||||||
-- provided.
|
-- provided.
|
||||||
|
|
||||||
@@ -259,7 +255,6 @@ oper
|
|||||||
mkV2Q : V -> Preposition -> V2Q ;
|
mkV2Q : V -> Preposition -> V2Q ;
|
||||||
|
|
||||||
mkAS : A -> AS ;
|
mkAS : A -> AS ;
|
||||||
subjAS : A -> AS ;
|
|
||||||
mkA2S : A -> Preposition -> A2S ;
|
mkA2S : A -> Preposition -> A2S ;
|
||||||
mkAV : A -> Preposition -> AV ;
|
mkAV : A -> Preposition -> AV ;
|
||||||
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||||
@@ -301,7 +296,7 @@ oper
|
|||||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||||
|
|
||||||
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||||
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; c = Clit0} ** {lock_NP = <>} ;
|
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||||
|
|
||||||
mkA a b c d = compADeg {s = \\_ => (mkAdj a c b d).s ; isPre = False ; lock_A = <>} ;
|
mkA a b c d = compADeg {s = \\_ => (mkAdj a c b d).s ; isPre = False ; lock_A = <>} ;
|
||||||
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ;
|
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ lin
|
|||||||
he_Pron =
|
he_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
here7from_Adv = ss "d'ici" ;
|
here7from_Adv = ss "d'ici" ;
|
||||||
here7to_Adv = ss "ici" ;
|
here7to_Adv = ss "ici" ;
|
||||||
here_Adv = ss "ici" ;
|
here_Adv = ss "ici" ;
|
||||||
@@ -47,12 +47,12 @@ lin
|
|||||||
i_Pron =
|
i_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
(elision "j") (elision "m") (elision "m") "moi" "mon" (elisPoss "m") "mes"
|
(elision "j") (elision "m") (elision "m") "moi" "mon" (elisPoss "m") "mes"
|
||||||
Fem Sg P1 Clit1 ;
|
Fem Sg P1 ;
|
||||||
in_Prep = mkPreposition "dans" ;
|
in_Prep = mkPreposition "dans" ;
|
||||||
it_Pron =
|
it_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
less_CAdv = ss "moins" ;
|
less_CAdv = ss "moins" ;
|
||||||
many_Det = {s = \\_,c => prepCase c ++ "plusieurs" ; n = Pl} ;
|
many_Det = {s = \\_,c => prepCase c ++ "plusieurs" ; n = Pl} ;
|
||||||
more_CAdv = ss "plus" ;
|
more_CAdv = ss "plus" ;
|
||||||
@@ -72,7 +72,7 @@ lin
|
|||||||
she_Pron =
|
she_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"elle" elisLa "lui" "elle" "son" (elisPoss "s") "ses"
|
"elle" elisLa "lui" "elle" "son" (elisPoss "s") "ses"
|
||||||
Fem Sg P3 Clit2 ;
|
Fem Sg P3 ;
|
||||||
|
|
||||||
so_AdA = ss "si" ;
|
so_AdA = ss "si" ;
|
||||||
somebody_NP = pn2np (mkPN ["quelqu'un"] Masc) ;
|
somebody_NP = pn2np (mkPN ["quelqu'un"] Masc) ;
|
||||||
@@ -94,7 +94,7 @@ lin
|
|||||||
these_NP = mkNP ["celles-ci"] Fem Pl ;
|
these_NP = mkNP ["celles-ci"] Fem Pl ;
|
||||||
they_Pron = mkPronoun
|
they_Pron = mkPronoun
|
||||||
"elles" "les" "leur" "eux" "leur" "leur" "leurs"
|
"elles" "les" "leur" "eux" "leur" "leur" "leurs"
|
||||||
Fem Pl P3 Clit1 ;
|
Fem Pl P3 ;
|
||||||
this_Quant = {s =
|
this_Quant = {s =
|
||||||
table {
|
table {
|
||||||
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; ci
|
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; ci
|
||||||
@@ -111,7 +111,7 @@ lin
|
|||||||
want_VV = mkVV (vouloir_V2 ** {lock_V = <>}) ;
|
want_VV = mkVV (vouloir_V2 ** {lock_V = <>}) ;
|
||||||
we_Pron =
|
we_Pron =
|
||||||
mkPronoun "nous" "nous" "nous" "nous" "notre" "notre" "nos"
|
mkPronoun "nous" "nous" "nous" "nous" "notre" "notre" "nos"
|
||||||
Fem Pl P1 Clit3 ;
|
Fem Pl P1 ;
|
||||||
whatSg_IP = {s = \\c => prepCase c ++ "quoi" ; a = aagr Fem Sg} ;
|
whatSg_IP = {s = \\c => prepCase c ++ "quoi" ; a = aagr Fem Sg} ;
|
||||||
whatPl_IP = {s = \\c => prepCase c ++ "quoi" ; a = aagr Fem Pl} ;
|
whatPl_IP = {s = \\c => prepCase c ++ "quoi" ; a = aagr Fem Pl} ;
|
||||||
when_IAdv = ss "quand" ;
|
when_IAdv = ss "quand" ;
|
||||||
@@ -127,11 +127,11 @@ lin
|
|||||||
yes_Phr = ss "oui" ; --- si
|
yes_Phr = ss "oui" ; --- si
|
||||||
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"
|
||||||
Fem Sg P2 Clit1 ;
|
Fem Sg P2 ;
|
||||||
youPl_Pron, youPol_Pron =
|
youPl_Pron, youPol_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
||||||
Fem Pl P2 Clit3 ;
|
Fem Pl P2 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
|
|||||||
|
|
||||||
param
|
param
|
||||||
Prep = P_di | P_a | P_da | P_in | P_su | P_con ;
|
Prep = P_di | P_a | P_da | P_in | P_su | P_con ;
|
||||||
|
NPForm = Ton Case | Aton Case | PreClit | Poss {g : Gender ; n : Number} ; --- AAgr
|
||||||
VType = VHabere | VEsse | VRefl ;
|
VType = VHabere | VEsse | VRefl ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -76,6 +77,15 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
|
|||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a ->
|
||||||
vpAgrNone ;
|
vpAgrNone ;
|
||||||
|
|
||||||
|
--- This assumes that Acc clitics are in place before Dat.
|
||||||
|
|
||||||
|
placeNewClitic = \ci,c,pro,isc,old ->
|
||||||
|
case <ci.p1,c,isc> of {
|
||||||
|
<Acc,CPrep P_a, True> => pro.s ! PreClit ++ old ; -- there is an old clitic
|
||||||
|
{p3 = True} => pro.s ! Aton c ; -- no old but a new
|
||||||
|
_ => [] -- no clitics
|
||||||
|
} ;
|
||||||
|
|
||||||
negation : Polarity => (Str * Str) = table {
|
negation : Polarity => (Str * Str) = table {
|
||||||
Pos => <[],[]> ;
|
Pos => <[],[]> ;
|
||||||
Neg => <"non",[]>
|
Neg => <"non",[]>
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ oper
|
|||||||
-- The use of "ne" as atonic genitive is debatable.
|
-- The use of "ne" as atonic genitive is debatable.
|
||||||
-- We follow the rule that the atonic nominative is empty.
|
-- We follow the rule that the atonic nominative is empty.
|
||||||
|
|
||||||
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
|
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
|
||||||
Gender -> Number -> Person -> ClitType -> Pronoun =
|
Gender -> Number -> Person -> Pronoun =
|
||||||
\il,le,lui,Lui,son,sa,ses,see,g,n,p,c ->
|
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
|
||||||
{s = table {
|
{s = table {
|
||||||
Ton Nom => il ;
|
Ton Nom => il ;
|
||||||
Ton x => prepCase x ++ Lui ;
|
Ton x => prepCase x ++ Lui ;
|
||||||
@@ -142,14 +142,15 @@ oper
|
|||||||
Aton Acc => le ;
|
Aton Acc => le ;
|
||||||
Aton (CPrep P_di) => "ne" ; --- hmm
|
Aton (CPrep P_di) => "ne" ; --- hmm
|
||||||
Aton (CPrep P_a) => lui ;
|
Aton (CPrep P_a) => lui ;
|
||||||
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
|
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
|
||||||
|
PreClit => glie ;
|
||||||
Poss {n = Sg ; g = Masc} => son ;
|
Poss {n = Sg ; g = Masc} => son ;
|
||||||
Poss {n = Sg ; g = Fem} => sa ;
|
Poss {n = Sg ; g = Fem} => sa ;
|
||||||
Poss {n = Pl ; g = Masc} => ses ;
|
Poss {n = Pl ; g = Masc} => ses ;
|
||||||
Poss {n = Pl ; g = Fem} => see
|
Poss {n = Pl ; g = Fem} => see
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = {g = g ; n = n ; p = p} ;
|
||||||
c = c
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ oper
|
|||||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||||
|
|
||||||
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||||
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; c = Clit0} ** {lock_NP = <>} ;
|
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||||
|
|
||||||
mkA a b c d e =
|
mkA a b c d e =
|
||||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ lin
|
|||||||
from_Prep = complGen ; ---
|
from_Prep = complGen ; ---
|
||||||
he_Pron =
|
he_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"lui" "lo" "gli" "lui" "suo" "sua" "suoi" "sue"
|
"lui" "lo" "gli" "glie" "lui" "suo" "sua" "suoi" "sue"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
here7from_Adv = ss ["da quì"] ;
|
here7from_Adv = ss ["da quì"] ;
|
||||||
here7to_Adv = ss "quì" ;
|
here7to_Adv = ss "quì" ;
|
||||||
here_Adv = ss "quì" ;
|
here_Adv = ss "quì" ;
|
||||||
@@ -46,13 +46,13 @@ lin
|
|||||||
in8front_Prep = mkPreposition "davanti" ;
|
in8front_Prep = mkPreposition "davanti" ;
|
||||||
i_Pron =
|
i_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"io" "mi" "mi" "me" "mio" "mia" "miei" "mie"
|
"io" "mi" "mi" "me" "me" "mio" "mia" "miei" "mie"
|
||||||
Fem Sg P1 Clit1 ;
|
Fem Sg P1 ;
|
||||||
in_Prep = {s = [] ; c = CPrep P_in} ;
|
in_Prep = {s = [] ; c = CPrep P_in} ;
|
||||||
it_Pron =
|
it_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"lui" "lo" "gli" "lui" "suo" "sua" "suoi" "sue"
|
"lui" "lo" "gli" "glie" "lui" "suo" "sua" "suoi" "sue"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
less_CAdv = ss "meno" ;
|
less_CAdv = ss "meno" ;
|
||||||
many_Det = {s = \\g,c => prepCase c ++ genForms "molti" "molte" ! g ; n = Pl} ;
|
many_Det = {s = \\g,c => prepCase c ++ genForms "molti" "molte" ! g ; n = Pl} ;
|
||||||
more_CAdv = ss "più" ;
|
more_CAdv = ss "più" ;
|
||||||
@@ -71,8 +71,8 @@ lin
|
|||||||
quite_Adv = ss "assai" ;
|
quite_Adv = ss "assai" ;
|
||||||
she_Pron =
|
she_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"lei" "la" "le" "lei" "suo" "sua" "suoi" "sue"
|
"lei" "la" "le" "glie" "lei" "suo" "sua" "suoi" "sue"
|
||||||
Fem Sg P3 Clit2 ;
|
Fem Sg P3 ;
|
||||||
so_AdA = ss "così" ;
|
so_AdA = ss "così" ;
|
||||||
somebody_NP = pn2np (mkPN ["qualcuno"] Masc) ;
|
somebody_NP = pn2np (mkPN ["qualcuno"] Masc) ;
|
||||||
somePl_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Pl} ;
|
somePl_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Pl} ;
|
||||||
@@ -92,8 +92,8 @@ lin
|
|||||||
therefore_PConj = ss "quindi" ;
|
therefore_PConj = ss "quindi" ;
|
||||||
these_NP = mkNP ["queste"] Fem Pl ;
|
these_NP = mkNP ["queste"] Fem Pl ;
|
||||||
they_Pron = mkPronoun
|
they_Pron = mkPronoun
|
||||||
"loro" "loro" "li" "loro" "loro" "loro" "loro" "loro"
|
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
|
||||||
Fem Pl P3 Clit1 ;
|
Fem Pl P3 ;
|
||||||
this_Quant = {
|
this_Quant = {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ;
|
Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ;
|
||||||
@@ -109,8 +109,8 @@ lin
|
|||||||
very_AdA = ss "molto" ;
|
very_AdA = ss "molto" ;
|
||||||
want_VV = mkVV (verboV (volere_96 "volere")) ;
|
want_VV = mkVV (verboV (volere_96 "volere")) ;
|
||||||
we_Pron =
|
we_Pron =
|
||||||
mkPronoun "noi" "ci" "ci" "noi" "nostro" "nostra" "nostri" "nostre"
|
mkPronoun "noi" "ci" "ci" "ce" "noi" "nostro" "nostra" "nostri" "nostre"
|
||||||
Fem Pl P1 Clit3 ;
|
Fem Pl P1 ;
|
||||||
whatSg_IP = {s = \\c => prepCase c ++ ["che cosa"] ; a = aagr Fem Sg} ;
|
whatSg_IP = {s = \\c => prepCase c ++ ["che cosa"] ; a = aagr Fem Sg} ;
|
||||||
whatPl_IP = {s = \\c => prepCase c ++ ["che cose"] ; a = aagr Fem Pl} ; ---
|
whatPl_IP = {s = \\c => prepCase c ++ ["che cose"] ; a = aagr Fem Pl} ; ---
|
||||||
when_IAdv = ss "quando" ;
|
when_IAdv = ss "quando" ;
|
||||||
@@ -125,16 +125,16 @@ lin
|
|||||||
with_Prep = {s = [] ; c = CPrep P_con} ;
|
with_Prep = {s = [] ; c = CPrep P_con} ;
|
||||||
yes_Phr = ss "sì" ;
|
yes_Phr = ss "sì" ;
|
||||||
youSg_Pron = mkPronoun
|
youSg_Pron = mkPronoun
|
||||||
"tu" "ti" "ti" "te" "tuo" "tua" "tuoi" "tue"
|
"tu" "ti" "ti" "te" "te" "tuo" "tua" "tuoi" "tue"
|
||||||
Fem Sg P2 Clit1 ;
|
Fem Sg P2 ;
|
||||||
youPl_Pron =
|
youPl_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"voi" "vi" "vi" "voi" "vostro" "vostra" "vostri" "vostre"
|
"voi" "vi" "vi" "ve" "voi" "vostro" "vostra" "vostri" "vostre"
|
||||||
Fem Pl P2 Clit3 ;
|
Fem Pl P2 ;
|
||||||
youPol_Pron =
|
youPol_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"Lei" "La" "Le" "Lei" "Suo" "Sua" "Suoi" "Sue"
|
"Lei" "La" "Le" "Glie" "Lei" "Suo" "Sua" "Suoi" "Sue"
|
||||||
Fem Sg P3 Clit2 ;
|
Fem Sg P3 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ incomplete concrete CatRomance of Cat =
|
|||||||
|
|
||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
VP = CommonRomance.VP ;
|
VP = ResRomance.VP ;
|
||||||
Comp = {s : Agr => Str} ;
|
Comp = {s : Agr => Str} ;
|
||||||
SC = {s : Str} ;
|
SC = {s : Str} ;
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,6 @@ param
|
|||||||
|
|
||||||
Mood = Indic | Conjunct ;
|
Mood = Indic | Conjunct ;
|
||||||
|
|
||||||
-- There are different types of clitic pronouns (as for position).
|
|
||||||
-- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".
|
|
||||||
|
|
||||||
ClitType = Clit0 | Clit1 | Clit2 | Clit3 ;
|
|
||||||
|
|
||||||
-- Adjectives are inflected in gender and number, and there is also an
|
-- Adjectives are inflected in gender and number, and there is also an
|
||||||
-- adverbial form (e.g. "infiniment"), which has different paradigms and
|
-- adverbial form (e.g. "infiniment"), which has different paradigms and
|
||||||
-- can even be irregular ("bien").
|
-- can even be irregular ("bien").
|
||||||
@@ -160,19 +155,6 @@ oper
|
|||||||
|
|
||||||
Adj = {s : AForm => Str} ;
|
Adj = {s : AForm => Str} ;
|
||||||
|
|
||||||
VP : Type = {
|
|
||||||
s : VPForm => {
|
|
||||||
fin : Agr => Str ; -- ai
|
|
||||||
inf : AAgr => Str -- dit
|
|
||||||
} ;
|
|
||||||
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
|
|
||||||
neg : Polarity => (Str * Str) ; -- ne-pas
|
|
||||||
clit1 : Agr => Str ; -- se
|
|
||||||
clit2 : Str ; -- lui
|
|
||||||
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
|
||||||
ext : Polarity => Str ; -- que je dors / que je dorme
|
|
||||||
} ;
|
|
||||||
|
|
||||||
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
|
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
|
||||||
case vp of {
|
case vp of {
|
||||||
VPAgrSubj => agr ;
|
VPAgrSubj => agr ;
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ incomplete concrete ConjunctionRomance of Conjunction =
|
|||||||
|
|
||||||
ConjNP conj ss = conjunctTable NPForm conj ss ** {
|
ConjNP conj ss = conjunctTable NPForm conj ss ** {
|
||||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
||||||
c = Clit0
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
||||||
c = Clit0
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
|||||||
|
|
||||||
param Prep ;
|
param Prep ;
|
||||||
|
|
||||||
|
-- Forms of noun phrases. Spanish and Italian have special forms for
|
||||||
|
-- fronted clitics.
|
||||||
|
|
||||||
|
param NPForm ;
|
||||||
|
|
||||||
-- Which types of verbs exist, in terms of auxiliaries.
|
-- Which types of verbs exist, in terms of auxiliaries.
|
||||||
-- (Fre, Ita "avoir", "être", and refl; Spa only "haber" and refl).
|
-- (Fre, Ita "avoir", "être", and refl; Spa only "haber" and refl).
|
||||||
|
|
||||||
@@ -40,11 +45,24 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
|||||||
|
|
||||||
oper clitInf : Str -> Str -> Str ;
|
oper clitInf : Str -> Str -> Str ;
|
||||||
|
|
||||||
|
-- If a new clitic is placed before an existing one.
|
||||||
|
-- (Fre "le lui", Ita "glie lo").
|
||||||
|
|
||||||
|
placeNewClitic :
|
||||||
|
(Case * Number * Person) -> -- info on old clit
|
||||||
|
Case -> -- case of new clit
|
||||||
|
{s : NPForm => Str ; a : Agr ; hasClit : Bool} -> -- new clit
|
||||||
|
Bool -> -- whether to clit'ze
|
||||||
|
Str -> -- old clit
|
||||||
|
Str ; -- old + new (or rev.)
|
||||||
|
|
||||||
|
|
||||||
--2 Constants that must derivatively depend on language
|
--2 Constants that must derivatively depend on language
|
||||||
|
|
||||||
dative : Case ;
|
---- nominative : Case ;
|
||||||
genitive : Case ;
|
---- accusative : Case ;
|
||||||
|
dative : Case ;
|
||||||
|
genitive : Case ;
|
||||||
|
|
||||||
vRefl : VType ;
|
vRefl : VType ;
|
||||||
isVRefl : VType -> Bool ;
|
isVRefl : VType -> Bool ;
|
||||||
@@ -80,7 +98,6 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
Case = Nom | Acc | CPrep Prep ;
|
Case = Nom | Acc | CPrep Prep ;
|
||||||
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Verb = {s : VF => Str ; vtyp : VType} ;
|
Verb = {s : VF => Str ; vtyp : VType} ;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ incomplete concrete NounRomance of Noun =
|
|||||||
in {
|
in {
|
||||||
s = \\c => det.s ! g ! npform2case c ++ cn.s ! n ;
|
s = \\c => det.s ! g ! npform2case c ++ cn.s ! n ;
|
||||||
a = agrP3 g n ;
|
a = agrP3 g n ;
|
||||||
c = Clit0
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN = pn2np ;
|
UsePN = pn2np ;
|
||||||
@@ -22,7 +22,7 @@ incomplete concrete NounRomance of Noun =
|
|||||||
s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! npform2case c ++ --- subtype
|
s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! npform2case c ++ --- subtype
|
||||||
np.s ! case2npform pred.c ;
|
np.s ! case2npform pred.c ;
|
||||||
a = np.a ;
|
a = np.a ;
|
||||||
c = Clit0
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetSg quant ord = {
|
DetSg quant ord = {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ oper
|
|||||||
nominative : Case = Nom ;
|
nominative : Case = Nom ;
|
||||||
accusative : Case = Acc ;
|
accusative : Case = Acc ;
|
||||||
|
|
||||||
Pronoun = {s : NPForm => Str ; a : Agr ; c : ClitType} ;
|
Pronoun = {s : NPForm => Str ; a : Agr ; hasClit : Bool} ;
|
||||||
|
|
||||||
Compl : Type = {s : Str ; c : Case ; isDir : Bool} ;
|
Compl : Type = {s : Str ; c : Case ; isDir : Bool} ;
|
||||||
|
|
||||||
@@ -22,13 +22,14 @@ oper
|
|||||||
pn2np : {s : Str ; g : Gender} -> Pronoun = \pn -> {
|
pn2np : {s : Str ; g : Gender} -> Pronoun = \pn -> {
|
||||||
s = \\c => prepCase (npform2case c) ++ pn.s ;
|
s = \\c => prepCase (npform2case c) ++ pn.s ;
|
||||||
a = agrP3 pn.g Sg ;
|
a = agrP3 pn.g Sg ;
|
||||||
c = Clit0
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
npform2case : NPForm -> Case = \p -> case p of {
|
npform2case : NPForm -> Case = \p -> case p of {
|
||||||
Ton x => x ;
|
Ton x => x ;
|
||||||
|
Poss _ => genitive ;
|
||||||
Aton x => x ;
|
Aton x => x ;
|
||||||
Poss _ => genitive
|
_ => dative ---- Ita PreClit
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
case2npform : Case -> NPForm = \c -> case c of {
|
case2npform : Case -> NPForm = \c -> case c of {
|
||||||
@@ -38,6 +39,20 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
VP : Type = {
|
||||||
|
s : VPForm => {
|
||||||
|
fin : Agr => Str ; -- ai
|
||||||
|
inf : AAgr => Str -- dit
|
||||||
|
} ;
|
||||||
|
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
|
||||||
|
neg : Polarity => (Str * Str) ; -- ne-pas
|
||||||
|
clit1 : Agr => Str ; -- se lui
|
||||||
|
clInfo : Case * Number * Person ; -- whether and what fills clit1 (Nom = none)
|
||||||
|
clit2 : Str ; -- y en
|
||||||
|
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
||||||
|
ext : Polarity => Str ; -- que je dors / que je dorme
|
||||||
|
} ;
|
||||||
|
|
||||||
appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
|
appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
|
||||||
comp.s ++ np ! Ton comp.c ;
|
comp.s ++ np ! Ton comp.c ;
|
||||||
|
|
||||||
@@ -62,6 +77,11 @@ oper
|
|||||||
inf = \\a => inf a
|
inf = \\a => inf a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
cli : (Agr => Str) * (Case * Number * Person) = case isVRefl typ of {
|
||||||
|
True => <\\a => reflPron ! a.n ! a.p ! Acc,<Acc,Sg,P3>> ; --- n,p
|
||||||
|
_ => <\\_ => [], <Nom,Sg,P1>> -- not care
|
||||||
|
} ;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
VPFinite t Simul => vf (vfin t) (\_ -> []) ;
|
VPFinite t Simul => vf (vfin t) (\_ -> []) ;
|
||||||
@@ -70,34 +90,32 @@ oper
|
|||||||
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) ;
|
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) ;
|
||||||
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a)
|
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a)
|
||||||
} ;
|
} ;
|
||||||
agr = partAgr typ ;
|
agr = partAgr typ ;
|
||||||
neg = negation ;
|
neg = negation ;
|
||||||
clit1 = \\a => case isVRefl typ of {
|
clit1 = cli.p1 ;
|
||||||
True => reflPron ! a.n ! a.p ! Acc ;
|
clInfo = cli.p2 ;
|
||||||
_ => []
|
clit2 = [] ;
|
||||||
} ;
|
comp = \\a => [] ;
|
||||||
clit2 = [] ;
|
ext = \\p => []
|
||||||
comp = \\a => [] ;
|
|
||||||
ext = \\p => []
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
|
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
|
||||||
let
|
let
|
||||||
cc : Str * Str * VPAgr = case <c.isDir, c.c, np.c> of {
|
cc : Bool * Str * VPAgr = case <c.isDir, c.c, np.hasClit> of {
|
||||||
<False,_,_> |
|
<False,_,_> |
|
||||||
<_,_,Clit0> => <[], c.s ++ np.s ! Ton c.c, vp.agr> ;
|
<_,_,False> => <False, c.s ++ np.s ! Ton c.c, vp.agr> ;
|
||||||
<_,Acc,_> => <np.s ! Aton c.c, [], vpAgrClit np.a> ;
|
<_,Acc,_> => <True, [], vpAgrClit np.a> ;
|
||||||
_ => <np.s ! Aton c.c, [], vp.agr>
|
_ => <True, [], vp.agr>
|
||||||
} ;
|
|
||||||
high = case np.c of { -- whether the new clitic comes closer to verb
|
|
||||||
Clit0 | Clit1 => False ; ---- approximation; should look at the old clit too
|
|
||||||
_ => True
|
|
||||||
} ;
|
} ;
|
||||||
in {
|
in {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
agr = cc.p3 ;
|
agr = cc.p3 ;
|
||||||
clit1 = vp.clit1 ; ---- just a reflexive
|
clit1 = \\a => placeNewClitic vp.clInfo c.c np cc.p1 (vp.clit1 ! a) ;
|
||||||
clit2 = preOrPost high vp.clit2 cc.p1 ;
|
clInfo = case cc.p1 of {
|
||||||
|
False => vp.clInfo ; -- no new clitic
|
||||||
|
_ => <c.c, np.a.n, np.a.p>
|
||||||
|
} ;
|
||||||
|
clit2 = vp.clit2 ;
|
||||||
neg = vp.neg ;
|
neg = vp.neg ;
|
||||||
comp = \\a => vp.comp ! a ++ cc.p2 ;
|
comp = \\a => vp.comp ! a ++ cc.p2 ;
|
||||||
ext = vp.ext ;
|
ext = vp.ext ;
|
||||||
@@ -107,6 +125,7 @@ oper
|
|||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
agr = vp.agr ;
|
agr = vp.agr ;
|
||||||
clit1 = vp.clit1 ;
|
clit1 = vp.clit1 ;
|
||||||
|
clInfo = vp.clInfo ;
|
||||||
clit2 = vp.clit2 ;
|
clit2 = vp.clit2 ;
|
||||||
neg = vp.neg ;
|
neg = vp.neg ;
|
||||||
comp = \\a => vp.comp ! a ++ co ! a ;
|
comp = \\a => vp.comp ! a ++ co ! a ;
|
||||||
@@ -116,6 +135,7 @@ oper
|
|||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
agr = vp.agr ;
|
agr = vp.agr ;
|
||||||
clit1 = vp.clit1 ;
|
clit1 = vp.clit1 ;
|
||||||
|
clInfo = vp.clInfo ;
|
||||||
clit2 = vp.clit2 ;
|
clit2 = vp.clit2 ;
|
||||||
neg = vp.neg ;
|
neg = vp.neg ;
|
||||||
comp = \\a => vp.comp ! a ++ co ;
|
comp = \\a => vp.comp ! a ++ co ;
|
||||||
@@ -125,6 +145,7 @@ oper
|
|||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
agr = vp.agr ;
|
agr = vp.agr ;
|
||||||
clit1 = vp.clit1 ;
|
clit1 = vp.clit1 ;
|
||||||
|
clInfo = vp.clInfo ;
|
||||||
clit2 = vp.clit2 ;
|
clit2 = vp.clit2 ;
|
||||||
neg = vp.neg ;
|
neg = vp.neg ;
|
||||||
comp = vp.comp ;
|
comp = vp.comp ;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
|
|||||||
|
|
||||||
param
|
param
|
||||||
Prep = P_de | P_a ;
|
Prep = P_de | P_a ;
|
||||||
|
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
|
||||||
VType = VHabere | VRefl ;
|
VType = VHabere | VRefl ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -51,6 +52,26 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
|
|||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a ->
|
||||||
vpAgrNone ;
|
vpAgrNone ;
|
||||||
|
|
||||||
|
--- This assumes that Acc clitics are in place before Dat.
|
||||||
|
|
||||||
|
placeNewClitic = \ci,c,pro,isc,old ->
|
||||||
|
if_then_Str isc (
|
||||||
|
case <ci.p3, pro.a.p> of {
|
||||||
|
<P2,P1> => old ++ pro.s ! Aton c ; -- te me, ---se me
|
||||||
|
<P3,P3> => "se" ++ old ; -- se lo
|
||||||
|
_ => pro.s ! Aton c ++ old -- indirect first
|
||||||
|
}) [] ; -- no clitics
|
||||||
|
|
||||||
|
{-
|
||||||
|
placeNewClitic = \ci,c,pro,isc,old ->
|
||||||
|
case <ci.p1, ci.p2, ci.p3, pro.a.p, isc> of {
|
||||||
|
<Acc, Sg, P2, P1, True> => old ++ pro.s ! Aton c ; -- te me, ---se me
|
||||||
|
<Acc, _, P3, P3, True> => "se" ++ old ; -- se lo
|
||||||
|
{p5 = True} => pro.s ! Aton c ++ old ; -- indirect first
|
||||||
|
_ => [] -- no clitics
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
negation : Polarity => (Str * Str) = table {
|
negation : Polarity => (Str * Str) = table {
|
||||||
Pos => <[],[]> ;
|
Pos => <[],[]> ;
|
||||||
Neg => <"no",[]>
|
Neg => <"no",[]>
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ oper
|
|||||||
-- We follow the rule that the atonic nominative is empty.
|
-- We follow the rule that the atonic nominative is empty.
|
||||||
|
|
||||||
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
|
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
|
||||||
Gender -> Number -> Person -> ClitType -> Pronoun =
|
Gender -> Number -> Person -> Pronoun =
|
||||||
\il,le,lui,Lui,son,sa,ses,see,g,n,p,c ->
|
\il,le,lui,Lui,son,sa,ses,see,g,n,p ->
|
||||||
{s = table {
|
{s = table {
|
||||||
Ton Nom => il ;
|
Ton Nom => il ;
|
||||||
Ton x => prepCase x ++ Lui ;
|
Ton x => prepCase x ++ Lui ;
|
||||||
@@ -107,35 +107,8 @@ oper
|
|||||||
Poss {n = Pl ; g = Fem} => see
|
Poss {n = Pl ; g = Fem} => see
|
||||||
} ;
|
} ;
|
||||||
a = {g = g ; n = n ; p = p} ;
|
a = {g = g ; n = n ; p = p} ;
|
||||||
c = c
|
hasClit = True
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
-- used in constructions like "(no) hay ..."
|
|
||||||
|
|
||||||
pronEmpty : Number -> Pronoun = \n -> mkPronoun
|
|
||||||
[]
|
|
||||||
[]
|
|
||||||
[]
|
|
||||||
[]
|
|
||||||
[] [] [] []
|
|
||||||
(PGen Masc)
|
|
||||||
n
|
|
||||||
P3
|
|
||||||
Clit2 ;
|
|
||||||
|
|
||||||
--2 Reflexive pronouns
|
|
||||||
--
|
|
||||||
-- It is simply a function depending on number and person.
|
|
||||||
|
|
||||||
pronRefl : Number -> Person -> Str = \n,p -> case <n,p> of {
|
|
||||||
<Sg,P1> => "me" ;
|
|
||||||
<Sg,P2> => "te" ;
|
|
||||||
<_, P3> => "se" ;
|
|
||||||
<Pl,P1> => "nos" ;
|
|
||||||
<Pl,P2> => "vos"
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-}
|
|
||||||
|
|
||||||
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ oper
|
|||||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||||
|
|
||||||
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||||
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; c = Clit0} ** {lock_NP = <>} ;
|
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||||
|
|
||||||
mkA a b c d e =
|
mkA a b c d e =
|
||||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ lin
|
|||||||
mkPronoun
|
mkPronoun
|
||||||
"el" "lo" "le" "él"
|
"el" "lo" "le" "él"
|
||||||
"su" "su" "sus" "sus"
|
"su" "su" "sus" "sus"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
here_Adv = mkAdv "aquí" ; -- acá
|
here_Adv = mkAdv "aquí" ; -- acá
|
||||||
here7to_Adv = mkAdv ["para acá"] ;
|
here7to_Adv = mkAdv ["para acá"] ;
|
||||||
here7from_Adv = mkAdv ["de acá"] ;
|
here7from_Adv = mkAdv ["de acá"] ;
|
||||||
@@ -50,13 +50,13 @@ lin
|
|||||||
mkPronoun
|
mkPronoun
|
||||||
"yo" "me" "me" "mí"
|
"yo" "me" "me" "mí"
|
||||||
"mi" "mi" "mis" "mis"
|
"mi" "mi" "mis" "mis"
|
||||||
Fem Sg P1 Clit1 ;
|
Fem Sg P1 ;
|
||||||
in_Prep = mkPreposition "en" ;
|
in_Prep = mkPreposition "en" ;
|
||||||
it_Pron =
|
it_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"el" "lo" "le" "él"
|
"el" "lo" "le" "él"
|
||||||
"su" "su" "sus" "sus"
|
"su" "su" "sus" "sus"
|
||||||
Masc Sg P3 Clit2 ;
|
Masc Sg P3 ;
|
||||||
less_CAdv = ss "meno" ; ----
|
less_CAdv = ss "meno" ; ----
|
||||||
many_Det = {s = \\g,c => prepCase c ++ genForms "muchos" "muchas" ! g ; n = Pl} ;
|
many_Det = {s = \\g,c => prepCase c ++ genForms "muchos" "muchas" ! g ; n = Pl} ;
|
||||||
more_CAdv = ss "mas" ;
|
more_CAdv = ss "mas" ;
|
||||||
@@ -77,7 +77,7 @@ lin
|
|||||||
mkPronoun
|
mkPronoun
|
||||||
"ella" "la" "le" "ella"
|
"ella" "la" "le" "ella"
|
||||||
"su" "su" "sus" "sus"
|
"su" "su" "sus" "sus"
|
||||||
Fem Sg P3 Clit2 ;
|
Fem Sg P3 ;
|
||||||
so_AdA = ss "tanto" ;
|
so_AdA = ss "tanto" ;
|
||||||
somebody_NP = pn2np (mkPN ["algún"] Masc) ;
|
somebody_NP = pn2np (mkPN ["algún"] Masc) ;
|
||||||
somePl_Det = {s = \\g,c => prepCase c ++ genForms "algunos" "algunas" ! g ; n = Pl} ;
|
somePl_Det = {s = \\g,c => prepCase c ++ genForms "algunos" "algunas" ! g ; n = Pl} ;
|
||||||
@@ -99,7 +99,7 @@ lin
|
|||||||
they_Pron = mkPronoun
|
they_Pron = mkPronoun
|
||||||
"ellas" "las" "les" "ellas"
|
"ellas" "las" "les" "ellas"
|
||||||
"su" "su" "sus" "sus"
|
"su" "su" "sus" "sus"
|
||||||
Fem Pl P3 Clit1 ;
|
Fem Pl P3 ;
|
||||||
this_Quant = {
|
this_Quant = {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => \\g,c => prepCase c ++ genForms "este" "esta" ! g ;
|
Sg => \\g,c => prepCase c ++ genForms "este" "esta" ! g ;
|
||||||
@@ -118,7 +118,7 @@ lin
|
|||||||
mkPronoun
|
mkPronoun
|
||||||
"nosotras" "nos" "nos" "nosotras"
|
"nosotras" "nos" "nos" "nosotras"
|
||||||
"nuestro" "nuestra" "nuestros" "nuestras"
|
"nuestro" "nuestra" "nuestros" "nuestras"
|
||||||
Fem Pl P1 Clit3 ;
|
Fem Pl P1 ;
|
||||||
whatSg_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Sg} ;
|
whatSg_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Sg} ;
|
||||||
whatPl_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Pl} ; ---
|
whatPl_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Pl} ; ---
|
||||||
when_IAdv = ss "cuando" ;
|
when_IAdv = ss "cuando" ;
|
||||||
@@ -135,17 +135,17 @@ lin
|
|||||||
youSg_Pron = mkPronoun
|
youSg_Pron = mkPronoun
|
||||||
"tu" "te" "te" "tí"
|
"tu" "te" "te" "tí"
|
||||||
"tu" "tu" "tus" "tus"
|
"tu" "tu" "tus" "tus"
|
||||||
Fem Sg P2 Clit1 ;
|
Fem Sg P2 ;
|
||||||
youPl_Pron =
|
youPl_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"vosotras" "vos" "vos" "vosotras"
|
"vosotras" "vos" "vos" "vosotras"
|
||||||
"vuestro" "vuestra" "vuestros" "vuestras"
|
"vuestro" "vuestra" "vuestros" "vuestras"
|
||||||
Fem Pl P2 Clit3 ;
|
Fem Pl P2 ;
|
||||||
youPol_Pron =
|
youPol_Pron =
|
||||||
mkPronoun
|
mkPronoun
|
||||||
"usted" "la" "le" "usted"
|
"usted" "la" "le" "usted"
|
||||||
"su" "su" "sus" "sus"
|
"su" "su" "sus" "sus"
|
||||||
Fem Pl P2 Clit3 ;
|
Fem Pl P2 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
etConj : {s : Str ; n : Number} = {s = pre {
|
etConj : {s : Str ; n : Number} = {s = pre {
|
||||||
|
|||||||
@@ -49,15 +49,16 @@ mkTreebank opts sh com trees = putInXML opts "treebank" comm (concatMap mkItem t
|
|||||||
tris = zip trees [1..]
|
tris = zip trees [1..]
|
||||||
|
|
||||||
testTreebank :: Options -> ShellState -> String -> Res
|
testTreebank :: Options -> ShellState -> String -> Res
|
||||||
testTreebank opts sh = putInXML opts "diff" [] . concatMap testOne . getTreebank . lines
|
testTreebank opts sh = putInXML opts "testtreebank" [] . concatMap testOne . getTreebank . lines
|
||||||
where
|
where
|
||||||
testOne (e,lang,str) = do
|
testOne (e,lang,str0) = do
|
||||||
let tr = annot gr e
|
let tr = annot gr e
|
||||||
let str0 = linearize sh lang tr
|
let str = linearize sh lang tr
|
||||||
if str == str0 then ret else putInXML opts "diff" [] $ do
|
if str == str0 then ret else putInXML opts "diff" [] $ concat [
|
||||||
putInXML opts "tree" [] (puts $ showTree tr)
|
putInXML opts "tree" [] (puts $ showTree tr),
|
||||||
putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0
|
putInXML opts "old" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str0,
|
||||||
putInXML opts "new" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str
|
putInXML opts "new" (" lang=" ++ show (prt_ (zIdent lang))) $ puts str
|
||||||
|
]
|
||||||
gr = firstStateGrammar sh
|
gr = firstStateGrammar sh
|
||||||
|
|
||||||
-- string vs. IO
|
-- string vs. IO
|
||||||
|
|||||||
Reference in New Issue
Block a user