forked from GitHub/gf-rgl
(Hun) Add ObjDef into NP, Det and Quant
This commit is contained in:
@@ -7,7 +7,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
|
|||||||
--2 Noun phrases
|
--2 Noun phrases
|
||||||
|
|
||||||
-- : Det -> CN -> NP
|
-- : Det -> CN -> NP
|
||||||
DetCN det cn = emptyNP ** {
|
DetCN det cn = emptyNP ** det ** {
|
||||||
s = \\c => det.s ! c ++ cn.s ! det.n ! c ;
|
s = \\c => det.s ! c ++ cn.s ! det.n ! c ;
|
||||||
agr = <P3,det.n> ;
|
agr = <P3,det.n> ;
|
||||||
} ;
|
} ;
|
||||||
@@ -63,7 +63,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
|
|||||||
_ => quant.s ! num.n ! c }
|
_ => quant.s ! num.n ! c }
|
||||||
++ num.s ! Attrib ; -- TODO: add inflection table in numbers
|
++ num.s ! Attrib ; -- TODO: add inflection table in numbers
|
||||||
sp = \\c => quant.sp ! num.n ! c
|
sp = \\c => quant.sp ! num.n ! c
|
||||||
++ num.s ! Indep
|
++ num.s ! Indep ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
@@ -120,6 +120,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
|
|||||||
s,
|
s,
|
||||||
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
||||||
isIndefArt = False ;
|
isIndefArt = False ;
|
||||||
|
objdef = Def ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Quant
|
-- : Quant
|
||||||
@@ -127,6 +128,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
|
|||||||
s,
|
s,
|
||||||
sp = \\_,_ => "egy" ;
|
sp = \\_,_ => "egy" ;
|
||||||
isIndefArt = True ;
|
isIndefArt = True ;
|
||||||
|
objdef = Indef ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Pron -> Quant
|
-- : Pron -> Quant
|
||||||
|
|||||||
@@ -46,12 +46,14 @@ oper
|
|||||||
s, -- form that comes before noun: "{this} car"
|
s, -- form that comes before noun: "{this} car"
|
||||||
sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP)
|
sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP)
|
||||||
isIndefArt : Bool ; -- standard trick to prevent "a one car"
|
isIndefArt : Bool ; -- standard trick to prevent "a one car"
|
||||||
|
objdef : ObjDef ; -- How V2 agrees if NP with this Det is an object
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkQuant : (s,sp : Str) -> Quant = \s,sp -> {
|
mkQuant : (s,sp : Str) -> Quant = \s,sp -> {
|
||||||
s = (mkNoun s).s ;
|
s = (mkNoun s).s ;
|
||||||
sp = (mkNoun sp).s ;
|
sp = (mkNoun sp).s ;
|
||||||
isIndefArt = False ;
|
isIndefArt = False ;
|
||||||
|
objdef = Def ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Det is formed in DetQuant : Quant -> Num -> Det
|
-- Det is formed in DetQuant : Quant -> Num -> Det
|
||||||
@@ -61,6 +63,7 @@ oper
|
|||||||
sp : Case => Str ;
|
sp : Case => Str ;
|
||||||
n : Number ;
|
n : Number ;
|
||||||
numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
||||||
|
objdef : ObjDef ; -- How V2 agrees if NP with this Det is an object
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Numeral : Type = {
|
Numeral : Type = {
|
||||||
|
|||||||
Reference in New Issue
Block a user