From c78791b62eb2c2cedf3c07674e1adfc99fee2b36 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 6 May 2008 15:52:12 +0000 Subject: [PATCH] ergative predication started --- lib/resource-1.4/hindi/CatHin.gf | 2 +- lib/resource-1.4/hindi/LangHin.gf | 2 +- lib/resource-1.4/hindi/ResHin.gf | 18 +++++++++++++++++- lib/resource-1.4/hindi/VerbHin.gf | 9 +++++---- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/lib/resource-1.4/hindi/CatHin.gf b/lib/resource-1.4/hindi/CatHin.gf index 7a97d4138..fb5b7adb4 100644 --- a/lib/resource-1.4/hindi/CatHin.gf +++ b/lib/resource-1.4/hindi/CatHin.gf @@ -39,7 +39,7 @@ concrete CatHin of Cat = CommonX ** open ResHin, Prelude in { ---- Verb -- VP = ResHin.VPH ; --- VPSlash = ResHin.VP ** {c2 : Str} ; + VPSlash = ResHin.VPHSlash ; -- Comp = {s : Agr => Str} ; -- ---- Adjective diff --git a/lib/resource-1.4/hindi/LangHin.gf b/lib/resource-1.4/hindi/LangHin.gf index 93ea9e623..d043d04f2 100644 --- a/lib/resource-1.4/hindi/LangHin.gf +++ b/lib/resource-1.4/hindi/LangHin.gf @@ -5,6 +5,6 @@ concrete LangHin of Lang = LexiconHin ** { -flags startcat = Phr ; unlexer = text ; lexer = text ; +flags startcat = Phr ; unlexer=unwords ; lexer=words ; } diff --git a/lib/resource-1.4/hindi/ResHin.gf b/lib/resource-1.4/hindi/ResHin.gf index 58ded8966..c20ada8b4 100644 --- a/lib/resource-1.4/hindi/ResHin.gf +++ b/lib/resource-1.4/hindi/ResHin.gf @@ -204,10 +204,23 @@ resource ResHin = ParamX ** open Prelude in { comp = \\_ => [] } ; + VPHSlash = VPH ** {c2 : Compl} ; + Clause : Type = {s : VPHTense => Bool => Str} ; Compl : Type = {s : Str ; c : VType} ; + insertObject : NP -> VPHSlash -> VPH = \np,vp -> { + s = \\b,vh => case of { + => + vp.s ! b ! VPTense VPPerf np.a ; -- ergative: agr to object + _ => vp.s ! b ! vh + } ; + obj = vp.obj ++ np.s ! NPC Obl ++ vp.c2.s ; + subj = vp.c2.c ; + comp = vp.comp + } ; + param Agr = Ag Gender Number Person ; NPCase = NPC Case | NPErg ; @@ -231,7 +244,10 @@ resource ResHin = ParamX ** open Prelude in { s = \\vt,b => let vps = vp.s ! b ! VPTense vt np.a ; - subj = NPC Dir + subj = case of { + => NPErg ; + _ => NPC Dir + } in np.s ! subj ++ vp.obj ++ vp.comp ! np.a ++ vps.neg ++ vps.inf ++ vps.fin } ; diff --git a/lib/resource-1.4/hindi/VerbHin.gf b/lib/resource-1.4/hindi/VerbHin.gf index 3083d7172..fab0f26e9 100644 --- a/lib/resource-1.4/hindi/VerbHin.gf +++ b/lib/resource-1.4/hindi/VerbHin.gf @@ -5,7 +5,8 @@ concrete VerbHin of Verb = CatHin ** open ResHin in { lin UseV = predV ; --- SlashV2a v = predVc v ; + SlashV2a v = predV v ** {c2 = v.c2} ; + -- Slash2V3 v np = -- insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ; -- Slash3V3 v np = @@ -20,9 +21,9 @@ concrete VerbHin of Verb = CatHin ** open ResHin in { -- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; -- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; -- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- --- --- ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ; --- + + ComplSlash vp np = insertObject np vp ; + -- SlashVV vv vp = -- insertObj (\\a => infVP vv.isAux vp a) (predVV vv) ** -- {c2 = vp.c2} ;