From a7b23107346e401d5dbdce113782677065d52c15 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 13 Apr 2020 17:54:06 +0200 Subject: [PATCH] (Hun) Add ObjDef into NP, Det and Quant --- src/hungarian/NounHun.gf | 6 ++++-- src/hungarian/ResHun.gf | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/hungarian/NounHun.gf b/src/hungarian/NounHun.gf index 25f77ae6f..905d3d5a6 100644 --- a/src/hungarian/NounHun.gf +++ b/src/hungarian/NounHun.gf @@ -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 = ; } ; @@ -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 diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 1c4baa7d6..bfbe662a4 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -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 = {