resource = resource-1.0

This commit is contained in:
aarne
2006-06-22 22:25:55 +00:00
parent 7e5584b1ab
commit 251bc4c738
881 changed files with 31130 additions and 31130 deletions

View File

@@ -0,0 +1,2 @@
concrete AdjectiveIta of Adjective = CatIta ** AdjectiveRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,2 @@
concrete AdverbIta of Adverb = CatIta ** AdverbRomance with
(ResRomance = ResIta) ;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete CatIta of Cat = CommonX - [Tense,TPres,TPast,TFut,TCond] ** CatRomance with
(ResRomance = ResIta) ;

View File

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

View File

@@ -1,4 +0,0 @@
--# -path=.:../romance:../abstract:../../prelude
concrete ClauseIta of Clause = CategoriesIta **
ClauseRomance with (SyntaxRomance=SyntaxIta) ;

View File

@@ -0,0 +1,2 @@
concrete ConjunctionIta of Conjunction = CatIta ** ConjunctionRomance with
(ResRomance = ResIta) ;

View File

@@ -1,25 +0,0 @@
concrete CountryIta of Country = open CategoriesIta, ParadigmsIta in {
lincat
Country = PN ;
Nationality = A ;
Language = N ;
lin
Denmark = mkPN "Danimarca" feminine ;
England = mkPN "Inghilterra" feminine ;
Finland = mkPN "Finlandia" feminine ;
France = mkPN "Francia" feminine ;
Germany = mkPN "Germania" feminine ;
Italy = mkPN "Italia" feminine ;
Norway = mkPN "Norvegia" feminine ;
Russia = mkPN "Russia" feminine ;
Spain = mkPN "Spagna" feminine ;
Sweden = mkPN "Svezia" feminine ;
Danish = regA "danese" ;
English = regA "inglese" ;
DanishLang = regN "danese" ;
EnglishLang = regN "inglese" ;
} ;

View File

@@ -0,0 +1,196 @@
--# -path=.:../romance:../abstract:../common:prelude
instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelude in {
flags optimize=all ;
param
Prep = P_di | P_a | P_da | P_in | P_su | P_con ;
VType = VHabere | VEsse | VRefl ;
oper
dative : Case = CPrep P_a ;
genitive : Case = CPrep P_di ;
prepCase = \c -> case c of {
Nom | Acc => [] ;
CPrep p => case p of {
P_di => "di" ;
P_a => "a" ;
P_da => "da" ;
P_in => "in" ;
P_su => "su" ;
P_con => "con"
}
} ;
artDef : Gender -> Number -> Case -> Str = \g,n,c ->
case <g,n,c> of {
<_, _, CPrep P_di> => prepArt "de" ;
<_, _, CPrep P_da> => prepArt "da" ;
<_, _, CPrep P_a> => prepArt "a" ;
<_, _, CPrep P_in> => prepArt "ne" ;
<_, _, CPrep P_su> => prepArt "su" ;
<_, _, CPrep P_con> => prepArt "co" ;
<Masc,Sg, Nom| Acc> => elision "il" "l'" "lo" ;
<Fem ,Sg, _> => elision "la" "l'" "la" ;
<Masc,Pl, _> => elision "i" "gli" "gli" ;
<Fem ,Pl, _> => "le"
}
where {
prepArt : Tok -> Tok = \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"
}
} ;
-- In these two, "de de/du/des" becomes "de".
artIndef = \g,n,c -> case <n,c> of {
<Sg,_> => prepCase c ++
genForms (elision "un" "un" "uno") (elision "una" "un'" "una") ! g ;
_ => prepCase c
} ;
possCase = artDef ;
partitive = \g,c -> case c of {
CPrep P_di => "di" ;
_ => prepCase c ++ artDef g Sg (CPrep P_di)
} ;
conjunctCase : NPForm -> NPForm = \c -> case c of {
Ton Nom | Aton Nom => Ton Nom ;
_ => Ton Acc
} ;
auxVerb : VType -> (VF => Str) = \vtyp -> case vtyp of {
VHabere => avere_V.s ;
_ => copula.s
} ;
partAgr : VType -> VPAgr = \vtyp -> case vtyp of {
VHabere => vpAgrNone ;
_ => VPAgrSubj
} ;
vpAgrClit : Agr -> VPAgr = \a ->
VPAgrClit (aagr a.g a.n) ; --- subty
pronArg = \n,p,acc,dat ->
let
pacc = case acc of { --- only accusative refl handled
CRefl => case p of {
P3 => "si" ;
_ => argPron Fem n p Acc False --- no clitic after acc
} ;
CPron a => argPron a.g a.n a.p Acc False ;
_ => []
} ;
hasAcc = case acc of {
CNone => False ;
_ => True
} ;
hasDat = case dat of {
CNone => False ;
_ => True
} ;
pdat = case dat of {
CPron a => argPron a.g a.n a.p dative hasAcc ;
_ => []
} ;
in
<pdat ++ pacc, [], orB hasAcc hasDat> ;
mkImperative p vp = {
s = \\pol,aag =>
let
agr = aag ** {p = p} ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
verb = case <aag.n, pol> of {
<Sg,Neg> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
_ => (vp.s ! VPImperat).fin ! agr
} ;
neg = vp.neg ! pol ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
} ;
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"non",[]>
} ;
conjThan = "che" ; --- di
conjThat = "che" ;
clitInf b cli inf = inf ++ bindIf b ++ cli ;
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
case c of {
Nom | Acc => "che" ;
CPrep P_di => "cui" ;
_ => prepCase c ++ "cui" --- ilquale
} ;
pronSuch : AAgr => Str = aagrForms "tale" "tale" "tali" "tali" ;
quelPron : AAgr => Str = aagrForms "quale" "quale" "quali" "quali" ;
partQIndir = "ciò" ;
reflPron : Number -> Person -> Case -> Str =
let
cases : (x,y : Str) -> (Case -> Str) = \me,moi,c -> case c of {
Acc | CPrep P_a => me ;
_ => moi
} ;
in
\n,p -> case <n,p> of {
<Sg,P1> => cases "mi" "me" ;
<Sg,P2> => cases "ti" "te" ;
<Pl,P1> => cases "ci" "noi" ; -- unlike French with just one alt!
<Pl,P2> => cases "vi" "voi" ;
_ => cases "si" "se"
} ;
argPron : Gender -> Number -> Person -> Case -> Bool -> Str =
let
cases : (x,y,z : Str) -> Case -> Bool -> Str =
\ci,ce,noi,c,isPre -> case c of {
Acc | CPrep P_a => if_then_Str isPre ce ci ;
_ => noi
} ;
cases4 : (x,y,z,u : Str) -> Case -> Bool -> Str =
\lo,gli,glie,lui,c,isPre -> case c of {
Acc => lo ;
CPrep P_a => if_then_Str isPre glie gli ;
_ => lui
} ;
in
\g,n,p -> case <g,n,p> of {
<_,Sg,P1> => cases "mi" "me" "me" ;
<_,Sg,P2> => cases "ti" "te" "te" ;
<_,Pl,P1> => cases "ci" "ce" "noi" ; -- unlike French with just one alt!
<_,Pl,P2> => cases "vi" "ve" "voi" ;
<Masc,Sg,P3> => cases4 "lo" "gli" "glie" "lui" ;
<Fem, Sg,P3> => cases4 "la" "le" "glie" "lei" ;
<_, Pl,P3> => cases4 "li" "li" "glie" "loro"
} ;
vRefl : VType = VRefl ;
isVRefl : VType -> Bool = \ty -> case ty of {
VRefl => True ;
_ => False
} ;
auxPassive : Verb = venire_V ;
copula = verbBesch (essere_1 "essere") ** {vtyp = VEsse} ;
avere_V = verbBesch (avere_2 "avere") ** {vtyp = VHabere} ;
venire_V = verbBesch (venire_110 "venire") ** {vtyp = VEsse} ;
}

View File

@@ -0,0 +1,39 @@
concrete ExtraIta of ExtraItaAbs = ExtraRomanceIta **
open CommonRomance, ParadigmsIta, PhonoIta, MorphoIta, ParamX, ResIta in {
lin
i8fem_Pron = mkPronoun
"io" "mi" "mi" "me" "me" "mio" "mia" "miei" "mie"
Fem Sg P1 ;
these8fem_NP = mkNP ["queste"] Fem Pl ;
they8fem_Pron = mkPronoun
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
Fem Pl P3 ;
this8fem_NP = pn2np (mkPN ["questa"] Fem) ;
those8fem_NP = mkNP ["quelle"] Fem Pl ;
we8fem_Pron =
mkPronoun "noi" "ci" "ci" "ce" "noi" "nostro" "nostra" "nostri" "nostre"
Fem Pl P1 ;
whoPl8fem_IP = {s = \\c => prepCase c ++ "chi" ; a = aagr Fem Pl} ;
whoSg8fem_IP = {s = \\c => prepCase c ++ "chi" ; a = aagr Fem Sg} ;
youSg8fem_Pron = mkPronoun
"tu" "ti" "ti" "te" "te" "tuo" "tua" "tuoi" "tue"
Fem Sg P2 ;
youPl8fem_Pron =
mkPronoun
"voi" "vi" "vi" "ve" "voi" "vostro" "vostra" "vostri" "vostre"
Fem Pl P2 ;
youPol8fem_Pron =
mkPronoun
"Lei" "La" "Le" "Glie" "Lei" "Suo" "Sua" "Suoi" "Sue"
Fem Sg P3 ;
youPolPl_Pron = mkPronoun
"Loro" "Loro" "Li" "Glie" "Loro" "Loro" "Loro" "Loro" "Loro"
Masc Pl P3 ;
youPolPl8fem_Pron = mkPronoun
"Loro" "Loro" "Li" "Glie" "Loro" "Loro" "Loro" "Loro" "Loro"
Fem Pl P3 ;
}

View File

@@ -0,0 +1,28 @@
-- Structures special for Italian. These are not implemented in other
-- Romance languages.
abstract ExtraItaAbs = ExtraRomanceAbs ** {
fun
-- Feminine variants of pronouns (those in $Structural$ are
-- masculine, which is the default when gender is unknown).
i8fem_Pron : Pron ;
these8fem_NP : NP ;
they8fem_Pron : Pron ;
this8fem_NP : NP ;
those8fem_NP : NP ;
we8fem_Pron : Pron ;
whoPl8fem_IP : IP ;
whoSg8fem_IP : IP ;
youSg8fem_Pron : Pron ;
youPl8fem_Pron : Pron ;
youPol8fem_Pron : Pron ; -- Lei
youPolPl_Pron : Pron ; -- Loro
youPolPl8fem_Pron : Pron ;
}

View File

@@ -0,0 +1,2 @@
concrete ExtraRomanceIta of ExtraRomanceAbs = CatIta ** ExtraRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,22 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete GrammarIta of Grammar =
NounIta,
VerbIta,
AdjectiveIta,
AdverbIta,
NumeralIta,
SentenceIta,
QuestionIta,
RelativeIta,
ConjunctionIta,
PhraseIta,
TextX - [Tense,TPres,TPast,TFut,TCond],
IdiomIta,
StructuralIta
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,48 @@
concrete IdiomIta of Idiom = CatIta **
open (P = ParamX), PhonoIta, MorphoIta, BeschIta, ParadigmsIta, Prelude in {
flags optimize=all_subs ;
lin
ImpersCl vp = mkClause [] (agrP3 Masc Sg) vp ;
GenericCl vp = mkClause "si" (agrP3 Masc Sg) vp ; ---- non se ci fanno cose
CleftNP np rs = mkClause [] (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ;
CleftAdv ad s = mkClause [] (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
(insertComplement (\\_ => ad.s) (predV copula))) ;
ExistNP np =
mkClause [] (agrP3 np.a.g np.a.n)
(insertClit2 (elision "ci" "c'" "ci")
(insertComplement (\\_ => np.s ! Ton Nom)
(predV copula))) ;
ExistIP ip = {
s = \\t,a,p,_ =>
ip.s ! Nom ++
(mkClause [] (agrP3 ip.a.g ip.a.n)
(insertClit2 (elision "ci" "c'" "ci")
(predV copula))).s ! t ! a ! p ! Indic
} ;
ProgrVP vp =
insertComplement
(\\agr =>
let
clpr = 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
)
(predV (essereV (verboV (stare_16 "stare")))) ;
ImpPl1 vp = {s =
(mkImperative P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
} ;
}

View File

@@ -0,0 +1,7 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete Italian of ItalianAbs =
LangIta,
-- IrregIta,
ExtraIta
** {} ;

View File

@@ -0,0 +1,5 @@
abstract ItalianAbs =
Lang,
-- IrregItaAbs,
ExtraItaAbs
** {} ;

View File

@@ -1,23 +1,10 @@
--# -path=.:../romance:../abstract:../../prelude
--# -path=.:../romance:../abstract:../common:prelude
concrete LangIta of Lang =
RulesIta,
ClauseIta,
StructuralIta,
BasicIta,
TimeIta,
CountryIta,
MathIta
GrammarIta,
LexiconIta
** {
** open Prelude, ParadigmsIta in {
flags startcat = Phr ; unlexer = text ; lexer = text ;
lin
AdvDate d = prefixSS "il" d ;
AdvTime t = prefixSS "alle" t ;
NWeekday w = w ;
PNWeekday w = mkPN (w.s ! singular) w.g ;
PNCountry x = x ;
ANationality x = x ;
NLanguage x = x ;
}
} ;

View File

@@ -1,9 +1,9 @@
--# -path=.:../romance:../abstract:../../prelude
--# -path=.:../romance:../common:../abstract:../../prelude
concrete BasicIta of Basic = CategoriesIta ** open ParadigmsIta, BeschIta in {
concrete LexiconIta of Lexicon = CatIta ** open
MorphoIta, ParadigmsIta, BeschIta in {
flags
startcat=Phr ; lexer=textlit ; unlexer=text ;
optimize=values ;
lin
@@ -14,17 +14,17 @@ lin
art_N = femN (regN "arte") ;
ask_V2Q = mkV2Q (verboV (rispondere_76 "chiedere")) dative ;
baby_N = regN "bambino" ;
bad_ADeg = prefADeg (mkADeg (regA "cattivo") (regA "peggio")) ;
bad_A = prefA (mkADeg (regA "cattivo") (regA "peggio")) ;
bank_N = regN "banca" ;
beautiful_ADeg = prefADeg (regADeg "bello") ;
beautiful_A = prefA (regADeg "bello") ;
become_VA = essereV (regV "diventare") ;
beer_N = regN "birra" ;
beg_V2V = mkV2V (regV "pregare") accusative dative ;
big_ADeg = prefADeg (regADeg "grande") ;
big_A = prefA (regADeg "grande") ;
bike_N = regN "bicicletta" ;
bird_N = regN "uccello" ;
black_ADeg = regADeg "nero" ;
blue_ADeg = regADeg "blù" ;
black_A = regADeg "nero" ;
blue_A = mkA "blù" "blù" "blù" "blù" "blumente" ;
boat_N = regN "batello" ;
book_N = regN "libro" ;
boot_N = regN "stivale" ;
@@ -32,9 +32,9 @@ lin
boy_N = regN "ragazzo" ;
bread_N = regN "pane" ;
break_V2 = dirV2 (verboV (rompere_77 "rompere")) ;
broad_ADeg = regADeg "largo" ;
broad_A = regADeg "largo" ;
brother_N2 = diN2 (regN "fratello") ;
brown_ADeg = regADeg "marrone" ;
brown_A = regADeg "marrone" ;
butter_N = regN "burro" ;
buy_V2 = dirV2 (regV "comprare") ;
camera_N = mkN ["macchina fotografica"]["macchine fotografiche"] feminine ; ---
@@ -48,18 +48,18 @@ lin
child_N = regN "bambino" ;
church_N = regN "chiesa" ;
city_N = regN "città" ;
clean_ADeg = regADeg "proprio" ;
clever_ADeg = regADeg "saggio" ;
clean_A = regADeg "proprio" ;
clever_A = regADeg "saggio" ;
close_V2 = dirV2 (verboV (chiudere_30 "chiudere")) ;
coat_N = regN "cappotto" ;
cold_ADeg = regADeg "freddo" ;
cold_A = regADeg "freddo" ;
come_V = essereV (verboV (venire_110 "venire")) ;
computer_N = regN "computer" ;
country_N = regN "paese" ;
cousin_N = regN "cugino" ; --- cousine
cow_N = regN "vacca" ;
die_V = verboV (morire_105 "morire") ;
dirty_ADeg = regADeg "sporco" ;
dirty_A = regADeg "sporco" ;
distance_N3 = mkN3 (regN "distanza") genitive dative ;
doctor_N = mkN "medico" "medici" masculine ;
dog_N = regN "cane" ;
@@ -67,7 +67,7 @@ lin
drink_V2 = dirV2 (verboV (bere_27 "bere")) ;
easy_A2V = mkA2V (regA "facile") dative genitive ;
eat_V2 = dirV2 (regV "mangiare") ;
empty_ADeg = regADeg "vuoto" ;
empty_A = regADeg "vuoto" ;
enemy_N = regN "nemico" ;
factory_N = regN "stabilimento" ;
father_N2 = diN2 (regN "padre") ;
@@ -84,10 +84,10 @@ lin
girl_N = regN "ragazza" ;
glove_N = regN "guanto" ;
gold_N = regN "oro" ;
good_ADeg = prefADeg (mkADeg (regA "buono")
good_A = prefA (mkADeg (regA "buono")
(mkA "migliore" "migliore" "migliori" "migliori" "meglio")) ;
go_V = essereV (verboV (andare_14 "andare")) ;
green_ADeg = regADeg "verde" ;
green_A = regADeg "verde" ;
harbour_N = regN "porto" ;
hate_V2 = dirV2 (regV "odiare") ;
hat_N = regN "capello" ;
@@ -96,9 +96,9 @@ lin
hill_N = regN "collina" ;
hope_VS = mkVS (regV "sperare") ;
horse_N = regN "cavallo" ;
hot_ADeg = regADeg "caldo" ;
hot_A = regADeg "caldo" ;
house_N = regN "casa" ;
important_ADeg = regADeg "importante" ;
important_A = regADeg "importante" ;
industry_N = regN "industria" ;
iron_N = regN "ferro" ;
king_N = regN "ré" ;
@@ -111,11 +111,11 @@ lin
like_V2 = dirV2 (regV "amare") ;
listen_V2 = dirV2 (regV "ascoltare") ;
live_V = verboV (vivere_95 "vivere") ;
long_ADeg = regADeg "lungo" ;
long_A = regADeg "lungo" ;
lose_V2 = dirV2 (verboV (perdere_62 "perdere")) ;
love_N = regN "amore" ;
love_V2 = dirV2 (regV "amare") ;
man_N = regN "uomo" ;
man_N = mkN "uomo" "uomini" masculine ;
married_A2 = mkA2 (regA "sposato") dative ;
meat_N = femN (regN "carne") ;
milk_N = regN "latte" ;
@@ -123,14 +123,16 @@ lin
mother_N2 = diN2 (femN (regN "madre")) ;
mountain_N = regN "montagna" ;
music_N = regN "musica" ;
narrow_ADeg = regADeg "stretto" ;
new_ADeg = prefADeg (regADeg "nuovo") ;
narrow_A = regADeg "stretto" ;
new_A = prefA (regADeg "nuovo") ;
newspaper_N = regN "giornale" ;
oil_N = regN "olio" ;
old_ADeg = prefADeg (regADeg "vecchio") ;
old_A = prefA (regADeg "vecchio") ;
open_V2 = dirV2 (verboV (aprire_102 "aprire")) ;
paint_V2A = mkV2A (verboV (cingere_31 "pingere")) accusative ;
paint_V2A =
mkV2A (verboV (cingere_31 "pingere")) accusative (mkPrep "in") ; ----
paper_N = regN "carta" ;
paris_PN = mkPN "Parigi" masculine ;
peace_N = femN (regN "pace") ;
pen_N = regN "penna" ;
planet_N = regN "pianeta" ;
@@ -143,7 +145,7 @@ lin
radio_N = mkN "radio" "radio" feminine ;
rain_V0 = mkV0 (verboV (piovere_66 "piovere")) ;
read_V2 = dirV2 (verboV (leggere_56 "leggere")) ;
red_ADeg = regADeg "rosso" ;
red_A = regADeg "rosso" ;
religion_N = femN (regN "religione") ;
restaurant_N = regN "ristorante" ;
river_N = regN "fiume" ;
@@ -164,11 +166,11 @@ lin
shirt_N = regN "camicia" ;
shoe_N = regN "scarpa" ;
shop_N = regN "magazzino" ;
short_ADeg = regADeg "corto" ; --- breve
short_A = regADeg "corto" ; --- breve
silver_N = regN "argento" ;
sister_N = regN "sorella" ;
sleep_V = verboV (dormire_99b "dormire") ;
small_ADeg = prefADeg (regADeg "piccolo") ;
small_A = prefA (regADeg "piccolo") ;
snake_N = regN "serpente" ;
sock_N = regN "calza" ;
speak_V2 = dirV2 (regV "parlare") ;
@@ -177,7 +179,7 @@ lin
stone_N = regN "sasso" ;
stove_N = regN "forno" ;
student_N = regN "studente" ;
stupid_ADeg = regADeg "stupido" ;
stupid_A = regADeg "stupido" ;
sun_N = regN "sole" ;
switch8off_V2 = dirV2 (verboV (cingere_31 "spingere")) ;
switch8on_V2 = dirV2 (regV "allumare") ; ----
@@ -186,32 +188,32 @@ lin
teacher_N = regN "professore" ;
teach_V2 = dirV2 (regV "insegnare") ;
television_N = femN (regN "televisione") ;
thick_ADeg = regADeg "grosso" ;
thin_ADeg = regADeg "sottile" ;
thick_A = regADeg "grosso" ;
thin_A = regADeg "sottile" ;
train_N = regN "treno" ;
travel_V = regV "viaggare" ;
tree_N = regN "albero" ;
--- trousers_N = regN "pantalon" ;
ugly_ADeg = regADeg "brutto" ;
ugly_A = regADeg "brutto" ;
understand_V2 = dirV2 (regV "capire") ;
university_N = regN "università" ;
village_N = regN "paese" ;
wait_V2 = mkV2 (regV "aspettare") dative ;
walk_V = regV "camminare" ;
warm_ADeg = regADeg "caldo" ;
warm_A = regADeg "caldo" ;
war_N = regN "guerra" ;
watch_V2 = dirV2 (regV "guardare") ;
water_N = regN "acqua" ;
white_ADeg = compADeg (regA "bianco") ;
white_A = compADeg (regA "bianco") ;
window_N = regN "finestra" ;
wine_N = regN "vino" ;
win_V2 = dirV2 (verboV (vincere_94 "vincere")) ;
woman_N = regN "donna" ;
wonder_VQ = mkVQ (regV "domandare") ; ---- domandarsi
wonder_VQ = mkVQ (reflV (regV "domandare")) ;
wood_N = regN "legno" ;
write_V2 = dirV2 (verboV (scrivere_82 "scrivere")) ;
yellow_ADeg = regADeg "giallo" ;
young_ADeg = prefADeg (regADeg "giovane") ;
yellow_A = regADeg "giallo" ;
young_A = prefA (regADeg "giovane") ;
do_V2 = dirV2 (verboV (fare_52 "fare")) ;
now_Adv = mkAdv "adesso" ;
@@ -220,12 +222,137 @@ lin
add_V3 = dirV3 (verboV (giungere_55 "aggiungere")) dative ;
number_N = regN "numero" ;
put_V2 = dirV2 (verboV (mettere_57 "mettere")) ;
stop_V = regV "fermare" ; ---- fermarsi
stop_V = reflV (regV "fermare") ;
jump_V = regV "saltare" ;
here_Adv = mkAdv "quì" ;
here7to_Adv = mkAdv "quì" ;
here7from_Adv = mkAdv ["da quì"] ;
there_Adv = mkAdv "lì" ;
there7to_Adv = mkAdv "lì" ;
there7from_Adv = mkAdv ["da lì"] ;
left_Ord = mkOrd (regA "sinistro") ;
right_Ord = mkOrd (regA "destro") ;
far_Adv = mkAdv "lontano" ;
correct_A = regA "corretto" ;
dry_A = regA "secco" ;
dull_A = regA "noioso" ;
full_A = regA "pieno" ;
heavy_A = regA "pesante" ;
near_A = regA "vicino" ;
rotten_A = regA "marcio" ;
round_A = regA "rotondo" ;
sharp_A = regA "aguzzo" ;
smooth_A = regA "liscio" ;
straight_A = regA "diretto" ;
wet_A = regA "bagnato" ;
wide_A = regA "largo" ;
animal_N = regN "animale" ;
ashes_N = regN "cenere" ;
back_N = regN "schiena" ;
bark_N = regN "corteccia" ;
belly_N = regN "pancia" ;
blood_N = regN "sangue" ;
bone_N = regN "osso" ;
breast_N = regN "seno" ;
cloud_N = regN "nuvola" ;
day_N = regN "giorno" ;
dust_N = regN "polvere" ;
ear_N = regN "orecchio" ;
earth_N = regN "terra" ;
egg_N = mkN "uovo" "uova" masculine ; -- fem in Pl
eye_N = regN "occhio" ;
fat_N = regN "grasso" ;
feather_N = regN "piuma" ;
fingernail_N = regN "unghia" ;
fire_N = regN "fuoco" ;
flower_N = regN "fiore" ;
fog_N = regN "nebbia" ;
foot_N = regN "piede" ;
forest_N = regN "bosco" ;
grass_N = regN "erba" ;
guts_N = regN "intestino" ;
hair_N = regN "capello" ;
hand_N = femN (regN "mano") ;
head_N = regN "testa" ;
heart_N = regN "cuore" ;
horn_N = regN "corno" ;
husband_N = regN "marito" ;
ice_N = regN "ghiaccio" ;
knee_N = regN "ginocchio" ;
leaf_N = regN "foglia" ;
leg_N = regN "gamba" ;
liver_N = regN "fegato" ;
louse_N = regN "pidocchio" ;
mouth_N = regN "bocca" ;
name_N = regN "nome" ;
neck_N = regN "collo" ;
night_N = femN (regN "notte") ;
nose_N = regN "naso" ;
person_N = regN "persona" ;
rain_N = regN "pioggia" ;
road_N = regN "strada" ;
root_N = femN (regN "radice") ;
rope_N = regN "corda" ;
salt_N = regN "sale" ;
sand_N = regN "sabbia" ;
seed_N = regN "seme" ;
skin_N = femN (regN "pelle") ;
sky_N = regN "cielo" ;
smoke_N = regN "fumo" ;
snow_N = femN (regN "neve") ;
stick_N = regN "bastone" ;
tail_N = regN "coda" ;
tongue_N = regN "lingua" ;
tooth_N = regN "dente" ;
wife_N = regN "donna" ;
wind_N = regN "vento" ;
wing_N = regN "ala" ;
worm_N = regN "verme" ;
year_N = regN "anno" ;
bite_V2 = dirV2 (verboV (esplodere_51 "mordere")) ;
blow_V = regV "soffiare" ;
burn_V = regV "bruciare" ;
count_V2 = dirV2 (regV "contare") ;
cut_V2 = dirV2 (regV "tagliare") ;
dig_V = regV "scavare" ;
fall_V = essereV (verboV (cadere_28 "cadere")) ;
fear_V2 = dirV2 (verboV (temere_20 "temere")) ;
fight_V2 = dirV2 (regV "lottare") ;
float_V = regV "galleggiare" ;
flow_V = verboV (finire_100 "fluire") ;
fly_V = regV "volare" ;
freeze_V = regV "gelare" ;
give_V3 = dirdirV3 (verboV (dare_15 "dare")) ;
hit_V2 = dirV2 (regV "colpire") ;
hold_V2 = dirV2 (verboV (venire_110 "tenire")) ;
hunt_V2 = dirV2 (regV "cacciare") ;
kill_V2 = dirV2 (verboV (ridere_74 "uccidere")) ;
laugh_V = verboV (ridere_74 "ridere") ;
lie_V = verboV (piacere_64 "giacere") ;
play_V = regV "giocare" ;
pull_V2 = dirV2 (regV "tirare") ;
push_V2 = dirV2 (verboV (cingere_31 "spingere")) ;
rub_V2 = dirV2 (regV "strofinare") ;
scratch_V2 = dirV2 (regV "graffiare") ;
sew_V = verboV (cucire_103 "cucire") ;
sing_V = regV "cantare" ;
sit_V = reflV (verboV (sedere_84 "sedere")) ;
smell_V = verboV (sentire_99 "sentire") ;
spit_V = regV "sputare" ;
split_V2 = dirV2 (verboV (ridere_74 "dividere")) ;
squeeze_V2 = dirV2 (verboV (temere_20 "spremere")) ;
stab_V2 = dirV2 (regV "pugnalare") ;
stand_V = verboV (stare_16 "stare") ; ---- in piedi
suck_V2 = dirV2 (regV "succhiare") ;
swell_V = regV "gonfiare" ;
swim_V = regV "nuotare" ;
think_V = regV "pensare" ;
throw_V2 = dirV2 (regV "gettare") ;
tie_V2 = dirV2 (regV "legare") ;
turn_V = regV "tornare" ;
vomit_V = regV "vomitare" ;
wash_V2 = dirV2 (regV "lavare") ;
wipe_V2 = dirV2 (regV "asciugare") ;
breathe_V = (regV "respirare") ;
grammar_N = regN "grammatica" ;
language_N = regN "lingua" ;
rule_N = regN "regola" ;
} ;

View File

@@ -1,4 +0,0 @@
--# -path=.:../romance:../abstract:../../prelude
concrete MathIta of Math = CategoriesIta **
MathRomance with (SyntaxRomance=SyntaxIta) ;

View File

@@ -1,45 +1,26 @@
--# -path=.:../romance:../../prelude
--# -path=.:../romance:../common:../../prelude
--1 A Simple Italian Resource Morphology
--
-- Aarne Ranta 2002--2003
-- Aarne Ranta 2002 -- 2005
--
-- This resource morphology contains definitions needed in the resource
-- syntax. It moreover contains the most usual inflectional patterns.
-- The patterns for verbs contain the complete "Bescherelle" conjugation
-- tables.
--
-- We use the parameter types and word classes defined in $TypesIta.gf$.
-- syntax. To build a lexicon, it is better to use $ParadigmsIta$, which
-- gives a higher-level access to this module.
resource MorphoIta = open (Predef=Predef), Prelude, TypesIta in {
resource MorphoIta = CommonRomance, ResIta **
open PhonoIta, Prelude, Predef in {
--2 Some phonology
--
--3 Elision
--
-- The phonological rule of *elision* can be defined as follows in GF.
-- In Italian it includes both vowels and the *impure 's'*.
flags optimize=all ;
oper
vocale : Strs = strs {
"a" ; "e" ; "h" ; "i" ; "o" ; "u"
} ;
sImpuro : Strs = strs {
"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" ;
--2 Nouns
--
-- The following macro is useful for creating the forms of number-dependent
-- tables, such as common nouns.
oper
numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
table {Sg => vino ; Pl => vini} ;
@@ -59,13 +40,13 @@ oper
-- Common nouns are inflected in number and have an inherent gender.
mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen ->
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
{s = mecmecs ; g = gen} ;
mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs ->
mkCNom (numForms mec mecs) ;
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
mkNoun (numForms mec mecs) ;
mkNomReg : Str -> {s : Number => Str ; g : Gender} = \vino ->
mkNomReg : Str -> Noun = \vino ->
let
o = last vino ;
vin = init vino ;
@@ -150,147 +131,30 @@ oper
-- All the eight personal pronouns can be built by the following macro.
-- The use of "ne" as atonic genitive is debatable.
-- We follow the rule that the atonic nominative is empty.
-- (The form $glie$ is no longer used, and also the other clitics are
-- given in $DiffIta.argPron$ and therefore wouldn't be needed in the
-- pronoun itself.)
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
PronGen -> Number -> Person -> ClitType -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p,c ->
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun =
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
{s = table {
Ton Nom => il ;
Ton x => prepCase x ++ Lui ;
Aton Nom => il ; ---- [] ;
Aton Nom => strOpt il ; -- [] or il
Aton Acc => le ;
Aton (CPrep P_di) => "ne" ; --- hmm
Aton (CPrep P_a) => lui ;
Aton (CPrep q) => strPrep q ++ Lui ; ---- GF bug with c or p!
Poss Sg Masc => son ;
Poss Sg Fem => sa ;
Poss Pl Masc => ses ;
Poss Pl Fem => see
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
} ;
g = g ;
n = n ;
p = p ;
c = c
a = {g = g ; n = n ; p = p} ;
hasClit = True
} ;
--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> => "mi" ;
<Sg,P2> => "ti" ;
<_, P3> => "si" ;
<Pl,P1> => "ci" ;
<Pl,P2> => "vi"
} ;
pronJe = mkPronoun
"io" --- (variants {"io" ; []}) etc
"mi"
"mi"
"me"
"mio" "mia" "miei" "mie"
PNoGen -- gender cannot be known from pronoun alone
Sg
P1
Clit1 ;
pronTu = mkPronoun
"tu"
"ti"
"ti"
"te"
"tuo" "tua" "tuoi" "tue"
PNoGen
Sg
P2
Clit1 ;
pronIl = mkPronoun
"lui"
"lo"
"gli"
"lui"
"suo" "sua" "suoi" "sue"
(PGen Masc)
Sg
P3
Clit2 ;
pronElle = mkPronoun
"lei"
"la"
"le"
"lei"
"suo" "sua" "suoi" "sue"
(PGen Fem)
Sg
P3
Clit2 ;
pronNous = mkPronoun
"noi"
"ci"
"ci"
"noi"
"nostro" "nostra" "nostri" "nostre"
PNoGen
Pl
P1
Clit3 ;
pronVous = mkPronoun
"voi"
"vi"
"vi"
"voi"
"vostro" "vostra" "vostri" "vostre"
PNoGen
Pl --- depends!
P2
Clit3 ;
pronIls = mkPronoun
"loro"
"loro"
"li" --- le !
"loro"
"loro" "loro" "loro" "loro"
PNoGen
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 => pronIls
}
} ;
-- used in constructions like "(non) ci sono ..."
pronEmpty : Number -> Pronoun = \n -> mkPronoun
[]
[]
[]
[]
[] [] [] []
(PGen Masc)
n
P3
Clit2 ;
--2 Determiners
--
-- Determiners, traditionally called indefinite pronouns, are inflected
@@ -298,193 +162,4 @@ oper
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
qualPron : Gender -> Number -> Str = pronForms (adjTale "quale") ;
talPron : Gender -> Number -> Str = pronForms (adjTale "tale") ;
tuttoPron : Gender -> Number -> Str = pronForms (adjSolo "tutto") ;
--2 Articles
--
-- The definite article has quite some variation: three parameters and
-- 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 {
<_, _, CPrep P_di> => prepArt g n "de" ;
<_, _, CPrep P_da> => prepArt g n "da" ;
<_, _, CPrep P_a> => prepArt g n "a" ;
<_, _, CPrep P_in> => prepArt g n "ne" ;
<_, _, CPrep P_su> => prepArt g n "su" ;
<_, _, CPrep P_con> => prepArt g n "co" ;
<Masc,Sg, Nom> => elision "il" "l'" "lo" ;
<Masc,Sg, _> => elision "il" "l'" "lo" ;
<Fem ,Sg, _> => elision "la" "l'" "la" ;
<Masc,Pl, _> => elision "i" "gli" "gli" ;
<Fem ,Pl, _> => "le"
} ;
-- 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
--
--3 The Bescherelle conjugations.
--
-- The following conjugations tables were generated using FM software
-- from a Haskell source.
--
-- The verb "essere" is often used in syntax.
verbEssere = verbPres (essere_5 "essere") AEsse ;
verbAvere = verbPres (avere_6 "avere") AHabere ;
-- machine-generated GF code
oper essere_5 : Str -> Verbum = \essere ->
let x_ = Predef.tk 6 essere in
{s = table {
Inf => x_ + "essere" ;
InfClit => x_ + "r" ;
Indi Pres Sg P1 => x_ + "sono" ;
Indi Pres Sg P2 => x_ + "sei" ;
Indi Pres Sg P3 => x_ + "è" ;
Indi Pres Pl P1 => x_ + "siamo" ;
Indi Pres Pl P2 => x_ + "siete" ;
Indi Pres Pl P3 => x_ + "sono" ;
Indi Imperf Sg P1 => x_ + "ero" ;
Indi Imperf Sg P2 => x_ + "eri" ;
Indi Imperf Sg P3 => x_ + "era" ;
Indi Imperf Pl P1 => x_ + "eravamo" ;
Indi Imperf Pl P2 => x_ + "eravate" ;
Indi Imperf Pl P3 => x_ + "erano" ;
Pass Sg P1 => x_ + "fui" ;
Pass Sg P2 => x_ + "fosti" ;
Pass Sg P3 => x_ + "fu" ;
Pass Pl P1 => x_ + "fummo" ;
Pass Pl P2 => x_ + "foste" ;
Pass Pl P3 => x_ + "furono" ;
Fut Sg P1 => x_ + "sarò" ;
Fut Sg P2 => x_ + "sarai" ;
Fut Sg P3 => x_ + "sarà" ;
Fut Pl P1 => x_ + "saremo" ;
Fut Pl P2 => x_ + "sarete" ;
Fut Pl P3 => x_ + "saranno" ;
Cong Pres Sg P1 => x_ + "sia" ;
Cong Pres Sg P2 => x_ + "sia" ;
Cong Pres Sg P3 => x_ + "sia" ;
Cong Pres Pl P1 => x_ + "siamo" ;
Cong Pres Pl P2 => x_ + "siate" ;
Cong Pres Pl P3 => x_ + "siano" ;
Cong Imperf Sg P1 => x_ + "fossi" ;
Cong Imperf Sg P2 => x_ + "fossi" ;
Cong Imperf Sg P3 => x_ + "fosse" ;
Cong Imperf Pl P1 => x_ + "fossimo" ;
Cong Imperf Pl P2 => x_ + "foste" ;
Cong Imperf Pl P3 => x_ + "fossero" ;
Cond Sg P1 => x_ + "sarei" ;
Cond Sg P2 => x_ + "saresti" ;
Cond Sg P3 => x_ + "sarebbe" ;
Cond Pl P1 => x_ + "saremmo" ;
Cond Pl P2 => x_ + "sareste" ;
Cond Pl P3 => x_ + "sarebbero" ;
Imper SgP2 => x_ + "sii" ;
--Imper IPs3 => x_ + "sia" ;
Imper PlP1 => x_ + "siamo" ;
Imper PlP2 => x_ + "siate" ;
--Imper IPp3 => x_ + "siano" ;
Ger => x_ + "essendo" ;
Part PresP Masc Sg => variants {} ;
Part PresP Masc Pl => variants {} ;
Part PresP Fem Sg => variants {} ;
Part PresP Fem Pl => variants {} ;
Part PassP Masc Sg => x_ + "stato" ;
Part PassP Masc Pl => x_ + "stati" ;
Part PassP Fem Sg => x_ + "stata" ;
Part PassP Fem Pl => x_ + "state"
}
} ;
oper avere_6 : Str -> Verbum = \avere ->
let x_ = Predef.tk 5 avere in
{s = table {
Inf => x_ + "avere" ;
InfClit => x_ + "aver" ;
Indi Pres Sg P1 => x_ + "ho" ;
Indi Pres Sg P2 => x_ + "hai" ;
Indi Pres Sg P3 => x_ + "ha" ;
Indi Pres Pl P1 => x_ + "abbiamo" ;
Indi Pres Pl P2 => x_ + "avete" ;
Indi Pres Pl P3 => x_ + "hanno" ;
Indi Imperf Sg P1 => x_ + "avevo" ;
Indi Imperf Sg P2 => x_ + "avevi" ;
Indi Imperf Sg P3 => x_ + "aveva" ;
Indi Imperf Pl P1 => x_ + "avevamo" ;
Indi Imperf Pl P2 => x_ + "avevate" ;
Indi Imperf Pl P3 => x_ + "avevano" ;
Pass Sg P1 => x_ + "ebbi" ;
Pass Sg P2 => x_ + "avesti" ;
Pass Sg P3 => x_ + "ebbe" ;
Pass Pl P1 => x_ + "avemmo" ;
Pass Pl P2 => x_ + "aveste" ;
Pass Pl P3 => x_ + "ebbero" ;
Fut Sg P1 => x_ + "avrò" ;
Fut Sg P2 => x_ + "avrai" ;
Fut Sg P3 => x_ + "avrà" ;
Fut Pl P1 => x_ + "avremo" ;
Fut Pl P2 => x_ + "avrete" ;
Fut Pl P3 => x_ + "avranno" ;
Cong Pres Sg P1 => x_ + "abbia" ;
Cong Pres Sg P2 => x_ + "abbia" ;
Cong Pres Sg P3 => x_ + "abbia" ;
Cong Pres Pl P1 => x_ + "abbiamo" ;
Cong Pres Pl P2 => x_ + "abbiate" ;
Cong Pres Pl P3 => x_ + "abbiano" ;
Cong Imperf Sg P1 => x_ + "avessi" ;
Cong Imperf Sg P2 => x_ + "avessi" ;
Cong Imperf Sg P3 => x_ + "avesse" ;
Cong Imperf Pl P1 => x_ + "avessimo" ;
Cong Imperf Pl P2 => x_ + "aveste" ;
Cong Imperf Pl P3 => x_ + "avessero" ;
Cond Sg P1 => x_ + "avrei" ;
Cond Sg P2 => x_ + "avresti" ;
Cond Sg P3 => x_ + "avrebbe" ;
Cond Pl P1 => x_ + "avremmo" ;
Cond Pl P2 => x_ + "avreste" ;
Cond Pl P3 => x_ + "avrebbero" ;
Imper SgP2 => x_ + "abbi" ;
--Imper IPs3 => x_ + "abbia" ;
Imper PlP1 => x_ + "abbiamo" ;
Imper PlP2 => x_ + "abbiate" ;
--Imper IPp3 => x_ + "abbiano" ;
Ger => x_ + "avendo" ;
Part PresP Masc Sg => x_ + "avente" ;
Part PresP Masc Pl => x_ + "aventi" ;
Part PresP Fem Sg => x_ + "avente" ;
Part PresP Fem Pl => x_ + "aventi" ;
Part PassP Masc Sg => x_ + "avuto" ;
Part PassP Masc Pl => x_ + "avuti" ;
Part PassP Fem Sg => x_ + "avuta" ;
Part PassP Fem Pl => x_ + "avute"
}
} ;
-- for Numerals
param DForm = ental Pred | ton | tiotal ;
param Pred = pred | indip ;
oper mkTal : Str -> Str -> Str -> {s : DForm => Str} =
\två -> \tolv -> \tjugo ->
{s = table {ental _ => två ; ton => tolv ; tiotal => tjugo}} ;
oper spl : Str -> {s : Gender => Str ; n : Number} = \s -> {s = \\_ =>
s ; n = Pl} ;
oper mille : Number => Str = table {Sg => "mille" ; Pl => "mila"} ;
}

View File

@@ -0,0 +1,2 @@
concrete NounIta of Noun = CatIta ** NounRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,72 @@
concrete NumeralIta of Numeral = CatIta **
open CommonRomance, ResRomance, MorphoIta, Prelude in {
lincat
Digit = {s : DForm => CardOrd => Str} ;
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
Sub100 = {s : CardOrd => Str ; n : Number} ;
Sub1000 = {s : CardOrd => Str ; n : Number} ;
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
lin num x = x ;
lin n2 = mkTal "due" "dodici" "venti" "secondo" ;
lin n3 = mkTal "tre" "tredici" "trenta" "terzo" ;
lin n4 = mkTal "quattro" "quattordici" "quaranta" "quarto" ;
lin n5 = mkTal "cinque" "quindici" "cinquanta" "quinto" ;
lin n6 = mkTal "sei" "sedici" "sessanta" "sesto" ;
lin n7 = mkTal "sette" "diciassette" "settanta" "settimo" ; --- diciasettesimo?
lin n8 = mkTal "otto" "diciotto" "ottanta" "ottavo" ;
lin n9 = mkTal "nove" "diciannove" "novanta" "nono" ;
lin pot01 =
let uno = (mkTal "uno" "undici" "dieci" "primo").s in
{s =\\f,g => case f of {
ental pred => [] ;
_ => uno ! f ! g
} ;
n = Pl} ;
lin pot0 d = {s = d.s ; n = Pl} ;
lin pot110 = spl ((mkTal "dieci" [] [] "decimo").s ! ental indip) ;
lin pot111 = spl ((mkTal "undici" [] [] "undicesimo").s ! ental indip) ;
lin pot1to19 d = spl (d.s ! ton) ;
lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ;
lin pot1 d = spl (d.s ! tiotal) ;
lin pot1plus d e =
{s = \\g => d.s ! tiotal ! NCard Masc ++ e.s ! ental indip ! g ; n = Pl} ;
lin pot1as2 n = n ;
lin pot2 d = spl (\\co => d.s ! ental pred ! NCard Masc ++
(mkTal "cento" [] [] "centesimo").s ! ental indip ! co) ;
lin pot2plus d e =
{s = \\g => d.s ! ental pred ! NCard Masc ++ "cento" ++ e.s ! g ; n = Pl} ;
lin pot2as3 n = n ;
lin pot3 n = spl (\\co => n.s ! NCard Masc ++
(mkTal (mille ! n.n) [] [] "millesimo").s ! ental indip ! co) ;
lin pot3plus n m = {s = \\g => n.s ! NCard Masc ++ mille ! n.n ++ m.s ! g ; n = Pl} ;
oper
mkTal : (x1,_,_,x4 : Str) -> {s : DForm => CardOrd => Str} =
\due,dodici,venti,secondo -> {s = \\d,co => case <d,co> of {
<ental _, NCard _> => due ;
<ental _, NOrd g n> => pronForms (adjSolo secondo) g n ;
<tiotal, NCard _> => venti ;
<tiotal, NOrd g n> => regCard venti g n ;
<ton, NCard _> => venti ;
<ton, NOrd g n> => regCard venti g n
}
} ;
regCard : Str -> Gender -> Number -> Str = \venti ->
pronForms (adjSolo (init venti + "esimo")) ;
spl : (CardOrd => Str) -> {s : CardOrd => Str ; n : Number} = \s -> {
s = s ;
n = Pl
} ;
oper mille : Number => Str = table {Sg => "mille" ; Pl => "mila"} ;
param DForm = ental Pred | ton | tiotal ;
param Pred = pred | indip ;
}

View File

@@ -1,40 +0,0 @@
concrete NumeralsIta of Numerals = open Prelude, TypesIta, MorphoIta, SyntaxIta in {
lincat
Numeral = {s : Gender => Str ; n : Number} ;
Digit = {s : DForm => Str} ;
Sub10 = {s : DForm => Gender => Str ; n : Number} ;
Sub100 = {s : Gender => Str ; n : Number} ;
Sub1000 = {s : Gender => Str ; n : Number} ;
Sub1000000 = {s : Gender => Str ; n : Number} ;
lin num x = x ;
lin n2 = mkTal "due" "dodici" "venti" ;
lin n3 = mkTal "tre" "tredici" "trenta" ;
lin n4 = mkTal "quattro" "quattordici" "quaranta" ;
lin n5 = mkTal "cinque" "quindici" "cinquanta" ;
lin n6 = mkTal "sei" "sedici" "sessanta" ;
lin n7 = mkTal "sette" "diciassette" "settanta" ;
lin n8 = mkTal "otto" "diciotto" "ottanta" ;
lin n9 = mkTal "nove" "diciannove" "novanta" ;
lin pot01 = {s = table {
ental pred => \\_ => [] ; _ => genForms "uno" "una"} ; n = Sg} ;
lin pot0 d = {s =\\f,g => d.s ! f ; n = Pl} ;
lin pot110 = spl "dieci" ;
lin pot111 = spl "undici" ;
lin pot1to19 d = spl (d.s ! ton) ;
lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ;
lin pot1 d = spl (d.s ! tiotal) ;
lin pot1plus d e = {s = \\g => d.s ! tiotal ++ e.s ! ental indip ! g ; n = Pl} ;
lin pot1as2 n = n ;
lin pot2 d = spl (d.s ! ental pred ! Masc ++ "cento") ;
lin pot2plus d e = {s = \\g => d.s ! ental pred ! Masc ++ "cento" ++ e.s ! g ; n = Pl} ;
lin pot2as3 n = n ;
lin pot3 n = spl (n.s ! Masc ++ mille ! n.n) ;
lin pot3plus n m = {s = \\g => n.s ! Masc ++ mille ! n.n ++ m.s ! g ; n = Pl} ;
}

View File

@@ -1,17 +1,17 @@
--# -path=.:../romance:../abstract:../../prelude
--# -path=.:../romance:../common:../abstract:../../prelude
--1 Italian Lexical Paradigms
--
-- Aarne Ranta 2003
--
-- This is an API to the user of the resource grammar
-- This is an API for the user of the resource grammar
-- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs.
--
-- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API, $Structural.gf$.
--
-- The main difference with $MorphoFre.gf$ is that the types
-- The main difference with $MorphoIta.gf$ is that the types
-- referred to are compiled resource grammar types. We have moreover
-- had the design principle of always having existing forms, rather
-- than stems, as string arguments of the paradigms.
@@ -20,15 +20,21 @@
-- first we give a handful of patterns that aim to cover all
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
-- escape to construct the most irregular words of type $C$.
-- However, this function should only seldom be needed: we have a
-- separate module $IrregularEng$, which covers all irregularly inflected
-- words.
--
-- The following modules are presupposed:
-- However, this function should only seldom be needed. For verbs, we have a
-- separate module [``BeschIta`` ../../italian/BeschIta.gf],
-- which covers the "Bescherelle" verb conjugations.
resource ParadigmsIta =
open (Predef=Predef), Prelude, TypesIta, MorphoIta, SyntaxIta,
RulesIta, BeschIta in {
open
(Predef=Predef),
Prelude,
CommonRomance,
ResIta,
MorphoIta,
BeschIta,
CatIta in {
flags optimize=all ;
--2 Parameters
--
@@ -49,23 +55,22 @@ oper
-- Prepositions used in many-argument functions are either strings
-- (including the 'accusative' empty string) or strings that
-- amalgamate with the following word (the 'genitive' "de" and the
-- 'dative' "à").
-- amalgamate with the following word (the 'genitive' "di" and the
-- 'dative' "a").
Preposition : Type ;
Prep : Type ;
accusative : Preposition ;
genitive : Preposition ;
dative : Preposition ;
mkPreposition : Str -> Preposition ;
accusative : Prep ;
genitive : Prep ;
dative : Prep ;
mkPrep : Str -> Prep ;
--2 Nouns
-- Worst case: give both two forms and the gender.
mkN : (uomi,uomini : Str) -> Gender -> N ;
mkN : (uomo,uomini : Str) -> Gender -> N ;
-- The regular function takes the singular form and the gender,
-- and computes the plural and the gender by a heuristic.
@@ -82,7 +87,7 @@ oper
--3 Compound nouns
--
-- Some nouns are ones where the first part is inflected as a noun but
-- the second part is not inflected. e.g. "numéro de téléphone".
-- the second part is not inflected. e.g. "numero di telefono".
-- They could be formed in syntax, but we give a shortcut here since
-- they are frequent in lexica.
@@ -91,9 +96,9 @@ oper
--3 Relational nouns
--
-- Relational nouns ("fille de x") need a case and a preposition.
-- Relational nouns ("figlio di x") need a case and a preposition.
mkN2 : N -> Preposition -> N2 ;
mkN2 : N -> Prep -> N2 ;
-- The most common cases are the genitive "di" and the dative "a",
-- with the empty preposition.
@@ -103,13 +108,13 @@ oper
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
mkN3 : N -> Preposition -> Preposition -> N3 ;
mkN3 : N -> Prep -> Prep -> N3 ;
--3 Relational common noun phrases
--
-- In some cases, you may want to make a complex $CN$ into a
-- relational noun (e.g. "the old town hall of"). However, $N2$ and
-- relational noun (e.g. "la vecchia chiesa di"). However, $N2$ and
-- $N3$ are purely lexical categories. But you can use the $AdvCN$
-- and $PrepNP$ constructions to build phrases like this.
@@ -118,7 +123,8 @@ oper
--
-- Proper names need a string and a gender.
mkPN : Str -> Gender -> PN ; -- Jean
mkPN : Str -> Gender -> PN ;
regPN : Str -> PN ; -- feminine if "-a", otherwise masculine
-- To form a noun phrase that can also be plural,
-- you can use the worst-case function.
@@ -139,7 +145,7 @@ oper
-- These functions create postfix adjectives. To switch
-- them to prefix ones (i.e. ones placed before the noun in
-- modification, as in "petite maison"), the following function is
-- modification, as in "vecchia chiesa"), the following function is
-- provided.
prefA : A -> A ;
@@ -148,33 +154,25 @@ oper
--
-- Two-place adjectives need a preposition for their second argument.
mkA2 : A -> Preposition -> A2 ;
mkA2 : A -> Prep -> A2 ;
--3 Comparison adjectives
-- Comparison adjectives are in the worst case put up from two
-- adjectives: the positive ("buono"), and the comparative ("migliore").
mkADeg : A -> A -> ADeg ;
mkADeg : A -> A -> A ;
-- If comparison is formed by "più", as usual in Italian,
-- the following pattern is used:
compADeg : A -> ADeg ;
compADeg : A -> A ;
-- The regular pattern is the same as $regA$ for plain adjectives,
-- with comparison by "plus".
-- with comparison by "p".
regADeg : Str -> ADeg ;
regADeg : Str -> A ;
-- From a given $ADeg$, it is possible to get back to $A$.
adegA : ADeg -> A ;
-- For prefixed adjectives, the following function is
-- provided.
prefADeg : ADeg -> ADeg ;
--2 Adverbs
@@ -194,31 +192,39 @@ oper
--2 Verbs
--
-- Regular verbs are ones with the infinitive "er" or "ir", the
-- latter with plural present indicative forms as "finissons".
-- Regular verbs are ones with the infinitive "are" or "ire", the
-- latter with singular present indicative forms as "finisco".
-- The regular verb function is the first conjugation recognizes
-- these endings, as well as the variations among
-- "aimer, céder, placer, peser, jeter, placer, manger, assiéger, payer".
-- "amare, cominciare, mangiare, legare, cercare".
regV : Str -> V ;
-- The module $BeschIta$ gives all the patterns of the "Bescherelle"
-- The module $BeschIta$ gives (almost) all the patterns of the "Bescherelle"
-- book. To use them in the category $V$, wrap them with the function
verboV : Verbo -> V ;
-- The function $regV$ gives all verbs the compound auxiliary "avoir".
-- To change it to "être", use the following function.
-- The function $regV$ gives all verbs the compound auxiliary "avere".
-- To change it to "essere", use the following function.
-- Reflexive implies "essere".
essereV : V -> V ;
reflV : V -> V ;
-- If $BeschIta$ does not give the desired result or feels difficult
-- to consult, here is a worst-case function for "-ire" and "-ere" verbs,
-- taking 11 arguments.
mkV :
(udire,odo,ode,udiamo,udiro,udii,udisti,udi,udirono,odi,udito : Str) -> V ;
--3 Two-place verbs
--
-- Two-place verbs need a preposition, except the special case with direct object.
-- (transitive verbs). Notice that a particle comes from the $V$.
mkV2 : V -> Preposition -> V2 ;
mkV2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
@@ -231,9 +237,10 @@ oper
-- Three-place (ditransitive) verbs need two prepositions, of which
-- the first one or both can be absent.
mkV3 : V -> Preposition -> Preposition -> V3 ; -- parler, à, de
dirV3 : V -> Preposition -> V3 ; -- donner,_,à
dirdirV3 : V -> V3 ; -- donner,_,_
mkV3 : V -> Prep -> Prep -> V3 ; -- parlare, a, di
dirV3 : V -> Prep -> V3 ; -- dare,_,a
dirdirV3 : V -> V3 ; -- dare,_,_
--3 Other complement patterns
--
@@ -242,71 +249,87 @@ oper
mkV0 : V -> V0 ;
mkVS : V -> VS ;
mkV2S : V -> Preposition -> V2S ;
mkVV : V -> VV ; -- plain infinitive: "je veux parler"
deVV : V -> VV ; -- "j'essaie de parler"
aVV : V -> VV ; -- "j'arrive à parler"
mkV2V : V -> Preposition -> Preposition -> V2V ;
mkV2S : V -> Prep -> V2S ;
mkVV : V -> VV ; -- plain infinitive: "voglio parlare"
deVV : V -> VV ; -- "cerco di parlare"
aVV : V -> VV ; -- "arrivo a parlare"
mkV2V : V -> Prep -> Prep -> V2V ;
mkVA : V -> VA ;
mkV2A : V -> Preposition -> V2A ;
mkV2A : V -> Prep -> Prep -> V2A ;
mkVQ : V -> VQ ;
mkV2Q : V -> Preposition -> V2Q ;
mkV2Q : V -> Prep -> V2Q ;
mkAS : A -> AS ;
subjAS : A -> AS ;
mkA2S : A -> Preposition -> A2S ;
mkAV : A -> Preposition -> AV ;
mkA2V : A -> Preposition -> Preposition -> A2V ;
mkAS : A -> AS ;
mkA2S : A -> Prep -> A2S ;
mkAV : A -> Prep -> AV ;
mkA2V : A -> Prep -> Prep -> A2V ;
-- Notice: categories $V2S, V2V, V2Q$ are in v 1.0 treated
-- just as synonyms of $V2$, and the second argument is given
-- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
-- $V0$ is just $V$.
V0, V2S, V2V, V2Q : Type ;
AS, A2S, AV, A2V : Type ;
--2 Definitions of the paradigms
--.
--2 The definitions of the paradigms
--
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
--.
Gender = SyntaxIta.Gender ;
Number = TypesIta.Number ;
Gender = MorphoIta.Gender ;
Number = MorphoIta.Number ;
masculine = Masc ;
feminine = Fem ;
singular = Sg ;
plural = Pl ;
Preposition = Case * Str ;
accusative = <Acc,[]> ;
genitive = <CPrep P_di,[]> ;
dative = <CPrep P_a,[]> ;
mkPreposition p = <Acc,p> ;
Prep = Compl ;
accusative = complAcc ;
genitive = complGen ;
dative = complDat ;
mkPrep p = {s = p ; c = Acc ; isDir = False} ;
mkN x y g = mkCNomIrreg x y g ** {lock_N = <>} ;
mkN x y g = mkNounIrreg x y g ** {lock_N = <>} ;
regN x = mkNomReg x ** {lock_N = <>} ;
compN x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
femN x = {s = x.s ; g = feminine ; lock_N = <>} ;
mascN x = {s = x.s ; g = masculine ; lock_N = <>} ;
mkN2 = \n,p -> n ** {lock_N2 = <> ; c = p.p1 ; s2 = p.p2} ;
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
diN2 n = mkN2 n genitive ;
aN2 n = mkN2 n dative ;
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c = p.p1 ; s2 = p.p2 ; c3 = q.p1 ; s3 = q.p2} ;
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
mkNP x g n = let np = mkNameNounPhrase x g in
{s = np.s ; g = np.g ; p = np.p ; c = np.c ; n = n ; lock_NP = <>} ;
regPN x = mkPN x g where {
g = case last x of {
"a" => feminine ;
_ => masculine
}
} ;
mkA a b c d e = mkAdj a b c d e ** {p = False ; lock_A = <>} ;
regA a = mkAdjReg a ** {p = False ; lock_A = <>} ;
prefA a = {s = a.s ; p = True ; lock_A = <>} ;
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
mkA a b c d e =
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
mkADeg a b = {s = table {Pos => a.s ; _ => b.s} ; p = a.p ; lock_ADeg = <>} ;
compADeg a = {s = table {Pos => a.s ; _ => \\f => "più" ++ a.s ! f} ; p = a.p ;
lock_ADeg = <>} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
isPre = a.isPre ; lock_A = <>} ;
compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "più" ++ a.s ! Posit ! f} ;
isPre = a.isPre ;
lock_A = <>} ;
regADeg a = compADeg (regA a) ;
prefADeg a = {s = a.s ; p = True ; lock_ADeg = <>} ;
adegA a = {s = a.s ! Pos ; p = a.p ; lock_A = <>} ;
mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ;
@@ -329,35 +352,48 @@ oper
}
}
}
in verbPres verb AHabere ** {aux = AHabere ; lock_V = <>} ;
in verbBesch verb ** {vtyp = VHabere ; lock_V = <>} ;
verboV ve = verbPres ve AHabere ** {lock_V = <>} ;
verboV ve = verbBesch ve ** {vtyp = VHabere ; lock_V = <>} ;
essereV v = {s = v.s ; aux = AEsse ; lock_V = <>} ;
mkV
dovere devo deve dobbiamo dovro
dovetti dovesti dovette dovettero dovi dovuto = verboV (mkVerbo
dovere devo deve dobbiamo dovro
dovetti dovesti dovette dovettero dovi dovuto
) ;
mkV2 v p = {s = v.s ; aux = v.aux ; s2 = p.p2 ; c = p.p1 ; lock_V2 = <>} ;
essereV v = {s = v.s ; vtyp = VEsse ; lock_V = <>} ;
reflV v = {s = v.s ; vtyp = VRefl ; lock_V = <>} ;
mkV2 v p = {s = v.s ; vtyp = v.vtyp ; c2 = p ; lock_V2 = <>} ;
dirV2 v = mkV2 v accusative ;
v2V v = v ** {lock_V = <>} ;
mkV3 v p q = {s = v.s ; aux = v.aux ;
s2 = p.p2 ; s3 = q.p2 ; c = p.p1 ; c3 = q.p1 ; lock_V3 = <>} ;
mkV3 v p q = {s = v.s ; vtyp = v.vtyp ;
c2 = p ; c3 = q ; lock_V3 = <>} ;
dirV3 v p = mkV3 v accusative p ;
dirdirV3 v = dirV3 v dative ;
V0 : Type = V ;
V2S, V2V, V2Q : Type = V2 ;
AS, AV : Type = A ;
A2S, A2V : Type = A2 ;
mkV0 v = v ** {lock_V0 = <>} ;
mkVS v = v ** {mn,mp = Ind ; lock_VS = <>} ; ---- more moods
mkV2S v p = mkV2 v p ** {mn,mp = Ind ; lock_V2S = <>} ;
mkVV v = v ** {c = accusative.p1 ; lock_VV = <>} ;
deVV v = v ** {c = genitive.p1 ; lock_VV = <>} ;
aVV v = v ** {c = dative.p1 ; lock_VV = <>} ;
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ; ---- more moods
mkV2S v p = mkV2 v p ** {mn,mp = Indic ; lock_V2S = <>} ;
mkVV v = v ** {c2 = complAcc ; lock_VV = <>} ;
deVV v = v ** {c2 = complGen ; lock_VV = <>} ;
aVV v = v ** {c2 = complDat ; lock_VV = <>} ;
mkV2V v p t = mkV2 v p ** {c3 = t.p1 ; s3 = p.p2 ; lock_V2V = <>} ;
mkVA v = v ** {lock_VA = <>} ;
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
mkV2A v p q = mkV3 v p q ** {lock_V2A = <>} ;
mkVQ v = v ** {lock_VQ = <>} ;
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
mkAS v = v ** {mn,mp = Ind ; lock_AS = <>} ; ---- more moods
mkA2S v p = mkA2 v p ** {mn,mp = Ind ; lock_A2S = <>} ;
mkAS v = v ** {lock_AS = <>} ; ---- more moods
mkA2S v p = mkA2 v p ** {lock_A2S = <>} ;
mkAV v p = v ** {c = p.p1 ; s2 = p.p2 ; lock_AV = <>} ;
mkA2V v p q = mkA2 v p ** {s3 = q.p2 ; c3 = q.p1 ; lock_A2V = <>} ;

View File

@@ -0,0 +1,20 @@
resource PhonoIta = open Prelude in {
--3 Elision
--
-- The phonological rule of *elision* can be defined as follows in GF.
-- In Italian it includes both vowels and the *impure 's'*.
oper
vocale : Strs = strs {
"a" ; "e" ; "h" ; "i" ; "o" ; "u" ; "è"
} ;
sImpuro : Strs = strs {
"z" ; "sb" ; "sc" ; "sd" ; "sf" ; "sm" ; "sp" ; "sq" ; "sr" ; "st" ; "sv"
} ;
elision : (_,_,_ : Str) -> Str = \il, l', lo ->
pre {il ; l' / vocale ; lo / sImpuro} ;
}

View File

@@ -0,0 +1,2 @@
concrete PhraseIta of Phrase = CatIta ** PhraseRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,2 @@
concrete QuestionIta of Question = CatIta ** QuestionRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,2 @@
concrete RelativeIta of Relative = CatIta ** RelativeRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,13 @@
--1 Italian auxiliary operations.
--
---- This module contains operations that are needed to make the
---- resource syntax work. To define everything that is needed to
---- implement $Test$, it moreover contains regular lexical
---- patterns needed for $Lex$.
--
instance ResIta of ResRomance = DiffIta ** open CommonRomance, Prelude in {
flags optimize=all ;
} ;

View File

@@ -1,4 +0,0 @@
--# -path=.:../romance:../abstract:../../prelude
concrete ResourceIta of Resource = RulesIta, ClauseIta, StructuralIta ** {} ;

View File

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

View File

@@ -0,0 +1,2 @@
concrete SentenceIta of Sentence = CatIta ** SentenceRomance with
(ResRomance = ResIta) ;

View File

@@ -1,92 +1,141 @@
--# -path=.:../romance:../abstract:../../prelude
concrete StructuralIta of Structural = CatIta **
open PhonoIta, MorphoIta, ParadigmsIta, BeschIta, Prelude in {
concrete StructuralIta of Structural = CategoriesIta, NumeralsIta **
open SyntaxIta, MorphoIta, BeschIta, Prelude in {
flags optimize=all ;
lin
UseNumeral n = {s = \\g => n.s !g ; n = n.n ; isNo = False} ;
above_Prep = justPrep "sopra" ;
after_Prep = justPrep "dopo" ;
all8mass_Det = mkDeterminer singular "tutto" "tutta" ;
all_NDet = mkDeterminerNum ["tutti i"] ["tutte le"] ; --- gli
almost_Adv = ss "quasi" ;
although_Subj = ss "benché" ** {m = Con} ;
and_Conj = etConj ;
because_Subj = ss "perché" ** {m = Ind} ;
before_Prep = justPrep "prima" ;
behind_Prep = justPrep "dietro" ;
between_Prep = justPrep "tra" ;
both_AndConjD = etetConj ;
by8agent_Prep = justCase (CPrep P_da) ;
by8means_Prep = justPrep "per" ;
can8know_VV = mkVerbVerbDir (verbPres (sapere_78 "sapere") AHabere) ;
can_VV = mkVerbVerbDir (verbPres (potere_69 "potere") AHabere) ;
during_Prep = justPrep "durante" ;
either8or_ConjD = ououConj ;
everybody_NP = normalNounPhrase (\\c => prepCase c ++ "tutti") Masc Pl ;
every_Det = chaqueDet ;
everything_NP = mkNameNounPhrase ["tutto"] Masc ;
above_Prep = {s = ["sopra"] ; c = MorphoIta.genitive ; isDir = False} ;
after_Prep = mkPrep "dopo" ;
all_Predet = {
s = \\a,c => prepCase c ++ aagrForms "tutto" "tutta" "tutti" "tutte" ! a ;
c = Nom
} ;
almost_AdA, almost_AdN = ss "quasi" ;
always_AdV = ss "sempre" ;
although_Subj = ss "benché" ** {m = Conjunct} ;
and_Conj = ss "e" ** {n = Pl} ;
because_Subj = ss "perché" ** {m = Indic} ;
before_Prep = mkPrep "prima" ;
behind_Prep = mkPrep "dietro" ;
between_Prep = mkPrep "fra" ;
both7and_DConj = {s1,s2 = "e" ; n = Pl} ;
but_PConj = ss "ma" ;
by8agent_Prep = {s = [] ; c = CPrep P_da ; isDir = False} ;
by8means_Prep = mkPrep "per" ;
can8know_VV = mkVV (verboV (sapere_78 "sapere")) ;
can_VV = mkVV (verboV (potere_69 "potere")) ;
during_Prep = mkPrep "durante" ;
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
everybody_NP = mkNP ["tutti"] Masc Pl ;
every_Det = {s = \\_,_ => "ogni" ; n = Sg} ;
everything_NP = pn2np (mkPN ["tutto"] Masc) ;
everywhere_Adv = ss "dappertutto" ;
from_Prep = justCase (CPrep P_da) ;
he_NP = pronNounPhrase pronIl ;
how_IAdv = commentAdv ;
how8many_IDet = {s = genForms "quanti" "quante" ; n = Pl} ;
if_Subj = siSubj ;
in8front_Prep = justPrep "davanti" ;
i_NP = pronNounPhrase pronJe ;
in_Prep = justCase (CPrep P_in) ;
it_NP = pronNounPhrase pronIl ;
many_Det = mkDeterminer plural "molti" "molte" ;
most8many_Det = plupartDet ;
most_Det = mkDeterminer1 singular (["la maggior parte"] ++ elisDe) ; --- de
much_Det = mkDeterminer1 singular "molto" ;
must_VV = mkVerbVerbDir (verbPres (dovere_47 "dovere") AHabere) ;
no_Phr = nonPhr ; --- and also Si!
on_Prep = justCase (CPrep P_su) ;
or_Conj = ouConj ;
otherwise_Adv = ss "altramente" ;
part_Prep = justCase genitive ; ---
possess_Prep = justCase genitive ;
few_Det = {s = \\g,c => prepCase c ++ genForms "pochi" "poche" ! g ; n = Pl} ;
first_Ord = {s = \\ag => (regA "primo").s ! Posit ! AF ag.g ag.n} ;
from_Prep = complGen ; ---
he_Pron =
mkPronoun
"lui" "lo" "gli" "glie" "lui" "suo" "sua" "suoi" "sue"
Masc Sg P3 ;
here7from_Adv = ss ["da quì"] ;
here7to_Adv = ss "quì" ;
here_Adv = ss "quì" ;
how_IAdv = ss "come" ;
how8many_IDet = {s = \\g,c => prepCase c ++ genForms "quanti" "quante" ! g ; n = Pl} ;
if_Subj = ss "se" ** {m = Indic} ;
in8front_Prep = mkPrep "davanti" ;
i_Pron =
mkPronoun
"io" "mi" "mi" "me" "me" "mio" "mia" "miei" "mie"
Masc Sg P1 ;
in_Prep = {s = [] ; c = CPrep P_in ; isDir = False} ;
it_Pron =
mkPronoun
"lui" "lo" "gli" "glie" "lui" "suo" "sua" "suoi" "sue"
Masc Sg P3 ;
less_CAdv = ss "meno" ;
many_Det = {s = \\g,c => prepCase c ++ genForms "molti" "molte" ! g ; n = Pl} ;
more_CAdv = ss "più" ;
most_Predet = {s = \\_,c => prepCase c ++ ["la maggior parte"] ; c = CPrep P_di} ;
much_Det = {s = \\g,c => prepCase c ++ genForms "molto" "molta" ! g ; n = Sg} ;
must_VV = mkVV (verboV (dovere_47 "dovere")) ;
no_Phr = ss "no" ;
on_Prep = {s = [] ; c = CPrep P_su ; isDir = False} ;
one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ;
only_Predet = {s = \\_,c => prepCase c ++ "soltanto" ; c = Nom} ; --- solo|a|i|e
or_Conj = {s = "o" ; n = Sg} ;
otherwise_PConj = ss "altramente" ;
part_Prep = complGen ;
please_Voc = ss ["per favore"] ;
possess_Prep = complGen ;
quite_Adv = ss "assai" ;
she_NP = pronNounPhrase pronElle ;
so_Adv = ss "così" ;
somebody_NP = mkNameNounPhrase ["qualcuno"] Masc ;
some_Det = mkDeterminer1 singular "qualche" ;
some_NDet = mkDeterminerNum "alcuni" "alcune" ;
something_NP = mkNameNounPhrase ["qualche cosa"] Masc ;
somewhere_Adv = ss ["qualche parte"] ; --- ne - pas
that_Det = mkDeterminer singular "quello" "quella" ;
that_NP = mkNameNounPhrase ["quello"] Masc ;
therefore_Adv = ss "quindi" ;
these_NDet = mkDeterminerNum "questi" "queste" ; --- ci
they_NP = pronNounPhrase pronIls ;
they8fem_NP = pronNounPhrase pronIls ;
this_Det = mkDeterminer singular "questo" "questa" ;
this_NP = mkNameNounPhrase ["questo"] Masc ;
those_NDet = mkDeterminerNum "quelli" "quelle" ; --- quegli
thou_NP = pronNounPhrase pronTu ;
through_Prep = justPrep "per" ;
too_Adv = ss "troppo" ;
to_Prep = justCase dative ; ---
under_Prep = justPrep "sotto" ;
very_Adv = ss "molto" ;
want_VV = mkVerbVerbDir (verbPres (volere_96 "volere") AHabere) ;
we_NP = pronNounPhrase pronNous ;
what8one_IP = intPronWhat singular ;
what8many_IP = intPronWhat plural ;
when_IAdv = quandAdv ;
when_Subj = quandSubj ;
where_IAdv = ouAdv ;
which8many_IDet = mkDeterminerNum "quali" "quali" ** {n = Pl} ;
which8one_IDet = quelDet ;
who8one_IP = intPronWho singular ;
who8many_IP = intPronWho plural ;
why_IAdv = pourquoiAdv ;
without_Prep = justPrep "senza" ;
with_Prep = justCase (CPrep P_con) ;
ye_NP = pronNounPhrase pronVous ;
yes_Phr = ouiPhr ;
you_NP = pronNounPhrase pronVous ;
she_Pron =
mkPronoun
"lei" "la" "le" "glie" "lei" "suo" "sua" "suoi" "sue"
Fem Sg P3 ;
so_AdA = ss "così" ;
somebody_NP = pn2np (mkPN ["qualcuno"] Masc) ;
somePl_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Pl} ;
someSg_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Sg} ;
something_NP = pn2np (mkPN ["qualche cosa"] Masc) ;
somewhere_Adv = ss ["qualche parte"] ;
that_Quant = {
s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "quello" "quella" ! g ;
Pl => \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g ---- quegli
}
} ;
that_NP = mkNP ["quello"] Masc Sg ;
there7from_Adv = ss ["di là"] ;
there7to_Adv = ss "là" ; --- ci
there_Adv = ss "là" ;
therefore_PConj = ss "quindi" ;
these_NP = mkNP ["questi"] Masc Pl ;
they_Pron = mkPronoun
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
Masc Pl P3 ;
this_Quant = {
s = \\_ => table {
Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ;
Pl => \\g,c => prepCase c ++ genForms "questi" "queste" ! g
}
} ;
this_NP = pn2np (mkPN ["questo"] Masc) ;
those_NP = mkNP ["quelli"] Masc Pl ;
through_Prep = mkPrep "per" ;
too_AdA = ss "troppo" ;
to_Prep = complDat ;
under_Prep = mkPrep "sotto" ;
very_AdA = ss "molto" ;
want_VV = mkVV (verboV (volere_96 "volere")) ;
we_Pron =
mkPronoun "noi" "ci" "ci" "ce" "noi" "nostro" "nostra" "nostri" "nostre"
Masc Pl P1 ;
whatSg_IP = {s = \\c => prepCase c ++ ["che cosa"] ; a = aagr Fem Sg} ;
whatPl_IP = {s = \\c => prepCase c ++ ["che cose"] ; a = aagr Fem Pl} ; ---
when_IAdv = ss "quando" ;
when_Subj = ss "quando" ** {m = Indic} ;
where_IAdv = ss "dove" ;
whichSg_IDet = {s = \\g,c => prepCase c ++ genForms "quale" "quale" ! g ; n = Sg} ;
whichPl_IDet = {s = \\g,c => prepCase c ++ genForms "quali" "quali" ! g; n = Pl} ;
whoPl_IP = {s = \\c => prepCase c ++ "chi" ; a = aagr Masc Pl} ;
whoSg_IP = {s = \\c => prepCase c ++ "chi" ; a = aagr Masc Sg} ;
why_IAdv = ss "perché" ;
without_Prep = mkPrep "senza" ;
with_Prep = {s = [] ; c = CPrep P_con ; isDir = False} ;
yes_Phr = ss "sì" ;
youSg_Pron = mkPronoun
"tu" "ti" "ti" "te" "te" "tuo" "tua" "tuoi" "tue"
Masc Sg P2 ;
youPl_Pron =
mkPronoun
"voi" "vi" "vi" "ve" "voi" "vostro" "vostra" "vostri" "vostre"
Masc Pl P2 ;
youPol_Pron =
mkPronoun
"Lei" "La" "Le" "Glie" "Lei" "Suo" "Sua" "Suoi" "Sue"
Masc Sg P3 ;
}

View File

@@ -1,246 +0,0 @@
--# -path=.:../abstract:../../prelude:../romance
concrete SwadeshLexIta of SwadeshLex = CategoriesIta
** open StructuralIta, RulesIta, SyntaxIta, ParadigmsIta,
BasicIta, BeschIta, Prelude in {
lin
-- Pronouns
i_NP = i_NP ;
thou_NP = thou_NP ;
he_NP = he_NP ;
we_NP = we_NP ;
you_NP = you_NP ;
they_NP = they_NP ;
who8many_IP = who8many_IP ;
who8one_IP = who8one_IP ;
what8many_IP = what8many_IP ;
what8one_IP = what8one_IP ;
-- Determiners
this_Det = this_Det ;
that_Det = that_Det ;
all_NDet = all_NDet ;
many_Det = many_Det ;
some_Det = some_Det ;
few_Det = mkDeterminer Pl "pochi" "poche" ;
other_Det = mkDeterminer Pl "altri" "altre" ;
-- Adverbs
here_Adv = here_Adv;
there_Adv = there_Adv;
where_IAdv = where_IAdv;
when_IAdv = when_IAdv;
how_IAdv = how_IAdv;
-- not : Adv ; -- ?
-- Conjunctions
and_Conj = and_Conj ;
-- Prepositions
at_Prep = justCase dative.p1 ;
in_Prep = StructuralIta.in_Prep ;
with_Prep = StructuralIta.with_Prep ;
-- Numerals
one_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))) ;
two_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))) ;
three_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) ;
four_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n4))))) ;
five_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n5))))) ;
-- Adjectives
bad_ADeg = bad_ADeg ;
big_ADeg = big_ADeg ;
black_ADeg = black_ADeg ;
cold_ADeg = cold_ADeg ;
correct_ADeg = regADeg "corretto" ;
dirty_ADeg = dirty_ADeg ;
dry_ADeg = regADeg "secco" ;
dull_ADeg = regADeg "noioso" ;
far_ADeg = regADeg "lontano" ;
full_ADeg = regADeg "pieno" ;
good_ADeg = good_ADeg ;
green_ADeg = green_ADeg ;
heavy_ADeg = regADeg "pesante" ;
long_ADeg = long_ADeg ;
narrow_ADeg = narrow_ADeg ;
near_ADeg = regADeg "vicino" ;
new_ADeg = new_ADeg ;
old_ADeg = old_ADeg ;
red_ADeg = red_ADeg ;
rotten_ADeg = regADeg "marcio" ;
round_ADeg = regADeg "rotondo" ;
sharp_ADeg = regADeg "aguzzo" ;
short_ADeg = short_ADeg ;
small_ADeg = small_ADeg ;
smooth_ADeg = regADeg "liscio" ;
straight_ADeg = regADeg "diretto" ;
thick_ADeg = thick_ADeg ;
thin_ADeg = thin_ADeg ;
warm_ADeg = warm_ADeg ;
wet_ADeg = regADeg "bagnato" ;
white_ADeg = white_ADeg ;
wide_ADeg = regADeg "largo" ;
yellow_ADeg = yellow_ADeg ;
left_A = regA "sinistro" ;
right_A = regA "destro" ;
-- Nouns
animal_N = regN "animale" ;
ashes_N = regN "cenere" ;
back_N = regN "schiena" ;
bark_N = regN "corteccia" ;
belly_N = regN "pancia" ;
bird_N = bird_N;
blood_N = regN "sangue" ;
bone_N = regN "osso" ;
breast_N = regN "seno" ;
child_N = child_N ;
cloud_N = regN "nuvola" ;
day_N = regN "giorno" ;
dog_N = dog_N ;
dust_N = regN "polvere" ;
ear_N = regN "orecchio" ;
earth_N = regN "terra" ;
egg_N = mkN "uovo" "uova" masculine ; -- fem in Pl
eye_N = regN "occhio" ;
fat_N = regN "grasso" ;
father_N = UseN2 father_N2 ;
feather_N = regN "piuma" ;
fingernail_N = regN "unghia" ;
fire_N = regN "fuoco" ;
fish_N = fish_N ;
flower_N = regN "fiore" ;
fog_N = regN "nebbia" ;
foot_N = regN "piede" ;
forest_N = regN "bosco" ;
fruit_N = fruit_N ;
grass_N = regN "erba" ;
guts_N = regN "intestino" ;
hair_N = regN "capello" ;
hand_N = femN (regN "mano") ;
head_N = regN "testa" ;
heart_N = regN "cuore" ;
horn_N = regN "corno" ;
husband_N = regN "marito" ;
ice_N = regN "ghiaccio" ;
knee_N = regN "ginocchio" ;
lake_N = lake_N ;
leaf_N = regN "foglia" ;
leg_N = regN "gamba" ;
liver_N = regN "fegato" ;
louse_N = regN "pidocchio" ;
man_N = man_N ;
meat_N = meat_N ;
moon_N = moon_N ;
mother_N = UseN2 mother_N2 ;
mountain_N = mountain_N ;
mouth_N = regN "bocca" ;
name_N = regN "nome" ;
neck_N = regN "collo" ;
night_N = femN (regN "notte") ;
nose_N = regN "naso" ;
person_N = regN "persona" ;
rain_N = regN "pioggia" ;
river_N = river_N ;
road_N = regN "strada" ;
root_N = femN (regN "radice") ;
rope_N = regN "corda" ;
salt_N = regN "sale" ;
sand_N = regN "sabbia" ;
sea_N = sea_N ;
seed_N = regN "seme" ;
skin_N = femN (regN "pelle") ;
sky_N = regN "cielo" ;
smoke_N = regN "fumo" ;
snake_N = snake_N ;
snow_N = femN (regN "neve") ;
star_N = star_N ;
stick_N = regN "bastone" ;
stone_N = stone_N ;
sun_N = sun_N ;
tail_N = regN "coda" ;
tongue_N = regN "lingua" ;
tooth_N = regN "dente" ;
tree_N = tree_N ;
water_N = water_N ;
wife_N = regN "donna" ;
wind_N = regN "vento" ;
wing_N = regN "ala" ;
woman_N = woman_N ;
worm_N = regN "verme" ;
year_N = regN "anno" ;
-- Verbs
bite_V = verboV (esplodere_51 "mordere") ;
blow_V = regV "soffiare" ;
breathe_V = regV "respirare" ;
burn_V = regV "bruciare" ;
come_V = BasicIta.come_V ;
count_V = regV "contare" ;
cut_V = regV "tagliare" ;
die_V = BasicIta.die_V ;
dig_V = regV "scavare" ;
drink_V = drink_V2 ;
eat_V = regV "mangiare" ;
fall_V = essereV (verboV (cadere_28 "cadere")) ;
fear_V = fear_VS ;
fight_V = regV "lottare" ;
float_V = regV "galleggiare" ;
flow_V = verboV (finire_100 "fluire") ;
fly_V = regV "volare" ;
freeze_V = regV "gelare" ;
give_V = verboV (dare_15 "dare") ;
hear_V = hear_V2 ;
hit_V = regV "colpire" ;
hold_V = verboV (venire_110 "tenire") ;
hunt_V = regV "cacciare" ;
kill_V = verboV (ridere_74 "uccidere") ;
know_V = know_V2 ;
laugh_V = verboV (ridere_74 "ridere") ;
lie_V = verboV (piacere_64 "giacere") ;
live_V = live_V ;
play_V = regV "giocare" ;
pull_V = regV "tirare" ;
push_V = verboV (cingere_31 "spingere") ;
rub_V = regV "strofinare" ;
say_V = say_VS ;
scratch_V = regV "graffiare" ;
see_V = see_V2 ;
sew_V = verboV (cucire_103 "cucire") ;
sing_V = regV "cantare" ;
sit_V = verboV (sedere_84 "sedere") ; --- refl?
sleep_V = sleep_V ;
smell_V = verboV (sentire_99 "sentire") ;
spit_V = regV "sputare" ;
split_V = verboV (ridere_74 "dividere") ;
squeeze_V = verboV (temere_20 "spremere") ;
stab_V = regV "pugnalare" ;
stand_V = verboV (stare_16 "stare") ; ---- in piedi
suck_V = regV "succhiare" ;
swell_V = regV "gonfiare" ;
swim_V = regV "nuotare" ;
think_V = regV "pensare" ;
throw_V = regV "gettare" ;
tie_V = regV "legare" ;
turn_V = regV "tornare" ;
vomit_V = regV "vomitare" ;
walk_V = regV "camminare" ;
wash_V = regV "lavare" ;
wipe_V = regV "asciugare" ;
}

View File

@@ -1,290 +0,0 @@
--# -path=.:../romance:../../prelude
instance SyntaxIta of SyntaxRomance =
TypesIta ** open Prelude, (CO=Coordination), MorphoIta, BeschIta in {
flags optimize=all ;
oper
nameNounPhrase = \jean ->
normalNounPhrase
(\\c => prepCase c ++ jean.s)
jean.g
Sg ;
nounPhraseOn = mkNameNounPhrase "si" Masc ; --- can be plural dep. on object
pronImpers : NounPhrase = mkNameNounPhrase [] Masc ;
partitiveNounPhrase = \n,vino ->
normalNounPhrase
(table {
CPrep P_di => elisDe ++ vino.s ! n ;
c => prepCase c ++ artDef vino.g n (CPrep P_di) ++ vino.s ! n
}
)
vino.g
n ;
chaqueDet = mkDeterminer1 Sg "ogni" ;
tousDet = mkDeterminer Pl ["tutti i"] ["tutte le"] ; --- gli
plupartDet = mkDeterminer1 Pl ["la maggior parte di"] ; --- dei, degli, delle
unDet = mkDeterminer Sg artUno artUna ;
plDet = mkDeterminer1 Pl [] ; --- dei, degli, delle
quelDet = mkDeterminer1 Sg "quale" ;
npGenPoss = \n,ton,mec ->
\\c => artDef mec.g n c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; --- mia madre
npGenPossNum = \nu,ton,mec ->
\\c => artDef mec.g Pl c ++ ton.s ! Poss Pl mec.g ++ nu.s ! mec.g ++ mec.s ! Pl ;
existNounPhrase np =
let ci = MorphoIta.pronNous in
sats2clause (
insertObject (mkSatsObject (pronEmpty np.n) (mkTransVerbCas verbEssere dative) ci)
accusative [] np) ;
{- ----
existNounPhrase = \delvino -> {
s = \\m =>
case m of {
Ind => case delvino.n of {Sg => "c'è" ; Pl => ["ci sono"]} ;
Con => case delvino.n of {Sg => ["ci sia"] ; Pl => ["ci siano"]}
} ++ delvino.s ! stressed accusative --- ce ne sono ; have to define "ci"
} ;
-}
---- check this!
reflPron : Number => Person => NPFormA => Str = \\n,p =>
case p of {
P3 => table {
Ton x => prepCase x ++ "sé" ;
Aton _ => "se" ;
Poss Sg Masc => "su" ;
Poss Sg _ => "su" ;
Poss Pl _ => "sus"
} ;
_ => (personPron Masc n p).s
} ;
mkAdjSolo : Str -> Bool -> Adjective = \adj,p ->
mkAdjective (adjSolo adj) p ;
mkAdjTale : Str -> Bool -> Adjective = \adj,p ->
mkAdjective (adjTale adj) p ;
mkAdjDegrSolo : Str -> Bool -> AdjDegr = \adj,p ->
mkAdjDegrLong (adjSolo adj) p ;
mkAdjDegrTale : Str -> Bool -> AdjDegr = \adj,p ->
mkAdjDegrLong (adjTale adj) p ;
comparConj = variants {"di" ; "che"} ;
-- The commonest case for functions is common noun + "di".
funGen : CommNounPhrase -> Function = \mere ->
mere ** complementCas genitive ;
-- Chains of "cui" - "cui" do not arise.
funRelPron = \mere,lequel ->
{s = table {
RComplex g n c => variants {
case mere.c of {
CPrep P_di => artDef mere.g n c ++
lequel.s ! RSimple dative ++ mere.s ! n ;
_ => nonExist} ;
artDef mere.g n c ++ mere.s ! n ++
mere.s2 ++ lequel.s ! RComplex g n mere.c
} ;
_ => nonExist
} ;
g = RG mere.g
} ;
-- Verbs
negVerb = \va -> "non" ++ va ;
copula = verbEssere ;
isClitCase = \c -> case c of {
Acc => True ;
CPrep P_a => True ; -- dative
_ => False
} ;
auxVerb ve = case ve.aux of {
AHabere => verbAvere ;
AEsse => verbEssere
} ;
-- The negation of a verb.
posNeg = \b,v,c ->
if_then_else Str b
(v ++ c)
("non" ++ v ++ c) ;
embedConj = "che" ;
-- Relative pronouns
identRelPron = {
s = table {
RSimple c => relPronForms ! c ;
RComplex g n c => composRelPron g n c
} ;
g = RNoGen
} ;
suchPron = talPron ;
composRelPron = ilqualPron ;
allRelForms = \lequel,g,n,c ->
variants {
lequel.s ! RSimple c ;
lequel.s ! RComplex g n c
} ;
pronIl = MorphoIta.pronIl ;
-- Interrogative pronouns
nounIntPron = \n, mec ->
{s = \\c => prepCase c ++ qualPron mec.g n ++ mec.s ! n ;
g = mec.g ;
n = n
} ;
intPronWho = \num -> {
s = \\c => prepCase c ++ "chi" ;
g = Masc ; --- can we decide this?
n = num
} ;
intPronWhat = \num -> {
s = table {
c => prepCase c ++ "che" ++ optStr "cosa"
} ;
g = Masc ; --- can we decide this?
n = num
} ;
-- Questions
{- ----
questVerbPhrase = \jean,dort ->
{s = table {
DirQ => (predVerbPhrase jean dort).s ! Ind ;
IndirQ => "se" ++ (predVerbPhrase jean dort).s ! Ind
}
} ;
existNounPhraseQuest = \delvino ->
let cedelvino = (existNounPhrase delvino).s ! Ind
in {
s = \\m => case m of {DirQ => [] ; _ => "se"} ++ cedelvino
} ;
intSlash = \Qui, Tuvois ->
let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in
{s = table {
DirQ => qui ++ tuvois ;
IndirQ => ifCe Tuvois.c ++ qui ++ tuvois
}
} ;
-}
intSlash = \Qui, Tuvois ->
{s = \\b,cl =>
let
qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ;
tuvois = Tuvois.s ! b ! cl
in
table {
DirQ => qui ++ tuvois ;
IndirQ => ifCe Tuvois.c ++ 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 ->
let {jeandort = (predVerbPhrase jean dort).s ! Ind} in
{s = table {
DirQ => quand.s ++ jeandort ; --- inversion?
IndirQ => quand.s ++ jeandort
}
} ;
-}
---- moved from MorphoIta
-- A macro for defining gender-dependent tables will be useful.
-- Its first application is in the indefinite article.
genForms = \matto, matta ->
table {Masc => matto ; Fem => matta} ;
artUno : Str = elision "un" "un" "uno" ;
artUna : Str = elision "una" "un'" "una" ;
artIndef = \g,n,c -> case n of {
Sg => prepCase c ++ genForms artUno artUna ! g ;
_ => prepCase c ++ []
} ;
artDef = \g,n,c -> artDefTable ! g ! n ! c ;
-- The composable pronoun "il quale" is inflected by varying the definite
-- article and the determiner "quale" in the expected way.
ilqualPron : Gender -> Number -> Case -> Str = \g,n,c ->
artDef g n c ++ qualPron g n ;
-- moved from ResIta
commentAdv = ss "comme" ;
quandAdv = ss "quando" ;
ouAdv = ss "dove" ;
pourquoiAdv = ss "perché" ;
etConj = ss "e" ** {n = Pl} ;
ouConj = ss "o" ** {n = Sg} ;
etetConj = sd2 "e" "e" ** {n = Pl} ;
ououConj = sd2 "o" "o" ** {n = Sg} ;
niniConj = sd2 "né" "né" ** {n = Sg} ; --- requires ne !
siSubj = ss "se" ** {m = Ind} ;
quandSubj = ss "quando" ** {m = Ind} ;
ouiPhr = ss ["Sì ."] ;
nonPhr = ss ["No ."] ;
negNe = "non" ; negPas = [] ;
progressiveSats subj vp =
mkSatsObject subj
(mkTransVerbDir (verbPres (stare_16 "stare") AEsse)) --- hack to reuse
(nameNounPhrase (mkProperName ( --- this function
vp.s ! VIGerund ! (pgen2gen subj.g) ! subj.n ! subj.p) Masc)) ;
conjunctCase : CaseA -> CaseA = \c -> case c of {
CPrep _ => accusative ;
_ => c
} ;
}

View File

@@ -1,32 +0,0 @@
concrete TimeIta of Time = NumeralsIta **
open Prelude, MorphoIta, CategoriesIta, ParadigmsIta in {
lincat
Date = SS ;
Weekday = N ;
Hour = SS ;
Minute = SS ;
Time = SS ;
lin
DayDate day = ss (day.s ! singular) ;
DayTimeDate day time = ss (day.s ! singular ++ "alle" ++ time.s) ;
FormalTime h m = ss ("alle" ++ h.s ++ "e" ++ m.s) ;
PastTime h m = ss ("alle" ++ h.s ++ "e" ++ h.s) ;
ToTime h m = ss ("alle" ++ h.s ++ "meno" ++ m.s) ;
ExactTime h = ss (h.s ++ "esattamento") ;
NumHour n = ss (n.s ! feminine) ;
NumMinute n = ss (n.s ! feminine) ;
monday = regN "lunedì" ;
tuesday = regN "martedì" ;
wednesday = regN "mercoledì" ;
thursday = regN "giovedì" ;
friday = regN "venerdì" ;
saturday = regN "sabato" ;
sunday = regN "domenica" ;
} ;

View File

@@ -1,159 +0,0 @@
--1 Italian Word Classes and Morphological Parameters
--
-- This is a resource module for Italian morphology, defining the
-- morphological parameters and word classes of Italian.
-- The morphology is so far only
-- complete w.r.t. the syntax part of the resource grammar.
-- It does not include those parameters that are not needed for
-- analysing individual words: such parameters are defined in syntax modules.
instance TypesIta of TypesRomance = {
-- First we give values to the abstract types.
param
Case = Nom | Acc | CPrep Prep ;
Prep = P_di | P_a | P_da | P_in | P_su | P_con ;
NPForm = Ton Case | Aton Case | Poss Number Gender ;
--2 Prepositions
--
-- The type $Case$ in $types.Ita.gf$ has the dative and genitive
-- cases, which are relevant for pronouns and the definite article,
-- but which are otherwise expressed by prepositions.
oper
prepCase = \c -> case c of {
Nom => [] ;
Acc => [] ;
CPrep p => strPrep p
} ;
strPrep : Prep -> Str = \p -> case p of {
P_di => "di" ;
P_a => "a" ;
P_da => "da" ;
P_in => "in" ;
P_su => "su" ;
P_con => "con"
} ;
oper
CaseA = Case ;
NPFormA = NPForm ;
prepositional = accusative ;
nominative = Nom ;
accusative = Acc ;
genitive = CPrep P_di ;
dative = CPrep P_a ;
stressed = Ton ;
unstressed = Aton ;
oper
pform2case = \p -> case p of {
Ton x => x ;
Aton x => x ;
Poss _ _ => genitive
} ;
case2pform = \c -> case c of {
Nom => Aton Nom ;
Acc => Aton Acc ;
_ => Ton c
} ;
case2pformClit = \c -> case c of {
Nom => Aton Nom ;
Acc => Aton Acc ;
CPrep P_a => Aton c ;
_ => Ton c
} ;
-- Comparative adjectives are only sometimes formed morphologically
-- (actually: by different morphemes).
mkAdjComp : (_,_ : AForm => Str) -> AdjComp =
\buono, migliore ->
{s = table {Pos => buono ; _ => migliore}} ;
-- Usually the comparison forms are built by prefixing the word
-- "più". The definite article needed in the superlative is provided in
-- $syntax.Ita.gf$.
adjCompLong : Adj -> AdjComp = \caro ->
mkAdjComp
caro.s
(\\gn => "più" ++ caro.s ! gn) ;
-- Relative pronouns: the case-dependent parameter type.
param RelForm = RSimple Case | RComplex Gender Number Case ;
oper RelFormA = RelForm ;
npRelForm : NPFormA -> RelFormA = \np -> case np of {
Ton c => RSimple c ;
Aton c => RSimple c ;
Poss _ _ => RSimple genitive
} ;
oper RelFormA = RelForm ;
--2 Relative pronouns
--
-- The simple (atonic) relative pronoun shows genuine variation in all of the
-- cases.
relPronForms = table {
Nom => "che" ;
Acc => "che" ;
CPrep P_a => "cui" ; --- variant a cui
CPrep p => strPrep p ++ "cui"
} ;
-- Verbs: conversion from full verbs to present-tense verbs.
verbPres = \amare,a -> {s = table {
VInfin => amare.s ! Inf ;
VFin (VPres Ind) n p => amare.s ! Indi Pres n p ;
VFin (VPres Sub) n p => amare.s ! Cong Pres n p ;
VFin (VImperf Ind) n p => amare.s ! Indi Imperf n p ;
VFin (VImperf Sub) n p => amare.s ! Cong Imperf n p ;
VFin VPasse n p => amare.s ! Pass n p ;
VFin VFut n p => amare.s ! Fut n p ;
VFin VCondit n p => amare.s ! Cond n p ;
VImper np => amare.s ! Imper np ;
VPart g n => amare.s ! Part PassP g n ;
VGer => amare.s ! Ger
} ;
aux = a
} ;
-- The full conjunction is a table on $VForm$:
param
Tempo = Pres | Imperf ;
TempoP = PresP | PassP ;
VForm =
Inf
| InfClit
| Indi Tempo Number Person
| Pass Number Person
| Fut Number Person
| Cong Tempo Number Person
| Cond Number Person
| Imper NumPersI
| Ger
| Part TempoP Gender Number ;
-- This is the full verb type.
oper Verbum = {s : VForm => Str} ;
}

View File

@@ -0,0 +1,2 @@
concrete VerbIta of Verb = CatIta ** VerbRomance with
(ResRomance = ResIta) ;

View File

@@ -0,0 +1,17 @@
1/2/2006
14:05 rename and sed as in HOWTO
The grammar compiles but produces French
PhonoIta from 0.9
MorphoIta from 0.9
DiffIta
ParadigmsIta from 0.9
LexiconIta from 0.9
StructuralIta, filling StructuralFre from 0.9
NumeralsIta from 0.9 adding ordinals
17:30 done - but needs more testing
17:40 added Ita to mathematical and multimodal, updated doc/index.txt,
doc/gf-resource.txt, and README