From 7a7b7309ef9b3cb216cb01586616aa1492ac5f02 Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 19 Oct 2013 15:40:27 +0000 Subject: [PATCH] time adverb word order in Chi ; mkDet in MakeStructural Swe --- lib/src/chinese/LexiconChi.gf | 4 ++-- lib/src/chinese/ResChi.gf | 5 +++++ lib/src/chinese/VerbChi.gf | 7 ++++--- lib/src/chinese/pinyin/ResChi.gf | 5 +++++ lib/src/swedish/MakeStructuralSwe.gf | 3 +++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/src/chinese/LexiconChi.gf b/lib/src/chinese/LexiconChi.gf index ac40a41f3..6345b9c31 100644 --- a/lib/src/chinese/LexiconChi.gf +++ b/lib/src/chinese/LexiconChi.gf @@ -249,7 +249,7 @@ lose_V2 = mkV2 "丢" ; love_V2 = mkV2 "爱" ; music_N = mkN "音乐" [] ; -- [mark] usually without classifier newspaper_N = mkN "报纸" "张"; --[mark] "报" --> "报纸" -now_Adv = mkAdv "现在" ; +now_Adv = mkAdv "现在" timeAdvType ; number_N = mkN "号码" ; -- [mark] "号" --> "号码" open_V2 = mkV2 "开" ; paint_V2A = mkV2A (mkV "画") ; @@ -281,7 +281,7 @@ talk_V3 = mkV3 "说" ; teach_V2 = mkV2 "教" ; teacher_N = mkN "老师" "名"; television_N = mkN "电视" "台"; -today_Adv = mkAdv "今天" ; +today_Adv = mkAdv "今天" timeAdvType ; train_N = mkN "火车" "辆"; travel_V = mkV "旅行" ; understand_V2 = mkV2 "懂" ; diff --git a/lib/src/chinese/ResChi.gf b/lib/src/chinese/ResChi.gf index 4c5a4b977..de82796c7 100644 --- a/lib/src/chinese/ResChi.gf +++ b/lib/src/chinese/ResChi.gf @@ -175,6 +175,11 @@ oper compl = vp.compl ; prePart = adv.s ++ vp.prePart } ; + insertAdvPost : SS -> VP -> VP = \adv,vp -> { + verb = vp.verb ; + compl = vp.compl ; + prePart = vp.prePart ++ adv.s + } ; insertPP : SS -> VP -> VP = \pp,vp -> { verb = vp.verb ; diff --git a/lib/src/chinese/VerbChi.gf b/lib/src/chinese/VerbChi.gf index 9b079de68..47bdaef24 100644 --- a/lib/src/chinese/VerbChi.gf +++ b/lib/src/chinese/VerbChi.gf @@ -43,9 +43,10 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { (insertObj (mkNP (infVP vp)) (predV v v.part)) ** {c2 = vp.c2 ; isPre = vp.isPre} ; AdvVP vp adv = case adv.advType of { - ATManner => insertObj (ss (deVAdv_s ++ adv.s)) vp ; -- he sleeps well - ATPlace True => insertAdv adv vp ; -- he sleeps on the table (zai - shang) - _ => insertAdv (ss (zai_V.s ++ adv.s)) vp -- he sleeps in the house / today + ATManner => insertObj (ss (deVAdv_s ++ adv.s)) vp ; -- he sleeps *well* + ATPlace True => insertAdvPost adv vp ; -- he today *in the house* sleeps + ATPlace False => insertAdvPost (ss (zai_V.s ++ adv.s)) vp ; -- he today *here* sleeps + _ => insertAdv adv vp -- he *today* here sleeps } ; AdVVP adv vp = insertAdv adv vp ; diff --git a/lib/src/chinese/pinyin/ResChi.gf b/lib/src/chinese/pinyin/ResChi.gf index 1bd87854d..c0c1612d0 100644 --- a/lib/src/chinese/pinyin/ResChi.gf +++ b/lib/src/chinese/pinyin/ResChi.gf @@ -175,6 +175,11 @@ oper compl = vp.compl ; prePart = adv.s ++ vp.prePart } ; + insertAdvPost : SS -> VP -> VP = \adv,vp -> { + verb = vp.verb ; + compl = vp.compl ; + prePart = vp.prePart ++ adv.s + } ; insertPP : SS -> VP -> VP = \pp,vp -> { verb = vp.verb ; diff --git a/lib/src/swedish/MakeStructuralSwe.gf b/lib/src/swedish/MakeStructuralSwe.gf index 63c753334..086f674d7 100644 --- a/lib/src/swedish/MakeStructuralSwe.gf +++ b/lib/src/swedish/MakeStructuralSwe.gf @@ -13,6 +13,9 @@ oper [table (P.Gender) [vilken;vilket] ; table (P.Gender) [vilka;vilka]] ; det = d ; lock_IQuant = <>} ; + mkDet : Str -> P.Number -> Det = \s,n -> + lin Det {s,sp = \\_,_ => s ; n = n ; det = DDef Indef} ; + dDefIndef : DetSpecies = DDef Indef ; ---- other DetSpecies