1
0
forked from GitHub/gf-rgl
Files
gf-rgl/src/chinese/CatChi.gf
T
Krasimir Angelov fb398c603e The new Decimal API
2023-08-21 20:14:26 +02:00

98 lines
2.4 KiB
Plaintext

concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelude in {
lincat
-- Tensed/Untensed
S = Sentence ;
QS = {s : Bool => Str} ; -- True = direct question (with ma for sentential questions)
RS = {s : Str} ;
SSlash = {s : Str ; c2 : Preposition} ;
-- Sentence
Cl = Clause ; -- {s : Polarity => Aspect => Str ; np: Str ; vp: Polarity => Aspect => Str} ;
ClSlash = Clause ** {c2 : Preposition} ;
Imp = {s : Polarity => Str} ;
-- Question
QCl = {s : Bool => Polarity => Aspect => Str} ; -- True = direct question
IP = {s : Str} ;
IComp = {s : Str} ;
IDet = {s : Str ; detType : DetType} ;
IQuant = {s : Str} ;
-- Relative
RCl = {s : Polarity => Aspect => Str} ;
RP = {s : Bool => Str} ; -- True = applied to adjectival VP's hence "de" is not repeated
-- Verb
VP = ResChi.VP ;
Comp = ResChi.VP ;
VPSlash = ResChi.VP ** {c2 : Preposition ; isPre : Bool} ; -- whether the missing arg is before verb
-- Adjective
AP = ResChi.Adj ** {hasAdA : Bool} ;
-- Noun
CN = ResChi.Noun ;
NP = ResChi.NP ;
Pron = SS ;
Det = Determiner ;
Quant = Determiner ** {pl : Str} ;
Predet = {s : Str} ; ----
Ord = {s : Str} ;
Num = {s : Str ; numType : NumType} ;
Adv = {s : Str ; advType : AdvType ; hasDe : Bool} ;
-- Numeral
Numeral = {s,p : Str} ;
Card, Digits = {s : Str} ;
Decimal = {s : Str ; hasDot : Bool} ;
-- Structural
Conj = {
s : ConjForm => {s1,s2 : Str} ; -- different form whether it's used for S, A, N, ...
conjType : ConjType -- different placement whether it's and,or,... or if-then
} ;
Subj = {prePart : Str ; sufPart : Str} ;
Prep = Preposition ;
-- Open lexical classes, e.g. Lexicon
V, VS, VQ, VA = Verb ;
V2, V2Q, V2S = Verb ** {c2 : Preposition ; hasPrep : Bool ; part : Str} ;
V3, V2A, V2V = Verb ** {c2, c3 : Preposition ; hasPrep : Bool ; part : Str} ;
VV = Verb ;
A = ResChi.Adj ;
A2 = ResChi.Adj ** {c2 : Preposition} ;
N = ResChi.Noun ;
N2 = ResChi.Noun ** {c2 : Preposition} ;
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
GN, SN, LN, PN = SS ;
-- overridden
Temp = {s : Str ; t : Aspect} ;
Tense = {s : Str ; t : Aspect} ;
Ant = {s : Str ; t : Aspect} ;
linref
S = linS ;
Prep = linPrep ;
VP = infVP ;
NP = \np -> np.det ++ np.s ;
}