1
0
forked from GitHub/gf-rgl

(Hun) Add ObjDef into NP, Det and Quant

This commit is contained in:
Inari Listenmaa
2020-04-13 17:54:06 +02:00
parent 16c808c7b1
commit a7b2310734
2 changed files with 7 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
--2 Noun phrases
-- : Det -> CN -> NP
DetCN det cn = emptyNP ** {
DetCN det cn = emptyNP ** det ** {
s = \\c => det.s ! c ++ cn.s ! det.n ! c ;
agr = <P3,det.n> ;
} ;
@@ -63,7 +63,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
_ => quant.s ! num.n ! c }
++ num.s ! Attrib ; -- TODO: add inflection table in numbers
sp = \\c => quant.sp ! num.n ! c
++ num.s ! Indep
++ num.s ! Indep ;
} ;
-- : Quant -> Num -> Ord -> Det ; -- these five best
@@ -120,6 +120,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
s,
sp = \\_,_ => pre {"a" ; "az" / v } ;
isIndefArt = False ;
objdef = Def ;
} ;
-- : Quant
@@ -127,6 +128,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
s,
sp = \\_,_ => "egy" ;
isIndefArt = True ;
objdef = Indef ;
} ;
-- : Pron -> Quant

View File

@@ -46,12 +46,14 @@ oper
s, -- form that comes before noun: "{this} car"
sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP)
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 -> {
s = (mkNoun s).s ;
sp = (mkNoun sp).s ;
isIndefArt = False ;
objdef = Def ;
} ;
-- Det is formed in DetQuant : Quant -> Num -> Det
@@ -61,6 +63,7 @@ oper
sp : Case => Str ;
n : Number ;
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 = {