forked from GitHub/gf-rgl
(Por) Diff
- sort opers - rm old commented code - tidy things up - no semantic changes
This commit is contained in:
@@ -5,22 +5,91 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
flags optimize=noexpand ;
|
flags optimize=noexpand ;
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
|
|
||||||
---- exceptions ----------------
|
|
||||||
oper
|
|
||||||
partAgr : VType -> Bool = \vtyp -> False ;
|
|
||||||
vpAgrSubj : Verb -> VPAgrType = \v -> <verbDefaultPart v, False> ;
|
|
||||||
vpAgrClits : Verb -> AAgr -> VPAgrType = \v,a -> <verbDefaultPart v, False> ;
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
param
|
param
|
||||||
Prepos = P_de | P_a ;
|
Prepos = P_de | P_a ;
|
||||||
|
|
||||||
VType = VHabere | VRefl ;
|
VType = VHabere | VRefl ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
partAgr : VType -> Bool ;
|
||||||
|
-- exception
|
||||||
|
partAgr _ = False ;
|
||||||
|
|
||||||
|
vpAgrSubj : Verb -> VPAgrType ;
|
||||||
|
-- exception
|
||||||
|
vpAgrSubj v = <verbDefaultPart v, False> ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
conjunctCase : Case -> Case = \c -> case c of {
|
||||||
|
Nom => Nom ;
|
||||||
|
_ => Acc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
clitInf b cli inf = inf ++ bindIf b ++ cli ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
pronArg = \n,p,acc,dat ->
|
||||||
|
let
|
||||||
|
paccp = case acc of {
|
||||||
|
CRefl => <reflPron n p Acc, p,True> ;
|
||||||
|
CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
|
||||||
|
_ => <[],P2,False>
|
||||||
|
} ;
|
||||||
|
pdatp = case dat of {
|
||||||
|
CPron ag an ap => <argPron ag an ap dative, ap,True> ;
|
||||||
|
_ => <[],P2,False>
|
||||||
|
} ;
|
||||||
|
peither = case acc of {
|
||||||
|
CRefl | CPron _ _ _ => True ;
|
||||||
|
_ => case dat of {
|
||||||
|
CPron _ _ _ => True ;
|
||||||
|
_ => False
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
defaultPronArg = <pdatp.p1 ++ paccp.p1, [], peither>
|
||||||
|
in
|
||||||
|
---- 8/6/2008 efficiency problem in pgf generation: replace the case
|
||||||
|
---- expr with a constant produces an error in V3 predication with
|
||||||
|
---- two pronouns
|
||||||
|
defaultPronArg ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkImperative b p vp =
|
||||||
|
\\pol,g,n =>
|
||||||
|
let
|
||||||
|
pe = case b of {True => P3 ; _ => p} ;
|
||||||
|
agr = {g = g ; n = n ; p = pe} ;
|
||||||
|
refl = case vp.s.vtyp of {
|
||||||
|
VRefl => <reflPron n pe Acc,True> ;
|
||||||
|
_ => <[],False>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ;
|
||||||
|
verb = vp.s.s ! vImper n pe ;
|
||||||
|
neg = vp.neg ! pol ;
|
||||||
|
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
|
||||||
|
in
|
||||||
|
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
CopulaType = Bool ;
|
||||||
|
selectCopula = \isEstar -> case isEstar of {True => estar_V ; False => copula} ;
|
||||||
|
serCopula = False ;
|
||||||
|
estarCopula = True ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
dative : Case = CPrep P_a ;
|
dative : Case = CPrep P_a ;
|
||||||
genitive : Case = CPrep P_de ;
|
genitive : Case = CPrep P_de ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
vRefl _ = VRefl ;
|
||||||
|
isVRefl : VType -> Bool = \ty -> case ty of {
|
||||||
|
VRefl => True ;
|
||||||
|
_ => False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
prepCase = \c -> case c of {
|
prepCase = \c -> case c of {
|
||||||
Nom => [] ;
|
Nom => [] ;
|
||||||
Acc => [] ;
|
Acc => [] ;
|
||||||
@@ -28,6 +97,10 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
CPrep P_a => "a"
|
CPrep P_a => "a"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
partitive = \_,c -> prepCase c ;
|
||||||
|
|
||||||
|
oper
|
||||||
artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c ->
|
artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c ->
|
||||||
case isNP of {
|
case isNP of {
|
||||||
True => case <g,n,c> of {
|
True => case <g,n,c> of {
|
||||||
@@ -59,97 +132,27 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
possCase = \_,_,c -> prepCase c ;
|
possCase = \_,_,c -> prepCase c ;
|
||||||
|
|
||||||
partitive = \_,c -> prepCase c ;
|
oper
|
||||||
|
|
||||||
{-
|
|
||||||
partitive = \g,c -> case c of {
|
|
||||||
CPrep P_de => "de" ;
|
|
||||||
_ => prepCase c ++ artDef g Sg (CPrep P_de)
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
conjunctCase : Case -> Case = \c -> case c of {
|
|
||||||
Nom => Nom ;
|
|
||||||
_ => Acc
|
|
||||||
} ;
|
|
||||||
|
|
||||||
auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ;
|
auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ;
|
||||||
|
|
||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
|
||||||
vpAgrNone ;
|
|
||||||
|
|
||||||
pronArg = \n,p,acc,dat ->
|
|
||||||
let
|
|
||||||
paccp = case acc of {
|
|
||||||
CRefl => <reflPron n p Acc, p,True> ;
|
|
||||||
CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
|
|
||||||
_ => <[],P2,False>
|
|
||||||
} ;
|
|
||||||
pdatp = case dat of {
|
|
||||||
CPron ag an ap => <argPron ag an ap dative, ap,True> ;
|
|
||||||
_ => <[],P2,False>
|
|
||||||
} ;
|
|
||||||
peither = case acc of {
|
|
||||||
CRefl | CPron _ _ _ => True ;
|
|
||||||
_ => case dat of {
|
|
||||||
CPron _ _ _ => True ;
|
|
||||||
_ => False
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
defaultPronArg = <pdatp.p1 ++ paccp.p1, [], peither>
|
|
||||||
---- defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3>
|
|
||||||
in
|
|
||||||
---- case <<paccp.p2, pdatp.p2> : Person * Person> of {
|
|
||||||
---- <P3,P3> => <"se" ++ paccp.p1, [], True> ;
|
|
||||||
---- _ => defaultPronArg
|
|
||||||
--- } ;
|
|
||||||
---- 8/6/2008 efficiency problem in pgf generation: replace the case expr with
|
|
||||||
---- a constant produces an error in V3 predication with two pronouns
|
|
||||||
defaultPronArg ;
|
|
||||||
|
|
||||||
infForm _ _ _ _ = True ;
|
|
||||||
|
|
||||||
mkImperative b p vp =
|
|
||||||
\\pol,g,n =>
|
|
||||||
let
|
|
||||||
pe = case b of {True => P3 ; _ => p} ;
|
|
||||||
agr = {g = g ; n = n ; p = pe} ;
|
|
||||||
refl = case vp.s.vtyp of {
|
|
||||||
VRefl => <reflPron n pe Acc,True> ;
|
|
||||||
_ => <[],False>
|
|
||||||
} ;
|
|
||||||
|
|
||||||
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ;
|
|
||||||
---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
|
||||||
----e verb = case <aag.n, pol,pe> of {
|
|
||||||
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
|
||||||
----e _ => (vp.s ! VPImperat).fin ! agr
|
|
||||||
----e } ;
|
|
||||||
verb = vp.s.s ! vImper n pe ;
|
|
||||||
neg = vp.neg ! pol ;
|
|
||||||
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
|
|
||||||
in
|
|
||||||
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
|
||||||
|
|
||||||
CopulaType = Bool ;
|
|
||||||
selectCopula = \isEstar -> case isEstar of {True => estar_V ; False => copula} ;
|
|
||||||
serCopula = False ;
|
|
||||||
estarCopula = True ;
|
|
||||||
|
|
||||||
negation : RPolarity => (Str * Str) = table {
|
negation : RPolarity => (Str * Str) = table {
|
||||||
RPos => <[],[]> ;
|
RPos => <[],[]> ;
|
||||||
RNeg _ => <"não",[]>
|
RNeg _ => <"não",[]>
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
copula : Verb = verbBeschH (ser_3 "ser") ;
|
||||||
|
|
||||||
|
oper
|
||||||
conjThan = "que" ;
|
conjThan = "que" ;
|
||||||
conjThat = "que" ;
|
conjThat = "que" ;
|
||||||
|
|
||||||
|
oper
|
||||||
subjIf = "se" ;
|
subjIf = "se" ;
|
||||||
|
|
||||||
|
oper
|
||||||
clitInf b cli inf = inf ++ bindIf b ++ cli ;
|
|
||||||
|
|
||||||
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
|
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
|
||||||
case c of {
|
case c of {
|
||||||
Nom | Acc => "que" ;
|
Nom | Acc => "que" ;
|
||||||
@@ -159,10 +162,10 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
|
|
||||||
pronSuch : AAgr => Str = aagrForms "tal" "tal" "tais" "tais" ;
|
pronSuch : AAgr => Str = aagrForms "tal" "tal" "tais" "tais" ;
|
||||||
|
|
||||||
quelPron : AAgr => Str = aagrForms "qual" "qual" "quais" "quais" ;
|
oper
|
||||||
|
partQIndir = [] ;
|
||||||
partQIndir = [] ; ---- ?
|
|
||||||
|
|
||||||
|
oper
|
||||||
reflPron : Number -> Person -> Case -> Str = \n,p,c ->
|
reflPron : Number -> Person -> Case -> Str = \n,p,c ->
|
||||||
let pro = argPron Fem n p c
|
let pro = argPron Fem n p c
|
||||||
in
|
in
|
||||||
@@ -174,6 +177,29 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
_ => pro
|
_ => pro
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
auxPassive : Verb = copula ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
vpAgrClits : Verb -> AAgr -> VPAgrType ;
|
||||||
|
-- exception
|
||||||
|
vpAgrClits v a = <verbDefaultPart v, False> ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
subjPron = \_ -> [] ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
polNegDirSubj = RPos ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
infForm _ _ _ _ = True ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
vpAgrClit : Agr -> VPAgr = \a ->
|
||||||
|
vpAgrNone ;
|
||||||
|
|
||||||
|
-- oper's opers
|
||||||
|
oper
|
||||||
argPron : Gender -> Number -> Person -> Case -> Str =
|
argPron : Gender -> Number -> Person -> Case -> Str =
|
||||||
let
|
let
|
||||||
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
|
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
|
||||||
@@ -197,26 +223,14 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
<_, Pl,P3> => cases3 "os" "seus" "eles"
|
<_, Pl,P3> => cases3 "os" "seus" "eles"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vRefl _ = VRefl ;
|
|
||||||
isVRefl : VType -> Bool = \ty -> case ty of {
|
|
||||||
VRefl => True ;
|
|
||||||
_ => False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
auxPassive : Verb = copula ;
|
|
||||||
|
|
||||||
copula : Verb = verbBeschH (ser_3 "ser") ;
|
|
||||||
|
|
||||||
estar_V : Verb = verbBeschH (estar_10 "estar") ;
|
estar_V : Verb = verbBeschH (estar_10 "estar") ;
|
||||||
|
|
||||||
haver_V : Verb = verbBeschH (haver_2 "haver") ;
|
haver_V : Verb = verbBeschH (haver_2 "haver") ;
|
||||||
|
|
||||||
ficar_V : Verb = verbBeschH (ficar_12 "ficar") ;
|
ficar_V : Verb = verbBeschH (ficar_12 "ficar") ;
|
||||||
|
|
||||||
verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere ; p = []} ;
|
verbBeschH : Verbum -> Verb ;
|
||||||
|
-- make a verb of type haver
|
||||||
subjPron = \_ -> [] ;
|
verbBeschH v = verbBesch v ** {vtyp = VHabere ; p = []} ;
|
||||||
|
|
||||||
polNegDirSubj = RPos ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user