mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
started updating Italian
This commit is contained in:
230
lib/resource/italian/BasicIta.gf
Normal file
230
lib/resource/italian/BasicIta.gf
Normal file
@@ -0,0 +1,230 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete BasicIta of Basic = CategoriesIta ** open ParadigmsIta, BeschIta in {
|
||||
|
||||
flags
|
||||
startcat=Phr ; lexer=textlit ; unlexer=text ;
|
||||
optimize=values ;
|
||||
|
||||
lin
|
||||
airplane_N = regN "aereo" ;
|
||||
--V answer_V2S = mkV2S (v2V répondre_V2) dative ;
|
||||
apartment_N = regN "apartamento" ;
|
||||
apple_N = regN "mela" ;
|
||||
art_N = femN (regN "arte") ;
|
||||
--V ask_V2Q = mkV2Q (regV "demander") dative ;
|
||||
baby_N = regN "bambino" ;
|
||||
bad_ADeg = prefADeg (mkADeg (regA "cattivo") (regA "peggio")) ;
|
||||
bank_N = regN "banca" ;
|
||||
beautiful_ADeg = prefADeg (regADeg "bello") ;
|
||||
become_VA = essereV (regV "diventare") ;
|
||||
beer_N = regN "birra" ;
|
||||
--V beg_V2V = mkV2V (regV "demander") accusative dative ;
|
||||
big_ADeg = prefADeg (regADeg "grande") ;
|
||||
bike_N = regN "bicicletta" ;
|
||||
bird_N = regN "uccello" ;
|
||||
black_ADeg = regADeg "nero" ;
|
||||
blue_ADeg = regADeg "blù" ;
|
||||
boat_N = regN "batello" ;
|
||||
book_N = regN "libro" ;
|
||||
boot_N = regN "stivale" ;
|
||||
boss_N = regN "capo" ;
|
||||
boy_N = regN "ragazzo" ;
|
||||
bread_N = regN "pane" ;
|
||||
--V break_V2 = dirV2 (regV "casser") ;
|
||||
broad_ADeg = regADeg "largo" ;
|
||||
brother_N2 = deN2 (regN "fratello") ;
|
||||
brown_ADeg = regADeg "marrone" ;
|
||||
butter_N = regN "burro" ;
|
||||
buy_V2 = dirV2 (regV "comprare") ;
|
||||
---- camera_N = compN (regN "appareil" masculine) ["de photo"] ;
|
||||
---- cap_N = regN "casquette" ;
|
||||
car_N = regN "macchina" ;
|
||||
---- carpet_N = regN "tapis" ;
|
||||
cat_N = regN "gatto" ;
|
||||
---- ceiling_N = regN "plafond" ;
|
||||
---- chair_N = regN "chaise" ;
|
||||
cheese_N = regN "formaggio" ;
|
||||
child_N = regN "bambino" ;
|
||||
church_N = regN "chiesa" ;
|
||||
city_N = regN "città" ;
|
||||
clean_ADeg = regADeg "proprio" ;
|
||||
clever_ADeg = regADeg "sapiente" ; ----
|
||||
--V close_V2 = dirV2 (regV "") ;
|
||||
--V coat_N = regN "manteau" ;
|
||||
cold_ADeg = regADeg "freddo" ;
|
||||
--V come_V = venir_V ;
|
||||
computer_N = regN "computer" ;
|
||||
country_N = regN "paese" ;
|
||||
cousin_N = regN "cugino" ; ---- cousine
|
||||
cow_N = regN "vacca" ;
|
||||
--V die_V = mourir_V ;
|
||||
dirty_ADeg = regADeg "sporco" ;
|
||||
doctor_N = mkN "medico" "medici" masculine ;
|
||||
dog_N = regN "cane" ;
|
||||
door_N = regN "porta" ;
|
||||
--V drink_V2 = boire_V2 ;
|
||||
easy_A2V = mkA2V (regA "facile") dative genitive ;
|
||||
eat_V2 = dirV2 (regV "mangiare") ;
|
||||
--V enemy_N = regN "ennemi" ;
|
||||
factory_N = regN "stabilimento" ;
|
||||
father_N2 = deN2 (regN "padre" masculine) ;
|
||||
--V fear_VS = mkVS (v2V craindre_V2) ;
|
||||
find_V2 = dirV2 (regV "trovare") ;
|
||||
fish_N = regN "pesca" ;
|
||||
---- floor_N = regN "plancher" ;
|
||||
forget_V2 = dirV2 (regV "dimenticare") ;
|
||||
fridge_N = regN "frigorifero" ;
|
||||
friend_N = regN "amico" ;
|
||||
fruit_N = regN "frutta" ;
|
||||
fun_AV = mkAV (regA "divertente") genitive ;
|
||||
garden_N = regN "giardino" ;
|
||||
girl_N = regN "ragazza" ;
|
||||
---- glove_N = regN "gant" ;
|
||||
gold_N = regN "oro" ;
|
||||
good_ADeg = prefADeg (mkADeg (regA "buono")
|
||||
(mkA "migliore" "migliore" "migliori" "migliori" "meglio")) ;
|
||||
--V go_V = aller_V ;
|
||||
green_ADeg = regADeg "verde" ;
|
||||
harbour_N = regN "porto" ;
|
||||
--V hate_V2 = haïr_V2 ;
|
||||
hat_N = regN "capello" ;
|
||||
--V have_V2 = avoir_V2 ;
|
||||
--V hear_V2 = entendre_V2 ;
|
||||
hill_N = regN "collina" ;
|
||||
hope_VS = mkVS (regV "sperare") ;
|
||||
horse_N = regN "cavallo" ;
|
||||
hot_ADeg = regADeg "caldo" ;
|
||||
house_N = regN "casa" ;
|
||||
important_ADeg = regADeg "importante" ;
|
||||
industry_N = regN "industria" ;
|
||||
iron_N = regN "ferro" ;
|
||||
king_N = regN "ré" ;
|
||||
--V know_V2 = connaître_V2 ; ---- savoir_V2 : VS
|
||||
lake_N = regN "lago" ;
|
||||
lamp_N = regN "lampa" ;
|
||||
--V learn_V2 = apprendre_V2 ;
|
||||
leather_N = regN "cuoio" ;
|
||||
leave_V2 = dirV2 (regV "lasciare") ;
|
||||
like_V2 = dirV2 (regV "amare") ;
|
||||
listen_V2 = dirV2 (regV "ascoltare") ;
|
||||
--V live_V = v2V vivre_V2 ;
|
||||
long_ADeg = regADeg "lungo" ;
|
||||
--V lose_V2 = perdre_V2 ;
|
||||
love_N = regN "amore" ;
|
||||
love_V2 = dirV2 (regV "amare") ;
|
||||
man_N = regN "uomo" ;
|
||||
married_A2 = mkA2 (regA "sposato") dative ;
|
||||
meat_N = femN (regN "carne") ;
|
||||
milk_N = regN "latte" ;
|
||||
moon_N = regN "luna" ;
|
||||
mother_N2 = deN2 (femN (regN "madre")) ;
|
||||
mountain_N = regN "montagna" ;
|
||||
music_N = regN "musica" ;
|
||||
narrow_ADeg = regADeg "stretto" ;
|
||||
new_ADeg = prefADeg (regADeg "nuovo") ;
|
||||
newspaper_N = regN "giornale" ;
|
||||
oil_N = regN "olio" ;
|
||||
old_ADeg =
|
||||
prefADeg (regADeg "veccio") ; ---- vieil
|
||||
--V open_V2 = ouvrir_V2 ;
|
||||
--V paint_V2A = mkV2A (v2V peindre_V2) accusative ;
|
||||
paper_N = regN "carta" ;
|
||||
peace_N = femN (regN "pace") ;
|
||||
pen_N = regN "stylo" ;
|
||||
planet_N = regN "planète" ;
|
||||
plastic_N = regN "plastic" ;
|
||||
play_V2 = dirV2 (regV "jouer") ;
|
||||
policeman_N = regN "policier" ;
|
||||
priest_N = regN "prêtre" ;
|
||||
probable_AS = mkAS (regA "probable") ;
|
||||
queen_N = regN "reine" ;
|
||||
radio_N = regN "radio" ;
|
||||
rain_V0 = mkV0 (pleuvoir_V) ;
|
||||
read_V2 = lire_V2 ;
|
||||
red_ADeg = regADeg "rouge" ;
|
||||
religion_N = regN "religion" ;
|
||||
restaurant_N = regN "restaurant" ;
|
||||
river_N = regN "rivière" ;
|
||||
rock_N = regN "rocher" ;
|
||||
roof_N = regN "toit" ;
|
||||
rubber_N = regN "caoutchuc" ;
|
||||
run_V = v2V courir_V2 ;
|
||||
say_VS = mkVS (v2V dire_V2) ;
|
||||
school_N = regN "école" ;
|
||||
science_N = regN "science" ;
|
||||
sea_N = regN "mer" ;
|
||||
seek_V2 = dirV2 (regV "chercher") ;
|
||||
see_V2 = voir_V2 ;
|
||||
sell_V3 = dirV3 (v2V vendre_V2) dative ;
|
||||
send_V3 = dirV3 (v2V envoyer_V2) dative ;
|
||||
sheep_N = regN "mouton" ;
|
||||
ship_N = regN "bateau" ;
|
||||
shirt_N = regN "chemise" ;
|
||||
shoe_N = regN "chaussure" ;
|
||||
shop_N = regN "magasin" ;
|
||||
short_ADeg = regADeg "court" ; ---- bref
|
||||
silver_N = regN "argent" ;
|
||||
sister_N = regN "soeur" ;
|
||||
sleep_V = v2V dormir_V2 ;
|
||||
small_ADeg = prefADeg (regADeg "petit") ;
|
||||
snake_N = regN "serpent" ;
|
||||
sock_N = regN "chaussette" ;
|
||||
speak_V2 = dirV2 (regV "parler") ;
|
||||
star_N = regN "étoile" ;
|
||||
steel_N = regN "acier" ;
|
||||
stone_N = regN "pierre" ;
|
||||
stove_N = regN "four" ;
|
||||
student_N = regN "étudiant" ;
|
||||
stupid_ADeg = regADeg "stupide" ;
|
||||
sun_N = regN "soleil" ;
|
||||
switch8off_V2 = éteindre_V2 ;
|
||||
switch8on_V2 = dirV2 (regV "allumer") ; ----
|
||||
table_N = regN "table" ;
|
||||
talk_V3 = mkV3 (regV "parler") dative genitive ;
|
||||
teacher_N = regN "professeur" ;
|
||||
teach_V2 = dirV2 (regV "enseigner") ;
|
||||
television_N = regN "télévision" ;
|
||||
thick_ADeg = compADeg (mkA "épais" "épaisse" "épais" "épaissement") ;
|
||||
thin_ADeg = regADeg "fin" ;
|
||||
train_N = regN "train" ;
|
||||
travel_V = regV "voyager" ;
|
||||
tree_N = regN "arbre" ;
|
||||
---- trousers_N = regN "pantalon" ;
|
||||
ugly_ADeg = regADeg "laide" ;
|
||||
understand_V2 = comprendre_V2 ;
|
||||
university_N = regN "université" ;
|
||||
village_N = regN "village" ;
|
||||
wait_V2 = attendre_V2 ; ---- dative?
|
||||
walk_V = regV "marcher" ;
|
||||
warm_ADeg = regADeg "chaud" ;
|
||||
war_N = regN "guerre" ;
|
||||
watch_V2 = dirV2 (regV "regarder") ;
|
||||
water_N = regN "eau" ;
|
||||
white_ADeg = compADeg (mkA "blanc" "blanche" "blancs" "blanchement") ;
|
||||
window_N = regN "fenêtre" ;
|
||||
wine_N = regN "vin" ;
|
||||
win_V2 = dirV2 (regV "gagner") ; ---- vaincre
|
||||
woman_N = regN "femme" ;
|
||||
wonder_VQ = mkVQ (regV "étonner") ; ----- s'étonner
|
||||
wood_N = regN "bois" ;
|
||||
write_V2 = écrire_V2 ;
|
||||
yellow_ADeg = regADeg "jaune" ;
|
||||
young_ADeg = prefADeg (regADeg "jeune") ;
|
||||
|
||||
do_V2 = faire_V2 ;
|
||||
now_Adv = mkAdv "maintenant" ;
|
||||
already_Adv = mkAdv "déjà" ;
|
||||
song_N = regN "chanson" ;
|
||||
add_V3 = dirV3 (regV "ajouter") dative ;
|
||||
number_N = regN "nombre" ; ---- numéro
|
||||
put_V2 = mettre_V2 ;
|
||||
stop_V = regV "arrêter" ; ---- s'arrêter
|
||||
jump_V = regV "sauter" ;
|
||||
here_Adv = mkAdv "ici" ;
|
||||
here7to_Adv = mkAdv "ici" ;
|
||||
here7from_Adv = mkAdv ["d'ici"] ;
|
||||
there_Adv = mkAdv "là" ; ---- y, là-bas
|
||||
there7to_Adv = mkAdv "là" ; --- y
|
||||
there7from_Adv = mkAdv ["de là"] ; ---- en
|
||||
} ;
|
||||
6283
lib/resource/italian/BeschIta.gf
Normal file
6283
lib/resource/italian/BeschIta.gf
Normal file
File diff suppressed because it is too large
Load Diff
5
lib/resource/italian/ClauseIta.gf
Normal file
5
lib/resource/italian/ClauseIta.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete ClauseIta of Clause = CategoriesIta **
|
||||
---- ClauseI with (Rules=RulesFre), (Verbphrase=VerbphraseFre) ;
|
||||
ClauseRomance with (SyntaxRomance=SyntaxIta) ;
|
||||
File diff suppressed because it is too large
Load Diff
360
lib/resource/italian/ParadigmsIta.gf
Normal file
360
lib/resource/italian/ParadigmsIta.gf
Normal file
@@ -0,0 +1,360 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
--1 Italian Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003
|
||||
--
|
||||
-- This is an API to 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
|
||||
-- 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: we have a
|
||||
-- separate module $IrregularEng$, which covers all irregularly inflected
|
||||
-- words.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
|
||||
resource ParadigmsIta =
|
||||
open (Predef=Predef), Prelude, TypesIta, MorphoIta, SyntaxIta,
|
||||
RulesIta, BeschIta in {
|
||||
|
||||
--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' "de" and the
|
||||
-- 'dative' "à").
|
||||
|
||||
Preposition : Type ;
|
||||
|
||||
accusative : Preposition ;
|
||||
genitive : Preposition ;
|
||||
dative : Preposition ;
|
||||
|
||||
mkPreposition : Str -> Preposition ;
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give both two forms and the gender.
|
||||
|
||||
mkN : (uomi,uomini : Str) -> Gender -> N ;
|
||||
|
||||
-- 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.
|
||||
|
||||
regN : Str -> N ;
|
||||
|
||||
-- To force a different gender, use one of the following functions.
|
||||
|
||||
mascN : N -> N ;
|
||||
femN : N -> N ;
|
||||
|
||||
--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".
|
||||
-- They could be formed in syntax, but we give a shortcut here since
|
||||
-- they are frequent in lexica.
|
||||
|
||||
compN : N -> Str -> N ;
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns ("fille de x") need a case and a preposition.
|
||||
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
|
||||
-- The most common cases are the genitive "di" and the dative "a",
|
||||
-- with the empty preposition.
|
||||
|
||||
diN2 : N -> N2 ;
|
||||
aN2 : N -> N2 ;
|
||||
|
||||
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
|
||||
|
||||
mkN3 : N -> Preposition -> Preposition -> 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
|
||||
-- $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.
|
||||
|
||||
mkPN : Str -> Gender -> PN ; -- Jean
|
||||
|
||||
-- To form a noun phrase that can also be plural,
|
||||
-- you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Gender -> Number -> NP ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives need five forms in the worst
|
||||
-- case (masc and fem singular, masc plural, adverbial).
|
||||
|
||||
mkA : (solo,sola,soli,sole, solamente : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, all other forms are derived from the
|
||||
-- masculine singular.
|
||||
|
||||
regA : Str -> A ;
|
||||
|
||||
-- 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
|
||||
-- provided.
|
||||
|
||||
prefA : A -> A ;
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Preposition -> 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 ;
|
||||
|
||||
-- If comparison is formed by "più", as usual in Italian,
|
||||
-- the following pattern is used:
|
||||
|
||||
compADeg : A -> ADeg ;
|
||||
|
||||
-- The regular pattern is the same as $regA$ for plain adjectives,
|
||||
-- with comparison by "plus".
|
||||
|
||||
regADeg : Str -> ADeg ;
|
||||
|
||||
-- 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
|
||||
|
||||
-- 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
|
||||
--
|
||||
-- Irregular verbs are given in the module $VerbsFre$.
|
||||
-- If a verb should be missing in that list, the module
|
||||
-- $BeschFre$ gives all the patterns of the "Bescherelle" book.
|
||||
--
|
||||
-- Regular verbs are ones with the infinitive "er" or "ir", the
|
||||
-- latter with plural present indicative forms as "finissons".
|
||||
-- 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".
|
||||
|
||||
regV : Str -> V ;
|
||||
|
||||
-- The function $regV$ gives all verbs the compound auxiliary "avoir".
|
||||
-- To change it to "être", use the following function.
|
||||
|
||||
essereV : 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 : V -> Preposition -> V2 ;
|
||||
|
||||
dirV2 : V -> 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 -> Preposition -> Preposition -> V3 ; -- parler, à, de
|
||||
dirV3 : V -> Preposition -> V3 ; -- donner,_,à
|
||||
dirdirV3 : V -> V3 ; -- donner,_,_
|
||||
|
||||
--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 -> 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 ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Preposition -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Preposition -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
subjAS : A -> AS ;
|
||||
mkA2S : A -> Preposition -> A2S ;
|
||||
mkAV : A -> Preposition -> AV ;
|
||||
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||
|
||||
|
||||
--2 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 ;
|
||||
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> ;
|
||||
|
||||
mkN x y g = mkCNomIrreg 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} ;
|
||||
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} ;
|
||||
|
||||
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 = <>} ;
|
||||
|
||||
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 = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
|
||||
|
||||
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 = <>} ;
|
||||
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 = <>} ;
|
||||
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 verbPres verb AHabere ** {aux = AHabere ; lock_V = <>} ;
|
||||
|
||||
essereV v = {s = v.s ; aux = AEsse ; lock_V = <>} ;
|
||||
|
||||
mkV2 v p = {s = v.s ; aux = v.aux ; s2 = p.p2 ; c = p.p1 ; 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 = <>} ;
|
||||
dirV3 v p = mkV3 v accusative p ;
|
||||
dirdirV3 v = dirV3 v dative ;
|
||||
|
||||
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 ; lock_VV = <>} ;
|
||||
deVV v = v ** {c = genitive.p1 ; lock_VV = <>} ;
|
||||
aVV v = v ** {c = dative.p1 ; 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 = <>} ;
|
||||
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 = <>} ;
|
||||
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 = <>} ;
|
||||
|
||||
} ;
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
instance SyntaxIta of SyntaxRomance =
|
||||
TypesIta ** open Prelude, (CO=Coordination), MorphoIta in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
oper
|
||||
nameNounPhrase = \jean ->
|
||||
normalNounPhrase
|
||||
@@ -11,6 +14,8 @@ oper
|
||||
|
||||
nounPhraseOn = mkNameNounPhrase "si" Masc ; --- can be plural dep. on object
|
||||
|
||||
pronImpers : NounPhrase = pronNounPhrase pronIl ; ---- should be empty
|
||||
|
||||
partitiveNounPhrase = \n,vino ->
|
||||
normalNounPhrase
|
||||
(table {
|
||||
@@ -34,7 +39,7 @@ oper
|
||||
|
||||
npGenPossNum = \nu,ton,mec ->
|
||||
\\c => artDef mec.g Pl c ++ ton.s ! Poss Pl mec.g ++ nu.s ! mec.g ++ mec.s ! Pl ;
|
||||
|
||||
{- ----
|
||||
existNounPhrase = \delvino -> {
|
||||
s = \\m =>
|
||||
case m of {
|
||||
@@ -42,6 +47,21 @@ oper
|
||||
Con => case delvino.n of {Sg => ["ci sia"] ; Pl => ["ci siano"]}
|
||||
} ++ delvino.s ! stressed accusative --- ce ne sono ; have to define "ci"
|
||||
} ;
|
||||
-}
|
||||
|
||||
reflPron : Number => Person => NPFormA => Str = \\n,p =>
|
||||
case p of {
|
||||
P3 => table {
|
||||
Ton x => prepCase x ++ "sé" ;
|
||||
Aton _ => "si" ;
|
||||
Poss Sg Masc => "suo" ;
|
||||
Poss Sg Fem => "sua" ;
|
||||
Poss Pl Masc => "suoi" ;
|
||||
Poss Pl _ => "sue"
|
||||
} ;
|
||||
_ => (personPron Masc n p).s
|
||||
} ;
|
||||
|
||||
|
||||
mkAdjSolo : Str -> Bool -> Adjective = \adj,p ->
|
||||
mkAdjective (adjSolo adj) p ;
|
||||
@@ -83,8 +103,7 @@ oper
|
||||
|
||||
negVerb = \va -> "non" ++ va ;
|
||||
|
||||
copula = \b,w -> let etre = (predVerb verbEssere).s in
|
||||
etre ! b ! Masc ! w ; ---- Masc
|
||||
copula = verbEssere ;
|
||||
|
||||
isClitCase = \c -> case c of {
|
||||
Acc => True ;
|
||||
@@ -149,7 +168,7 @@ oper
|
||||
} ;
|
||||
|
||||
-- Questions
|
||||
|
||||
{- ----
|
||||
questVerbPhrase = \jean,dort ->
|
||||
{s = table {
|
||||
DirQ => (predVerbPhrase jean dort).s ! Ind ;
|
||||
@@ -163,14 +182,6 @@ oper
|
||||
s = \\m => case m of {DirQ => [] ; _ => "se"} ++ cedelvino
|
||||
} ;
|
||||
|
||||
intVerbPhrase = \qui, dormir ->
|
||||
let dort = dormir.s ! qui.g ! VPF Simul (VFin presInd qui.n P3)
|
||||
in
|
||||
{s = table {
|
||||
_ => qui.s ! Nom ++ dort
|
||||
}
|
||||
} ;
|
||||
|
||||
intSlash = \Qui, Tuvois ->
|
||||
let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in
|
||||
{s = table {
|
||||
@@ -178,6 +189,19 @@ oper
|
||||
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").
|
||||
@@ -187,7 +211,7 @@ oper
|
||||
Acc => "ciò" ;
|
||||
_ => []
|
||||
} ;
|
||||
|
||||
{- ----
|
||||
questAdverbial = \quand, jean, dort ->
|
||||
let {jeandort = (predVerbPhrase jean dort).s ! Ind} in
|
||||
{s = table {
|
||||
@@ -195,7 +219,7 @@ oper
|
||||
IndirQ => quand.s ++ jeandort
|
||||
}
|
||||
} ;
|
||||
|
||||
-}
|
||||
---- moved from MorphoIta
|
||||
|
||||
-- A macro for defining gender-dependent tables will be useful.
|
||||
@@ -220,82 +244,6 @@ oper
|
||||
ilqualPron : Gender -> Number -> Case -> Str = \g,n,c ->
|
||||
artDef g n c ++ qualPron g n ;
|
||||
|
||||
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 ;
|
||||
|
||||
-- moved from ResIta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user