mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
corrected use of possess_Prep in Chi to avoid double "de"
This commit is contained in:
@@ -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} ;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 "得很" ;
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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 ** {
|
||||
|
||||
Reference in New Issue
Block a user