diff --git a/src/hungarian/NounMorphoHun.gf b/src/hungarian/NounMorphoHun.gf index 7a566e71..4dd65824 100644 --- a/src/hungarian/NounMorphoHun.gf +++ b/src/hungarian/NounMorphoHun.gf @@ -429,7 +429,8 @@ oper } ; --- This is used in ResHun.caseFromStem, not here. +-- This is used in ResHun.caseFromStem, which makes NP out of CN. +-- Ns only have stems, and these forms are attached to the stems. endCase : Case -> HarmForms = \c -> case c of { Nom => harm1 [] ; @@ -453,4 +454,12 @@ oper -- Tem => harm1 "kor" -- Temporal 'at '. Only used with numerals. } ; + endCasePossVow : Case -> HarmForms = \c -> case c of { + Acc => harm1 "t" ; + Sup => harm1 "n" ; + Tra => harm "vá" "vé" ; + Ins => harm "val" "vel" ; + _ => endCase c + } ; + } diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 009f379b..9f9de7a7 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -37,15 +37,16 @@ oper } ; caseFromPossStem : Noun -> Determiner -> Case -> Str = \cn,det,cas -> - let stem : NumCaseStem = case of { + let stem_casetable : NumCaseStem*(Case->HarmForms) = case of { => case st of { - dSg_rSg1P2 => SgAccStem ; - dSg_rP3 => PossdSg_PossrP3 ; - dSg_rPl1 => PossdSg_PossrPl1 } ; - => PossdPl ; - _ => Predef.error "caseFromPossStem: Trying to apply to non-possessive Det" - } ; - in applyCaseSuf (det.poss ! cn.h) cas cn stem ; + dSg_rSg1P2 => ; + dSg_rP3 => ; -- TODO nneeds to be vowel only after Sg3 + dSg_rPl1 => } ; + => ; + _ => Predef.error "caseFromPossStem: Trying to apply to non-possessive Det" } ; + stem = stem_casetable.p1 ; + casetable = stem_casetable.p2 ; + in applyCaseSuf (det.poss ! cn.h) cas cn stem casetable ; BaseNP : Type = { agr : Person*Number ; @@ -191,8 +192,9 @@ oper applyCase : (Str->Str->Str) -> Case -> Noun -> NumCaseStem -> Str = \bind,cas,cn,stem -> bind (cn.s ! stem) (endCase cas ! cn.h) ; - applyCaseSuf : Str -> Case -> Noun -> NumCaseStem -> Str = - \suf,cas,cn,stem -> glue (glue (cn.s ! stem) suf) (endCase cas ! cn.h) ; + applyCaseSuf : Str -> Case -> Noun -> NumCaseStem -> (Case -> HarmForms) -> Str = + \suf,cas,cn,stem,casetable -> + glue (glue (cn.s ! stem) suf) (casetable cas ! cn.h) ; ------------------