forked from GitHub/gf-core
Chi constructions (part of them), topicalized time adverbs
This commit is contained in:
@@ -36,9 +36,9 @@ concrete ExtraChi of ExtraChiAbs = CatChi **
|
||||
lincat
|
||||
Aspect = {s : Str ; a : ResChi.Aspect} ;
|
||||
lin
|
||||
PredBareAP np ap = case ap.hasAdA of {
|
||||
True => mkClause np.s (insertObj (mkNP ap.s) (predV nocopula [])) ;
|
||||
False => mkClause np.s (insertObj (mkNP ap.s) (predV hen_copula []))
|
||||
CompBareAP ap = case ap.hasAdA of {
|
||||
True => insertObj (mkNP ap.s) (predV nocopula []) ;
|
||||
False => insertObj (mkNP ap.s) (predV hen_copula [])
|
||||
} ;
|
||||
QuestRepV cl = {
|
||||
s = \\p,a =>
|
||||
|
||||
@@ -10,7 +10,7 @@ abstract ExtraChiAbs = Cat,
|
||||
Aspect ;
|
||||
|
||||
fun
|
||||
PredBareAP : NP -> AP -> Cl ; -- adjectival predication without copula
|
||||
CompBareAP : AP -> Comp ; -- adjectival predication without copula
|
||||
|
||||
QuestRepV : Cl -> QCl ; -- V neg V question
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ concrete IdiomChi of Idiom = CatChi ** open Prelude, ResChi in {
|
||||
ProgrVP vp = {
|
||||
verb = regVerb zai_s ;
|
||||
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||
prePart = []
|
||||
prePart, topic = []
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,14 @@ concrete ParseChi of ParseEngAbs =
|
||||
NumeralChi,
|
||||
SymbolChi [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
ConjunctionChi,
|
||||
VerbChi - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
VerbChi - [SlashV2V, PassV2, UseCopula, ComplVV, CompAP],
|
||||
AdverbChi,
|
||||
PhraseChi,
|
||||
SentenceChi,
|
||||
QuestionChi,
|
||||
RelativeChi,
|
||||
IdiomChi [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionChi,
|
||||
ExtraChi [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
@@ -22,13 +23,18 @@ concrete ParseChi of ParseEngAbs =
|
||||
DictEngChi
|
||||
|
||||
**
|
||||
open ResChi, ParadigmsChi, SyntaxChi, Prelude in {
|
||||
open ResChi, ParadigmsChi, SyntaxChi, Prelude, (G = GrammarChi), (E = ExtraChi) in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding = utf8 ;
|
||||
|
||||
|
||||
-- Chinese-specific overrides
|
||||
|
||||
lin
|
||||
CompAP = G.CompAP | E.CompBareAP ;
|
||||
|
||||
lin
|
||||
|
||||
EmptyRelSlash slash = mkRCl <which_RP : RP> <lin ClSlash slash : ClSlash> ;
|
||||
@@ -135,8 +141,8 @@ DashCN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
|
||||
|
||||
ComplVV v a p vp = {
|
||||
verb = v ;
|
||||
compl = a.s ++ p.s ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
|
||||
prePart = vp.prePart
|
||||
compl = a.s ++ p.s ++ vp.topic ++ vp.prePart ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
|
||||
prePart, topic = []
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
|
||||
@@ -100,7 +100,13 @@ param
|
||||
|
||||
oper
|
||||
|
||||
VP = {verb : Verb ; compl : Str ; prePart : Str} ;
|
||||
VP = {
|
||||
topic : Str ; -- topicalized item, before subject
|
||||
prePart : Str ; -- between subject and verb
|
||||
verb : Verb ;
|
||||
compl : Str -- after verb
|
||||
} ;
|
||||
|
||||
NP = {s : Str} ;
|
||||
|
||||
-- for morphology
|
||||
@@ -155,41 +161,53 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
infVP : VP -> Str = \vp -> vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||
infVP : VP -> Str = \vp -> vp.topic ++ vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||
|
||||
predV : Verb -> Str -> VP = \v,part -> {
|
||||
verb = v ;
|
||||
compl = part ;
|
||||
prePart = [] ;
|
||||
prePart, topic = [] ;
|
||||
} ;
|
||||
|
||||
insertObj : NP -> VP -> VP = \np,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = np.s ++ vp.compl ;
|
||||
prePart = vp.prePart
|
||||
prePart = vp.prePart ;
|
||||
topic = vp.topic
|
||||
} ;
|
||||
|
||||
insertObjPost : NP -> VP -> VP = \np,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = vp.compl ++ np.s ;
|
||||
prePart = vp.prePart
|
||||
prePart = vp.prePart ;
|
||||
topic = vp.topic
|
||||
} ;
|
||||
|
||||
insertAdv : SS -> VP -> VP = \adv,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = vp.compl ;
|
||||
prePart = adv.s ++ vp.prePart
|
||||
prePart = adv.s ++ vp.prePart ;
|
||||
topic = vp.topic
|
||||
} ;
|
||||
|
||||
insertTopic : SS -> VP -> VP = \adv,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = vp.compl ;
|
||||
prePart = vp.prePart ;
|
||||
topic = adv.s ++ vp.topic
|
||||
} ;
|
||||
insertAdvPost : SS -> VP -> VP = \adv,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = vp.compl ;
|
||||
prePart = vp.prePart ++ adv.s
|
||||
prePart = vp.prePart ++ adv.s ;
|
||||
topic = vp.topic
|
||||
} ;
|
||||
|
||||
insertPP : SS -> VP -> VP = \pp,vp -> {
|
||||
verb = vp.verb ;
|
||||
compl = vp.compl ;
|
||||
prePart = vp.prePart ++ pp.s
|
||||
prePart = vp.prePart ++ pp.s ;
|
||||
topic = vp.topic
|
||||
} ;
|
||||
|
||||
insertExtra : SS -> VP -> VP = \ext,vp ->
|
||||
@@ -216,8 +234,8 @@ oper
|
||||
} ;
|
||||
|
||||
mkClauseCompl : Str -> VP -> Str -> Clause = \np,vp,compl -> {
|
||||
s = \\p,a => np ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
||||
np = np ;
|
||||
s = \\p,a => vp.topic ++ np ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
||||
np = vp.topic ++ np ;
|
||||
vp = insertObj (ss compl) vp ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
||||
ComplVV v vp = {
|
||||
verb = v ;
|
||||
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||
prePart = []
|
||||
prePart, topic = []
|
||||
} ;
|
||||
|
||||
ComplVS v s = insertObj s (predV v []) ;
|
||||
@@ -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
|
||||
_ => insertAdv adv vp -- he *today* here sleeps
|
||||
ATTime => insertTopic adv vp -- *today* he here sleeps
|
||||
} ;
|
||||
|
||||
AdVVP adv vp = insertAdv adv vp ;
|
||||
|
||||
Reference in New Issue
Block a user