forked from GitHub/gf-rgl
(Hun) Combine the parameters on definiteness and Quant/Det type
This commit is contained in:
@@ -16,17 +16,18 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
True => det.s ! c ;
|
True => det.s ! c ;
|
||||||
False => det.s ! Nom
|
False => det.s ! Nom
|
||||||
} ++ case <p,det.dt> of {
|
} ++ case <p,det.dt> of {
|
||||||
<NotPossessed, NoPoss>
|
|
||||||
=> standalone ;
|
|
||||||
<_, DetPoss _>
|
<_, DetPoss _>
|
||||||
=> possessed ;
|
=> possessed ;
|
||||||
<Poss per rnum, NoPoss>
|
<NotPossessed, _>
|
||||||
|
=> standalone ;
|
||||||
|
<Poss per rnum, _>
|
||||||
=> let pron : Pronoun = pronTable ! <per,rnum> ; -- Possessor's number
|
=> let pron : Pronoun = pronTable ! <per,rnum> ; -- Possessor's number
|
||||||
dnum : CatHun.Num = case det.n of { -- Possessed's number
|
dnum : CatHun.Num = case det.n of { -- Possessed's number
|
||||||
Sg => NumSg ; Pl => NumPl } ;
|
Sg => NumSg ; Pl => NumPl } ;
|
||||||
in caseFromPossStem cn (DetQuant (PossPron pron) dnum) c
|
in caseFromPossStem cn (DetQuant (PossPron pron) dnum) c
|
||||||
} ++ cn.compl ! det.n ! c ;
|
} ++ cn.compl ! det.n ! c ;
|
||||||
agr = <P3,det.n> ;
|
agr = <P3,det.n> ;
|
||||||
|
objdef = dt2objdef det.dt ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : PN -> NP ;
|
-- : PN -> NP ;
|
||||||
@@ -96,8 +97,7 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
<True,True> => [] ;
|
<True,True> => [] ;
|
||||||
_ => quant.sp ! num.n ! c }
|
_ => quant.sp ! num.n ! c }
|
||||||
++ num.s ! Indep ;
|
++ num.s ! Indep ;
|
||||||
dt = case quant.qt of { QuantPoss stem => DetPoss stem ;
|
dt = qt2dt quant.qt ;
|
||||||
_ => NoPoss } ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
@@ -160,23 +160,20 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
DefArt = mkQuant "a" "a" ** {
|
DefArt = mkQuant "a" "a" ** {
|
||||||
s,
|
s,
|
||||||
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
||||||
qt = Article ;
|
qt = DefQuant ;
|
||||||
objdef = Def ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Quant
|
-- : Quant
|
||||||
IndefArt = mkQuant "egy" [] ** {
|
IndefArt = mkQuant "egy" [] ** {
|
||||||
s = \\n,_ => case n of {Sg => "egy" ; Pl => []} ;
|
s = \\n,_ => case n of {Sg => "egy" ; Pl => []} ;
|
||||||
sp = \\n,_ => case n of {Sg => "egy" ; Pl => "sok"} ;
|
sp = \\n,_ => case n of {Sg => "egy" ; Pl => "sok"} ;
|
||||||
qt = Article ;
|
qt = IndefArticle ;
|
||||||
objdef = Indef ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Pron -> Quant
|
-- : Pron -> Quant
|
||||||
PossPron pron = pron ** {
|
PossPron pron = pron ** {
|
||||||
s,sp = \\_ => pron.s ;
|
s,sp = \\_ => pron.s ;
|
||||||
qt = QuantPoss (agr2PossStem pron.agr) ;
|
qt = QuantPoss (agr2pstem pron.agr) ;
|
||||||
objdef = Def ;
|
|
||||||
caseagr = False ;
|
caseagr = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -18,13 +18,15 @@ oper
|
|||||||
|
|
||||||
param
|
param
|
||||||
QuantType =
|
QuantType =
|
||||||
Article -- Needed to prevent "a 2 cars"
|
IndefArticle -- Needed to prevent "a 2 cars"
|
||||||
| Other -- Not poss, not article
|
| IndefQuant -- Not IndefArt, not poss, not def
|
||||||
|
| DefQuant
|
||||||
| QuantPoss PossStem -- Which possessive stem it takes
|
| QuantPoss PossStem -- Which possessive stem it takes
|
||||||
;
|
;
|
||||||
|
|
||||||
DetType =
|
DetType =
|
||||||
NoPoss -- distinction between Article and Other no longer needed
|
DefDet -- distinction between Article and Other no longer needed
|
||||||
|
| IndefDet -- still need def or indef
|
||||||
| DetPoss PossStem -- Sill need to know which stem it takes if Poss
|
| DetPoss PossStem -- Sill need to know which stem it takes if Poss
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -33,13 +35,29 @@ param
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
-- standard trick to prevent "a one car"
|
-- standard trick to prevent "a one car"
|
||||||
isIndefArt : {qt : QuantType ; objdef : ObjDef} -> Bool = \quant ->
|
isIndefArt : {qt : QuantType} -> Bool = \quant ->
|
||||||
case <quant.qt,quant.objdef> of {
|
case quant.qt of {
|
||||||
<Article,Indef> => True ;
|
IndefArticle => True ;
|
||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
agr2PossStem : Person*Number -> PossStem = \pn ->
|
dt2objdef : DetType -> ObjDef = \dt -> case dt of {
|
||||||
|
IndefDet => Indef ;
|
||||||
|
_ => Def
|
||||||
|
} ;
|
||||||
|
|
||||||
|
objdef2dt : ObjDef -> DetType = \od -> case od of {
|
||||||
|
Def => DefDet ;
|
||||||
|
Indef => IndefDet
|
||||||
|
} ;
|
||||||
|
|
||||||
|
qt2dt : QuantType -> DetType = \qt -> case qt of {
|
||||||
|
QuantPoss x => DetPoss x ;
|
||||||
|
DefQuant => DefDet ;
|
||||||
|
_ => IndefDet
|
||||||
|
} ;
|
||||||
|
|
||||||
|
agr2pstem : Person*Number -> PossStem = \pn ->
|
||||||
case <pn.p1,pn.p2> of {
|
case <pn.p1,pn.p2> of {
|
||||||
<P1,Pl> => dSg_rPl1 ;
|
<P1,Pl> => dSg_rPl1 ;
|
||||||
<P3,n> => dSg_rP3 n ;
|
<P3,n> => dSg_rP3 n ;
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ oper
|
|||||||
|
|
||||||
BaseQuant : Type = {
|
BaseQuant : Type = {
|
||||||
poss : HarmForms ; -- Quants made by PossPron need this, empty for others
|
poss : HarmForms ; -- Quants made by PossPron need this, empty for others
|
||||||
objdef : ObjDef ; -- How V2 agrees if NP with this Det is an object
|
|
||||||
caseagr : Bool ; -- If it agrees in case: "azoknak a nőknek" vs. "sok nőknek"
|
caseagr : Bool ; -- If it agrees in case: "azoknak a nőknek" vs. "sok nőknek"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -200,8 +199,7 @@ oper
|
|||||||
mkQuant : (s,sp : Str) -> Quant = \s,sp -> {
|
mkQuant : (s,sp : Str) -> Quant = \s,sp -> {
|
||||||
s = mkCaseNoun s ;
|
s = mkCaseNoun s ;
|
||||||
sp = mkCaseNoun sp ;
|
sp = mkCaseNoun sp ;
|
||||||
qt = Other ;
|
qt = DefQuant ;
|
||||||
objdef = Def ;
|
|
||||||
caseagr = True ;
|
caseagr = True ;
|
||||||
poss = harm1 [] ;
|
poss = harm1 [] ;
|
||||||
} ;
|
} ;
|
||||||
@@ -212,7 +210,6 @@ oper
|
|||||||
s,
|
s,
|
||||||
sp : Case => Str ;
|
sp : Case => Str ;
|
||||||
n : Number ;
|
n : Number ;
|
||||||
-- numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
|
||||||
dt : DetType ;
|
dt : DetType ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -221,9 +218,8 @@ oper
|
|||||||
sp = mkCaseNoun s ! n ;
|
sp = mkCaseNoun s ! n ;
|
||||||
n = n ;
|
n = n ;
|
||||||
numtype = NoNum ;
|
numtype = NoNum ;
|
||||||
objdef = d ;
|
|
||||||
caseagr = ca ;
|
caseagr = ca ;
|
||||||
dt = NoPoss ;
|
dt = objdef2dt d ;
|
||||||
poss = harm1 [] ;
|
poss = harm1 [] ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user