From 65a9709041d80561a51e0448b2f8a280b1a9bc8c Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 5 Jul 2014 08:33:45 +0000 Subject: [PATCH] distinction between direct and indirect questions in Chi, to eliminate "ma" in indir questions --- lib/src/chinese/CatChi.gf | 4 ++-- lib/src/chinese/ConstructionChi.gf | 2 +- lib/src/chinese/ExtraChi.gf | 2 +- lib/src/chinese/IdiomChi.gf | 2 +- lib/src/chinese/PhraseChi.gf | 2 +- lib/src/chinese/QuestionChi.gf | 10 +++++----- lib/src/chinese/SentenceChi.gf | 4 ++-- lib/src/chinese/VerbChi.gf | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/src/chinese/CatChi.gf b/lib/src/chinese/CatChi.gf index 98c78fe5c..b4570b4e0 100644 --- a/lib/src/chinese/CatChi.gf +++ b/lib/src/chinese/CatChi.gf @@ -5,7 +5,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu -- Tensed/Untensed S = {s : Str} ; - QS = {s : Str} ; + QS = {s : Bool => Str} ; -- True = direct question (with ma for sentential questions) RS = {s : Str} ; SSlash = {s : Str ; c2 : Preposition} ; @@ -19,7 +19,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu -- Question - QCl = {s : Polarity => Aspect => Str} ; + QCl = {s : Bool => Polarity => Aspect => Str} ; -- True = direct question IP = {s : Str} ; IComp = {s : Str} ; IDet = {s : Str ; detType : DetType} ; diff --git a/lib/src/chinese/ConstructionChi.gf b/lib/src/chinese/ConstructionChi.gf index fc87c1364..15704fd70 100644 --- a/lib/src/chinese/ConstructionChi.gf +++ b/lib/src/chinese/ConstructionChi.gf @@ -13,7 +13,7 @@ lin married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) ; what_name_QCl x = mkQCl whatSg_IP (mkClSlash (lin NP x) (mkV2 (mkV "叫"))) ; - how_old_QCl x = {s = \\p,a => x.s ++ (R.word "几岁" | R.word "多大")} ; ---- + how_old_QCl x = {s = \\_,p,a => x.s ++ (R.word "几岁" | R.word "多大")} ; ---- ---- how_far_QCl x = mkQCl (E.IAdvAdv (ss "far")) (lin NP x) ; -- some more things diff --git a/lib/src/chinese/ExtraChi.gf b/lib/src/chinese/ExtraChi.gf index 042170f73..b3ba953c3 100644 --- a/lib/src/chinese/ExtraChi.gf +++ b/lib/src/chinese/ExtraChi.gf @@ -41,7 +41,7 @@ concrete ExtraChi of ExtraChiAbs = CatChi ** False => insertObj (mkNP ap.s) (predV hen_copula []) } ; QuestRepV cl = { - s = \\p,a => + s = \\_,p,a => ---- also for indirect questions? let v = cl.vp.verb ; verb = case a of { diff --git a/lib/src/chinese/IdiomChi.gf b/lib/src/chinese/IdiomChi.gf index a2e166a42..cbb34949e 100644 --- a/lib/src/chinese/IdiomChi.gf +++ b/lib/src/chinese/IdiomChi.gf @@ -16,7 +16,7 @@ concrete IdiomChi of Idiom = CatChi ** open Prelude, ResChi in { ExistNP np = mkClause [] (regVerb you_s) np.s ; ---- infl of you - ExistIP ip = {s = (mkClause [] (regVerb you_s) ip.s).s} ; ---- infl of you + ExistIP ip = {s = \\_ => (mkClause [] (regVerb you_s) ip.s).s} ; ---- infl of you ProgrVP vp = { verb = regVerb zai_s ; diff --git a/lib/src/chinese/PhraseChi.gf b/lib/src/chinese/PhraseChi.gf index 1ebde7980..51b3787d1 100644 --- a/lib/src/chinese/PhraseChi.gf +++ b/lib/src/chinese/PhraseChi.gf @@ -4,7 +4,7 @@ concrete PhraseChi of Phrase = CatChi ** open Prelude, ResChi in { PhrUtt pconj utt voc = {s = pconj.s ++ voc.s ++ utt.s} ; UttS s = s ; - UttQS qs = qs ; + UttQS qs = ss (qs.s ! True) ; UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p} ; UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p} ; UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p} ; --- add politeness here? diff --git a/lib/src/chinese/QuestionChi.gf b/lib/src/chinese/QuestionChi.gf index 6a878b423..a509894d8 100644 --- a/lib/src/chinese/QuestionChi.gf +++ b/lib/src/chinese/QuestionChi.gf @@ -5,17 +5,17 @@ concrete QuestionChi of Question = CatChi ** lin - QuestCl cl = {s = \\p,a => cl.s ! p ! a ++ question_s} ; --- plus redup questions + QuestCl cl = {s = \\isDir,p,a => cl.s ! p ! a ++ if_then_Str isDir question_s []} ; --- plus redup questions QuestVP ip vp = { - s = \\p,a => ip.s ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl + s = \\_,p,a => ip.s ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl } ; - QuestSlash ip cls = mkClauseCompl cls.np (insertObj (ss (appPrep cls.c2 ip.s)) cls.vp) [] ; + QuestSlash ip cls = {s = \\_ => (mkClauseCompl cls.np (insertObj (ss (appPrep cls.c2 ip.s)) cls.vp) []).s} ; - QuestIAdv iadv cl = mkClauseCompl cl.np (insertAdv iadv cl.vp) [] ; + QuestIAdv iadv cl = {s = \\_ => (mkClauseCompl cl.np (insertAdv iadv cl.vp) []).s} ; - QuestIComp icomp np = {s = \\p,a => np.s ++ icomp.s} ; ---- order + QuestIComp icomp np = {s = \\_,p,a => np.s ++ icomp.s} ; ---- order PrepIP p ip = ss (appPrep p ip.s) ; diff --git a/lib/src/chinese/SentenceChi.gf b/lib/src/chinese/SentenceChi.gf index 175592b6e..65d8ae4d3 100644 --- a/lib/src/chinese/SentenceChi.gf +++ b/lib/src/chinese/SentenceChi.gf @@ -32,11 +32,11 @@ concrete SentenceChi of Sentence = CatChi ** SlashPrep cl prep = cl ** {c2 = prep} ; EmbedS s = ss (conjThat ++ s.s) ; - EmbedQS qs = qs ; + EmbedQS qs = ss (qs.s ! False) ; EmbedVP vp = ss (infVP vp) ; UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ; - UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ; + UseQCl t p cl = {s = \\isDir => t.s ++ p.s ++ cl.s ! isDir ! p.p ! t.t} ; UseRCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ; UseSlash t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t ; c2 = cl.c2} ; diff --git a/lib/src/chinese/VerbChi.gf b/lib/src/chinese/VerbChi.gf index db28c84e3..28a14a7a9 100644 --- a/lib/src/chinese/VerbChi.gf +++ b/lib/src/chinese/VerbChi.gf @@ -14,7 +14,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { SlashV2V v vp = insertObj (mkNP (infVP vp)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; SlashV2S v s = insertObj (ss (say_s ++ s.s)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; - SlashV2Q v q = insertObj (ss (say_s ++ q.s)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; + SlashV2Q v q = insertObj (ss (say_s ++ q.s ! False)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; ComplVV v vp = { verb = v ; @@ -23,7 +23,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { } ; ComplVS v s = insertObj s (predV v []) ; - ComplVQ v q = insertObj q (predV v []) ; + ComplVQ v q = insertObj (ss (q.s ! False)) (predV v []) ; ComplVA v ap = insertObj ap (predV v []) ; ComplSlash vp np = case vp.isPre of {