mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-31 02:38:55 -06:00
Italian adjectives: special case for -ico -> -ici
e.g. "unico" should be "unici" in m.pl., not "unichi" Probably applies to nouns too
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
-- syntax. To build a lexicon, it is better to use $ParadigmsIta$, which
|
-- syntax. To build a lexicon, it is better to use $ParadigmsIta$, which
|
||||||
-- gives a higher-level access to this module.
|
-- gives a higher-level access to this module.
|
||||||
|
|
||||||
resource MorphoIta = CommonRomance, ResIta **
|
resource MorphoIta = CommonRomance, ResIta **
|
||||||
open PhonoIta, Prelude, Predef in {
|
open PhonoIta, Prelude, Predef in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
@@ -23,7 +23,7 @@ resource MorphoIta = CommonRomance, ResIta **
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
|
numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
|
||||||
table {Sg => vino ; Pl => vini} ;
|
table {Sg => vino ; Pl => vini} ;
|
||||||
|
|
||||||
-- For example:
|
-- For example:
|
||||||
|
|
||||||
@@ -41,13 +41,13 @@ oper
|
|||||||
|
|
||||||
-- Common nouns are inflected in number and have an inherent gender.
|
-- Common nouns are inflected in number and have an inherent gender.
|
||||||
|
|
||||||
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
|
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
|
||||||
{s = mecmecs ; g = gen} ;
|
{s = mecmecs ; g = gen} ;
|
||||||
|
|
||||||
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
|
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
|
||||||
mkNoun (numForms mec mecs) ;
|
mkNoun (numForms mec mecs) ;
|
||||||
|
|
||||||
mkNomReg : Str -> Noun = \vino ->
|
mkNomReg : Str -> Noun = \vino ->
|
||||||
let
|
let
|
||||||
o = last vino ;
|
o = last vino ;
|
||||||
vin = init vino ;
|
vin = init vino ;
|
||||||
@@ -90,22 +90,22 @@ oper
|
|||||||
|
|
||||||
-- Then the regular and invariant patterns.
|
-- Then the regular and invariant patterns.
|
||||||
|
|
||||||
adjSolo : Str -> Adj = \solo ->
|
adjSolo : Str -> Adj = \solo ->
|
||||||
let
|
let
|
||||||
sol = Predef.tk 1 solo
|
sol = Predef.tk 1 solo
|
||||||
in
|
in
|
||||||
mkAdj solo (sol + "a") (sol + "i") (sol + "e") (sol + "amente") ;
|
mkAdj solo (sol + "a") (sol + "i") (sol + "e") (sol + "amente") ;
|
||||||
|
|
||||||
adjTale : Str -> Adj = \tale ->
|
adjTale : Str -> Adj = \tale ->
|
||||||
let
|
let
|
||||||
tal = Predef.tk 1 tale ;
|
tal = Predef.tk 1 tale ;
|
||||||
tali = tal + "i" ;
|
tali = tal + "i" ;
|
||||||
tala = if_then_Str (pbool2bool (Predef.occur (Predef.dp 1 tal) "lr")) tal tale
|
tala = if_then_Str (pbool2bool (Predef.occur (Predef.dp 1 tal) "lr")) tal tale
|
||||||
in
|
in
|
||||||
mkAdj tale tale tali tali (tala + "mente") ;
|
mkAdj tale tale tali tali (tala + "mente") ;
|
||||||
|
|
||||||
adjBlu : Str -> Adj = \blu ->
|
adjBlu : Str -> Adj = \blu ->
|
||||||
mkAdj blu blu blu blu blu ; ---
|
mkAdj blu blu blu blu blu ; ---
|
||||||
|
|
||||||
|
|
||||||
mkAdjReg : Str -> Adj = \solo ->
|
mkAdjReg : Str -> Adj = \solo ->
|
||||||
@@ -117,7 +117,12 @@ oper
|
|||||||
in
|
in
|
||||||
case o of {
|
case o of {
|
||||||
"o" => case l of {
|
"o" => case l of {
|
||||||
"c" | "g" => mkAdj solo (sol + "a") (sol + "hi") (sol + "he") solamente ;
|
-- "c" | "g" => mkAdj solo (sol + "a") (sol + "hi") (sol + "he") solamente ;
|
||||||
|
"c" => case last (init sol) of {
|
||||||
|
"i" => mkAdj solo (sol + "a") (sol + "i") (sol + "he") solamente ; -- pubblico -> pubblici
|
||||||
|
_ => mkAdj solo (sol + "a") (sol + "hi") (sol + "he") solamente -- ricco -> ricchi
|
||||||
|
} ;
|
||||||
|
"g" => mkAdj solo (sol + "a") (sol + "hi") (sol + "he") solamente ;
|
||||||
"i" => mkAdj solo (sol + "a") sol (sol + "e") solamente ;
|
"i" => mkAdj solo (sol + "a") sol (sol + "e") solamente ;
|
||||||
_ => mkAdj solo (sol + "a") (sol + "i") (sol + "e") solamente
|
_ => mkAdj solo (sol + "a") (sol + "i") (sol + "e") solamente
|
||||||
} ;
|
} ;
|
||||||
@@ -138,7 +143,7 @@ oper
|
|||||||
-- given in $DiffIta.argPron$ and therefore wouldn't be needed in the
|
-- given in $DiffIta.argPron$ and therefore wouldn't be needed in the
|
||||||
-- pronoun itself.)
|
-- pronoun itself.)
|
||||||
|
|
||||||
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
|
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
|
||||||
Gender -> Number -> Person -> Pronoun =
|
Gender -> Number -> Person -> Pronoun =
|
||||||
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
|
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
|
||||||
let
|
let
|
||||||
@@ -155,14 +160,14 @@ oper
|
|||||||
<Sg,Masc> => son ;
|
<Sg,Masc> => son ;
|
||||||
<Sg,Fem> => sa ;
|
<Sg,Fem> => sa ;
|
||||||
<Pl,Masc> => ses ;
|
<Pl,Masc> => ses ;
|
||||||
<Pl,Fem> => see
|
<Pl,Fem> => see
|
||||||
} ;
|
} ;
|
||||||
a = Ag g n p ;
|
a = Ag g n p ;
|
||||||
hasClit = True ; isPol = False
|
hasClit = True ; isPol = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{- --e
|
{- --e
|
||||||
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
|
mkPronoun : (_,_,_,_,_,_,_,_,_ : Str) ->
|
||||||
Gender -> Number -> Person -> Pronoun =
|
Gender -> Number -> Person -> Pronoun =
|
||||||
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
|
\il,le,lui,glie,Lui,son,sa,ses,see,g,n,p ->
|
||||||
{s = table {
|
{s = table {
|
||||||
|
|||||||
Reference in New Issue
Block a user