1
0
forked from GitHub/gf-rgl

(Romance) mv numForms to CommonRomance; rm from Morpho*

This commit is contained in:
odanoburu
2018-05-09 15:23:10 -03:00
parent 0fcf1d1f66
commit ba094d3af1
4 changed files with 83 additions and 97 deletions

View File

@@ -8,7 +8,7 @@
-- syntax. To build a lexicon, it is better to use $ParadigmsFre$, which -- syntax. To build a lexicon, it is better to use $ParadigmsFre$, which
-- gives a higher-level access to this module. -- gives a higher-level access to this module.
resource MorphoFre = CommonRomance, ResFre ** resource MorphoFre = CommonRomance, ResFre **
open PhonoFre, Prelude, Predef in { open PhonoFre, Prelude, Predef in {
flags optimize=noexpand ; flags optimize=noexpand ;
@@ -24,41 +24,34 @@ oper
--2 Nouns --2 Nouns
--
-- The following macro is useful for creating the forms of number-dependent
-- tables, such as common nouns.
numForms : Str -> Str -> Number => Str = \bon,bons ->
table {Sg => bon ; Pl => bons} ;
-- For example, the regular noun forms are defined as follows:
-- regular noun forms are defined as follows:
nomReg : Str -> Number => Str = \bu -> numForms bu (bu + "s") ; nomReg : Str -> Number => Str = \bu -> numForms bu (bu + "s") ;
-- Common nouns are inflected in number and have an inherent gender. -- Common nouns are inflected in number and have an inherent gender.
CNom = {s : Number => Str ; g : Gender} ; CNom = {s : Number => Str ; g : Gender} ;
mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen -> mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen ->
{s = mecmecs ; g = gen} ; {s = mecmecs ; g = gen} ;
mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs -> mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs ->
mkCNom (numForms mec mecs) ; mkCNom (numForms mec mecs) ;
mkCNomReg : Str -> Gender -> CNom = \mec -> mkCNomReg : Str -> Gender -> CNom = \mec ->
mkCNom (nomReg mec) ; mkCNom (nomReg mec) ;
mkCNomNiveau : Str -> Gender -> CNom = \niveau -> mkCNomNiveau : Str -> Gender -> CNom = \niveau ->
mkCNomIrreg niveau (niveau + "x") ; mkCNomIrreg niveau (niveau + "x") ;
mkCNomCheval : Str -> Gender -> CNom = \cheval -> mkCNomCheval : Str -> Gender -> CNom = \cheval ->
let {cheva = Predef.tk 1 cheval} in let {cheva = Predef.tk 1 cheval} in
mkCNomIrreg cheval (cheva + "ux") ; mkCNomIrreg cheval (cheva + "ux") ;
mkCNomInvar : Str -> Gender -> CNom = \cas -> mkCNomInvar : Str -> Gender -> CNom = \cas ->
mkCNomIrreg cas cas ; mkCNomIrreg cas cas ;
mkNomReg : Str -> Gender -> CNom = \cas -> mkNomReg : Str -> Gender -> CNom = \cas ->
let cass = case Predef.dp 2 cas of { let cass = case Predef.dp 2 cas of {
"al" => init cas + "ux" ; "al" => init cas + "ux" ;
"au" => cas + "x" ; "au" => cas + "x" ;
@@ -72,7 +65,7 @@ oper
} }
} }
in mkCNomIrreg cas cass ; in mkCNomIrreg cas cass ;
--2 Adjectives --2 Adjectives
-- --
@@ -97,12 +90,12 @@ oper
}) })
} ; } ;
adjInvar : Str -> Gender => Number => Str = \bien -> adjInvar : Str -> Gender => Number => Str = \bien ->
\\_,_ => bien ; \\_,_ => bien ;
-- Adjectives themselves are records. Here the most common cases: -- Adjectives themselves are records. Here the most common cases:
adjGrand : Str -> Adj = \grand -> adjGrand : Str -> Adj = \grand ->
let grande = case last grand of { let grande = case last grand of {
"e" => grand ; "e" => grand ;
_ => grand + "e" _ => grand + "e"
@@ -112,32 +105,32 @@ oper
-- Masculine form used for adverbial; also covers "carré". -- Masculine form used for adverbial; also covers "carré".
adjJoli : Str -> Adj = \joli -> adjJoli : Str -> Adj = \joli ->
mkAdj joli (joli + "s") (joli + "e") (joli + "ment") ; mkAdj joli (joli + "s") (joli + "e") (joli + "ment") ;
adjHeureux : Str -> Adj = \heureux -> adjHeureux : Str -> Adj = \heureux ->
let {heureu = Predef.tk 1 heureux} in let {heureu = Predef.tk 1 heureux} in
mkAdj heureux heureux (heureu+"se") (heureu+"sement") ; mkAdj heureux heureux (heureu+"se") (heureu+"sement") ;
adjBanal : Str -> Adj = \banal -> adjBanal : Str -> Adj = \banal ->
let {bana = Predef.tk 1 banal} in let {bana = Predef.tk 1 banal} in
mkAdj banal (bana + "ux") (banal+"e") (banal+"ement") ; mkAdj banal (bana + "ux") (banal+"e") (banal+"ement") ;
adjJeune : Str -> Adj = \jeune -> adjJeune : Str -> Adj = \jeune ->
mkAdj jeune (jeune+"s") jeune (jeune+"ment") ; mkAdj jeune (jeune+"s") jeune (jeune+"ment") ;
adjIndien : Str -> Adj = \indien -> adjIndien : Str -> Adj = \indien ->
mkAdj indien (indien+"s") (indien+"ne") (indien+"nement") ; mkAdj indien (indien+"s") (indien+"ne") (indien+"nement") ;
adjTel : Str -> Adj = \tel -> adjTel : Str -> Adj = \tel ->
mkAdj tel (tel+"s") (tel+"le") (tel+"lement") ; mkAdj tel (tel+"s") (tel+"le") (tel+"lement") ;
adjFrancais : Str -> Adj = \francais -> adjFrancais : Str -> Adj = \francais ->
mkAdj francais francais (francais+"e") (francais+"ement") ; mkAdj francais francais (francais+"e") (francais+"ement") ;
adjCher : Str -> Adj = \cher -> adjCher : Str -> Adj = \cher ->
let {ch = Predef.tk 2 cher} in let {ch = Predef.tk 2 cher} in
mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ; mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ;
adjPublic : Str -> Adj = \public -> adjPublic : Str -> Adj = \public ->
let publique = init public + "que" in let publique = init public + "que" in
@@ -175,7 +168,7 @@ oper
-- All the eight personal pronouns can be built by the following macro. -- All the eight personal pronouns can be built by the following macro.
-- The use of "en" as atonic genitive is debatable. -- The use of "en" as atonic genitive is debatable.
mkPronoun : (_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,g,n,p -> \il,le,lui,Lui,son,sa,ses,g,n,p ->
let let
@@ -238,8 +231,8 @@ param
TSubj = SPres | SImparf ; TSubj = SPres | SImparf ;
TPart = PPres | PPasse Gender Number ; TPart = PPres | PPasse Gender Number ;
VForm = Inf VForm = Inf
| Indi Temps Number Person | Indi Temps Number Person
| Condi Number Person | Condi Number Person
| Subjo TSubj Number Person | Subjo TSubj Number Person
| Imper NumPersI | Imper NumPersI
| Part TPart ; | Part TPart ;
@@ -247,13 +240,13 @@ param
-- This is a conversion to the type in $CommonRomance$. -- This is a conversion to the type in $CommonRomance$.
oper oper
vvf : (VForm => Str) -> (VF => Str) = \aller -> table { vvf : (VForm => Str) -> (VF => Str) = \aller -> table {
VInfin True => case last (aller ! Indi Presn Sg P3) of { --- terrible hack to store the binding here... 30/11/2014 VInfin True => case last (aller ! Indi Presn Sg P3) of { --- terrible hack to store the binding here... 30/11/2014
"a" | "e" => bindHyphensT ; -- parle-t-il, va-t-il "a" | "e" => bindHyphensT ; -- parle-t-il, va-t-il
_ => bindHyphen -- prend-il _ => bindHyphen -- prend-il
} ; } ;
VInfin False => aller ! Inf ; VInfin False => aller ! Inf ;
VFin (VPres Indic) n p => aller ! Indi Presn n p ; VFin (VPres Indic) n p => aller ! Indi Presn n p ;
VFin (VPres Subjunct) n p => aller ! Subjo SPres n p ; VFin (VPres Subjunct) n p => aller ! Subjo SPres n p ;
VFin (VImperf Indic) n p => aller ! Indi Imparf n p ; --# notpresent VFin (VImperf Indic) n p => aller ! Indi Imparf n p ; --# notpresent
VFin (VImperf Subjunct) n p => aller ! Subjo SImparf n p ; --# notpresent VFin (VImperf Subjunct) n p => aller ! Subjo SImparf n p ; --# notpresent
@@ -269,10 +262,10 @@ oper
-- the worst case -- the worst case
mkVerb12 : mkVerb12 :
(tenir,tiens,tient,tenons,tenez,tiennent,tienne,tenions,tiensI,tint,tiendra,tenu : Str) -> Verbe = (tenir,tiens,tient,tenons,tenez,tiennent,tienne,tenions,tiensI,tint,tiendra,tenu : Str) -> Verbe =
\tenir,tiens,tient,tenons,tenez,tiennent,tienne,tenions,tiensI,tint,tiendra,tenu -> \tenir,tiens,tient,tenons,tenez,tiennent,tienne,tenions,tiensI,tint,tiendra,tenu ->
let let
tiens2 : Str = case tiens of { tiens2 : Str = case tiens of {
_ + "e" => tiens + "s" ; _ + "e" => tiens + "s" ;
_ => tiens _ => tiens
@@ -317,7 +310,7 @@ oper
} ; } ;
mkVerb7 : (tenir,tiens,tenons,tiennent,tint,tiendra,tenu : Str) -> Verbe = mkVerb7 : (tenir,tiens,tenons,tiennent,tint,tiendra,tenu : Str) -> Verbe =
\tenir,tiens,tenons,tiennent,tint,tiendra,tenu -> \tenir,tiens,tenons,tiennent,tint,tiendra,tenu ->
let let
tient : Str = case tiens of { tient : Str = case tiens of {
_ + "e" => tiens ; _ + "e" => tiens ;
@@ -389,12 +382,12 @@ oper
} }
} ; } ;
affixPlMes : (_,_ : Str) -> Affixe = affixPlMes : (_,_ : Str) -> Affixe =
\è, â -> lesAffixes (â + "mes") (â + "tes") (è + "rent") ; \è, â -> lesAffixes (â + "mes") (â + "tes") (è + "rent") ;
affixPasseAi : Number => Affixe = table { affixPasseAi : Number => Affixe = table {
Sg => affixSgAi ; Sg => affixSgAi ;
Pl => affixPlMes "è" "â" Pl => affixPlMes "è" "â"
} ; } ;
affixPasseS : (i,î : Str) -> Number => Affixe = \i,î -> table { affixPasseS : (i,î : Str) -> Number => Affixe = \i,î -> table {
@@ -421,13 +414,13 @@ oper
affixPasseU : AffixPasse = affixPasse "u" "û" ; affixPasseU : AffixPasse = affixPasse "u" "û" ;
affixPasseNonExist : AffixPasse = affixPasseNonExist : AffixPasse =
let {aff : Number => Affixe = let {aff : Number => Affixe =
table {_ => lesAffixes nonExist nonExist nonExist}} in table {_ => lesAffixes nonExist nonExist nonExist}} in
{ps = aff ; si = aff} ; {ps = aff ; si = aff} ;
affixImper : NumPersI => Str = table { affixImper : NumPersI => Str = table {
SgP2 => "e" ; SgP2 => "e" ;
PlP1 => "ons" ; PlP1 => "ons" ;
PlP2 => "ez" PlP2 => "ez"
} ; } ;
@@ -437,7 +430,7 @@ oper
Pl => table { Pl => table {
P3 => v + "ont" ; P3 => v + "ont" ;
p => all + affixPlOns ! p p => all + affixPlOns ! p
} }
} ; } ;
} }

View File

@@ -19,9 +19,6 @@ resource MorphoPor = CommonRomance, ResPor **
-- number-dependent tables, such as common nouns. -- number-dependent tables, such as common nouns.
oper oper
numForms : (_,_ : Str) -> Number => Str = \campus, campi ->
table {Sg => campus ; Pl => campi} ;
-- For example: -- For example:
nomVinho : Str -> Number => Str = \vinho -> nomVinho : Str -> Number => Str = \vinho ->
numForms vinho (vinho + "s") ; numForms vinho (vinho + "s") ;

View File

@@ -24,8 +24,8 @@ param
Direct = DDir | DInv ; Direct = DDir | DInv ;
-- Adjectives are inflected in gender and number, and there is also an -- Adjectives are inflected in gender and number, and there is also an
-- adverbial form (e.g. "infiniment"), which has different paradigms and -- adverbial form (e.g. "infiniment"), which has different paradigms and
-- can even be irregular ("bien"). -- can even be irregular ("bien").
-- Comparative adjectives are moreover inflected in degree -- Comparative adjectives are moreover inflected in degree
-- (which in Romance is usually syntactic, though). -- (which in Romance is usually syntactic, though).
@@ -61,18 +61,18 @@ oper
AF g n => aagr g n ; AF g n => aagr g n ;
_ => aagr Masc Sg -- "le plus lentement" _ => aagr Masc Sg -- "le plus lentement"
} ; } ;
conjGender : Gender -> Gender -> Gender = \m,n -> conjGender : Gender -> Gender -> Gender = \m,n ->
case m of { case m of {
Fem => n ; Fem => n ;
_ => Masc _ => Masc
} ; } ;
--3 Verbs --3 Verbs
-- --
-- In the current syntax, we use -- In the current syntax, we use
-- a reduced conjugation with only the present tense infinitive, -- a reduced conjugation with only the present tense infinitive,
-- indicative, subjunctive, and imperative forms. -- indicative, subjunctive, and imperative forms.
-- But our morphology has full Bescherelle conjunctions: -- But our morphology has full Bescherelle conjunctions:
-- so we use a coercion between full and reduced verbs. -- so we use a coercion between full and reduced verbs.
@@ -84,17 +84,17 @@ oper
-- For Italian contracted forms, $VInfin$ should have -- For Italian contracted forms, $VInfin$ should have
-- an alternative form, whose proper place is $Diff$. -- an alternative form, whose proper place is $Diff$.
param param
VF = VF =
VInfin Bool VInfin Bool
| VFin TMood Number Person | VFin TMood Number Person
| VImper NumPersI | VImper NumPersI
| VPart Gender Number | VPart Gender Number
| VGer | VGer
| VPresPart --- = VGer except in Italian | VPresPart --- = VGer except in Italian
; ;
TMood = TMood =
VPres Mood VPres Mood
| VImperf Mood --# notpresent | VImperf Mood --# notpresent
| VPasse --# notpresent | VPasse --# notpresent
@@ -111,7 +111,7 @@ param
| VPInfinit Anteriority Bool ; | VPInfinit Anteriority Bool ;
RTense = RTense =
RPres RPres
| RPast --# notpresent | RPast --# notpresent
| RPasse --# notpresent | RPasse --# notpresent
| RFut --# notpresent | RFut --# notpresent
@@ -129,7 +129,7 @@ oper
verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> a ; verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> a ;
conjAgr : Agr -> Agr -> Agr = \a,b -> conjAgr : Agr -> Agr -> Agr = \a,b ->
{g = conjGender a.g b.g ; n = conjNumber a.n b.n ; p = conjPerson a.p b.p} ; {g = conjGender a.g b.g ; n = conjNumber a.n b.n ; p = conjPerson a.p b.p} ;
Ag : Gender -> Number -> Person -> Agr = \g,n,p -> {g = g ; n = n ; p = p} ; Ag : Gender -> Number -> Person -> Agr = \g,n,p -> {g = g ; n = n ; p = p} ;
@@ -137,11 +137,11 @@ oper
-- The imperative forms depend on number and person. -- The imperative forms depend on number and person.
vImper : Number -> Person -> VF = \n,p -> case <n,p> of { vImper : Number -> Person -> VF = \n,p -> case <n,p> of {
<Sg,P2> => VImper SgP2 ; <Sg,P2> => VImper SgP2 ;
<Pl,P1> => VImper PlP1 ; <Pl,P1> => VImper PlP1 ;
<Pl,P2> => VImper PlP2 ; <Pl,P2> => VImper PlP2 ;
_ => VFin (VPres Conjunct) n p _ => VFin (VPres Conjunct) n p
} ; } ;
{- {-
param param
@@ -201,9 +201,14 @@ oper
oper oper
genForms : Str -> Str -> Gender => Str = \bon,bonne -> genForms : Str -> Str -> Gender => Str = \bon,bonne ->
table { table {
Masc => bon ; Masc => bon ;
Fem => bonne Fem => bonne
} ; } ;
-- The following macro is useful for creating the forms of
-- number-dependent tables, such as common nouns.
numForms : (_,_ : Str) -> Number => Str = \campus, campi ->
table {Sg => campus ; Pl => campi} ;
aagrForms : (x1,_,_,x4 : Str) -> (AAgr => Str) = \tout,toute,tous,toutes -> aagrForms : (x1,_,_,x4 : Str) -> (AAgr => Str) = \tout,toute,tous,toutes ->
table { table {
@@ -215,7 +220,7 @@ oper
Adj = {s : AForm => Str} ; Adj = {s : AForm => Str} ;
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr -> appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
case vp of { case vp of {
VPAgrSubj => agr ; VPAgrSubj => agr ;
VPAgrClit g n => {g = g ; n = n} VPAgrClit g n => {g = g ; n = n}
@@ -232,13 +237,12 @@ oper
bindIf : Bool -> Str = \b -> if_then_Str b BIND [] ; bindIf : Bool -> Str = \b -> if_then_Str b BIND [] ;
param param
VPAgr = VPAgr =
VPAgrSubj -- elle est partie, elle s'est vue VPAgrSubj -- elle est partie, elle s'est vue
| VPAgrClit Gender Number ; -- elle a dormi; elle les a vues | VPAgrClit Gender Number ; -- elle a dormi; elle les a vues
-- Polarity: three values (Fre positive,ne-pas,ne), presence of polarity element line "aucun" -- Polarity: three values (Fre positive,ne-pas,ne), presence of polarity element line "aucun"
param RPolarity = RPos | RNeg Bool ; -- RNeg True = "ne", RNeg False = "ne - pas" param RPolarity = RPos | RNeg Bool ; -- RNeg True = "ne", RNeg False = "ne - pas"
} }

View File

@@ -8,7 +8,7 @@
-- syntax. To build a lexicon, it is better to use $ParadigmsSpa$, which -- syntax. To build a lexicon, it is better to use $ParadigmsSpa$, which
-- gives a higher-level access to this module. -- gives a higher-level access to this module.
resource MorphoSpa = CommonRomance, ResSpa ** resource MorphoSpa = CommonRomance, ResSpa **
open PhonoSpa, Prelude, Predef, open PhonoSpa, Prelude, Predef,
CatSpa in { CatSpa in {
@@ -17,20 +17,12 @@ resource MorphoSpa = CommonRomance, ResSpa **
--2 Nouns --2 Nouns
--
-- The following macro is useful for creating the forms of number-dependent
-- tables, such as common nouns.
oper oper
numForms : (_,_ : Str) -> Number => Str = \vino, vini -> nomVino : Str -> Number => Str = \vino ->
table {Sg => vino ; Pl => vini} ;
-- For example:
nomVino : Str -> Number => Str = \vino ->
numForms vino (vino + "s") ; numForms vino (vino + "s") ;
nomPilar : Str -> Number => Str = \pilar -> nomPilar : Str -> Number => Str = \pilar ->
numForms pilar (pilar + "es") ; numForms pilar (pilar + "es") ;
nomTram : Str -> Number => Str = \tram -> nomTram : Str -> Number => Str = \tram ->
@@ -38,10 +30,10 @@ 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 = \mec -> mkNomReg : Str -> Noun = \mec ->
@@ -75,15 +67,15 @@ 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 + "os") (sol + "as") (sol + "amente") ; mkAdj solo (sol + "a") (sol + "os") (sol + "as") (sol + "amente") ;
-- masculine and feminine are identical: -- masculine and feminine are identical:
-- adjectives ending with -e, -a and many but not all that end in a consonant -- adjectives ending with -e, -a and many but not all that end in a consonant
adjUtil : Str -> Str -> Adj = \util,utiles -> adjUtil : Str -> Str -> Adj = \util,utiles ->
mkAdj util util utiles utiles (util + "mente") ; mkAdj util util utiles utiles (util + "mente") ;
-- adjectives that end in consonant but have different masc and fem forms -- adjectives that end in consonant but have different masc and fem forms
@@ -91,15 +83,15 @@ oper
adjEspanol : Str -> Str -> Adj = \espanol,espanola -> adjEspanol : Str -> Str -> Adj = \espanol,espanola ->
mkAdj espanol espanola (espanol + "es") (espanol + "as") (espanola + "mente") ; mkAdj espanol espanola (espanol + "es") (espanol + "as") (espanola + "mente") ;
adjBlu : Str -> Adj = \blu -> adjBlu : Str -> Adj = \blu ->
mkAdj blu blu blu blu blu ; --- mkAdj blu blu blu blu blu ; ---
-- francés francesa franceses francesas -- francés francesa franceses francesas
adjEs : Str -> Adj = \francEs -> adjEs : Str -> Adj = \francEs ->
let franc : Str = Predef.tk 2 francEs ; let franc : Str = Predef.tk 2 francEs ;
frances : Str = franc + "es" ; frances : Str = franc + "es" ;
in mkAdj francEs (frances + "a") (frances + "es") (frances + "as") (frances + "amente") ; in mkAdj francEs (frances + "a") (frances + "es") (frances + "as") (frances + "amente") ;
-- alemán alemana alemanes alemanas -- alemán alemana alemanes alemanas
adjVn : Str -> Adj = \alemAn -> adjVn : Str -> Adj = \alemAn ->
@@ -117,7 +109,7 @@ oper
in mkAdj alemAn (alemVn + "a") (alemVn + "es") in mkAdj alemAn (alemVn + "a") (alemVn + "es")
(alemVn + "as") (alemVn + "amente") ; (alemVn + "as") (alemVn + "amente") ;
mkAdjReg : Str -> Adj = \solo -> mkAdjReg : Str -> Adj = \solo ->
case solo of { case solo of {
_ + "o" => adjSolo solo ; _ + "o" => adjSolo solo ;
_ + ("e" | "a") => adjUtil solo (solo + "s") ; _ + ("e" | "a") => adjUtil solo (solo + "s") ;
@@ -132,7 +124,7 @@ oper
-- The use of "ne" as atonic genitive is debatable. -- The use of "ne" as atonic genitive is debatable.
-- We follow the rule that the atonic nominative is empty. -- We follow the rule that the atonic nominative is empty.
mkPronoun : (_,_,_,_,_,_,_,_ : Str) -> mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
Gender -> Number -> Person -> Pronoun = Gender -> Number -> Person -> Pronoun =
\il,le,lui,Lui,son,sa,ses,see,g,n,p -> \il,le,lui,Lui,son,sa,ses,see,g,n,p ->
let let
@@ -148,7 +140,7 @@ 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 ;
@@ -169,7 +161,7 @@ oper
} ; } ;
mkQuantifier : (ese,esa,esos,esas : Str) -> Quant = \ese,esa,esos,esas-> mkQuantifier : (ese,esa,esos,esas : Str) -> Quant = \ese,esa,esos,esas->
let let
se : Str = Predef.drop 1 ese ; se : Str = Predef.drop 1 ese ;
sa : Str = Predef.drop 1 esa ; sa : Str = Predef.drop 1 esa ;
sos : Str = Predef.drop 1 esos ; sos : Str = Predef.drop 1 esos ;
@@ -177,7 +169,7 @@ oper
E : Str = "é" ; E : Str = "é" ;
attrforms : Number => Gender => Case => Str = table { attrforms : Number => Gender => Case => Str = table {
Sg => \\g,c => prepCase c ++ genForms ese esa ! g ; Sg => \\g,c => prepCase c ++ genForms ese esa ! g ;
Pl => \\g,c => prepCase c ++ genForms esos esas ! g ---- Pl => \\g,c => prepCase c ++ genForms esos esas ! g ----
} ; } ;
npforms : Number => Gender => Case => Str = table { npforms : Number => Gender => Case => Str = table {
Sg => \\g,c => prepCase c ++ genForms (E + se) (E + sa) ! g ; Sg => \\g,c => prepCase c ++ genForms (E + se) (E + sa) ! g ;
@@ -195,7 +187,7 @@ oper
s2 = [] ; s2 = [] ;
isNeg = neg isNeg = neg
} ; } ;
mkIDet : (cuantos, cuantas : Str) -> Number -> IDet = \cuantos,cuantas,number -> mkIDet : (cuantos, cuantas : Str) -> Number -> IDet = \cuantos,cuantas,number ->
lin IDet { lin IDet {
s = \\g,c => prepCase c ++ genForms cuantos cuantas ! g ; s = \\g,c => prepCase c ++ genForms cuantos cuantas ! g ;