mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Cat) Implement AForm+related opers in DiffCat
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
--# -path=.:../romance:../abstract:../common:prelude
|
--# -path=.:../romance:../abstract:../common:prelude
|
||||||
instance DiffCat of DiffRomance - [partAgr,stare_V,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoCat, BeschCat, Prelude in {
|
instance DiffCat of DiffRomance - [partAgr,stare_V,vpAgrSubj,vpAgrClits,AFormSimple] = open CommonRomance, PhonoCat, BeschCat, Prelude in {
|
||||||
|
|
||||||
flags optimize=noexpand ;
|
flags optimize=noexpand ;
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
@@ -64,6 +64,21 @@ oper
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- AForm and comparatives
|
||||||
|
param
|
||||||
|
AFormComplex = AF Gender Number | AAttrMasc | AA ;
|
||||||
|
oper
|
||||||
|
AForm = AFormComplex ;
|
||||||
|
aform2aagr : AForm -> AAgr = \a -> case a of {
|
||||||
|
DiffCat.AF g n => aagr g n ;
|
||||||
|
_ => aagr Masc Sg -- "le plus lentement"
|
||||||
|
} ;
|
||||||
|
genNum2Aform : Gender -> Number -> AForm = DiffCat.AF ;
|
||||||
|
genNumPos2Aform : Gender -> Number -> Bool -> AForm = \g,n,isPre ->
|
||||||
|
case <g,n,isPre> of {
|
||||||
|
<Masc,Sg,True> => AAttrMasc ;
|
||||||
|
_ => genNum2Aform g n
|
||||||
|
} ;
|
||||||
piuComp = "més" ;
|
piuComp = "més" ;
|
||||||
|
|
||||||
possCase = \_,_,c -> prepCase c ;
|
possCase = \_,_,c -> prepCase c ;
|
||||||
|
|||||||
@@ -96,11 +96,11 @@ oper
|
|||||||
|
|
||||||
mkAdjFull : (x1,_,_,_,_,x6 : Str) -> Adj = \bon,bo,prima,prims,primes,primament ->
|
mkAdjFull : (x1,_,_,_,_,x6 : Str) -> Adj = \bon,bo,prima,prims,primes,primament ->
|
||||||
{s = table {
|
{s = table {
|
||||||
ASg Masc AAttr => bon ;
|
AAttrMasc => bon ;
|
||||||
ASg Masc APred => bo ;
|
AF Masc Sg => bo ;
|
||||||
ASg Fem _ => prima ;
|
AF Fem Sg => prima ;
|
||||||
APl Masc => prims ;
|
AF Masc Pl => prims ;
|
||||||
APl Fem => primes ;
|
AF Fem Pl => primes ;
|
||||||
AA => primament
|
AA => primament
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -121,8 +121,8 @@ oper
|
|||||||
let fond = Predef.tk 1 fondo
|
let fond = Predef.tk 1 fondo
|
||||||
in adjBlau fondo (fond + "a") ;
|
in adjBlau fondo (fond + "a") ;
|
||||||
|
|
||||||
adjBo : (bo,bon : Str) -> Adj = \bo,bon ->
|
adjBo : (bo,bon,be : Str) -> Adj = \bo,bon,be ->
|
||||||
mkAdjFull bon bo (bon + "a") (bon + "s") (bon + "es") (bon + "ament") ;
|
mkAdjFull bon bo (bon + "a") (bon + "s") (bon + "es") be ;
|
||||||
|
|
||||||
adjFidel : Str -> Adj = \fidel ->
|
adjFidel : Str -> Adj = \fidel ->
|
||||||
let fidels : Str = case (last fidel) of {
|
let fidels : Str = case (last fidel) of {
|
||||||
|
|||||||
Reference in New Issue
Block a user