mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 10:48:54 -06:00
adjustments and clean-up in resource
This commit is contained in:
@@ -49,10 +49,10 @@ incomplete concrete CatRomance of Cat =
|
||||
NP,Pron = Pronoun ;
|
||||
Det = {s : Gender => Case => Str ; n : Number} ;
|
||||
QuantSg = {s : Gender => Case => Str} ;
|
||||
QuantPl = {s : Gender => Case => Str} ;
|
||||
Quant = {s : Number => Gender => Case => Str} ;
|
||||
QuantPl = {s : Bool => Gender => Case => Str} ;
|
||||
Quant = {s : Bool => Number => Gender => Case => Str} ;
|
||||
Predet = {s : AAgr => Case => Str ; c : Case} ; -- la plupart de...
|
||||
Num = {s : Gender => Str} ;
|
||||
Num = {s : Gender => Str ; isNum : Bool} ;
|
||||
Ord = {s : AAgr => Str} ;
|
||||
|
||||
-- Adverb
|
||||
|
||||
@@ -15,11 +15,6 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
|
||||
param Prep ;
|
||||
|
||||
-- Forms of noun phrases. Spanish and Italian have special forms for
|
||||
-- fronted clitics.
|
||||
|
||||
param NPForm ;
|
||||
|
||||
-- Which types of verbs exist, in terms of auxiliaries.
|
||||
-- (Fre, Ita "avoir", "être", and refl; Spa only "haber" and refl).
|
||||
|
||||
@@ -55,8 +50,10 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
|
||||
--2 Constants that must derivatively depend on language
|
||||
|
||||
dative : Case ;
|
||||
genitive : Case ;
|
||||
param NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
|
||||
|
||||
oper dative : Case ;
|
||||
oper genitive : Case ;
|
||||
|
||||
vRefl : VType ;
|
||||
isVRefl : VType -> Bool ;
|
||||
@@ -71,6 +68,10 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
artDef : Gender -> Number -> Case -> Str ;
|
||||
artIndef : Gender -> Number -> Case -> Str ;
|
||||
|
||||
-- This is the definite article in Italian, $prepCase c$ in French and Spanish.
|
||||
|
||||
possCase : Gender -> Number -> Case -> Str ;
|
||||
|
||||
auxVerb : VType -> (VF => Str) ;
|
||||
negation : Polarity => (Str * Str) ;
|
||||
copula : Verb ;
|
||||
@@ -81,7 +82,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
relPron : Bool => AAgr => Case => Str ;
|
||||
pronSuch : AAgr => Str ;
|
||||
|
||||
partQIndir : Str ; -- ce, ciò
|
||||
partQIndir : Str ; -- ce, ciò
|
||||
|
||||
reflPron : Number -> Person -> Case -> Str ;
|
||||
-- argPron : Gender -> Number -> Person -> Case -> Str ;
|
||||
|
||||
@@ -30,36 +30,36 @@ incomplete concrete NounRomance of Noun =
|
||||
n = Sg
|
||||
} ;
|
||||
DetPl quant num ord = {
|
||||
s = \\g,c => quant.s ! g ! c ++ num.s ! g ++ ord.s ! aagr g Pl ;
|
||||
s = \\g,c => quant.s ! num.isNum ! g ! c ++ num.s ! g ++ ord.s ! aagr g Pl ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
SgQuant q = {s = q.s ! Sg} ;
|
||||
PlQuant q = {s = q.s ! Pl} ;
|
||||
SgQuant q = {s = q.s ! False ! Sg} ;
|
||||
PlQuant q = {s = \\b => q.s ! b ! Pl} ;
|
||||
|
||||
PossPron p = {
|
||||
s = \\n,g,c => prepCase c ++ p.s ! Poss (aagr g n) ---- il mio!
|
||||
s = \\_,n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ---- il mio!
|
||||
} ;
|
||||
|
||||
NoNum = {s = \\_ => []} ;
|
||||
NoNum = {s = \\_ => [] ; isNum = False} ;
|
||||
NoOrd = {s = \\_ => []} ;
|
||||
|
||||
NumInt n = {s = \\_ => n.s} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "ème"} ; ---
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
|
||||
NumNumeral numeral = {s = \\g => numeral.s ! NCard g ; isNum = True} ;
|
||||
OrdNumeral numeral = {s = \\a => numeral.s ! NOrd a.g a.n} ;
|
||||
|
||||
AdNum adn num = {s = \\a => adn.s ++ num.s ! a} ;
|
||||
AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum} ;
|
||||
|
||||
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\n,g,c => artDef g n c
|
||||
s = \\_,n,g,c => artDef g n c
|
||||
} ;
|
||||
|
||||
IndefArt = {
|
||||
s = \\n,g,c => artIndef g n c
|
||||
s = \\b,n,g,c => if_then_Str b [] (artIndef g n c) ;
|
||||
} ;
|
||||
|
||||
MassDet = {
|
||||
|
||||
@@ -29,8 +29,7 @@ oper
|
||||
npform2case : NPForm -> Case = \p -> case p of {
|
||||
Ton x => x ;
|
||||
Poss _ => genitive ;
|
||||
Aton x => x ;
|
||||
_ => dative ---- Ita PreClit
|
||||
Aton x => x
|
||||
} ;
|
||||
|
||||
case2npform : Case -> NPForm = \c -> case c of {
|
||||
|
||||
Reference in New Issue
Block a user