1
0
forked from GitHub/gf-core

moved Chi ListCN to right place and added some missing words

This commit is contained in:
aarne
2013-10-01 16:30:52 +00:00
parent e5fe5d55c9
commit 4d1804c820
7 changed files with 24 additions and 14 deletions

View File

@@ -156,7 +156,7 @@ ParseEngSwe:
gf -make -literal=Symb -probs=$(PROBSFILE) -name=ParseEngSwe ParseEng.pgf ParseSwe.pgf gf -make -literal=Symb -probs=$(PROBSFILE) -name=ParseEngSwe ParseEng.pgf ParseSwe.pgf
ParseChi: ParseChi:
gf -make -literal=Symb -probs=$(PROBSFILE) -name=ParseChi chinese/ParseChi.gf gf -make -s -literal=Symb -probs=$(PROBSFILE) -name=ParseChi chinese/ParseChi.gf
ParseEngChi: ParseEngChi:
gf -make -literal=Symb -probs=$(PROBSFILE) -name=ParseEngChi ParseEng.pgf ParseChi.pgf gf -make -literal=Symb -probs=$(PROBSFILE) -name=ParseEngChi ParseEng.pgf ParseChi.pgf

View File

@@ -7,6 +7,7 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
ConjNP c = conjunctDistrSS (c.s ! CPhr CNPhrase) ; 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} ;
ConjRS c = conjunctDistrSS (c.s ! CSent) ; ConjRS c = conjunctDistrSS (c.s ! CSent) ;
ConjCN c ns = conjunctDistrSS (c.s ! CPhr CNPhrase) ns ** {c = ns.c} ;
-- These fun's are generated from the list cat's. -- These fun's are generated from the list cat's.
@@ -20,6 +21,8 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
ConsAP = consrSS duncomma ; ConsAP = consrSS duncomma ;
BaseRS = twoSS ; BaseRS = twoSS ;
ConsRS = consrSS duncomma ; ConsRS = consrSS duncomma ;
BaseCN x y = twoSS x y ** {c = x.c} ; --- classified comes from first part ; should it rather be ge?
ConsCN x xs = consrSS duncomma x xs ** {c = x.c} ;
lincat lincat
[S] = {s1,s2 : Str} ; [S] = {s1,s2 : Str} ;
@@ -27,5 +30,7 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
[NP] = {s1,s2 : Str} ; [NP] = {s1,s2 : Str} ;
[AP] = {s1,s2 : Str} ; [AP] = {s1,s2 : Str} ;
[RS] = {s1,s2 : Str} ; [RS] = {s1,s2 : Str} ;
[CN] = {s1,s2 : Str ; c : Str} ;
} }

View File

@@ -491,7 +491,7 @@ rate_N = mkN "率" ;
bond_N = mkN "券" ; bond_N = mkN "券" ;
zoological_A = mkA "关于动物" ; zoological_A = mkA "关于动物" ;
time_N = mkN "时间" ; time_N = mkN "时间" ;
--* presidentMasc_N = mkN "" ; -- Don't understand presidentMasc_N = mkN "总统" ;
week_N = mkN "星期" ; week_N = mkN "星期" ;
investor_N = mkN "投资者" ; investor_N = mkN "投资者" ;
into_Prep = mkPrep "成" ; into_Prep = mkPrep "成" ;
@@ -542,6 +542,7 @@ just_Adv = mkAdv "只是" ;
up_Adv = mkAdv "上" ; up_Adv = mkAdv "上" ;
security_N = mkN "安全" ; security_N = mkN "安全" ;
current_A = mkA "现时" ; current_A = mkA "现时" ;
currency_N = mkN "货币" ;
cost_N = mkN "成本" ; cost_N = mkN "成本" ;
problem_N = mkN "问题" ; problem_N = mkN "问题" ;
financial_A = mkA "金融" ; financial_A = mkA "金融" ;

View File

@@ -7,7 +7,6 @@ concrete ExtraChi of ExtraChiAbs = CatChi **
[VPS] = {s1,s2 : Str} ; [VPS] = {s1,s2 : Str} ;
VPI = {s : Str} ; --- ??? VPI = {s : Str} ; --- ???
[VPI] = {s1,s2 : Str} ; --- ??? [VPI] = {s1,s2 : Str} ; --- ???
[CN] = {s : Str ; c : Str} ;
lin lin
PassVPSlash vps = insertAdv (mkNP passive_s) vps ; PassVPSlash vps = insertAdv (mkNP passive_s) vps ;
@@ -17,14 +16,13 @@ concrete ExtraChi of ExtraChiAbs = CatChi **
BaseVPS = twoSS ; BaseVPS = twoSS ;
ConsVPS = consrSS duncomma ; ConsVPS = consrSS duncomma ;
PredVPS np vps = {s = np.s ++ vps.s} ;
MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ; --- ?? almost just a copy of VPS MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ; --- ?? almost just a copy of VPS
ConjVPI c = conjunctDistrSS (c.s ! CSent) ; ConjVPI c = conjunctDistrSS (c.s ! CSent) ;
BaseVPI = twoSS ; BaseVPI = twoSS ;
ConsVPI = consrSS duncomma ; ConsVPI = consrSS duncomma ;
ConjCN c = conjunctDistrSS (c.s ! CPhr CNPhrase) ** {c = ge_s} ; --- classifier always ge
BaseCN = twoSS ;
ConsCN = consrSS duncomma ;
GenRP nu cn = {s = cn.s ++ relative_s} ; ---- ?? GenRP nu cn = {s = cn.s ++ relative_s} ; ---- ??

View File

@@ -3,7 +3,7 @@ abstract ExtraChiAbs = Cat,
Extra [NP, Quant, VPSlash, VP, Tense, Aspect, GenNP, PassVPSlash, Extra [NP, Quant, VPSlash, VP, Tense, Aspect, GenNP, PassVPSlash,
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP, 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, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash, ListCN, ConjCN, BaseCN, ConsCN] ClSlash, RCl, EmptyRelSlash]
** { ** {
cat cat

View File

@@ -72,8 +72,12 @@ oper
mkVV : Str -> VV = ---- mkVV : Str -> VV = ----
\v -> lin VV (regVerb v) ; \v -> lin VV (regVerb v) ;
mkVQ : V -> VQ = mkVQ = overload {
\v -> lin VQ v ; mkVQ : Str -> VQ =
\v -> lin VQ (regVerb v) ;
mkVQ : V -> VQ =
\v -> lin VQ v ;
} ;
mkVS = overload { mkVS = overload {
mkVS : V -> VS = mkVS : V -> VS =
@@ -89,10 +93,12 @@ oper
\v -> lin VA v ; \v -> lin VA v ;
} ; } ;
mkV2Q : V -> V2Q = mkV2Q = overload {
\v -> lin V2Q (v ** {c2 = emptyPrep ; hasPrep = False ; part = []}) ; mkV2Q : V -> V2Q =
---- mkV2Q : V -> Str -> V2Q = \v -> lin V2Q (v ** {c2 = emptyPrep ; hasPrep = False ; part = []}) ;
---- \v,p -> lin V2Q (v ** {c2 = mkPrep p}) ; mkV2Q : Str -> V2Q =
\v -> lin V2Q (regVerb v ** {c2 = emptyPrep ; hasPrep = False ; part = []}) ;
} ;
mkV2V= overload { mkV2V= overload {
mkV2V : Str -> V2V = mkV2V : Str -> V2V =

View File

@@ -62,7 +62,7 @@ resource ResChi = ParamX ** open Prelude in {
-- Write the characters that constitute a word separately. This enables straightforward tokenization. -- Write the characters that constitute a word separately. This enables straightforward tokenization.
bword : Str -> Str -> Str = \x,y -> x + y ; -- change to x + y to treat words as single tokens bword : Str -> Str -> Str = \x,y -> x ++ y ; -- change to x + y to treat words as single tokens
word : Str -> Str = \s -> case s of { word : Str -> Str = \s -> case s of {
x@? + y@? + z@? + u@? + v@? + w@? + a@? + b@? => bword x (bword y (bword z (bword u (bword v (bword w (bword a b)))))) ; x@? + y@? + z@? + u@? + v@? + w@? + a@? + b@? => bword x (bword y (bword z (bword u (bword v (bword w (bword a b)))))) ;