1
0
forked from GitHub/gf-rgl

(Cat) Implement AForm+related opers in DiffCat

This commit is contained in:
Inari Listenmaa
2021-09-17 11:32:36 +08:00
parent b8acdddabd
commit 445c4f5187
2 changed files with 23 additions and 8 deletions

View File

@@ -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 ;

View File

@@ -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 {