diff --git a/lib/src/chinese/NounChi.gf b/lib/src/chinese/NounChi.gf index 017cbb6b8..ddd8d5554 100644 --- a/lib/src/chinese/NounChi.gf +++ b/lib/src/chinese/NounChi.gf @@ -16,7 +16,7 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in { PPartNP np v2 = mkNP ((predV v2 v2.part).verb.s ++ possessive_s ++ np.s) ; ---- ?? - AdvNP np adv = mkNP (adv.s ++ possessive_s ++ np.s) ; + AdvNP np adv = mkNP (adv.s ++ possessiveIf adv.advType ++ np.s) ; DetQuant quant num = { s = case num.numType of { @@ -79,7 +79,7 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in { } ; RelCN cn rs = {s = rs.s ++ cn.s ; c = cn.c} ; - AdvCN cn ad = {s = ad.s ++ possessive_s ++ cn.s ; c = cn.c} ; + AdvCN cn ad = {s = ad.s ++ possessiveIf ad.advType ++ cn.s ; c = cn.c} ; SentCN cn cs = {s = cs.s ++ cn.s ; c = cn.c} ; ApposCN cn np = {s = np.s ++ cn.s ; c = cn.c} ; diff --git a/lib/src/chinese/ResChi.gf b/lib/src/chinese/ResChi.gf index 9acda63e4..f2a336618 100644 --- a/lib/src/chinese/ResChi.gf +++ b/lib/src/chinese/ResChi.gf @@ -94,7 +94,7 @@ param CPosType = CAPhrase | CNPhrase | CVPhrase ; DeForm = DeNoun | NdNoun ; -- parameter created for noun with/out partical "de" - AdvType = ATPlace Bool | ATTime | ATManner ; -- ATPlace True = has zai_s already + AdvType = ATPlace Bool | ATTime | ATManner | ATPoss ; -- ATPlace True = has zai_s already -- parts of speech @@ -275,10 +275,16 @@ oper } ; getAdvType : Str -> AdvType = \s -> case s of { + "的" => ATPoss ; "在" + _ => ATPlace True ; -- certain that True _ => ATPlace False -- uncertain whether ATPlace } ; + possessiveIf : AdvType -> Str = \at -> case at of { + ATPoss => [] ; --- to avoid double "de" + _ => possessive_s + } ; + mkSubj : Str -> Str -> {prePart : Str ; sufPart : Str} = \p,s -> { prePart = word p ; sufPart = word s diff --git a/lib/src/chinese/StructuralChi.gf b/lib/src/chinese/StructuralChi.gf index d2a66f727..0bb8ebcae 100644 --- a/lib/src/chinese/StructuralChi.gf +++ b/lib/src/chinese/StructuralChi.gf @@ -22,7 +22,7 @@ lin by8means_Prep = mkPrep [] "旁边" mannerAdvType ; -- in_Prep = mkPrep "里" []; --- in Paris in_Prep = mkPrep "在" "中" ; --- in the house, the car, etc - possess_Prep = mkPrep [] "的" ; + possess_Prep = mkPrep [] "的" ATPoss ; with_Prep = mkPrep "和" "一起" ; ---- with_Prep = mkPrep [] "和"; -- an alternative for some uses @@ -102,7 +102,7 @@ no_Utt = ss neg_s ; lin always_AdV = ssword "一直" ; - part_Prep = mkPrep possessive_s ; + part_Prep = mkPrep [] "的" ATPoss ; language_title_Utt = ssword "中文" ; please_Voc = ss "请" ; quite_Adv = mkAdA "得很" ; diff --git a/lib/src/chinese/VerbChi.gf b/lib/src/chinese/VerbChi.gf index b9d6b463d..db28c84e3 100644 --- a/lib/src/chinese/VerbChi.gf +++ b/lib/src/chinese/VerbChi.gf @@ -46,7 +46,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { 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 - ATTime => insertTopic adv vp -- *today* he here sleeps + ATTime | ATPoss => insertTopic adv vp -- *today* he here sleeps } ; AdVVP adv vp = insertAdv adv vp ; @@ -70,7 +70,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { CompAdv adv = case adv.advType of { ATPlace True => insertObj adv (predV noVerb []) ; - _ => insertObj adv (predV zai_V []) + _ => insertObj adv (predV zai_V []) ---- for all others ?? } ; VPSlashPrep vp prep = vp ** {c2 = prep ; isPre = True} ; diff --git a/lib/src/experimental/PredChi.gf b/lib/src/experimental/PredChi.gf index f8f9b4531..2e72b3439 100644 --- a/lib/src/experimental/PredChi.gf +++ b/lib/src/experimental/PredChi.gf @@ -35,7 +35,7 @@ lin ATManner => cl ** {obj1 = deVAdv_s ++ advs ++ cl.obj1} ; -- he sleeps *well* ATPlace True => cl ** {adv = cl.adv ++ advs} ; -- he today *in the house* sleeps ATPlace False => cl ** {adv = cl.adv ++ zai_V.s ++ advs} ; -- he today *here* sleeps - ATTime => cl ** {adv = advs ++ cl.adv} -- he *today* here sleeps ---- also: **today** he here sleeps + ATTime | _ => cl ** {adv = advs ++ cl.adv} -- he *today* here sleeps ---- also: **today** he here sleeps } ; ComplV2 x vp np = vp ** {