mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Cat) Implement AForm+related opers in DiffCat
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--# -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 ;
|
||||
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" ;
|
||||
|
||||
possCase = \_,_,c -> prepCase c ;
|
||||
|
||||
@@ -96,11 +96,11 @@ oper
|
||||
|
||||
mkAdjFull : (x1,_,_,_,_,x6 : Str) -> Adj = \bon,bo,prima,prims,primes,primament ->
|
||||
{s = table {
|
||||
ASg Masc AAttr => bon ;
|
||||
ASg Masc APred => bo ;
|
||||
ASg Fem _ => prima ;
|
||||
APl Masc => prims ;
|
||||
APl Fem => primes ;
|
||||
AAttrMasc => bon ;
|
||||
AF Masc Sg => bo ;
|
||||
AF Fem Sg => prima ;
|
||||
AF Masc Pl => prims ;
|
||||
AF Fem Pl => primes ;
|
||||
AA => primament
|
||||
}
|
||||
} ;
|
||||
@@ -121,8 +121,8 @@ oper
|
||||
let fond = Predef.tk 1 fondo
|
||||
in adjBlau fondo (fond + "a") ;
|
||||
|
||||
adjBo : (bo,bon : Str) -> Adj = \bo,bon ->
|
||||
mkAdjFull bon bo (bon + "a") (bon + "s") (bon + "es") (bon + "ament") ;
|
||||
adjBo : (bo,bon,be : Str) -> Adj = \bo,bon,be ->
|
||||
mkAdjFull bon bo (bon + "a") (bon + "s") (bon + "es") be ;
|
||||
|
||||
adjFidel : Str -> Adj = \fidel ->
|
||||
let fidels : Str = case (last fidel) of {
|
||||
|
||||
Reference in New Issue
Block a user