(Fre) Update A,A2 to not have Degree

This commit is contained in:
Inari Listenmaa
2021-09-14 18:16:13 +08:00
parent b696b9e932
commit 5281c3ba71
4 changed files with 131 additions and 121 deletions
+27 -20
View File
@@ -4,14 +4,16 @@ instance DiffFre of DiffRomance - [
imperClit,
invertedClause,
verbHyphen,
iAdvQuestionInv
]
iAdvQuestionInv,
-- for comparative forms
ComparAgr, af2compar, aagr2compar
]
= open CommonRomance, PhonoFre, Prelude in {
flags optimize=noexpand ; coding=utf8 ;
-- flags optimize=all ;
param
param
Prepos = P_de | P_a | PNul ;
VType = VTyp VAux VBool ; -- True means that -t- is required as in va-t-il, alla-t-il
VAux = VHabere | VEsse | VRefl ;
@@ -23,7 +25,7 @@ instance DiffFre of DiffRomance - [
prepCase : Case -> Str = \c -> case c of {
Nom => [] ;
Acc => [] ;
Acc => [] ;
CPrep P_a => "à" ;
CPrep P_de => elisDe ;
CPrep PNul => []
@@ -73,9 +75,9 @@ instance DiffFre of DiffRomance - [
---- pronArg = pronArgGen Neg ; --- takes more space and time
pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str * Bool =
pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str * Bool =
\n,p,acc,dat ->
let
let
pacc = case acc of {
CRefl => <case p of {
P3 => elision "s" ; --- use of reflPron incred. expensive
@@ -98,9 +100,9 @@ instance DiffFre of DiffRomance - [
-- Positive polarity is used in the imperative: stressed for 1st and
-- 2nd persons.
pronArgGen : RPolarity -> Number -> Person -> CAgr -> CAgr -> Str * Str =
pronArgGen : RPolarity -> Number -> Person -> CAgr -> CAgr -> Str * Str =
\b,n,p,acc,dat ->
let
let
cas : Person -> Case -> Case = \pr,c -> case <pr,b> of {
<P1 | P2, RPos> => CPrep P_de ; --- encoding in argPron
_ => c
@@ -123,9 +125,9 @@ instance DiffFre of DiffRomance - [
_ => <pdat ++ pacc, []>
} ;
mkImperative b p vp =
\\pol,g,n =>
let
mkImperative b p vp =
\\pol,g,n =>
let
agr = Ag g n p ;
num = if_then_else Number b Pl n ;
verb = vp.s.s ! vImper num p ;
@@ -135,14 +137,14 @@ instance DiffFre of DiffRomance - [
<Sg,False> => <"toi",elision "t",True> ;
_ => <"vous","vous",True>
} ;
_ => <[],[],False>
_ => <[],[],False>
} ;
clpr = <vp.clit1 ++ vp.clit2, vp.clit3.hasClit> ;
compl = vp.comp ! agr ++ vp.ext ! pol
in
case pol of {
RPos => verb ++ if_then_Str refl.p3 bindHyphen [] ++ refl.p1 ++
if_then_Str clpr.p2 bindHyphen [] ++ vp.clit3.imp ++
RPos => verb ++ if_then_Str refl.p3 bindHyphen [] ++ refl.p1 ++
if_then_Str clpr.p2 bindHyphen [] ++ vp.clit3.imp ++
compl ;
RNeg _ => neg.p1 ++ refl.p2 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
} ;
@@ -157,6 +159,11 @@ instance DiffFre of DiffRomance - [
bindHyphen : Str = BIND ++ "-" ++ BIND ;
piuComp = "plus" ;
ComparAgr = AAgr ;
af2compar = aform2aagr ;
aagr2compar = id AAgr ;
CopulaType = {} ;
selectCopula = \isEstar -> copula ;
serCopula = <> ;
@@ -175,7 +182,7 @@ instance DiffFre of DiffRomance - [
clitInf _ cli inf = cli ++ inf ;
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
let
lequel = case <a.g,a.n,c> of {
<Masc,Sg, CPrep P_de> => "duquel" ;
@@ -215,8 +222,8 @@ instance DiffFre of DiffRomance - [
_ => pron
} ;
argPron : Gender -> Number -> Person -> Case -> Str =
let
argPron : Gender -> Number -> Person -> Case -> Str =
let
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
Acc | CPrep P_a => me ;
_ => moi
@@ -226,8 +233,8 @@ instance DiffFre of DiffRomance - [
CPrep P_a => leur ;
_ => eux
} ;
in
\g,n,p -> case <g,n,p> of {
in
\g,n,p -> case <g,n,p> of {
<_,Sg,P1> => cases (elision "m") "moi" ;
<_,Sg,P2> => cases (elision "t") "toi" ;
<_,Pl,P1> => \_ -> "nous" ;
@@ -280,7 +287,7 @@ instance DiffFre of DiffRomance - [
polNegDirSubj = RNeg True ;
invertedClause :
invertedClause :
VType -> (RTense * Anteriority * Number * Person) -> Bool -> (Str * Str) -> Str -> (clit,fin,inf,compl,subj,ext : Str) -> Str =
\vtyp,vform,hasClit,neg,bindHyph,clit,fin,inf,compl,subj,ext -> case <vtyp,vform,hasClit> of {