mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-08-22 04:06:23 -06:00
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ Bul,Bulgarian,bulgarian,,,y,,,,,y,n
|
||||
Cat,Catalan,catalan,Romance,,y,,,,y,y,n
|
||||
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y,n
|
||||
Chi,Chinese (simplified),chinese,,,,,,,,y,y
|
||||
Cze,Czech,czech,,,,,,n,,y,n
|
||||
Cze,Czech,czech,,,,,,y,,y,n
|
||||
Dan,Danish,danish,Scand,,y,,,,,y,n
|
||||
Dut,Dutch,dutch,,,y,,,,,y,n
|
||||
Eng,English,english,,,y,,,,y,y,y
|
||||
|
||||
|
@@ -6,4 +6,8 @@ lin
|
||||
s = prep.s ++ np.prep ! prep.c
|
||||
} ;
|
||||
|
||||
SubjS subj s = {
|
||||
s = subj.s ++ s.s
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -21,10 +21,11 @@ concrete CatCze of Cat =
|
||||
RP = AdjForms ;
|
||||
|
||||
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
|
||||
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
|
||||
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase ; ind : Agr => Str} ; -- ind : incorporated indirect object, rendered after the object slot
|
||||
V = ResCze.VerbForms ;
|
||||
V2 = ResCze.VerbForms ** {c : ComplementCase} ;
|
||||
VS,VQ = ResCze.VerbForms ;
|
||||
V3 = ResCze.VerbForms ** {c,c2 : ComplementCase} ; -- c : direct object, c2 : indirect object
|
||||
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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--# -path=.:../abstract:../common:../api
|
||||
|
||||
concrete LangCze of Lang =
|
||||
concrete LangCze of Lang =
|
||||
GrammarCze,
|
||||
LexiconCze
|
||||
-- ,ConstructionCze
|
||||
-- ,DocumentationCze --# notpresent
|
||||
,MarkupCze - [stringMark]
|
||||
** {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete MarkupCze of Markup = CatCze, MarkHTMLX ** open ResCze in {
|
||||
|
||||
lin
|
||||
MarkupCN m cn = cn ** {s = \\n,c => appMark m (cn.s ! n ! c)} ;
|
||||
|
||||
-- s, clit and prep are alternative surface forms, so each is marked;
|
||||
-- but clit ! Nom is the pro-drop subject, empty for every pronoun,
|
||||
-- and marking it up would leave the tags around nothing
|
||||
MarkupNP m np = np ** {
|
||||
s = \\c => appMark m (np.s ! c) ;
|
||||
clit = \\c => case c of {
|
||||
Nom => np.clit ! Nom ;
|
||||
_ => appMark m (np.clit ! c)
|
||||
} ;
|
||||
prep = \\c => appMark m (np.prep ! c)
|
||||
} ;
|
||||
|
||||
MarkupAP m ap = ap ** {s = \\g,n,c => appMark m (ap.s ! g ! n ! c)} ;
|
||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||
MarkupS m s = {s = appMark m s.s} ;
|
||||
MarkupUtt m utt = {s = appMark m utt.s} ;
|
||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||
MarkupText m txt = {s = appMark m txt.s} ;
|
||||
|
||||
}
|
||||
@@ -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" ;
|
||||
@@ -63,8 +61,6 @@ oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
||||
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
||||
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
||||
oper Slash3V3 : V3 -> NP -> VPSlash = notYet "Slash3V3" ;
|
||||
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -122,6 +122,14 @@ oper
|
||||
= \vf,c -> vf ** {c = c} ;
|
||||
} ;
|
||||
|
||||
mkV3 = overload {
|
||||
mkV3 : VerbForms -> VerbForms ** {c,c2 : ComplementCase}
|
||||
= \vf -> vf ** {c = {s = [] ; c = Acc ; hasPrep = False} ;
|
||||
c2 = {s = [] ; c = Dat ; hasPrep = False}} ;
|
||||
mkV3 : VerbForms -> ComplementCase -> ComplementCase -> VerbForms ** {c,c2 : ComplementCase}
|
||||
= \vf,c,c2 -> vf ** {c = c ; c2 = c2} ;
|
||||
} ;
|
||||
|
||||
------------------------
|
||||
-- Adverbs, prepositions, conjunctions, ...
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@ lin
|
||||
UttCN cn = {s = cn.s ! Sg ! Nom} ;
|
||||
UttAP ap = {s = ap.s ! Masc Anim ! Sg ! Nom} ;
|
||||
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} ;
|
||||
|
||||
}
|
||||
|
||||
+122
-19
@@ -28,6 +28,11 @@ oper
|
||||
softConsonant : pattern Str = #("ť"|"ď"|"j"|"ň"|"ř"|"š"|"c"|"č"|"ž") ;
|
||||
neutralConsonant : pattern Str = #("b"|"f"|"l"|"m"|"p"|"s"|"v") ;
|
||||
|
||||
-- neutral consonants take the hard endings by default (hrad, pán), and so do
|
||||
-- the foreign "z" and "x"; this is the class to test when choosing a paradigm
|
||||
hardishConsonant : pattern Str =
|
||||
#("d"|"t"|"g"|"h"|"k"|"n"|"r" | "b"|"f"|"l"|"m"|"p"|"s"|"v" | "z"|"x") ;
|
||||
|
||||
consonant : pattern Str =
|
||||
#(
|
||||
"d" | "t" | "g" | "h" | "k" | "n" | "r" |
|
||||
@@ -139,22 +144,33 @@ oper
|
||||
|
||||
declensionNounForms : (nom,gen : Str) -> Gender -> NounForms
|
||||
= \nom,gen,g ->
|
||||
let decl : DeclensionType = case <g, nom, gen> of {
|
||||
<Masc Anim, _ + #hardConsonant, _ + "a"> => declPAN ;
|
||||
<Masc Anim, _ + "a" , _ + "a"> => declPREDSEDA ;
|
||||
<Masc Inanim, _ + #hardConsonant, _ + "u"> => declHRAD ;
|
||||
<Fem, _ + "a" , _ + "y"> => declZENA ;
|
||||
<Neutr, _ + "o" , _ + "a"> => declMESTO ;
|
||||
<Masc Anim, _ + #softConsonant, _ + "e"> => declMUZ ;
|
||||
<Masc Anim, _ + "tel" , _ + "e"> => declMUZ ;
|
||||
-- the oblique stem, for the paradigms that cannot derive it from the nominative
|
||||
let stem : Str = Predef.tk 1 gen ;
|
||||
decl : DeclensionType = case <g, nom, gen> of {
|
||||
<Masc Anim, _ + "tel" , _ + "e"> => declMUZstem stem ;
|
||||
<Masc Anim, _ + "ce" , _ + "e"> => declSOUDCE ;
|
||||
<Masc Inanim, _ + #softConsonant, _ + "e"> => declSTROJ ;
|
||||
<Masc Anim, _ + ("us"|"os") , _ + "a"> => declLATINUSA ;
|
||||
<Masc Anim, _ + "a" , _ + "a"> => declPREDSEDA ;
|
||||
<Masc Anim, _ + (#softConsonant|#hardishConsonant), _ + ("e"|"ě")> => declMUZstem stem ;
|
||||
<Masc Anim, _ + #hardishConsonant, _ + "a"> => declPAN ;
|
||||
<Masc Inanim, _ + ("us"|"os") , _ + "u"> => declLATINUS ;
|
||||
<Masc Inanim, _ + "ý" , _ + "ého"> => declADJM ;
|
||||
<Masc Inanim, _ + (#softConsonant|#hardishConsonant), _ + ("e"|"ě")> => declSTROJ ;
|
||||
<Masc Inanim, _ + #hardishConsonant, _ + "u"> => declHRADstem stem ;
|
||||
<Masc Inanim, _ + #hardishConsonant, _ + "a"> => declHRADAstem stem ;
|
||||
<Fem, _ + "a" , _ + "y"> => declZENA ;
|
||||
<Fem, _ + "á" , _ + "é"> => declADJF ;
|
||||
<Fem, _ + ("e"|"ě") , _ + ("e"|"ě")> => declRUZE ;
|
||||
<Fem, _ + #softConsonant, _ + "e"> => declPISEN ;
|
||||
<Fem, _ + "ost" , _ + "i"> => declKOST ; --- also many other "st" 3.6.3
|
||||
<Fem, _ + (#softConsonant|#hardishConsonant), _ + "i"> => declKOST ; --- also many other "st" 3.6.3
|
||||
<Fem, _ + (#softConsonant|#hardishConsonant), _ + ("e"|"ě")> => declPISEN ;
|
||||
<Neutr, _ + "um" , _ + "a"> => declLATINUM ;
|
||||
<Neutr, _ + "ma" , _ + ("matu"|"mata")> => declGREEKMA ;
|
||||
<Neutr, _ + "o" , _ + "a"> => declMESTO ;
|
||||
<Neutr, _ + "e" , _+"ete"> => declKURE ;
|
||||
<Neutr, _ + "e" , _ + "e"> => declMORE ;
|
||||
<Neutr, _ + "í" , _ + "í"> => declSTAVENI ;
|
||||
<Neutr, _ + ("e"|"ě") , _ + ("e"|"ě")> => declMORE ;
|
||||
<Masc Inanim, _ + ("é"|"i"|"y"|"e"), _ + ("é"|"i"|"y"|"e")> => declINVAR (Masc Inanim) ;
|
||||
<Neutr, _ + ("é"|"i"|"y") , _ + ("é"|"i"|"y")> => declINVAR Neutr ;
|
||||
_ => (\s -> declSTROJ ("" + s)) -- Predef.error ("cannot infer declension type for" ++ nom ++ gen)
|
||||
}
|
||||
in decl nom ;
|
||||
@@ -165,12 +181,14 @@ oper
|
||||
= \s -> case s of {
|
||||
_ + "ost" => declKOST s ;
|
||||
_ + "tel" => declMUZ s ;
|
||||
_ + #hardConsonant => declHRAD s ;
|
||||
_ + "us" => declLATINUS s ;
|
||||
_ + "um" => declLATINUM s ;
|
||||
_ + #hardishConsonant => declHRAD s ;
|
||||
_ + #softConsonant => declSTROJ s ;
|
||||
_ + "a" => declZENA s ;
|
||||
_ + "o" => declMESTO s ;
|
||||
_ + "ce" => declSOUDCE s ;
|
||||
_ + "e" => declMORE s ;
|
||||
_ + ("e"|"ě") => declMORE s ;
|
||||
_ + "í" => declSTAVENI s ;
|
||||
_ => declSTROJ ("" + s) -- Predef.error ("cannot guess declension type for" ++ s)
|
||||
} ;
|
||||
@@ -216,9 +234,9 @@ oper
|
||||
g = Masc Anim
|
||||
} ;
|
||||
|
||||
declHRAD : DeclensionType = \hrad -> --- 3.5.2: sloc u/ě/e extra arg, sport-u, hrad-ě ; sgen u/a
|
||||
let hrd = dropFleetingE hrad
|
||||
in
|
||||
-- the oblique stem is a separate argument, because it cannot always be
|
||||
-- derived from the nominative: uzel-uzlu but člen-členu
|
||||
declHRADstem : Str -> DeclensionType = \hrd,hrad ->
|
||||
{
|
||||
snom,sacc = hrad ;
|
||||
sgen,sdat = hrd + "u" ; --- Berlín-a
|
||||
@@ -233,6 +251,9 @@ oper
|
||||
g = Masc Inanim
|
||||
} ;
|
||||
|
||||
declHRAD : DeclensionType = \hrad -> --- 3.5.2: sloc u/ě/e extra arg, sport-u, hrad-ě ; sgen u/a
|
||||
declHRADstem (dropFleetingE hrad) hrad ;
|
||||
|
||||
declZENA : DeclensionType = \zena -> --- 3.6.1 sge y/i ; pgen sometimes shortening
|
||||
let zen = init zena
|
||||
in
|
||||
@@ -270,9 +291,91 @@ oper
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
-- Latin masculines in -us: the ending is dropped outside the nominative
|
||||
-- (algoritmus - algoritmu), otherwise they follow hrad
|
||||
declLATINUS : DeclensionType = \algoritmus ->
|
||||
let algoritm = Predef.tk 2 algoritmus
|
||||
in declHRAD algoritm ** {
|
||||
snom, sacc = algoritmus ;
|
||||
svoc = algoritm + "e"
|
||||
} ;
|
||||
|
||||
declLATINUSA : DeclensionType = \genius ->
|
||||
declLATINUS genius ** {g = Masc Anim} ;
|
||||
|
||||
-- Latin neuters in -um: the ending is dropped outside the nominative
|
||||
-- (kontinuum - kontinua), otherwise they follow město
|
||||
declLATINUM : DeclensionType = \kompaktum ->
|
||||
let kompakt = Predef.tk 2 kompaktum
|
||||
in declMESTO (kompakt + "o") ** {
|
||||
snom, sacc, svoc = kompaktum
|
||||
} ;
|
||||
|
||||
-- Greek neuters in -ma, with the stem extended by -t- (schéma - schématu)
|
||||
declGREEKMA : DeclensionType = \schema ->
|
||||
let schemat = schema + "t"
|
||||
in {
|
||||
snom,sacc,svoc = schema ;
|
||||
sgen,sdat,sloc = schemat + "u" ;
|
||||
sins = schemat + "em" ;
|
||||
|
||||
pnom,pacc = schemat + "a" ;
|
||||
pgen = schemat ;
|
||||
pdat = schemat + "ům" ;
|
||||
ploc = schemat + "ech" ;
|
||||
pins = schemat + "y" ;
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
-- the hrad type with genitive -a instead of -u (les - lesa, zákon - zákona)
|
||||
declHRADAstem : Str -> DeclensionType = \les_,les ->
|
||||
declHRADstem les_ les ** {sgen = les_ + "a"} ;
|
||||
|
||||
declHRADA : DeclensionType = \les ->
|
||||
declHRADAstem (dropFleetingE les) les ;
|
||||
|
||||
-- nouns that are adjectives in form: proměnná - proměnné, nultý - nultého
|
||||
declADJF : DeclensionType = \promenna ->
|
||||
let a = mladyAdjForms (init promenna + "ý")
|
||||
in {
|
||||
snom,svoc = a.fsnom ;
|
||||
sgen = a.fsgen ;
|
||||
sdat,sloc = a.fsdat ;
|
||||
sacc = a.fsacc ;
|
||||
sins = a.fsins ;
|
||||
pnom,pacc = a.fpnom ;
|
||||
pgen,ploc = a.pgen ;
|
||||
pdat = a.msins ;
|
||||
pins = a.pins ;
|
||||
g = Fem
|
||||
} ;
|
||||
|
||||
declADJM : DeclensionType = \nulty ->
|
||||
let a = mladyAdjForms nulty
|
||||
in {
|
||||
snom,sacc,svoc = a.msnom ;
|
||||
sgen = a.msgen ;
|
||||
sdat = a.msdat ;
|
||||
sloc = a.msloc ;
|
||||
sins = a.msins ;
|
||||
pnom,pacc = a.fpnom ;
|
||||
pgen,ploc = a.pgen ;
|
||||
pdat = a.msins ;
|
||||
pins = a.pins ;
|
||||
g = Masc Inanim
|
||||
} ;
|
||||
|
||||
-- indeclinable loans: bombé, tamari, software
|
||||
declINVAR : Gender -> DeclensionType = \g,s -> {
|
||||
snom,sgen,sdat,sacc,svoc,sloc,sins = s ;
|
||||
pnom,pgen,pdat,pacc,ploc,pins = s ;
|
||||
g = g
|
||||
} ;
|
||||
|
||||
declMUZ : DeclensionType = \muz_ -> --- 3.5.3 : sdat,sloc ; pnom
|
||||
let muz = dropFleetingE muz_
|
||||
in
|
||||
declMUZstem (dropFleetingE muz_) muz_ ;
|
||||
|
||||
declMUZstem : Str -> DeclensionType = \muz,muz_ ->
|
||||
{
|
||||
snom = muz_ ;
|
||||
sgen,sacc = muz + "e" ; --- pacc
|
||||
|
||||
@@ -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 ; ----
|
||||
|
||||
+41
-2
@@ -3,9 +3,48 @@
|
||||
concrete SymbolCze of Symbol = CatCze ** open Prelude, ResCze in {
|
||||
|
||||
lincat
|
||||
Symb = {s : Str} ;
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
SymbPN s = lin PN {s = \\_ => s.s ; g = Neutr} ;
|
||||
|
||||
BaseSymb = infixSS "a" ;
|
||||
ConsSymb = infixSS bindComma ;
|
||||
|
||||
SymbPN s = symbolPN s.s ;
|
||||
IntPN i = symbolPN i.s ;
|
||||
FloatPN f = symbolPN f.s ;
|
||||
|
||||
-- unlike a bare symbol, a cardinal used as a name still declines
|
||||
NumPN card = lin PN {s = \\c => card.s ! Neutr ! c ; g = Neutr} ;
|
||||
|
||||
-- the numeral is an invariable label: "úroveň pět", "na úrovni pět"
|
||||
CNNumNP cn card = {
|
||||
s,clit,prep = \\c => cn.s ! Sg ! c ++ card.s ! cn.g ! Nom ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
CNIntNP cn i = {
|
||||
s,clit,prep = \\c => cn.s ! Sg ! c ++ i.s ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
-- as DetCN in NounCze, with the symbols in apposition
|
||||
CNSymbNP det cn xs = {
|
||||
s,clit,prep = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ++ xs.s ;
|
||||
a = numSizeAgr cn.g det.size P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum sy = {s = \\_,_ => sy.s ; size = Num5} ; -- "n čísel", like numerals from 5 up
|
||||
SymbOrd sy = {s = glue sy.s "-tý"} ; ---- Ord is still an uninflected string
|
||||
|
||||
oper
|
||||
symbolPN : Str -> PN
|
||||
= \s -> lin PN {s = \\_ => s ; g = Neutr} ;
|
||||
|
||||
}
|
||||
|
||||
+47
-3
@@ -8,17 +8,35 @@ lin
|
||||
|
||||
ComplSlash vps np = case <np.hasClit, vps.c.hasPrep> of {
|
||||
<True,False> => vps ** {
|
||||
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c
|
||||
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c ;
|
||||
compl = \\a => vps.compl ! a ++ vps.ind ! a
|
||||
} ;
|
||||
_ => vps ** {
|
||||
compl = \\a => vps.compl ! a ++ vps.c.s ++ np.s ! vps.c.c
|
||||
compl = \\a => vps.compl ! a ++ vps.c.s ++ np.s ! vps.c.c ++ vps.ind ! a
|
||||
}
|
||||
} ;
|
||||
|
||||
SlashV2a v = {
|
||||
verb = v ;
|
||||
clit,compl = \\_ => [] ;
|
||||
c = v.c
|
||||
c = v.c ;
|
||||
ind = \\_ => []
|
||||
} ;
|
||||
|
||||
-- three-place verbs: c = direct object case, c2 = indirect object case
|
||||
Slash2V3 v np = { -- fill the direct object, leave the indirect open
|
||||
verb = v ;
|
||||
clit = \\_ => [] ;
|
||||
compl = \\_ => v.c.s ++ np.s ! v.c.c ;
|
||||
c = v.c2 ;
|
||||
ind = \\_ => []
|
||||
} ;
|
||||
Slash3V3 v np = { -- fill the indirect object (rendered after the object slot)
|
||||
verb = v ;
|
||||
clit = \\_ => [] ;
|
||||
compl = \\_ => [] ;
|
||||
c = v.c ;
|
||||
ind = \\_ => v.c2.s ++ np.s ! v.c2.c
|
||||
} ;
|
||||
|
||||
UseComp comp = {
|
||||
@@ -36,6 +54,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 +69,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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ flags optimize=values ;
|
||||
stick_V = irregV "stick" "stuck" "stuck" ;
|
||||
sting_V = irregV "sting" "stung" "stung" ;
|
||||
stink_V = irregV "stink" "stank" "stunk" ;
|
||||
stride_V = irregV "stride" "strod" "stridden" ;
|
||||
stride_V = irregV "stride" "strode" "stridden" ;
|
||||
strike_V = irregV "strike" "struck" "struck" ;
|
||||
string_V = irregV "string" "strung" "strung" ;
|
||||
strive_V = irregV "strive" "strove" "striven" ;
|
||||
|
||||
@@ -446,8 +446,9 @@ oper
|
||||
vp.s.s ! vform ++
|
||||
vp.ext ;
|
||||
|
||||
rnp2np : Agr -> RNP -> NP ;
|
||||
rnp2np agr rnp = {
|
||||
s = \\npf => rnp.s ! agr ! npf ;
|
||||
s = rnp.s ! agr ;
|
||||
a = agr ;
|
||||
isPron = rnp.isPron ;
|
||||
isNeg = rnp.isNeg
|
||||
|
||||
@@ -148,8 +148,7 @@ lin
|
||||
play_V2 = mkV2 (mkV "pelata") cpartitive ; --- leikkiä, soittaa
|
||||
policeman_N = mkN "poliisi" ;
|
||||
priest_N = mkN "pappi" ;
|
||||
probable_AS = mkAS --- for vowel harmony
|
||||
(mkA (mkN "todennäköinen") "tonennäköisempi" "todennäköisin") ; ---- sta
|
||||
probable_AS = mkAS (compoundA "toden" (mkA "näköinen")) ;
|
||||
queen_N = mkN "kuningatar" ;
|
||||
radio_N = mk2N "radio" "radioita" ;
|
||||
rain_V0 = mkV0 (mk2V "sataa" "satoi") ;
|
||||
|
||||
@@ -1064,7 +1064,7 @@ oper
|
||||
Transl => "niiksi" ;
|
||||
Ess => "niinä" ;
|
||||
Iness => "niissä" ;
|
||||
Elat => "niitä" ;
|
||||
Elat => "niistä" ;
|
||||
Illat => "niihin" ;
|
||||
Adess => "niillä" ;
|
||||
Ablat => "niiltä" ;
|
||||
|
||||
@@ -142,7 +142,7 @@ oper
|
||||
(ordN "a" "sadas") ;
|
||||
|
||||
tuhatN = co
|
||||
(snoun2nounBind (mkN "tuhat" "tuhannen" "tuhatta" "ruhantena" "tuhanteen"
|
||||
(snoun2nounBind (mkN "tuhat" "tuhannen" "tuhatta" "tuhantena" "tuhanteen"
|
||||
"tuhansien" "tuhansia" "tuhansina" "tuhansissa" "tuhansiin"))
|
||||
(ordN "a" "tuhannes") ;
|
||||
|
||||
@@ -173,7 +173,7 @@ oper
|
||||
|
||||
miljoonaN = co
|
||||
(snoun2nounBind (mkN "miljoona"))
|
||||
(ordN "s" "miljoonas") ;
|
||||
(ordN "a" "miljoonas") ;
|
||||
|
||||
miljoonaaN = {s = table {
|
||||
Sg => miljoonaN.s ;
|
||||
@@ -186,7 +186,7 @@ oper
|
||||
|
||||
miljardiN = co
|
||||
(snoun2nounBind (mkN "miljardi"))
|
||||
(ordN "s" "miljardis") ;
|
||||
(ordN "a" "miljardis") ;
|
||||
|
||||
miljardiaN = {s = table {
|
||||
Sg => miljardiN.s ;
|
||||
|
||||
@@ -221,7 +221,15 @@ oper
|
||||
= \s -> lin A {s = \\_,_ => s ; h = Back ; p = [] ; hasPrefix = False} ; ----- stemming adds bogus endings
|
||||
|
||||
compoundA : Str -> A -> A -- prefix glued to adjective, e.g. "hevos"+"vetoinen"
|
||||
= \s,a -> lin A {s = \\d,c => s + a.s ! d ! c ; h = a.h ; p = s + a.p ; hasPrefix = a.hasPrefix} ;
|
||||
= \s,a -> lin A {
|
||||
s = \\d,c => s + a.s ! d ! c ;
|
||||
h = a.h ;
|
||||
p = case a.hasPrefix of {
|
||||
True => s + a.p ;
|
||||
False => []
|
||||
} ;
|
||||
hasPrefix = a.hasPrefix
|
||||
} ;
|
||||
|
||||
prefixA : Str -> A -> A -- in modifying use, an uninflected glued prefix, e.g. "sähkö" for "sähköinen"
|
||||
= \pr,a -> a ** {
|
||||
|
||||
@@ -76,7 +76,7 @@ oper
|
||||
let
|
||||
tuoree = init (tuore.s ! NCase Sg Gen) ;
|
||||
tuoreesti = tuoree + "sti" ;
|
||||
tuoreemmin = init tuoree ;
|
||||
tuoreemmin = init tuoree + "in" ;
|
||||
in {s = table {
|
||||
AN f => tuore.s ! f ;
|
||||
AAdv => if_then_Str isPos tuoreesti tuoreemmin
|
||||
|
||||
@@ -148,7 +148,7 @@ oper
|
||||
let
|
||||
tuoree = tuore.s ! 1 ;
|
||||
tuoreesti = tuoree + "sti" ;
|
||||
tuoreemmin = init tuoree ;
|
||||
tuoreemmin = init tuoree + "in" ;
|
||||
in {s = table {
|
||||
SAN f => tuore.s ! f ;
|
||||
SAAdv => if_then_Str isPos tuoreesti tuoreemmin
|
||||
|
||||
@@ -5345,7 +5345,7 @@ lin bestir_V = mkV "bestir" "bestirred" "bestirred" ;
|
||||
lin bestow_V = mkV "bestow" "bestowed" "bestowed" ;
|
||||
lin bestowal_N = mkN "bestowal" "bestowals" ;
|
||||
lin bestrew_V = mkV "bestrew" "bestrewed" "bestrewed" ;
|
||||
lin bestride_V = mkV "bestride" "bestrod" "bestridden" ;
|
||||
lin bestride_V = mkV "bestride" "bestrode" "bestridden" ;
|
||||
lin bestubbled_A = mkAMost "bestubbled" "bestubbledly" ;
|
||||
lin bet_N = mkN "bet" "bets" ;
|
||||
lin bet_V = mkV "bet" "betted" "betted" ;
|
||||
@@ -48049,7 +48049,7 @@ lin strict_A = mkA "strict" "stricter" "strictest" "strictly" ;
|
||||
lin strictness_N = mkN "strictness" "strictnesses" ;
|
||||
lin stricture_N = mkN "stricture" "strictures" ;
|
||||
lin stride_N = mkN "stride" "strides" ;
|
||||
lin stride_V = mkV "stride" "strod" "stridden" ;
|
||||
lin stride_V = mkV "stride" "strode" "stridden" ;
|
||||
lin strident_A = mkAMost "strident" "stridently" ;
|
||||
lin strider_N = mkN "strider" "striders" ;
|
||||
lin stridor_N = mkN "stridor" "stridors" ;
|
||||
|
||||
@@ -16,6 +16,9 @@ flags coding=utf8 ;
|
||||
AdjOrd o = {s=o.s; adv="["++o.s!AF MascPersSg Nom ++ [": the adverb form does not exist (fun AdjOrd)]"] ; isPost = False};
|
||||
|
||||
AdAP ada ap = { s = \\af => ada.s ++ ap.s ! af; adv = ada.s ++ ap.adv ; isPost = ap.isPost};
|
||||
|
||||
-- AdvAP : AP -> Adv -> AP ; -- warm by nature
|
||||
AdvAP ap adv = { s = \\af => ap.s ! af ++ adv.s; adv = ap.adv ++ adv.s ; isPost = True};
|
||||
|
||||
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
CAdvAP c a n = {
|
||||
|
||||
+13
-2
@@ -2,11 +2,22 @@
|
||||
|
||||
concrete ExtendPol of Extend =
|
||||
CatPol ** ExtendFunctor - [
|
||||
iFem_Pron, youFem_Pron, theyFem_Pron, ProDrop, PassVPSlash
|
||||
iFem_Pron, youFem_Pron, theyFem_Pron, ProDrop, PassVPSlash, ExistsNP
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarPol) **
|
||||
open PronounMorphoPol, Prelude in {
|
||||
open PronounMorphoPol, ResPol, VerbMorphoPol, Prelude in {
|
||||
|
||||
-- ExtendFunctor defaults ExistsNP to ExistNP, which gives "jest macierz".
|
||||
-- Polish distinguishes the two: "there is" is jest/są, but "there exists" is
|
||||
-- istnieć, which is the form mathematical prose uses.
|
||||
oper
|
||||
istniec_V : Verb = mkMonoVerb "istnieć" conj52 Imperfective ;
|
||||
|
||||
lin ExistsNP np = {
|
||||
s = \\pol,anter,tense =>
|
||||
(indicative_form istniec_V False pol) ! <tense, anter, np.gn, np.p> ++ np.nom
|
||||
} ;
|
||||
|
||||
lin iFem_Pron = pronJa FemSg ;
|
||||
lin youFem_Pron = pronTy FemSg ;
|
||||
|
||||
@@ -16,6 +16,20 @@ concrete IdiomPol of Idiom = CatPol ** open Prelude, ResPol, VerbMorphoPol in {
|
||||
vp.sufix !pol !NeutSg
|
||||
};
|
||||
|
||||
-- ImpP3 : NP -> VP -> Utt ; -- let John walk
|
||||
-- Polish has no third-person imperative; "niech" + a finite form is the
|
||||
-- standard equivalent. The copula takes the future ("niech x będzie grupą"),
|
||||
-- every other verb the present ("niech x należy do A") -- być is the only
|
||||
-- Polish verb with a synthetic future, and imienne marks exactly the
|
||||
-- copular VPs.
|
||||
ImpP3 np vp = let
|
||||
tense : Tense = case vp.imienne of { True => Fut ; False => Pres }
|
||||
in {
|
||||
s = "niech" ++ np.nom ++ vp.prefix ++
|
||||
((indicative_form vp.verb vp.imienne Pos) !<tense, Simul, np.gn, np.p>) ++
|
||||
vp.sufix !Pos !np.gn
|
||||
};
|
||||
|
||||
-- ImpPl1 : VP -> Utt ; -- let's go
|
||||
ImpPl1 vp = {
|
||||
s = vp.prefix ++
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
lin paris_PN =
|
||||
{ nom = (mkNTable0045 "Paryż")!SF Sg Nom; voc = (mkNTable0045 "Paryż")!SF Sg VocP;
|
||||
dep = let forms = (mkNTable0045 "Paryż") in table {
|
||||
GenPrep|GenNoPrep=>forms!SF Sg Gen; AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
NomPrep=>forms!SF Sg Nom; GenPrep|GenNoPrep=>forms!SF Sg Gen; AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
DatPrep|DatNoPrep=>forms!SF Sg Dat; InstrC=>forms!SF Sg Instr;
|
||||
LocPrep=>forms!SF Sg Loc};
|
||||
gn= MascInaniSg ; p=P3
|
||||
@@ -213,7 +213,7 @@
|
||||
lin john_PN =
|
||||
{ nom = (mkNTable0002 "Jan")!SF Sg Nom; voc = (mkNTable0002 "Jan")!SF Sg VocP;
|
||||
dep = let forms = (mkNTable0002 "Jan") in table {
|
||||
GenPrep|GenNoPrep=>forms!SF Sg Gen; AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
NomPrep=>forms!SF Sg Nom; GenPrep|GenNoPrep=>forms!SF Sg Gen; AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
DatPrep|DatNoPrep=>forms!SF Sg Dat; InstrC=>forms!SF Sg Instr;
|
||||
LocPrep=>forms!SF Sg Loc};
|
||||
gn= MascPersSg ; p=P3
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete MarkupPol of Markup = CatPol, MarkHTMLX ** open ResPol in {
|
||||
|
||||
lin
|
||||
MarkupCN m cn = cn ** {s = \\n,c => appMark m (cn.s ! n ! c)} ;
|
||||
|
||||
-- NP has three alternative surface forms: nom, voc and the dependent
|
||||
-- cases; each is marked up separately.
|
||||
MarkupNP m np = np ** {
|
||||
nom = appMark m np.nom ;
|
||||
voc = appMark m np.voc ;
|
||||
dep = \\c => appMark m (np.dep ! c)
|
||||
} ;
|
||||
|
||||
MarkupAP m ap = ap ** {s = \\af => appMark m (ap.s ! af)} ;
|
||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||
MarkupS m s = {s = appMark m s.s} ;
|
||||
MarkupUtt m utt = {s = appMark m utt.s} ;
|
||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||
MarkupText m txt = {s = appMark m txt.s} ;
|
||||
|
||||
}
|
||||
@@ -60,6 +60,7 @@ oper
|
||||
nom = "wszyscy" ;
|
||||
voc = "wszyscy" ;
|
||||
dep = table {
|
||||
NomPrep => "wszyscy";
|
||||
(GenNoPrep|GenPrep) => "wszystkich";
|
||||
(DatNoPrep|DatPrep) => "wszystkim";
|
||||
(AccNoPrep|AccPrep) => "wszystkich";
|
||||
@@ -74,6 +75,7 @@ oper
|
||||
nom = "wszystko" ;
|
||||
voc = "wszystko" ;
|
||||
dep = table {
|
||||
NomPrep => "wszystko";
|
||||
(GenNoPrep|GenPrep) => "wszystkiego";
|
||||
(DatNoPrep|DatPrep) => "wszystkiemu";
|
||||
(AccNoPrep|AccPrep) => "wszystko";
|
||||
@@ -88,6 +90,7 @@ oper
|
||||
nom = "ktoś" ;
|
||||
voc = "ktosiu" ;
|
||||
dep = table {
|
||||
NomPrep => "ktoś";
|
||||
(GenNoPrep|GenPrep) => "kogoś";
|
||||
(DatNoPrep|DatPrep) => "komuś";
|
||||
(AccNoPrep|AccPrep) => "kogoś";
|
||||
@@ -102,6 +105,7 @@ oper
|
||||
nom = "coś" ;
|
||||
voc = "coś" ;
|
||||
dep = table {
|
||||
NomPrep => "coś";
|
||||
(GenNoPrep|GenPrep) => "czegoś";
|
||||
(DatNoPrep|DatPrep) => "czemuś";
|
||||
(AccNoPrep|AccPrep) => "coś";
|
||||
@@ -117,6 +121,7 @@ oper
|
||||
nom = "kto" ;
|
||||
voc = "kto" ;
|
||||
dep = table {
|
||||
NomPrep => "kto";
|
||||
(GenNoPrep|GenPrep) => "kogo";
|
||||
(DatNoPrep|DatPrep) => "komu";
|
||||
(AccNoPrep|AccPrep) => "kogo";
|
||||
@@ -131,6 +136,7 @@ oper
|
||||
nom = "co" ;
|
||||
voc = "co" ;
|
||||
dep = table {
|
||||
NomPrep => "co";
|
||||
(GenNoPrep|GenPrep) => "czego";
|
||||
(DatNoPrep|DatPrep) => "czemu";
|
||||
(AccNoPrep|AccPrep) => "co";
|
||||
@@ -216,6 +222,7 @@ oper
|
||||
oper niktNP : NounPhrase =
|
||||
{ voc,nom="nikt";
|
||||
dep = table {
|
||||
NomPrep => "nikt";
|
||||
(GenNoPrep|GenPrep) => "nikogo";
|
||||
(DatNoPrep|DatPrep) => "nikomu";
|
||||
(AccNoPrep|AccPrep) => "nikogo";
|
||||
@@ -230,6 +237,7 @@ oper
|
||||
oper nicNP : NounPhrase =
|
||||
{ voc,nom="nic";
|
||||
dep = table {
|
||||
NomPrep => "nic";
|
||||
(GenNoPrep|GenPrep) => "niczego";
|
||||
(DatNoPrep|DatPrep) => "niczemu";
|
||||
(AccNoPrep|AccPrep) => "nic";
|
||||
|
||||
@@ -27,6 +27,7 @@ resource NounMorphoPol = open CatPol, ResPol, Prelude, (Predef=Predef) in {
|
||||
{ nom = forms!SF Sg Nom;
|
||||
voc = forms!SF Sg VocP;
|
||||
dep = table {
|
||||
NomPrep =>forms!SF Sg Nom;
|
||||
GenPrep|GenNoPrep=>forms!SF Sg Gen;
|
||||
AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
DatPrep|DatNoPrep=>forms!SF Sg Dat;
|
||||
|
||||
@@ -26,10 +26,14 @@
|
||||
|
||||
mkA2 : A -> Str -> ComplCase -> A2 ;
|
||||
|
||||
mkAdv : Str -> Adv ; -- an adverb from a string
|
||||
|
||||
|
||||
--.
|
||||
-- Definitions hidden from the public API
|
||||
|
||||
mkAdv s = lin Adv {s = s} ;
|
||||
|
||||
ComplCase = ResPol.ComplCase ;
|
||||
genPrep = GenPrep ;
|
||||
genNoPrep = GenNoPrep ;
|
||||
@@ -41,6 +45,7 @@
|
||||
{ nom = (tab form)!SF Sg Nom;
|
||||
voc = (tab form)!SF Sg VocP;
|
||||
dep = let forms = (tab form) in table {
|
||||
NomPrep =>forms!SF Sg Nom;
|
||||
GenPrep|GenNoPrep=>forms!SF Sg Gen;
|
||||
AccPrep|AccNoPrep=>forms!SF Sg Acc;
|
||||
DatPrep|DatNoPrep=>forms!SF Sg Dat;
|
||||
@@ -101,6 +106,13 @@
|
||||
let ntable : SubstForm => Str = guess_paradigm_basic sgnom
|
||||
in NM.mkN ntable gender ;
|
||||
-- 2 string
|
||||
-- NB: sggen is deliberately NOT passed to guess_paradigm. The 2-string
|
||||
-- guess_paradigm table is unsound: its first branch <_ + "a", _ + "">
|
||||
-- matches every noun in -a (the suffix "" matches anything), and its
|
||||
-- branches disagree about whether mkNTable* takes the nominative
|
||||
-- (mkNTable0021 does Predef.tk 1) or the bare stem (mkNTable0308 does
|
||||
-- not). Routing sggen there turns "liczba"/"liczby" into "liczbaa".
|
||||
-- Until that table is repaired, the 1-string guesser is the sound path.
|
||||
mkNGender : Str -> Str -> Gender -> N = \sgnom,sggen,gender ->
|
||||
let ntable : SubstForm => Str = guess_paradigm sgnom
|
||||
in NM.mkN ntable gender ;
|
||||
@@ -373,6 +385,9 @@
|
||||
_ + "ń" => NM.mkNTable0142 sgnom ; -- Alternatives: mkNTable0268,mkNTable0290,mkNTable0297,mkNTable0468,mkNTable0592,mkNTable0612,mkNTable0674,mkNTable0676,mkNTable0775,mkNTable0815,mkNTable0935,mkNTable1004
|
||||
_ + "ł" => NM.mkNTable0151 sgnom ; -- Alternatives: mkNTable0192,mkNTable0280,mkNTable0533,mkNTable0601
|
||||
_ + "ę" => NM.mkNTable0379 sgnom ; -- Alternatives: mkNTable0604
|
||||
-- -ość is the productive feminine abstract-noun suffix (sprzeczność,
|
||||
-- własność, równość); it always takes the kość declension.
|
||||
_ + "ość" => NM.mkNTable0475 sgnom ;
|
||||
_ + "ć" => NM.mkNTable0069 sgnom ; -- Alternatives: mkNTable0475,mkNTable0567,mkNTable0573,mkNTable0649,mkNTable0734,mkNTable0792,mkNTable0793,mkNTable0794,mkNTable0814,mkNTable0838,mkNTable0922,mkNTable0923,mkNTable1014
|
||||
_ + "ź" => NM.mkNTable0316 sgnom ; -- Alternatives: mkNTable0633,mkNTable0661,mkNTable0722,mkNTable0732,mkNTable0771
|
||||
_ + "y" => NM.mkNTable0012 sgnom ; -- Alternatives: mkNTable0050,mkNTable0058,mkNTable0123,mkNTable0203,mkNTable0635,mkNTable0665,mkNTable0777,mkNTable0886,mkNTable1020
|
||||
|
||||
@@ -23,6 +23,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "ja";
|
||||
voc = "ja";
|
||||
dep = table {
|
||||
NomPrep => "ja";
|
||||
(GenNoPrep|GenPrep) => "mnie";
|
||||
DatNoPrep => "mi";
|
||||
DatPrep => "mnie";
|
||||
@@ -114,6 +115,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
nom = "ty" ;
|
||||
voc = "ty" ;
|
||||
dep = table { -- it is simplyfied to avoid variants
|
||||
NomPrep => "ty";
|
||||
GenNoPrep => "cię";
|
||||
GenPrep => "ciebie";
|
||||
DatNoPrep => "tobie";
|
||||
@@ -133,6 +135,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "pan" ;
|
||||
voc = "panie" ;
|
||||
dep = table {
|
||||
NomPrep => "pan";
|
||||
GenNoPrep => "pana"; --"go"};
|
||||
GenPrep => "pana";
|
||||
DatNoPrep => "panu"; --"mu"};
|
||||
@@ -152,6 +155,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "pani" ;
|
||||
voc = "pani" ;
|
||||
dep = table {
|
||||
NomPrep => "pani";
|
||||
GenNoPrep => "pani"; --"go"};
|
||||
GenPrep => "pani";
|
||||
DatNoPrep => "pani"; --"mu"};
|
||||
@@ -171,6 +175,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "on" ;
|
||||
voc = "on" ;
|
||||
dep = table {
|
||||
NomPrep => "on";
|
||||
GenNoPrep => "jego"; --"go"};
|
||||
GenPrep => "niego";
|
||||
DatNoPrep => "jemu"; --"mu"};
|
||||
@@ -191,6 +196,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "ona" ;
|
||||
voc = "ona" ;
|
||||
dep = table {
|
||||
NomPrep => "ona";
|
||||
GenNoPrep => "jej";
|
||||
GenPrep => "niej";
|
||||
DatNoPrep => "jej";
|
||||
@@ -247,6 +253,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
nom = "ono" ; -- The true nom. and voc. forms will be that of the subject
|
||||
voc = "ono" ; -- Here, we use the neuter pronoun as a shortcut
|
||||
dep = table {
|
||||
NomPrep => "ono";
|
||||
GenNoPrep => "się";
|
||||
GenPrep => "siebie";
|
||||
DatNoPrep => "sobie";
|
||||
@@ -265,6 +272,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "ono" ;
|
||||
voc = "ono" ;
|
||||
dep= table {
|
||||
NomPrep => "ono";
|
||||
GenNoPrep => "jego"; --"go";
|
||||
GenPrep => "niego";
|
||||
DatNoPrep => "jemu"; --"mu";
|
||||
@@ -285,6 +293,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "my";
|
||||
voc = "my";
|
||||
dep = table {
|
||||
NomPrep => "my";
|
||||
(GenNoPrep|GenPrep) => "nas";
|
||||
(DatNoPrep|DatPrep) => "nam";
|
||||
(AccNoPrep|AccPrep) => "nas";
|
||||
@@ -338,6 +347,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "wy" ;
|
||||
voc = "wy" ;
|
||||
dep = table {
|
||||
NomPrep => "wy";
|
||||
(GenNoPrep|GenPrep) => "was";
|
||||
(DatNoPrep|DatPrep) => "wam";
|
||||
(AccNoPrep|AccPrep) => "was";
|
||||
@@ -391,6 +401,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "oni" ;
|
||||
voc = "oni" ;
|
||||
dep = table {
|
||||
NomPrep => "oni";
|
||||
GenNoPrep => "ich";
|
||||
GenPrep => "nich";
|
||||
DatNoPrep => "im";
|
||||
@@ -411,6 +422,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "one" ;
|
||||
voc = "one" ;
|
||||
dep = table {
|
||||
NomPrep => "one";
|
||||
GenNoPrep => "ich";
|
||||
GenPrep => "nich";
|
||||
DatNoPrep => "im";
|
||||
@@ -429,6 +441,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
|
||||
{ nom = "one" ;
|
||||
voc = "one" ;
|
||||
dep = table {
|
||||
NomPrep => "one";
|
||||
GenNoPrep => "ich";
|
||||
GenPrep => "nich";
|
||||
DatNoPrep => "im";
|
||||
|
||||
@@ -189,23 +189,23 @@
|
||||
--6 Complement definition
|
||||
|
||||
param ComplCase = GenPrep | GenNoPrep | DatPrep | DatNoPrep |
|
||||
AccPrep | AccNoPrep | InstrC | LocPrep ;
|
||||
AccPrep | AccNoPrep | InstrC | LocPrep | NomPrep ;
|
||||
|
||||
oper
|
||||
Complement : Type = {s : Str; c : ComplCase} ;
|
||||
|
||||
mkCompl : Str -> Case -> Complement;
|
||||
mkCompl s c = {
|
||||
s=s;
|
||||
c = case s of {
|
||||
"" => case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrC; _ => AccNoPrep };
|
||||
_ => case c of { Gen => GenPrep; Dat => DatPrep; Acc => AccPrep; Instr => InstrC; _ => LocPrep }
|
||||
mkCompl s c = {
|
||||
s=s;
|
||||
c = case s of {
|
||||
"" => case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrC; Nom => NomPrep; _ => AccNoPrep };
|
||||
_ => case c of { Gen => GenPrep; Dat => DatPrep; Acc => AccPrep; Instr => InstrC; Nom => NomPrep; _ => LocPrep }
|
||||
}
|
||||
};
|
||||
|
||||
extract_case = table {GenPrep => Gen; GenNoPrep => Gen; DatPrep => Dat;
|
||||
DatNoPrep => Dat; AccPrep => Acc; AccNoPrep => Acc; InstrC => Instr;
|
||||
LocPrep => Loc};
|
||||
LocPrep => Loc; NomPrep => Nom};
|
||||
|
||||
--7 Various types
|
||||
-- possible problem: dzieci ,ktorych piecioro bawilo sie... / okna, ktorych piec stalo opartych o sciane...
|
||||
|
||||
@@ -75,6 +75,9 @@ lin
|
||||
-- AdvS : Adv -> S -> S ; -- today, I will go home
|
||||
AdvS adv s = { s = adv.s ++ s.s };
|
||||
ExtAdvS adv s = { s = adv.s ++ "," ++ s.s };
|
||||
|
||||
-- SSubjS : S -> Subj -> S -> S ; -- I go home, if she comes
|
||||
SSubjS a subj b = { s = a.s ++ "," ++ subj.s ++ b.s };
|
||||
|
||||
-- SlashPrep : Cl -> Prep -> ClSlash ; -- (with whom) he walks
|
||||
SlashPrep c p = { s=c.s; c=p };
|
||||
|
||||
@@ -87,6 +87,9 @@ lin
|
||||
something_NP = cos ;
|
||||
somewhere_Adv = ss "gdzieś";
|
||||
that_Quant = demPronTen "tamten";
|
||||
-- Polish always sets off a "że" clause with a comma, so the subordinator
|
||||
-- carries it, as IdiomPol/SentencePol already do for EmbedS and SlashVS
|
||||
that_Subj = ss [", że"];
|
||||
there_Adv = ss "tam";
|
||||
there7to_Adv = ss "tam";
|
||||
there7from_Adv = ss "stamtąd";
|
||||
|
||||
@@ -28,7 +28,11 @@ lin
|
||||
vps.sufix!p!gn ++ vps.c.s ++ np.dep !(npcase !<p,vps.c.c>) ++ vps.postfix!p!gn);
|
||||
|
||||
-- AdvVP : VP -> Adv -> VP ; -- sleep here
|
||||
AdvVP vp adv = setPrefix vp (vp.prefix ++ adv.s);
|
||||
-- the adverbial follows the verb: Polish is neutrally SVO ("śpi tutaj",
|
||||
-- "przecina zbiór pusty"), and putting it in the prefix topicalizes it.
|
||||
-- This matters because an object reached through PrepNP arrives here as
|
||||
-- an Adv, and *"π zbiór pusty przecina" is marked at best.
|
||||
AdvVP vp adv = setSufix vp (\\p,gn => vp.sufix ! p ! gn ++ adv.s);
|
||||
|
||||
-- AdVVP : AdV -> VP -> VP ; -- always sleep
|
||||
AdVVP adV vp = setPrefix vp (vp.prefix ++ adV.s);
|
||||
@@ -40,7 +44,9 @@ lin
|
||||
-- CompAP : AP -> Comp ; -- (be) small
|
||||
CompAP ap = { s = \\gn => ap.s ! AF gn Nom };
|
||||
|
||||
CompCN cn = { s = \\gn => cn.s ! numGenNum gn ! Nom }; --- AR 7/12/2010
|
||||
-- a predicative noun goes in the instrumental in Polish, exactly as in
|
||||
-- CompNP below: "x jest grupą", not *"x jest grupa"
|
||||
CompCN cn = { s = \\gn => cn.s ! numGenNum gn ! Instr }; --- AR 7/12/2010
|
||||
|
||||
-- CompNP : NP -> Comp ; -- (be) a man
|
||||
CompNP np = { s = \\gn => np.dep !InstrC };
|
||||
|
||||
Reference in New Issue
Block a user