spanish works although with bugs

This commit is contained in:
aarne
2004-12-10 07:13:01 +00:00
parent 666496eee9
commit a3b75f842f
7 changed files with 196 additions and 232 deletions

View File

@@ -1,4 +1,4 @@
--# -path=.:../romance:../abstract:../../prelude --# -path=.:../romance:../abstract:../../prelude
concrete CategoriesIta of Categories = concrete CategoriesSpa of Categories =
CategoriesRomance with (SyntaxRomance=SyntaxIta) ; CategoriesRomance with (SyntaxRomance=SyntaxSpa) ;

View File

@@ -25,14 +25,7 @@ oper
"a" ; "e" ; "h" ; "i" ; "o" ; "u" "a" ; "e" ; "h" ; "i" ; "o" ; "u"
} ; } ;
sImpuro : Strs = strs { elisQue = "que" ; --- no elision in Italian
"z" ; "sb" ; "sc" ; "sd" ; "sf" ; "sm" ; "sp" ; "sq" ; "sr" ; "st" ; "sv"
} ;
elision : (_,_,_ : Str) -> Str = \il, l', lo ->
pre {il ; l' / vocale ; lo / sImpuro} ;
elisQue = "che" ; --- no elision in Italian
elisDe = "de" ; elisDe = "de" ;
--2 Nouns --2 Nouns
@@ -45,14 +38,11 @@ oper
-- For example: -- For example:
nomVino : Str -> Number => Str = \vino -> let {vin = Predef.tk 1 vino} in nomVino : Str -> Number => Str = \vino ->
numForms vino (vin + "i") ; numForms vino (vino + "s") ;
nomRana : Str -> Number => Str = \rana -> let {ran = Predef.tk 1 rana} in nomPilar : Str -> Number => Str = \pilar ->
numForms rana (ran + "e") ; numForms pilar (pilar + "es") ;
nomSale : Str -> Number => Str = \sale -> let {sal = Predef.tk 1 sale} in
numForms sale (sal + "i") ;
nomTram : Str -> Number => Str = \tram -> nomTram : Str -> Number => Str = \tram ->
numForms tram tram ; numForms tram tram ;
@@ -86,15 +76,10 @@ oper
let let
sol = Predef.tk 1 solo sol = Predef.tk 1 solo
in in
mkAdj solo (sol + "a") (sol + "i") (sol + "e") (sol + "amente") ; mkAdj solo (sol + "a") (sol + "os") (sol + "as") (sol + "amente") ;
adjTale : Str -> Adj = \tale -> adjUtil : Str -> Str -> Adj = \util,utiles ->
let mkAdj util util utiles utiles (util + "mente") ;
tal = Predef.tk 1 tale ;
tali = tal + "i" ;
tala = if_then_Str (pbool2bool (Predef.occur (Predef.dp 1 tal) "lr")) tal tale
in
mkAdj tale tale tali tali (tala + "mente") ;
adjBlu : Str -> Adj = \blu -> adjBlu : Str -> Adj = \blu ->
mkAdj blu blu blu blu blu ; --- mkAdj blu blu blu blu blu ; ---
@@ -134,11 +119,11 @@ oper
-- It is simply a function depending on number and person. -- It is simply a function depending on number and person.
pronRefl : Number -> Person -> Str = \n,p -> case <n,p> of { pronRefl : Number -> Person -> Str = \n,p -> case <n,p> of {
<Sg,P1> => "mi" ; <Sg,P1> => "me" ;
<Sg,P2> => "ti" ; <Sg,P2> => "te" ;
<_, P3> => "si" ; <_, P3> => "se" ;
<Pl,P1> => "ci" ; <Pl,P1> => "nos" ;
<Pl,P2> => "vi" <Pl,P2> => "vos"
} ; } ;
@@ -149,11 +134,11 @@ oper
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ; pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
qualPron : Gender -> Number -> Str = pronForms (adjTale "quale") ; qualPron : Gender -> Number -> Str = pronForms (adjUtil "cuál" "cuales") ;
talPron : Gender -> Number -> Str = pronForms (adjTale "tale") ; talPron : Gender -> Number -> Str = pronForms (adjUtil "tál" "tales") ;
tuttoPron : Gender -> Number -> Str = pronForms (adjSolo "tutto") ; tuttoPron : Gender -> Number -> Str = pronForms (adjSolo "todo") ;
--2 Articles --2 Articles
-- --
@@ -161,36 +146,26 @@ oper
-- elision. This is the simples definition we have been able to find. -- elision. This is the simples definition we have been able to find.
artDefTable : Gender => Number => Case => Str = \\g,n,c => case <g,n,c> of { artDefTable : Gender => Number => Case => Str = \\g,n,c => case <g,n,c> of {
<_, _, CPrep P_de> => prepArt g n "de" ; <Masc,Sg, CPrep P_de> => "del" ;
<_, _, CPrep P_a> => prepArt g n "a" ; <Masc,Sg, CPrep P_a> => "al" ;
<Masc,Sg, Nom> => elision "il" "l'" "lo" ; <Masc,Sg, _> => prepCase c ++ "el" ;
<Masc,Sg, _> => elision "il" "l'" "lo" ;
<Fem ,Sg, _> => elision "la" "l'" "la" ; <Fem ,Sg, _> => prepCase c ++ "la" ;
<Masc,Pl, _> => elision "i" "gli" "gli" ; <Masc,Pl, _> => prepCase c ++ "los" ;
<Fem ,Pl, _> => "le" <Fem ,Pl, _> => prepCase c ++ "las"
} ;
-- This auxiliary expresses the uniform rule.
prepArt : Gender -> Number -> Tok -> Tok = \g,n,de -> case <g,n> of {
<Masc,Sg> => elision (de + "l") (de + "ll'") (de + "llo") ;
<Masc,Pl> => elision (de + "i") (de + "gli") (de + "gli") ;
<Fem, Sg> => elision (de + "lla") (de + "ll'") (de + "lla") ;
<Fem, Pl> => de + "lle"
} ; } ;
--2 Verbs --2 Verbs
-- --
--3 The Bescherell conjugations. --3 The Bescherelle conjugations.
-- --
-- The following conjugations tables were generated using FM software -- The following conjugations tables were generated using FM software
-- from a Haskell source. -- from a Haskell source.
-- --
-- The verb "essere" is often used in syntax. -- The verb "essere" is often used in syntax.
-- verbEssere = verbPres (essere_5 "essere") AEsse ; verbSer = verbPres (ser_7 "ser") AHabere ;
-- verbAvere = verbPres (avere_6 "avere") AHabere ; verbHaber = verbPres (haber_10 "haber") AHabere ;
-- machine-generated GF code -- machine-generated GF code

View File

@@ -1,4 +1,4 @@
--# -path=.:../romance:../abstract:../../prelude --# -path=.:../romance:../abstract:../../prelude
concrete RulesIta of Rules = concrete RulesSpa of Rules =
RulesRomance with (SyntaxRomance=SyntaxIta) ; RulesRomance with (SyntaxRomance=SyntaxSpa) ;

View File

@@ -1,7 +1,7 @@
--# -path=.:../romance:../abstract:../../prelude --# -path=.:../romance:../abstract:../../prelude
concrete StructuralIta of Structural = CategoriesIta, NumeralsIta ** concrete StructuralSpa of Structural = CategoriesSpa, NumeralsSpa **
open SyntaxIta, MorphoIta, Prelude in { open SyntaxSpa, MorphoSpa, Prelude in {
lin lin
INP = pronNounPhrase pronJe ; INP = pronNounPhrase pronJe ;
@@ -19,32 +19,32 @@ lin
--- TheyNP = pronNounPhrase (variants {pronIls ; pronElles}) ; --- TheyNP = pronNounPhrase (variants {pronIls ; pronElles}) ;
ThisNP = mkNameNounPhrase ["questo"] Masc ; ThisNP = mkNameNounPhrase ["esto"] Masc ;
ThatNP = mkNameNounPhrase ["quello"] Masc ; ThatNP = mkNameNounPhrase ["eso"] Masc ;
TheseNumNP n = mkNameNounPhrase ("questi" ++ n.s ! Masc) Masc ; TheseNumNP n = mkNameNounPhrase ("éstos" ++ n.s ! Masc) Masc ;
ThoseNumNP n = mkNameNounPhrase ("quelli" ++ n.s ! Masc) Masc ; ThoseNumNP n = mkNameNounPhrase ("ésos" ++ n.s ! Masc) Masc ;
ItNP = pronNounPhrase pronIl ; ItNP = pronNounPhrase pronIl ;
EveryDet = chaqueDet ; EveryDet = chaqueDet ;
AllMassDet = mkDeterminer singular "tutto" "tutta" ; AllMassDet = mkDeterminer singular "todo" "toda" ;
AllNumDet = mkDeterminerNum plural ["tutti i"] ["tutte le"] ; --- gli AllNumDet = mkDeterminerNum plural ["todos los"] ["todas las"] ;
WhichDet = quelDet ; WhichDet = quelDet ;
WhichNumDet = mkDeterminerNum plural "quali" "quali" ; WhichNumDet = mkDeterminerNum plural "cuales" "cuales" ;
MostsDet = plupartDet ; MostsDet = plupartDet ;
MostDet = mkDeterminer1 singular (["la maggior parte"] ++ elisDe) ; --- de MostDet = mkDeterminer1 singular (["la mayor parte"] ++ elisDe) ; --- de
SomeDet = mkDeterminer1 singular "qualche" ; SomeDet = mkDeterminer singular "alguno" "alguna" ;
SomeNumDet = mkDeterminerNum plural "alcuni" "alcune" ; SomeNumDet = mkDeterminerNum plural "algunos" "algunas" ;
NoDet = mkDeterminer singular "nessuno" "nessuna" ; --- non NoDet = mkDeterminer singular "ninguno" "ninguna" ; --- non
NoNumDet = mkDeterminerNum plural "nessuni" "nessune" ; ---- ?? NoNumDet = mkDeterminerNum plural "ningunos" "ningunas" ; ---- ??
AnyDet = mkDeterminer1 singular "qualche" ; --- AnyDet = mkDeterminer singular "alguno" "alguna" ; ---
AnyNumDet = mkDeterminerNum plural "alcuni" "alcune" ; --- AnyNumDet = mkDeterminerNum plural "algunos" "algunas" ; ---
ManyDet = mkDeterminer plural "molti" "molte" ; ManyDet = mkDeterminer plural "muchos" "muchas" ;
MuchDet = mkDeterminer1 singular "molto" ; MuchDet = mkDeterminer1 singular "mucho" ;
ThisDet = mkDeterminer singular "questo" "questa" ; ThisDet = mkDeterminer singular "esto" "esta" ;
ThatDet = mkDeterminer singular "quello" "quella" ; ThatDet = mkDeterminer singular "eso" "esa" ;
TheseNumDet = mkDeterminerNum plural "questi" "queste" ; --- ci TheseNumDet = mkDeterminerNum plural "estos" "estas" ;
ThoseNumDet = mkDeterminerNum plural "quelli" "quelle" ; --- quegli ThoseNumDet = mkDeterminerNum plural "esos" "esas" ;
UseNumeral n = {s = \\_ => n.s} ; ---- gender UseNumeral n = {s = \\_ => n.s} ; ---- gender
@@ -57,57 +57,57 @@ lin
OrConj = ouConj ; OrConj = ouConj ;
BothAnd = etetConj ; BothAnd = etetConj ;
EitherOr = ououConj ; EitherOr = ououConj ;
NeitherNor = niniConj ; --- requires ne ! NeitherNor = niniConj ;
IfSubj = siSubj ; IfSubj = siSubj ;
WhenSubj = quandSubj ; WhenSubj = quandSubj ;
PhrYes = ouiPhr ; PhrYes = ouiPhr ;
PhrNo = nonPhr ; --- and also Si! PhrNo = nonPhr ; --- and also Si!
VeryAdv = ss "molto" ; VeryAdv = ss "muy" ;
TooAdv = ss "troppo" ; TooAdv = ss "demasiado" ;
OtherwiseAdv = ss "altramente" ; OtherwiseAdv = ss "otramente" ;
ThereforeAdv = ss "quindi" ; ThereforeAdv = ss ["por eso"] ;
EverybodyNP = mkNameNounPhrase ["tutti"] Masc ; EverybodyNP = mkNameNounPhrase ["todos"] Masc ;
SomebodyNP = mkNameNounPhrase ["qualcuno"] Masc ; SomebodyNP = mkNameNounPhrase ["algún"] Masc ;
NobodyNP = mkNameNounPhrase ["nessuno"] Masc ; --- ne NobodyNP = mkNameNounPhrase ["nadién"] Masc ; --- ne
EverythingNP = mkNameNounPhrase ["tutto"] Masc ; EverythingNP = mkNameNounPhrase ["todo"] Masc ;
SomethingNP = mkNameNounPhrase ["qualche cosa"] Masc ; SomethingNP = mkNameNounPhrase ["algo"] Masc ;
NothingNP = mkNameNounPhrase ["niente"] Masc ; --- ne NothingNP = mkNameNounPhrase ["nada"] Masc ; --- ne
CanVV = mkVerbVerbDir (verbPres (potere_72 "potere") AHabere) ; ---- CanVV = mkVerbVerbDir (verbPres (potere_72 "potere") AHabere) ;
CanKnowVV = mkVerbVerbDir (verbPres (sapere_81 "sapere") AHabere) ; ---- CanKnowVV = mkVerbVerbDir (verbPres (sapere_81 "sapere") AHabere) ;
MustVV = mkVerbVerbDir (verbPres (dovere_50 "dovere") AHabere) ; ---- MustVV = mkVerbVerbDir (verbPres (dovere_50 "dovere") AHabere) ;
WantVV = mkVerbVerbDir (verbPres (volere_99 "volere") AHabere) ; ---- WantVV = mkVerbVerbDir (verbPres (volere_99 "volere") AHabere) ;
EverywhereNP = ss "dappertutto" ; EverywhereNP = ss ["en todas partes"] ;
SomewhereNP = ss ["qualche parte"] ; --- ne - pas SomewhereNP = ss ["en ninguna parte"] ;
NowhereNP = ss ["nessun parte"] ; NowhereNP = ss ["en alguna parte"] ; ----
AlthoughSubj = ss "benché" ** {m = Con} ; AlthoughSubj = ss "benché" ** {m = Con} ;
AlmostAdv = ss "quasi" ; AlmostAdv = ss "casi" ;
QuiteAdv = ss "assai" ; QuiteAdv = ss "bastante" ;
InPrep = justCase (CPrep P_in) ; InPrep = justPrep "en" ;
OnPrep = justCase (CPrep P_su) ; OnPrep = justPrep "sobre" ; ----
ToPrep = justCase dative ; --- ToPrep = justCase dative ; ---
ThroughPrep = justPrep "per" ; ThroughPrep = justPrep "por" ;
AbovePrep = justPrep "sopra" ; AbovePrep = justPrep "sobre" ;
UnderPrep = justPrep "sotto" ; UnderPrep = justPrep "bajo" ;
InFrontPrep = justPrep "davanti" ; InFrontPrep = {s = "delante" ; c = genitive} ;
BehindPrep = justPrep "dietro" ; BehindPrep = {s = "detrás" ; c = genitive} ;
BetweenPrep = justPrep "tra" ; BetweenPrep = justPrep "entre" ;
FromPrep = justCase (CPrep P_da) ; FromPrep = justCase (CPrep P_de) ;
BeforePrep = justPrep "prima" ; BeforePrep = {s = "antes" ; c = genitive} ;
DuringPrep = justPrep "durante" ; DuringPrep = justPrep "durante" ; ----
AfterPrep = justPrep "dopo" ; AfterPrep = {s = "después" ; c = genitive} ;
WithPrep = justCase (CPrep P_con) ; WithPrep = justPrep "con" ;
WithoutPrep = justPrep "senza" ; WithoutPrep = justPrep "sin" ;
ByMeansPrep = justPrep "per" ; ByMeansPrep = justPrep "por" ;
PossessPrep = justCase genitive ; PossessPrep = justCase genitive ;
PartPrep = justCase genitive ; --- PartPrep = justCase genitive ; ---
AgentPrep = justCase (CPrep P_da) ; AgentPrep = justPrep "por" ;
} }

View File

@@ -1,7 +1,7 @@
--# -path=.:../romance:../../prelude --# -path=.:../romance:../../prelude
instance SyntaxIta of SyntaxRomance = instance SyntaxSpa of SyntaxRomance =
TypesIta ** open Prelude, (CO=Coordination), MorphoIta in { TypesSpa ** open Prelude, (CO=Coordination), MorphoSpa in {
oper oper
nameNounPhrase = \jean -> nameNounPhrase = \jean ->
normalNounPhrase normalNounPhrase
@@ -9,25 +9,25 @@ oper
jean.g jean.g
Sg ; Sg ;
nounPhraseOn = mkNameNounPhrase "si" Masc ; --- can be plural dep. on object nounPhraseOn = mkNameNounPhrase "se" Masc ; --- can be plural dep. on object
partitiveNounPhrase = \n,vino -> partitiveNounPhrase = \n,vino ->
normalNounPhrase normalNounPhrase
(table { (table {
CPrep P_di => elisDe ++ vino.s ! n ; CPrep P_de => elisDe ++ vino.s ! n ;
c => prepCase c ++ artDef vino.g n (CPrep P_di) ++ vino.s ! n c => prepCase c ++ artDef vino.g n (CPrep P_de) ++ vino.s ! n
} }
) )
vino.g vino.g
n ; n ;
chaqueDet = mkDeterminer1 Sg "ogni" ; chaqueDet = mkDeterminer1 Sg "cada" ;
tousDet = mkDeterminer Pl ["tutti i"] ["tutte le"] ; --- gli tousDet = mkDeterminer Pl ["todos los"] ["todas las"] ; --- gli
plupartDet = mkDeterminer1 Pl ["la maggior parte di"] ; --- dei, degli, delle plupartDet = mkDeterminer1 Pl ["la mayor parte de"] ; --- dei, degli, delle
unDet = mkDeterminer Sg artUno artUna ; unDet = mkDeterminer Sg artUno artUna ;
plDet = mkDeterminer1 Pl [] ; --- dei, degli, delle plDet = mkDeterminer1 Pl [] ; --- dei, degli, delle
quelDet = mkDeterminer1 Sg "quale" ; quelDet = mkDeterminer1 Sg "cuál" ; ----
npGenPoss = \n,ton,mec -> npGenPoss = \n,ton,mec ->
\\c => artDef mec.g n c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; --- mia madre \\c => artDef mec.g n c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; --- mia madre
@@ -38,26 +38,26 @@ oper
existNounPhrase = \delvino -> { existNounPhrase = \delvino -> {
s = \\m => s = \\m =>
case m of { case m of {
Ind => case delvino.n of {Sg => "c'è" ; Pl => ["ci sono"]} ; Ind => "hay" ;
Con => case delvino.n of {Sg => ["ci sia"] ; Pl => ["ci siano"]} Con => "haya"
} ++ delvino.s ! stressed accusative --- ce ne sono ; have to define "ci" } ++ delvino.s ! stressed accusative
} ; } ;
mkAdjSolo : Str -> Bool -> Adjective = \adj,p -> mkAdjSolo : Str -> Bool -> Adjective = \adj,p ->
mkAdjective (adjSolo adj) p ; mkAdjective (adjSolo adj) p ;
mkAdjTale : Str -> Bool -> Adjective = \adj,p -> mkAdjUtil : Str -> Str -> Bool -> Adjective = \adj,as,p ->
mkAdjective (adjTale adj) p ; mkAdjective (adjUtil adj as) p ;
mkAdjDegrSolo : Str -> Bool -> AdjDegr = \adj,p -> mkAdjDegrSolo : Str -> Bool -> AdjDegr = \adj,p ->
mkAdjDegrLong (adjSolo adj) p ; mkAdjDegrLong (adjSolo adj) p ;
mkAdjDegrTale : Str -> Bool -> AdjDegr = \adj,p -> mkAdjDegrUtil : Str -> Str -> Bool -> AdjDegr = \adj,as,p ->
mkAdjDegrLong (adjTale adj) p ; mkAdjDegrLong (adjUtil adj as) p ;
comparConj = variants {"di" ; "che"} ; comparConj = "que" ;
-- The commonest case for functions is common noun + "di". -- The commonest case for functions is common noun + "de".
funGen : CommNounPhrase -> Function = \mere -> funGen : CommNounPhrase -> Function = \mere ->
mere ** complementCas genitive ; mere ** complementCas genitive ;
@@ -68,7 +68,7 @@ oper
{s = table { {s = table {
RComplex g n c => variants { RComplex g n c => variants {
case mere.c of { case mere.c of {
CPrep P_di => artDef mere.g n c ++ CPrep P_de => artDef mere.g n c ++
lequel.s ! RSimple dative ++ mere.s ! n ; lequel.s ! RSimple dative ++ mere.s ! n ;
_ => nonExist} ; _ => nonExist} ;
artDef mere.g n c ++ mere.s ! n ++ artDef mere.g n c ++ mere.s ! n ++
@@ -81,9 +81,9 @@ oper
-- Verbs -- Verbs
negVerb = \va -> "non" ++ va ; negVerb = \va -> "no" ++ va ;
copula = \b,w -> let etre = (predVerb verbEssere).s in copula = \b,w -> let etre = (predVerb verbSer).s in
etre ! b ! Masc ! w ; ---- Masc etre ! b ! Masc ! w ; ---- Masc
isClitCase = \c -> case c of { isClitCase = \c -> case c of {
@@ -92,19 +92,18 @@ oper
_ => False _ => False
} ; } ;
auxVerb ve = case ve.aux of { -- Spanish only has one compound auxiliary.
AHabere => verbAvere ;
AEsse => verbEssere auxVerb ve = verbHaber ;
} ;
-- The negation of a verb. -- The negation of a verb.
posNeg = \b,v,c -> posNeg = \b,v,c ->
if_then_else Str b if_then_else Str b
(v ++ c) (v ++ c)
("non" ++ v ++ c) ; ("no" ++ v ++ c) ;
embedConj = "che" ; embedConj = "que" ;
-- Relative pronouns -- Relative pronouns
@@ -135,14 +134,14 @@ oper
} ; } ;
intPronWho = \num -> { intPronWho = \num -> {
s = \\c => prepCase c ++ "chi" ; s = \\c => prepCase c ++ "quién" ;
g = Masc ; --- can we decide this? g = Masc ; --- can we decide this?
n = num n = num
} ; } ;
intPronWhat = \num -> { intPronWhat = \num -> {
s = table { s = table {
c => prepCase c ++ "che" ++ optStr "cosa" c => prepCase c ++ "qué"
} ; } ;
g = Masc ; --- can we decide this? g = Masc ; --- can we decide this?
n = num n = num
@@ -153,14 +152,14 @@ oper
questVerbPhrase = \jean,dort -> questVerbPhrase = \jean,dort ->
{s = table { {s = table {
DirQ => (predVerbPhrase jean dort).s ! Ind ; DirQ => (predVerbPhrase jean dort).s ! Ind ;
IndirQ => "se" ++ (predVerbPhrase jean dort).s ! Ind IndirQ => "si" ++ (predVerbPhrase jean dort).s ! Ind
} }
} ; } ;
existNounPhraseQuest = \delvino -> existNounPhraseQuest = \delvino ->
let cedelvino = (existNounPhrase delvino).s ! Ind let cedelvino = (existNounPhrase delvino).s ! Ind
in { in {
s = \\m => case m of {DirQ => [] ; _ => "se"} ++ cedelvino s = \\m => case m of {DirQ => [] ; _ => "si"} ++ cedelvino
} ; } ;
intVerbPhrase = \qui, dormir -> intVerbPhrase = \qui, dormir ->
@@ -175,19 +174,10 @@ oper
let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in
{s = table { {s = table {
DirQ => qui ++ tuvois ; DirQ => qui ++ tuvois ;
IndirQ => ifCe Tuvois.c ++ qui ++ tuvois IndirQ => qui ++ tuvois
} }
} ; } ;
-- An auxiliary to distinguish between
-- "je ne sais pas" ("ce qui dort" / "ce que tu veux" / "à qui tu penses").
ifCe : Case -> Str = \c -> case c of { ---
Nom => "ciò" ;
Acc => "ciò" ;
_ => []
} ;
questAdverbial = \quand, jean, dort -> questAdverbial = \quand, jean, dort ->
let {jeandort = (predVerbPhrase jean dort).s ! Ind} in let {jeandort = (predVerbPhrase jean dort).s ! Ind} in
{s = table { {s = table {
@@ -204,8 +194,8 @@ oper
genForms = \matto, matta -> genForms = \matto, matta ->
table {Masc => matto ; Fem => matta} ; table {Masc => matto ; Fem => matta} ;
artUno : Str = elision "un" "un" "uno" ; artUno : Str = "un" ;
artUna : Str = elision "una" "un'" "una" ; artUna : Str = "una" ;
artIndef = \g,n,c -> case n of { artIndef = \g,n,c -> case n of {
Sg => prepCase c ++ genForms artUno artUna ! g ; Sg => prepCase c ++ genForms artUno artUna ! g ;
@@ -221,11 +211,11 @@ oper
artDef g n c ++ qualPron g n ; artDef g n c ++ qualPron g n ;
pronJe = mkPronoun pronJe = mkPronoun
"io" --- (variants {"io" ; []}) etc "yo" --- (variants {"yo" ; []}) etc
"mi"
"mi"
"me" "me"
"mio" "mia" "miei" "mie" "me"
"mí"
"mi" "mi" "mis" "mis"
PNoGen -- gender cannot be known from pronoun alone PNoGen -- gender cannot be known from pronoun alone
Sg Sg
P1 P1
@@ -233,86 +223,84 @@ oper
pronTu = mkPronoun pronTu = mkPronoun
"tu" "tu"
"ti"
"ti"
"te" "te"
"tuo" "tua" "tuoi" "tue" "te"
"tí"
"tu" "tu" "tus" "tus"
PNoGen PNoGen
Sg Sg
P2 P2
Clit1 ; Clit1 ;
pronIl = mkPronoun pronIl = mkPronoun
"lui" "el"
"lo" "lo"
"gli" "le"
"lui" "él"
"suo" "sua" "suoi" "sue" "su" "su" "sus" "sus"
(PGen Masc) (PGen Masc)
Sg Sg
P3 P3
Clit2 ; Clit2 ;
pronElle = mkPronoun pronElle = mkPronoun
"lei" "ella"
"la" "la"
"le" "le"
"lei" "ella"
"suo" "sua" "suoi" "sue" "su" "su" "sus" "sus"
(PGen Fem) (PGen Fem)
Sg Sg
P3 P3
Clit2 ; Clit2 ;
pronNous = mkPronoun pronNous = mkPronoun
"noi" "nosotros" ---- nosotras
"ci" "nos"
"ci" "nos"
"noi" "nosotros"
"nostro" "nostra" "nostri" "nostre" "nuestro" "nuestra" "nuestros" "nuestras"
PNoGen (PGen Masc)
Pl Pl
P1 P1
Clit3 ; Clit3 ;
pronVous = mkPronoun pronVous = mkPronoun
"voi" "vosotros" ---- vosotras
"vi" "vos"
"vi" "vos"
"voi" "vosotros"
"vostro" "vostra" "vostri" "vostre" "vuestro" "vuestra" "vuestros" "vuestras"
PNoGen (PGen Masc)
Pl --- depends! Pl
P2 P2
Clit3 ; Clit3 ;
pronIls = mkPronoun pronIls = mkPronoun
"loro" "ellos" ---- ellas
"loro" "los"
"li" --- le ! "les"
"loro" "ellos"
"loro" "loro" "loro" "loro" "su" "su" "sus" "sus"
PNoGen PNoGen
Pl Pl
P3 P3
Clit1 ; Clit1 ;
-- moved from ResIta commentAdv = ss "como" ;
quandAdv = ss "cuando" ;
commentAdv = ss "comme" ;
quandAdv = ss "quando" ;
ouAdv = ss "o" ; ouAdv = ss "o" ;
pourquoiAdv = ss "perché" ; pourquoiAdv = ss "porqué" ;
etConj = ss "e" ** {n = Pl} ; etConj = ss "y" ** {n = Pl} ;
ouConj = ss "o" ** {n = Sg} ; ouConj = ss "o" ** {n = Sg} ;
etetConj = sd2 "e" "e" ** {n = Pl} ; etetConj = sd2 "y" "y" ** {n = Pl} ;
ououConj = sd2 "o" "o" ** {n = Sg} ; ououConj = sd2 "o" "o" ** {n = Sg} ;
niniConj = sd2 "né" "né" ** {n = Sg} ; --- requires ne ! niniConj = sd2 "no" "ni" ** {n = Sg} ; ----
siSubj = ss "se" ** {m = Ind} ; siSubj = ss "si" ** {m = Ind} ;
quandSubj = ss "quando" ** {m = Ind} ; quandSubj = ss "cuando" ** {m = Ind} ;
ouiPhr = ss ["Sì ."] ; ouiPhr = ss ["Sí ."] ;
nonPhr = ss ["No ."] ; nonPhr = ss ["No ."] ;
} }

View File

@@ -1,48 +1,47 @@
--# -path=.:../romance:../abstract:../../prelude --# -path=.:../romance:../abstract:../../prelude
concrete TestResourceIta of TestResource = concrete TestResourceSpa of TestResource =
RulesIta, StructuralIta ** open Prelude, TypesIta, MorphoIta, SyntaxIta in { RulesSpa, StructuralSpa ** open Prelude, TypesSpa, MorphoSpa, SyntaxSpa in {
flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
lin lin
Big = mkAdjDegrTale "grande" adjPre ; Big = mkAdjDegrUtil "grande" "grandes"adjPre ;
Small = mkAdjDegrSolo "piccolo" adjPre ; Small = mkAdjDegrSolo "pequeño" adjPre ;
Old = mkAdjDegrLong (mkAdj "vecchio" "vecchia" "vecchi" "vecchie" "vecchiamente") Old = mkAdjDegrSolo "viejo" adjPre ;
adjPre ; Young = mkAdjDegrUtil "joven" "jovenes"adjPre ;
Young = mkAdjDegrTale "giovane" adjPre ; Happy = mkAdjDegrUtil "feliz" "felices" adjPost ;
Happy = mkAdjDegrTale "felice" adjPost ;
American = mkAdjective (adjSolo "americano") adjPost ; American = mkAdjective (adjSolo "americano") adjPost ;
Finnish = mkAdjective (adjTale "finlandese") adjPost ; Finnish = mkAdjective (adjUtil "finlandes" "finlandeses") adjPost ;
Married = mkAdjCompl (adjSolo "sposato") adjPost {s2 = [] ; c = dative} ; Married = mkAdjCompl (adjSolo "casado") adjPost {s2 = "con" ; c = accusative} ;
Man = mkCNom (numForms "uomo" "uomini") Masc ; Man = mkCNom (nomVino "hombre") Masc ;
Woman = mkCNom (nomRana "donna") Fem ; Woman = mkCNom (nomPilar "mujer") Fem ;
Car = mkCNom (nomRana "macchina") Fem ; Car = mkCNom (nomVino "coche") Masc ;
Light = mkCNom (nomSale "luce") Fem ; Light = mkCNom (nomPilar "luz") Fem ;
House = mkCNom (nomRana "casa") Fem ; House = mkCNom (nomVino "casa") Fem ;
Wine = mkCNom (nomVino "vino") Masc ; Wine = mkCNom (nomVino "vino") Masc ;
Bottle = mkCNom (nomRana "bottiglia") Fem ; Bottle = mkCNom (nomVino "botella") Fem ;
Bar = mkCNom (nomTram "bar") Masc ; Bar = mkCNom (nomTram "bar") Masc ;
Walk = verbPres (amare_7 "camminare") AHabere ; Walk = verbPres (zurrar_3 "pasear") AHabere ;
Run = (verbPres (correre_41 "correre") AHabere) ; ---- Run = (verbPres (correre_41 "correre") AHabere) ;
Send = mkTransVerbDir (verbPres (amare_7 "mandare") AHabere) ; Send = mkTransVerbDir (verbPres (zurrar_3 "mandar") AHabere) ;
Love = mkTransVerbDir (verbPres (amare_7 "amare") AHabere) ; Love = mkTransVerbDir (verbPres (zurrar_3 "amar") AHabere) ;
Wait = mkTransVerbCas (verbPres (amare_7 "aspettare") AHabere) dative ; Wait = mkTransVerbCas (verbPres (zurrar_3 "esperar") AHabere) dative ;
Drink = mkTransVerbDir (verbPres (bere_29 "bere") AHabere) ; ---- Drink = mkTransVerbDir (verbPres (bere_29 "bere") AHabere) ;
Give = mkDitransVerb (verbPres (dare_17 "dare") AHabere) [] dative [] accusative ; ---- Give = mkDitransVerb (verbPres (dare_17 "dare") AHabere) [] dative [] accusative ;
Prefer = mkDitransVerb (verbPres (finire_103 "preferire") AHabere) [] accusative [] dative ; Prefer = mkDitransVerb (verbPres (zurrir_5 "preferir") AHabere) [] accusative [] dative ;
Say = verbSent (verbPres (dire_44 "dire") AHabere) Ind Ind ; ---- Say = verbSent (verbPres (dire_44 "dire") AHabere) Ind Ind ;
Prove = verbSent (verbPres (amare_7 "dimostrare") AHabere) Ind Ind ; Prove = verbSent (verbPres (zurrar_3 "demonstrar") AHabere) Ind Ind ;
SwitchOn = mkTransVerbDir (verbPres (amare_7 "allumare") AHabere) ; ---- SwitchOn = mkTransVerbDir (verbPres (zurrar_3 "encender") AHabere) ;
SwitchOff = mkTransVerbDir (verbPres (spegnere_89 "spegnere") AHabere) ; SwitchOff = mkTransVerbDir (verbPres (zurrar_3 "apagar") AHabere) ;
Mother = funGen (mkCNom (nomSale "madre") Fem) ; Mother = funGen (mkCNom (nomVino "madre") Fem) ;
Uncle = funGen (mkCNom (nomVino "zio") Masc) ; Uncle = funGen (mkCNom (nomVino "zio") Masc) ;
Connection = mkCNom (nomSale "connessione") Fem ** Connection = mkCNom (nomPilar "connexión") Fem **
{s2 = [] ; c = CPrep P_da ; s3 = [] ; c3 = dative} ; {s2 = [] ; c = CPrep P_de ; s3 = [] ; c3 = dative} ;
Well = ss "bene" ; Well = ss "bien" ;
Always = ss "sempre" ; Always = ss "siempre" ;
John = mkProperName "Giovanni" Masc ; John = mkProperName "Juan" Masc ;
Mary = mkProperName "Maria" Fem ; Mary = mkProperName "Maria" Fem ;
} }

View File

@@ -36,6 +36,8 @@ oper
P_a => "a" P_a => "a"
} ; } ;
prepositional = accusative ;
oper oper
CaseA = Case ; CaseA = Case ;
NPFormA = NPForm ; NPFormA = NPForm ;