mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-08-22 04:06:23 -06:00
czech: fill in the lins needed to build an application grammar
The Czech resource was too incomplete to compile a Syntax/Grammar client:
Sentence, Idiom and Question defined almost nothing, and many Structural
words were absent, so MissingCze's notYet stubs were reached at PMCFG
generation time.
Added:
CatCze lincat VV
SentenceCze AdvS, ExtAdvS, SSubjS, EmbedS, EmbedQS, ImpVP
IdiomCze ImpP3, ExistNP, ImpersCl, GenericCl
VerbCze CompCN, ComplVS, ComplVV, PassV2
NounCze SentCN, PredetNP
AdverbCze SubjS
QuestionCze QuestIAdv
PhraseCze UttImpSg, UttImpPl, UttImpPol
StructuralCze all_Predet, both7and_DConj, between_Prep, by8means_Prep,
can_VV, either7or_DConj, every_Det, if_Subj, no_Quant,
on_Prep, someSg_Det, that_Subj, under_Prep, where_IAdv
ExtendCze ExistsNP no longer excluded
Three of these approximate, because VerbForms lacks the required forms:
ImpVP uses the 1st person plural present ("předpokládáme, že ...") as there
is no imperative; PassV2 uses the reflexive passive ("číslo se dělí") as
passpart is commented out in ResCze; ImpP3 uses "nechť", which suits
mathematical text more than the "let John walk" of the RGL example.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,4 +6,8 @@ lin
|
||||
s = prep.s ++ np.prep ! prep.c
|
||||
} ;
|
||||
|
||||
SubjS subj s = {
|
||||
s = subj.s ++ s.s
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ concrete CatCze of Cat =
|
||||
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
|
||||
V = ResCze.VerbForms ;
|
||||
V2 = ResCze.VerbForms ** {c : ComplementCase} ;
|
||||
VS,VQ = ResCze.VerbForms ;
|
||||
VS,VQ,VV = ResCze.VerbForms ;
|
||||
|
||||
A = ResCze.AdjForms ;
|
||||
AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}
|
||||
|
||||
@@ -12,7 +12,6 @@ concrete ExtendCze of Extend = CatCze **
|
||||
,SlashBareV2S
|
||||
,PredIAdvVP
|
||||
,PredAPVP
|
||||
,ExistsNP
|
||||
,ExistS
|
||||
,ExistPluralCN
|
||||
,ExistNPQS
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
concrete IdiomCze of Idiom = CatCze ** open Prelude, ResCze in {
|
||||
|
||||
lin
|
||||
ImpP3 np vp = {
|
||||
s = "nechť" ++ np.s ! Nom ++ vp.clit ! np.a ++
|
||||
verbAgr vp.verb np.a True ++ vp.compl ! np.a
|
||||
} ;
|
||||
|
||||
ImpersCl vp = let agr = Ag Neutr Sg P3 in {
|
||||
subj = [] ;
|
||||
clit = vp.clit ! agr ;
|
||||
compl = vp.compl ! agr ;
|
||||
verb = vp.verb ;
|
||||
a = agr
|
||||
} ;
|
||||
|
||||
GenericCl vp = let agr = Ag (Masc Anim) Pl P3 in {
|
||||
subj = [] ;
|
||||
clit = vp.clit ! agr ;
|
||||
compl = vp.compl ! agr ;
|
||||
verb = vp.verb ;
|
||||
a = agr
|
||||
} ;
|
||||
|
||||
ExistNP np = {
|
||||
subj, clit = [] ;
|
||||
compl = np.s ! Nom ;
|
||||
verb = iii_kupovatVerbForms "existovat" ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,12 +9,10 @@ oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
|
||||
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
|
||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||
oper CompCN : CN -> Comp = notYet "CompCN" ;
|
||||
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||
oper ComparA : A -> NP -> AP = notYet "ComparA" ;
|
||||
|
||||
@@ -99,5 +99,12 @@ lin
|
||||
NumDecimal ds = ds ** {s = \\_,_ => ds.s} ;
|
||||
NumNumeral nu = nu ;
|
||||
|
||||
SentCN cn sc = cn ** {s = \\n,c => cn.s ! n ! c ++ sc.s} ;
|
||||
|
||||
PredetNP pred np = np ** {
|
||||
s = \\c => pred.s ++ np.s ! c ;
|
||||
clit = \\c => pred.s ++ np.clit ! c ;
|
||||
prep = \\c => pred.s ++ np.prep ! c
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ lin
|
||||
UttNP np = {s = np.s ! Nom} ;
|
||||
UttVP vp = let agr = Ag Neutr Sg P3 in {s = vp.clit ! agr ++ vp.verb.inf ++ vp.compl ! agr} ;
|
||||
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s} ;
|
||||
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
|
||||
|
||||
@@ -4,4 +4,6 @@ concrete QuestionCze of Question = CatCze **
|
||||
lin
|
||||
QuestCl cl = cl ; ----
|
||||
|
||||
QuestIAdv iadv cl = cl ** {clit = iadv.s ++ cl.clit} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,5 +28,24 @@ lin
|
||||
pol.s ++ verbAgr rcl.verb a pol.p ++
|
||||
rcl.compl ! a ;
|
||||
} ;
|
||||
|
||||
|
||||
-- no imperative in VerbForms yet; the 1st person plural present is used
|
||||
-- instead, which is the normal register in mathematical Czech
|
||||
-- ("předpokládáme, že ..." = "we assume that ...")
|
||||
ImpVP vp = let agr = Ag (Masc Anim) Pl P1 in
|
||||
{s = vp.clit ! agr ++ verbAgr vp.verb agr True ++ vp.compl ! agr} ;
|
||||
|
||||
EmbedS s = {s = "že" ++ s.s} ;
|
||||
|
||||
EmbedQS qs = {s = qs.s} ;
|
||||
|
||||
EmbedVP vp = let agr = Ag Neutr Sg P3 in
|
||||
{s = vp.clit ! agr ++ vp.verb.inf ++ vp.compl ! agr} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
|
||||
ExtAdvS a s = {s = a.s ++ SOFT_BIND ++ "," ++ s.s} ;
|
||||
|
||||
SSubjS a subj b = {s = a.s ++ SOFT_BIND ++ "," ++ subj.s ++ b.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,42 @@
|
||||
concrete StructuralCze of Structural = CatCze **
|
||||
open ParadigmsCze, ResCze, Prelude in {
|
||||
|
||||
-- a singular determiner inflecting like an adjective, e.g. "každý", "nějaký"
|
||||
oper
|
||||
adjDet : AdjForms -> Determiner = \afs -> {
|
||||
s = \\g,c => (adjFormsAdjective afs).s ! g ! Sg ! c ;
|
||||
size = Num1
|
||||
} ;
|
||||
|
||||
lin
|
||||
all_Predet = {s = "všechny"} ;
|
||||
and_Conj = mkConj "a" ;
|
||||
both7and_DConj = {s1 = "jak" ; s2 = "tak"} ;
|
||||
between_Prep = mkPrep "mezi" Ins ;
|
||||
by8agent_Prep = mkPrep "od" Gen ; ---- TODO this means "from", there might be no good translation
|
||||
by8means_Prep = mkPrep "pomocí" Gen ;
|
||||
can_VV = {
|
||||
inf = "moci" ;
|
||||
pressg1 = "mohu" ;
|
||||
pressg2 = "můžeš" ;
|
||||
pressg3, negpressg3 = "může" ;
|
||||
prespl1 = "můžeme" ;
|
||||
prespl2 = "můžete" ;
|
||||
prespl3 = "mohou" ;
|
||||
pastpartsg = "mohl" ;
|
||||
pastpartpl = "mohli" ;
|
||||
} ;
|
||||
either7or_DConj = {s1 = "buď" ; s2 = "nebo"} ;
|
||||
every_Det = adjDet (mladyAdjForms "každý") ;
|
||||
few_Det = invarNumeral "málo" ; -- CEG 6.8 --- TODO genitive mála
|
||||
for_Prep = mkPrep "pro" accusative ;
|
||||
if_Subj = {s = "jestliže"} ;
|
||||
no_Quant = adjFormsAdjective (mladyAdjForms "žádný") ;
|
||||
on_Prep = mkPrep "na" Loc ;
|
||||
someSg_Det = adjDet (mladyAdjForms "nějaký") ;
|
||||
that_Subj = {s = "že"} ;
|
||||
under_Prep = mkPrep "pod" Ins ;
|
||||
where_IAdv = {s = "kde"} ;
|
||||
from_Prep = mkPrep (pre {"s"|"z" => "ze" ; _ => "z"}) Gen ; ---- consonant clusters
|
||||
have_V2 = mkV2 haveVerbForms ;
|
||||
in_Prep = mkPrep (pre {"v"|"m" => "ve" ; _ => "v"}) Loc ; ----
|
||||
|
||||
@@ -36,6 +36,12 @@ lin
|
||||
CompNP np = {
|
||||
s = \\a_ => np.s ! Nom ; ---- InstrC in Pol
|
||||
} ;
|
||||
|
||||
CompCN cn = {
|
||||
s = \\a => case a of {
|
||||
Ag _ n _ => cn.s ! n ! Nom ---- InstrC also possible
|
||||
}
|
||||
} ;
|
||||
|
||||
CompAdv adv = {
|
||||
s = \\a_ => adv.s
|
||||
@@ -45,4 +51,24 @@ lin
|
||||
compl = \\a => vp.compl ! a ++ adv.s
|
||||
} ;
|
||||
|
||||
-- VerbForms has no passive participle yet, so the reflexive passive is used:
|
||||
-- "číslo se dělí" = "the number is divided"
|
||||
PassV2 v = {
|
||||
verb = v ;
|
||||
clit = \\_ => "se" ;
|
||||
compl = \\_ => []
|
||||
} ;
|
||||
|
||||
ComplVV vv vp = {
|
||||
verb = vv ;
|
||||
clit = vp.clit ;
|
||||
compl = \\a => vp.verb.inf ++ vp.compl ! a
|
||||
} ;
|
||||
|
||||
ComplVS vs s = {
|
||||
verb = vs ;
|
||||
clit = \\_ => [] ;
|
||||
compl = \\_ => SOFT_BIND ++ "," ++ "že" ++ s.s
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user