From 84c1422e6f424ec01f992d6f098de78c969ff8f2 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 3 Oct 2013 07:37:17 +0000 Subject: [PATCH] adjectival predication now without copula by default in Chi --- lib/src/chinese/AdjectiveChi.gf | 6 +++--- lib/src/chinese/CatChi.gf | 2 +- lib/src/chinese/ConjunctionChi.gf | 2 +- lib/src/chinese/ParseChi.gf | 6 ++++-- lib/src/chinese/ResChi.gf | 25 +++++++++++++++---------- lib/src/chinese/VerbChi.gf | 6 +++++- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/lib/src/chinese/AdjectiveChi.gf b/lib/src/chinese/AdjectiveChi.gf index 040aa31d9..1c4c5fa7f 100644 --- a/lib/src/chinese/AdjectiveChi.gf +++ b/lib/src/chinese/AdjectiveChi.gf @@ -2,7 +2,7 @@ concrete AdjectiveChi of Adjective = CatChi ** open ResChi, Prelude in { lin - PositA a = a ; + PositA a = a ** {hasAdA = False} ; --ComparA a np = complexAP (a.s ++ than_s ++ np.s) ; ComparA a np = complexAP (than_s ++ np.s ++ a.s) ; @@ -20,9 +20,9 @@ concrete AdjectiveChi of Adjective = CatChi ** open ResChi, Prelude in { SentAP ap sc = complexAP (ap.s ++ sc.s) ; - AdAP ada ap = complexAP (ada.s ++ ap.s) ; + AdAP ada ap = {s = ada.s ++ ap.s ; monoSyl = False ; hasAdA = True} ; - UseA2 a = a ; + UseA2 a = a ** {hasAdA = False} ; AdvAP ap adv = complexAP (adv.s ++ ap.s) ; ---- diff --git a/lib/src/chinese/CatChi.gf b/lib/src/chinese/CatChi.gf index 1899f114f..8c485d866 100644 --- a/lib/src/chinese/CatChi.gf +++ b/lib/src/chinese/CatChi.gf @@ -37,7 +37,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Adv] ** open ResChi, Prelude in -- Adjective - AP = ResChi.Adj ; + AP = ResChi.Adj ** {hasAdA : Bool} ; -- Noun diff --git a/lib/src/chinese/ConjunctionChi.gf b/lib/src/chinese/ConjunctionChi.gf index c27eab382..bc5abeab0 100644 --- a/lib/src/chinese/ConjunctionChi.gf +++ b/lib/src/chinese/ConjunctionChi.gf @@ -5,7 +5,7 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin ConjS c = conjunctDistrSS (c.s ! CSent) ; ConjAdv c as = conjunctDistrSS (c.s ! CSent) as ** {advType = as.advType} ; ---- ?? ConjNP c = conjunctDistrSS (c.s ! CPhr CNPhrase) ; - ConjAP c as = conjunctDistrSS (c.s ! CPhr CAPhrase) as ** {monoSyl = False} ; + ConjAP c as = conjunctDistrSS (c.s ! CPhr CAPhrase) as ** {monoSyl = False ; hasAdA = True} ; ---- ?? ConjRS c = conjunctDistrSS (c.s ! CSent) ; ConjCN c ns = conjunctDistrSS (c.s ! CPhr CNPhrase) ns ** {c = ns.c} ; diff --git a/lib/src/chinese/ParseChi.gf b/lib/src/chinese/ParseChi.gf index 7f863fa62..2917bc65e 100644 --- a/lib/src/chinese/ParseChi.gf +++ b/lib/src/chinese/ParseChi.gf @@ -103,12 +103,14 @@ DashCN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ---- GerundAP v = { s = v.s ++ de_s ; ---- - monoSyl = False + monoSyl = False ; + hasAdA = True ; --- } ; PastPartAP v = { s = v.s ++ de_s ; - monoSyl = False + monoSyl = False ; + hasAdA = True ; --- } ; diff --git a/lib/src/chinese/ResChi.gf b/lib/src/chinese/ResChi.gf index a5267d739..c01b1cc91 100644 --- a/lib/src/chinese/ResChi.gf +++ b/lib/src/chinese/ResChi.gf @@ -40,6 +40,7 @@ resource ResChi = ParamX ** open Prelude in { xie_s = "些" ; the_s = "那" ; geng_s = "更" ; -- more, in comparison + hen_s = "很" ; -- very, or predicating a monosyllabic adjective zai_V = mkVerb "在" [] [] [] [] "不" ; fullstop_s = "。" ; @@ -98,15 +99,16 @@ oper -- for morphology - Noun : Type = {s : Str; c : Str} ; - Adj : Type = {s : Str; monoSyl: Bool} ; - Verb : Type = {s : Str ; pp,ds,dp,ep : Str ; neg : Str} ; + Noun : Type = {s : Str ; c : Str} ; + Adj : Type = {s : Str ; monoSyl: Bool} ; + Verb : Type = {s,sn : Str ; pp,ds,dp,ep : Str ; neg : Str} ; --- sn=[] needed for "hen" as copula regNoun : Str -> Str -> Noun = \s,c -> {s = word s ; c = word c}; mkAdj : Str -> Bool -> Adj = \s,b -> {s = word s ; monoSyl = b}; - complexAP : Str -> Adj = \s -> {s = s ; monoSyl = False} ; + complexAP : Str -> Adj ** {hasAdA : Bool} = + \s -> {s = s ; monoSyl = False ; hasAdA = False} ; --- not used for adding AdA simpleAdj : Str -> Adj = \s -> case s of { ? => mkAdj s True ; -- monosyllabic @@ -114,6 +116,9 @@ oper } ; copula : Verb = mkVerb "是" [] [] [] [] "不" ; + hen_copula : Verb = + {s = hen_s ; sn = [] ; pp = [] ; ds = [] ; dp = [] ; ep = [] ; neg = "不"} ; --- + nocopula : Verb = mkVerb [] [] [] [] [] "不" ; regVerb : (walk : Str) -> Verb = \v -> mkVerb v "了" "着" "在" "过" "没" ; @@ -121,7 +126,7 @@ oper noVerb : Verb = regVerb [] ; ---?? -- used as copula for verbal adverbs mkVerb : (v : Str) -> (pp,ds,dp,ep,neg : Str) -> Verb = \v,pp,ds,dp,ep,neg -> - {s = word v ; pp = pp ; ds = ds ; dp = dp ; ep = ep ; neg = neg} ; + {s,sn = word v ; pp = pp ; ds = ds ; dp = dp ; ep = ep ; neg = neg} ; useVerb : Verb -> Polarity => Aspect => Str = \v -> table { @@ -133,11 +138,11 @@ oper AExper => v.s ++ v.ep } ; Neg => table { - APlain => v.neg ++ v.s ; --- neg? - APerf => "不" ++ v.s ++ v.pp ; - ADurStat => "不" ++ v.s ; - ADurProg => v.neg ++ v.dp ++ v.s ; -- mei or bu - AExper => v.neg ++ v.s ++ v.ep + APlain => v.neg ++ v.sn ; --- neg? + APerf => "不" ++ v.sn ++ v.pp ; + ADurStat => "不" ++ v.sn ; + ADurProg => v.neg ++ v.dp ++ v.sn ; -- mei or bu + AExper => v.neg ++ v.sn ++ v.ep } } ; diff --git a/lib/src/chinese/VerbChi.gf b/lib/src/chinese/VerbChi.gf index efcaa370e..d01f31d8d 100644 --- a/lib/src/chinese/VerbChi.gf +++ b/lib/src/chinese/VerbChi.gf @@ -54,7 +54,11 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in { PassV2 v = insertAdv (mkNP passive_s) (predV v v.part) ; ---- - CompAP ap = insertObj (mkNP (ap.s ++ possessive_s)) (predV copula []) ; ---- hen / bu + CompAP ap = insertObj (mkNP ap.s) ( + case ap.hasAdA of { + True => predV nocopula [] ; + False => predV hen_copula []} + ) ; CompNP np = insertObj np (predV copula []) ; ----