changed names of resource-1.3; added a note on homepage on release

This commit is contained in:
aarne
2008-06-25 16:54:35 +00:00
parent 7d721eb16e
commit c5c6d13546
1729 changed files with 113 additions and 32 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

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

View File

@@ -0,0 +1,199 @@
--# -path=.:../romance:../abstract:../common:prelude
instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelude in {
flags optimize=all ;
param
Prepos = 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 => pre {"a" ; "ad" / vocale} ;
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 ag an ap => argPron ag an ap Acc False ;
_ => []
} ;
hasAcc = case acc of {
CNone => False ;
_ => True
} ;
hasDat = case dat of {
CNone => False ;
_ => True
} ;
pdat = case dat of {
CPron ag an ap => argPron ag an ap dative hasAcc ;
_ => []
} ;
in
<pdat ++ pacc, [], orB hasAcc hasDat> ;
mkImperative b p vp = {
s = \\pol,aag =>
let
pe = case b of {True => P3 ; _ => p} ;
agr = aag ** {p = pe} ;
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
verb = case <aag.n, pol,pe> of {
<Sg,Neg,P2> => (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" ;
subjIf = "se" ;
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 = makeNP ["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 = makeNP ["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 [] True (agrP3 Masc Sg) vp ;
GenericCl vp = mkClause "si" True (agrP3 Masc Sg) vp ; ---- non se ci fanno cose
CleftNP np rs = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => rs.s ! Indic ! np.a)
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ;
CleftAdv ad s = mkClause [] True (agrP3 Masc Sg)
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
(insertComplement (\\_ => ad.s) (predV copula))) ;
ExistNP np =
mkClause [] True (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 [] True (agrP3 ip.a.g ip.a.n)
(insertClit2 (elision "ci" "c'" "ci")
(predV copula))).s ! DDir ! 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 False 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

@@ -0,0 +1,10 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete LangIta of Lang =
GrammarIta,
LexiconIta
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,358 @@
--# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconIta of Lexicon = CatIta ** open
MorphoIta, ParadigmsIta, BeschIta in {
flags
optimize=values ;
lin
airplane_N = regN "aereo" ;
answer_V2S = mkV2S (verboV (rispondere_76 "rispondere")) ParadigmsIta.dative ;
apartment_N = regN "apartamento" ;
apple_N = regN "mela" ;
art_N = femN (regN "arte") ;
ask_V2Q = mkV2Q (verboV (rispondere_76 "chiedere")) ParadigmsIta.dative ;
baby_N = regN "bambino" ;
bad_A = prefA (mkADeg (regA "cattivo") (regA "peggio")) ;
bank_N = regN "banca" ;
beautiful_A = prefA (regADeg "bello") ;
become_VA = essereV (regV "diventare") ;
beer_N = regN "birra" ;
beg_V2V = mkV2V (regV "pregare") ParadigmsIta.accusative ParadigmsIta.dative ;
big_A = prefA (regADeg "grande") ;
bike_N = regN "bicicletta" ;
bird_N = regN "uccello" ;
black_A = regADeg "nero" ;
blue_A = mkA "blù" "blù" "blù" "blù" "blumente" ;
boat_N = regN "batello" ;
book_N = regN "libro" ;
boot_N = regN "stivale" ;
boss_N = regN "capo" ;
boy_N = regN "ragazzo" ;
bread_N = regN "pane" ;
break_V2 = dirV2 (verboV (rompere_77 "rompere")) ;
broad_A = regADeg "largo" ;
brother_N2 = diN2 (regN "fratello") ;
brown_A = regADeg "marrone" ;
butter_N = regN "burro" ;
buy_V2 = dirV2 (regV "comprare") ;
camera_N = mkN ["macchina fotografica"]["macchine fotografiche"] feminine ; ---
cap_N = regN "berretta" ;
car_N = regN "macchina" ;
carpet_N = regN "tappeto" ;
cat_N = regN "gatto" ;
ceiling_N = regN "soffitto" ;
chair_N = regN "sedia" ;
cheese_N = regN "formaggio" ;
child_N = regN "bambino" ;
church_N = regN "chiesa" ;
city_N = regN "città" ;
clean_A = regADeg "proprio" ;
clever_A = regADeg "saggio" ;
close_V2 = dirV2 (verboV (chiudere_30 "chiudere")) ;
coat_N = regN "cappotto" ;
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_A = regADeg "sporco" ;
distance_N3 = mkN3 (regN "distanza") ParadigmsIta.genitive ParadigmsIta.dative ;
doctor_N = mkN "medico" "medici" masculine ;
dog_N = regN "cane" ;
door_N = regN "porta" ;
drink_V2 = dirV2 (verboV (bere_27 "bere")) ;
easy_A2V = mkA2V (regA "facile") ParadigmsIta.dative ParadigmsIta.genitive ;
eat_V2 = dirV2 (regV "mangiare") ;
empty_A = regADeg "vuoto" ;
enemy_N = regN "nemico" ;
factory_N = regN "stabilimento" ;
father_N2 = diN2 (regN "padre") ;
fear_VS = mkVS (verboV (temere_20 "temere")) ;
find_V2 = dirV2 (regV "trovare") ;
fish_N = regN "pesca" ;
floor_N = regN "pavimento" ;
forget_V2 = dirV2 (regV "dimenticare") ;
fridge_N = regN "frigorifero" ;
friend_N = regN "amico" ;
fruit_N = regN "frutta" ;
fun_AV = mkAV (regA "divertente") ParadigmsIta.genitive ;
garden_N = regN "giardino" ;
girl_N = regN "ragazza" ;
glove_N = regN "guanto" ;
gold_N = regN "oro" ;
good_A = prefA (mkADeg (regA "buono")
(mkA "migliore" "migliore" "migliori" "migliori" "meglio")) ;
go_V = essereV (verboV (andare_14 "andare")) ;
green_A = regADeg "verde" ;
harbour_N = regN "porto" ;
hate_V2 = dirV2 (regV "odiare") ;
hat_N = regN "capello" ;
have_V2 = dirV2 (verboV (avere_2 "avere")) ;
hear_V2 = dirV2 (verboV (sentire_99 "sentire")) ;
hill_N = regN "collina" ;
hope_VS = mkVS (regV "sperare") ;
horse_N = regN "cavallo" ;
hot_A = regADeg "caldo" ;
house_N = regN "casa" ;
important_A = regADeg "importante" ;
industry_N = regN "industria" ;
iron_N = regN "ferro" ;
king_N = regN "ré" ;
know_V2 = dirV2 (verboV (conoscere_37 "conoscere")) ; --- savoir_V2 : VS
lake_N = regN "lago" ;
lamp_N = regN "lampa" ;
learn_V2 = dirV2 (regV "imparare") ;
leather_N = regN "cuoio" ;
leave_V2 = dirV2 (regV "lasciare") ;
like_V2 = dirV2 (regV "amare") ;
listen_V2 = dirV2 (regV "ascoltare") ;
live_V = verboV (vivere_95 "vivere") ;
long_A = regADeg "lungo" ;
lose_V2 = dirV2 (verboV (perdere_62 "perdere")) ;
love_N = regN "amore" ;
love_V2 = dirV2 (regV "amare") ;
man_N = mkN "uomo" "uomini" masculine ;
married_A2 = mkA2 (regA "sposato") ParadigmsIta.dative ;
meat_N = femN (regN "carne") ;
milk_N = regN "latte" ;
moon_N = regN "luna" ;
mother_N2 = diN2 (femN (regN "madre")) ;
mountain_N = regN "montagna" ;
music_N = regN "musica" ;
narrow_A = regADeg "stretto" ;
new_A = prefA (regADeg "nuovo") ;
newspaper_N = regN "giornale" ;
oil_N = regN "olio" ;
old_A = prefA (regADeg "vecchio") ;
open_V2 = dirV2 (verboV (aprire_102 "aprire")) ;
paint_V2A =
mkV2A (verboV (cingere_31 "pingere")) ParadigmsIta.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" ;
plastic_N = regN "plastica" ;
play_V2 = dirV2 (regV "giocare") ;
policeman_N = regN "carabiniere" ;
priest_N = regN "prete" ;
probable_AS = mkAS (regA "probabile") ;
queen_N = regN "regina" ;
radio_N = mkN "radio" "radio" feminine ;
rain_V0 = mkV0 (verboV (piovere_66 "piovere")) ;
read_V2 = dirV2 (verboV (leggere_56 "leggere")) ;
red_A = regADeg "rosso" ;
religion_N = femN (regN "religione") ;
restaurant_N = regN "ristorante" ;
river_N = regN "fiume" ;
rock_N = regN "roccia" ;
roof_N = regN "tetto" ;
rubber_N = regN "gomma" ;
run_V = verboV (correre_38 "correre") ;
say_VS = mkVS (verboV (dire_41 "dire")) ;
school_N = regN "scuola" ;
science_N = regN "scienza" ;
sea_N = regN "mare" ;
seek_V2 = dirV2 (regV "cercare") ;
see_V2 = dirV2 (verboV (vedere_93 "vedere")) ;
sell_V3 = dirV3 (verboV (scendere_80 "vendere")) ParadigmsIta.dative ; ---- except some forms
send_V3 = dirV3 (regV "mandare") ParadigmsIta.dative ;
sheep_N = regN "agnello" ;
ship_N = femN (regN "nave") ;
shirt_N = regN "camicia" ;
shoe_N = regN "scarpa" ;
shop_N = regN "magazzino" ;
short_A = regADeg "corto" ; --- breve
silver_N = regN "argento" ;
sister_N = regN "sorella" ;
sleep_V = verboV (dormire_99b "dormire") ;
small_A = prefA (regADeg "piccolo") ;
snake_N = regN "serpente" ;
sock_N = regN "calza" ;
speak_V2 = dirV2 (regV "parlare") ;
star_N = regN "stella" ;
steel_N = regN "acciaio" ;
stone_N = regN "sasso" ;
stove_N = regN "forno" ;
student_N = regN "studente" ;
stupid_A = regADeg "stupido" ;
sun_N = regN "sole" ;
switch8off_V2 = dirV2 (verboV (cingere_31 "spingere")) ;
switch8on_V2 = dirV2 (regV "allumare") ; ----
table_N = regN "tavola" ; --- tavolo
talk_V3 = mkV3 (regV "parlare") ParadigmsIta.dative ParadigmsIta.genitive ;
teacher_N = regN "professore" ;
teach_V2 = dirV2 (regV "insegnare") ;
television_N = femN (regN "televisione") ;
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_A = regADeg "brutto" ;
understand_V2 = dirV2 (regV "capire") ;
university_N = regN "università" ;
village_N = regN "paese" ;
wait_V2 = mkV2 (regV "aspettare") ParadigmsIta.dative ;
walk_V = regV "camminare" ;
warm_A = regADeg "caldo" ;
war_N = regN "guerra" ;
watch_V2 = dirV2 (regV "guardare") ;
water_N = regN "acqua" ;
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 (reflV (regV "domandare")) ;
wood_N = regN "legno" ;
write_V2 = dirV2 (verboV (scrivere_82 "scrivere")) ;
yellow_A = regADeg "giallo" ;
young_A = prefA (regADeg "giovane") ;
do_V2 = dirV2 (verboV (fare_52 "fare")) ;
now_Adv = mkAdv "adesso" ;
already_Adv = mkAdv "già" ;
song_N = femN (regN "canzone") ;
add_V3 = dirV3 (verboV (giungere_55 "aggiungere")) ParadigmsIta.dative ;
number_N = regN "numero" ;
put_V2 = dirV2 (verboV (mettere_57 "mettere")) ;
stop_V = reflV (regV "fermare") ;
jump_V = regV "saltare" ;
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

@@ -0,0 +1,165 @@
--# -path=.:../romance:../common:../../prelude
--1 A Simple Italian Resource Morphology
--
-- Aarne Ranta 2002 -- 2005
--
-- This resource morphology contains definitions needed in the resource
-- syntax. To build a lexicon, it is better to use $ParadigmsIta$, which
-- gives a higher-level access to this module.
resource MorphoIta = CommonRomance, ResIta **
open PhonoIta, Prelude, Predef in {
flags optimize=all ;
--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} ;
-- For example:
nomVino : Str -> Number => Str = \vino -> let {vin = Predef.tk 1 vino} in
numForms vino (vin + "i") ;
nomRana : Str -> Number => Str = \rana -> let {ran = Predef.tk 1 rana} in
numForms rana (ran + "e") ;
nomSale : Str -> Number => Str = \sale -> let {sal = Predef.tk 1 sale} in
numForms sale (sal + "i") ;
nomTram : Str -> Number => Str = \tram ->
numForms tram tram ;
-- Common nouns are inflected in number and have an inherent gender.
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
{s = mecmecs ; g = gen} ;
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
mkNoun (numForms mec mecs) ;
mkNomReg : Str -> Noun = \vino ->
let
o = last vino ;
vin = init vino ;
n = last vin
in
case o of {
"o" => {s = case n of {
"c" | "g" => numForms vino (vin + "hi") ;
"i" => numForms vino vin ;
_ => numForms vino (vin + "i")
} ; g = Masc} ;
"a" => {s = case n of {
"c" | "g" => numForms vino (vin + "he") ;
_ => numForms vino (vin + "e")
} ; g = Fem} ;
"e" => {s = numForms vino (vin + "i")
; g = Masc} ;
"à" | "ù" => {s = numForms vino vino
; g = Fem} ;
_ => {s = numForms vino vino
; g = Masc}
} ;
--2 Adjectives
--
-- Adjectives are conveniently seen as gender-dependent nouns.
-- Here are some patterns. First one that describes the worst case.
mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente ->
{s = table {
AF Masc n => numForms solo soli ! n ;
AF Fem n => numForms sola sole ! n ;
AA => solamente
}
} ;
-- Then the regular and invariant patterns.
adjSolo : Str -> Adj = \solo ->
let
sol = Predef.tk 1 solo
in
mkAdj solo (sol + "a") (sol + "i") (sol + "e") (sol + "amente") ;
adjTale : Str -> Adj = \tale ->
let
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 ->
mkAdj blu blu blu blu blu ; ---
mkAdjReg : Str -> Adj = \solo ->
let
o = last solo ;
sol = init solo ;
l = last sol ;
solamente = (sol + "amente")
in
case o of {
"o" => case l of {
"c" | "g" => mkAdj solo (sol + "a") (sol + "hi") (sol + "he") solamente ;
"i" => mkAdj solo (sol + "a") sol (sol + "e") solamente ;
_ => mkAdj solo (sol + "a") (sol + "i") (sol + "e") solamente
} ;
"e" => mkAdj solo solo (sol + "i") (sol + "i") (case l of {
"l" => sol + "mente" ;
_ => solo + "mente"
}) ;
_ => mkAdj solo solo solo solo (sol + "mente")
} ;
--2 Personal pronouns
--
-- 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) ->
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 => strOpt il ; -- [] or il
Aton Acc => le ;
Aton (CPrep P_di) => "ne" ; --- hmm
Aton (CPrep P_a) => lui ;
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
} ;
a = {g = g ; n = n ; p = p} ;
hasClit = True
} ;
--2 Determiners
--
-- Determiners, traditionally called indefinite pronouns, are inflected
-- in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
}

View File

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

View File

@@ -0,0 +1,111 @@
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 ;
-- numerals as sequences of digits
lincat
Dig = TDigit ;
lin
IDig d = d ;
IIDig d i = {
s = \\o => d.s ! NCard Masc ++ i.s ! o ;
n = Pl
} ;
D_0 = mkDig "0" ;
D_1 = mk3Dig "1" "1:o" Sg ; ---- gender
D_2 = mk2Dig "2" "2:o" ;
D_3 = mk2Dig "3" "3:o" ;
D_4 = mkDig "4" ;
D_5 = mkDig "5" ;
D_6 = mkDig "6" ;
D_7 = mkDig "7" ;
D_8 = mkDig "8" ;
D_9 = mkDig "9" ;
oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":o") ;
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
s = table {NCard _ => c ; NOrd _ _ => o} ; ---- gender
n = n
} ;
TDigit = {
n : Number ;
s : CardOrd => Str
} ;
}

View File

@@ -0,0 +1,475 @@
--# -path=.:../romance:../common:../abstract:../../prelude
--1 Italian Lexical Paradigms
--
-- Aarne Ranta 2003
--
-- 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 $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.
--
-- The structure of functions for each word class $C$ is the following:
-- 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. For verbs, we have a
-- separate module [``BeschIta`` ../../italian/BeschIta.gf],
-- which covers the "Bescherelle" verb conjugations.
resource ParadigmsIta =
open
(Predef=Predef),
Prelude,
CommonRomance,
ResIta,
MorphoIta,
BeschIta,
CatIta in {
flags optimize=all ;
--2 Parameters
--
-- To abstract over gender names, we define the following identifiers.
oper
Gender : Type ;
masculine : Gender ;
feminine : Gender ;
-- To abstract over number names, we define the following.
Number : Type ;
singular : Number ;
plural : Number ;
-- Prepositions used in many-argument functions are either strings
-- (including the 'accusative' empty string) or strings that
-- amalgamate with the following word (the 'genitive' "di" and the
-- 'dative' "a").
--Prep : Type ;
accusative : Prep ;
genitive : Prep ;
dative : Prep ;
mkPrep : Str -> Prep ;
-- The following prepositions also have special contracted forms.
con_Prep, da_Prep, in_Prep, su_Prep : Prep ;
--2 Nouns
mkN : overload {
-- The regular function takes the singular form and the gender,
-- and computes the plural and the gender by a heuristic.
-- The heuristic says that the gender is feminine for nouns
-- ending with "a", and masculine for all other words.
mkN : (cane : Str) -> N ;
-- To force a different gender, give it explicitly.
mkN : (carne : Str) -> Gender -> N ;
-- Worst case: give both two forms and the gender.
mkN : (uomo,uomini : Str) -> Gender -> N ;
-- In *compound nouns*, the first part is inflected as a noun but
-- 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.
mkN : N -> Str -> N
} ;
--3 Relational nouns
--
-- Relational nouns ("figlio di x") need a case and a preposition.
-- The default is regular nouns with the genitive "di".
mkN2 : overload {
mkN2 : Str -> N2 ;
mkN2 : N -> Prep -> N2
} ;
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
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. "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.
--
--3 Proper names and noun phrases
--
-- Proper names need a string and a gender. The gender is by default feminine if
-- the name ends with an "a", and masculine otherwise.
mkPN : overload {
mkPN : Str -> PN ;
mkPN : Str -> Gender -> PN
} ;
--2 Adjectives
mkA : overload {
-- For regular adjectives, all forms are derived from the
-- masculine singular. Comparison is formed by "più".
mkA : (bianco : Str) -> A ;
-- Five forms are needed in the worst
-- case (masc and fem singular, masc plural, adverbial), given that
-- comparison is formed by "più".
mkA : (solo,sola,soli,sole,solamente : Str) -> A ;
-- With irregular comparison, there are as it were two adjectives:
-- the positive ("buono") and the comparative ("migliore").
mkA : A -> A -> A
} ;
-- All the functions above create postfix adjectives. To switch
-- them to prefix ones (i.e. ones placed before the noun in
-- modification, as in "vecchia chiesa"), the following function is
-- provided.
prefixA : A -> A = prefA ;
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
mkA2 : A -> Prep -> A2 ;
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position
-- after the verb.
mkAdv : Str -> Adv ;
-- Some appear next to the verb (e.g. "sempre").
mkAdV : Str -> AdV ;
-- Adverbs modifying adjectives and sentences can also be formed.
mkAdA : Str -> AdA ;
--2 Verbs
mkV : overload {
-- 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
-- "amare, cominciare, mangiare, legare, cercare".
mkV : Str -> V ;
-- The module $BeschIta$ gives (almost) all the patterns of the "Bescherelle"
-- book. To use them in the category $V$, wrap them with the function
mkV : Verbo -> 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
} ;
-- 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 ;
--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 : overload {
mkV2 : Str -> V2 ;
mkV2 : V -> V2 ;
mkV2 : V -> Prep -> V2
} ;
-- You can reuse a $V2$ verb in $V$.
v2V : V2 -> V ;
--3 Three-place verbs
--
-- Three-place (ditransitive) verbs need two prepositions, of which
-- the first one or both can be absent.
mkV3 : V -> Prep -> Prep -> V3 ; -- parlare, a, di
dirV3 : V -> Prep -> V3 ; -- dare,_,a
dirdirV3 : V -> V3 ; -- dare,_,_
--3 Other complement patterns
--
-- Verbs and adjectives can take complements such as sentences,
-- questions, verb phrases, and adjectives.
mkV0 : V -> V0 ;
mkVS : V -> VS ;
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 -> Prep -> Prep -> V2A ;
mkVQ : V -> VQ ;
mkV2Q : V -> Prep -> V2Q ;
mkAS : A -> AS ;
mkA2S : A -> Prep -> A2S ;
mkAV : A -> Prep -> AV ;
mkA2V : A -> Prep -> Prep -> A2V ;
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$,
-- and the second argument is given
-- as an adverb. Likewise
-- $V0$ is just $V$.
V0 : Type ;
AS, A2S, AV, A2V : Type ;
--.
--2 The definitions of the paradigms
--
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
Gender = MorphoIta.Gender ;
Number = MorphoIta.Number ;
masculine = Masc ;
feminine = Fem ;
singular = Sg ;
plural = Pl ;
--Prep = Compl ;
accusative = complAcc ;
genitive = complGen ;
dative = complDat ;
mkPrep p = {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ;
con_Prep = {s = [] ; c = CPrep P_con ; isDir = False ; lock_Prep = <>} ;
da_Prep = {s = [] ; c = CPrep P_da ; isDir = False ; lock_Prep = <>} ;
in_Prep = {s = [] ; c = CPrep P_in ; isDir = False ; lock_Prep = <>} ;
su_Prep = {s = [] ; c = CPrep P_su ; isDir = False ; lock_Prep = <>} ;
mk2N 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 = <>} ;
mk2N2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
diN2 n = mk2N2 n genitive ;
aN2 n = mk2N2 n dative ;
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
mk2PN : Str -> Gender -> PN ;
mk2PN x g = {s = x ; g = g} ** {lock_PN = <>} ;
regPN x = mk2PN x g where {
g = case last x of {
"a" => feminine ;
_ => masculine
}
} ;
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
mk5A 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 = <>} ;
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) ;
mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdA x = ss x ** {lock_AdA = <>} ;
regV x =
let
are = Predef.dp 3 x ;
ci = Predef.dp 2 (Predef.tk 3 x) ;
i = last ci ;
verb = case are of {
"ire" => finire_100 x ;
_ => case i of {
"c" => cercare_7 x ;
"g" => legare_8 x ;
_ => case ci of {
"ci" => cominciare_9 x ;
"gi" => mangiare_10 x ;
_ => amare_6 x
}
}
}
in verbBesch verb ** {vtyp = VHabere ; lock_V = <>} ;
verboV ve = verbBesch ve ** {vtyp = VHabere ; lock_V = <>} ;
mk11V
dovere devo deve dobbiamo dovro
dovetti dovesti dovette dovettero dovi dovuto = verboV (mkVerbo
dovere devo deve dobbiamo dovro
dovetti dovesti dovette dovettero dovi dovuto
) ;
essereV v = {s = v.s ; vtyp = VEsse ; lock_V = <>} ;
reflV v = {s = v.s ; vtyp = VRefl ; lock_V = <>} ;
mk2V2 v p = {s = v.s ; vtyp = v.vtyp ; c2 = p ; lock_V2 = <>} ;
dirV2 v = mk2V2 v accusative ;
v2V v = v ** {lock_V = <>} ;
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 ;
AS, AV : Type = A ;
A2S, A2V : Type = A2 ;
mkV0 v = v ** {lock_V0 = <>} ;
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ; ---- more moods
mkV2S v p = mk2V2 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 = mkV3 v p t ** {lock_V2V = <>} ;
mkVA v = v ** {lock_VA = <>} ;
mkV2A v p q = mkV3 v p q ** {lock_V2A = <>} ;
mkVQ v = v ** {lock_VQ = <>} ;
mkV2Q v p = mk2V2 v p ** {lock_V2Q = <>} ;
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 = <>} ;
------------------------
mkN = overload {
mkN : (cane : Str) -> N = regN ;
mkN : (carne : Str) -> Gender -> N = \n,g -> {s = (regN n).s ; g = g ; lock_N = <>} ;
mkN : (uomo,uomini : Str) -> Gender -> N = mk2N ;
mkN : N -> Str -> N = compN
} ;
compN : N -> Str -> N ;
mk2N :(uomo,uomini : Str) -> Gender -> N ;
regN : Str -> N ;
mascN : N -> N ;
femN : N -> N ;
mkN2 = overload {
mkN2 : Str -> N2 = \s -> diN2 (regN s) ;
mkN2 : N -> Prep -> N2 = mk2N2
} ;
mk2N2 : N -> Prep -> N2 ;
diN2 : N -> N2 ;
aN2 : N -> N2 ;
regPN : Str -> PN ; -- feminine if "-a", otherwise masculine
-- obsolete
makeNP : Str -> Gender -> Number -> NP ;
mkPN = overload {
mkPN : Str -> PN = regPN ;
mkPN : Str -> Gender -> PN = mk2PN
} ;
mkA = overload {
mkA : (bianco : Str) -> A = regA ;
mkA : (solo,sola,soli,sole, solamente : Str) -> A = mk5A ;
mkA : A -> A -> A = mkADeg
} ;
mk5A : (solo,sola,soli,sole, solamente : Str) -> A ;
regA : Str -> A ;
prefA : A -> A ;
mkADeg : A -> A -> A ;
compADeg : A -> A ;
regADeg : Str -> A ;
mkV = overload {
mkV : Str -> V = regV ;
mkV : Verbo -> V = verboV ;
mkV :
(udire,odo,ode,udiamo,udiro,udii,udisti,udi,udirono,odi,udito : Str) -> V = mk11V ;
} ;
regV : Str -> V ;
verboV : Verbo -> V ;
mk11V :
(udire,odo,ode,udiamo,udiro,udii,udisti,udi,udirono,odi,udito : Str) -> V ;
mkV2 = overload {
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Prep -> V2 = mk2V2
} ;
mk2V2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
} ;

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" ; "è" ; "y"
} ;
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

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

View File

@@ -0,0 +1,142 @@
concrete StructuralIta of Structural = CatIta **
open PhonoIta, MorphoIta, ParadigmsIta, BeschIta, Prelude in {
flags optimize=all ;
lin
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 = makeNP ["tutti"] Masc Pl ;
every_Det = {s = \\_,_ => "ogni" ; n = Sg} ;
everything_NP = pn2np (mkPN ["tutto"] Masc) ;
everywhere_Adv = ss "dappertutto" ;
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} ;
for_Prep = mkPrep "per" ;
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_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 = makeNP ["quello"] Masc Sg ;
there7from_Adv = ss ["di là"] ;
there7to_Adv = ss "là" ; --- ci
there_Adv = ss "là" ;
therefore_PConj = ss "quindi" ;
these_NP = makeNP ["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 = makeNP ["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

@@ -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