mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-10-02 23:23:38 -06:00
Cze: improve morphology (#477)
* Cze: remove API stubs for existing concrete functions
The obsolete `MissingCze` stubs were hiding working `GrammarCze` constructions.
* Cze: correct noun inflection and preserve gender across number
Gender can vary across number: `dítě` ("child") is neuter in the singular and
feminine in the plural.
mkUtt (mkNP this_Quant child_N)
toto dítě
t-o-to dít-ě
DEM-N.SG.NOM-PROX child(N)-NOM.SG
"This child."
mkUtt (mkNP this_Quant plNum child_N)
tyto děti
t-y-to dět-i
DEM-F.PL.NOM-PROX child(F)-NOM.PL
"These children."
The locative of `banka` ("bank") exhibits stem alternation:
stem-final `k` becomes `c` before `-e`.
v bance
v banc-e
in bank-LOC.SG
"In a bank."
Within the žena paradigm, soft consonants take i rather than y in the genitive
singular and nominative/accusative plural. Dative and locative use a different
ending: Nataši contrasts with Nataše. Before i and ě, write n, t, d instead of
ň, ť, ď; the vowel letter already marks palatalization.
(zenaN "Máňa").sgen
Máni
Mán-i
Máňa-GEN.SG
"Of Máňa."
(zenaN "Máňa").sdat
Máně
Mán-ě
Máňa-DAT.SG
"To Máňa."
These are regular žena defaults. Dative/locative variants in -i also
occur, particularly regionally, but this does not license spellings
such as Máňi or Natašy. See https://prirucka.ujc.cas.cz/?id=350.
The kost and píseň paradigms need the same dental spelling before i, í
and ě: paměť becomes paměti, and dlaň becomes dlaně. Before -mi, the kost
stem keeps its soft consonant, as in loďmi.
(kostN "paměť").sgen
paměti
pamět-i
memory(F)-GEN.SG
"Of a memory."
The kost plural endings -em/-ech give pamětem/pamětech. Spelling does not
determine every noun's paradigm, so mixed endings still need lexical overrides.
(kostN "loď") ** {pdat = "lodím" ; ploc = "lodích"}
Likewise, mkN "zeď" "zdi" feminine does not recover the oblique stem zd-.
The genitive selects a default class; it does not guarantee recovery of
every exceptional stem or ending. Supply the stem and the exceptional
nominative/accusative explicitly:
(kostN "zd") ** {snom,sacc = "zeď"}
Inflected proper names change with case: `Praha` ("Prague") becomes
`Prahy` after `do` ("to"), which requires the genitive.
[Praha follows the žena declension.](https://prirucka.ujc.cas.cz/?id=370)
mkAdv to_Prep (mkNP (mkPN (zenaN "Praha")))
do Prahy
do Prah-y
to Prague-GEN.SG
"To Prague."
Personal pronouns: Feminine accusative `ji` differs from genitive, dative
and instrumental `jí`; prepositional accusative `ni` now has the required
`n-` form. Masculine inanimate plurals use `ony`, as feminine plurals do,
while masculine animate plurals use `oni`.
For sůl ("salt"), the vocative follows the oblique stem sol-, while nominative and
accusative singular have sůl. Here the kost paradigm can supply the vocative.
salt_N.svoc
soli
sol-i
salt(F)-VOC.SG
"O salt."
The default mestoN paradigm uses -u in the locative, but město takes -ě.
Its dative is městu.
mkAdv in_Prep (mkNP city_N)
ve městě
ve měst-ě
in city(N)-LOC.SG
"In a city."
Qualify the vocative case as ResCze.Voc where CatCze.Voc, the category
of vocative phrases, is also in scope.
* Cze: distinguish adjective degrees and predicate agreement
The comparative of `dobrý` ("good") is `lepší` ("better"), with a different
stem. Positive declension alone cannot determine it. The superlative
[adds nej- to the comparative](https://prirucka.ujc.cas.cz/?id=410):
`lepší` becomes `nejlepší` ("best").
(mkA "dobrý" "lepší").superl.msnom
nejlepší
nej-lep-š-í
SUP-good-CMPR-M.SG.NOM
"Best" (masculine singular nominative).
The superlative still inflects for case; its masculine singular genitive is:
(mkA "dobrý" "lepší").superl.msgen
nejlepšího
nej-lep-š-ího
SUP-good-CMPR-M.SG.GEN
"best"
The smart paradigm supplies regular comparison and common lexical exceptions:
mkA "rychlý" gives rychlejší and nejrychlejší, while mkA "dobrý" gives
lepší and nejlepší. The -dý class has regular -ější comparison, like -tý:
hrdý ("proud") gives hrdější, while chudý ("poor") takes chudší.
Supply a comparative explicitly for other exceptions or to select a variant:
mkA "čistý" "čistší" chooses čistší; the regular guess čistější is also
accepted. Unsupported endings leave comparison unavailable;
mkA "lehký" needs an explicit "lehčí" when comparison is required.
(mkA "hrdý").compar.msnom → hrdější ("prouder")
(mkA "rudý").superl.msgen → nejrudějšího ("reddest", M.SG.GEN)
Here rudý means "red". Common -ší exceptions take precedence over the
regular -dý pattern. A compact morphology check covers this pattern,
an inflected superlative and an exception.
The inferred comparative also supplies the regular superlative:
(mkA "rychlý").superl.msnom
nejrychlejší
nej-rychl-ejš-í
SUP-fast-CMPR-M.SG.NOM
"Fastest."
Spelling cannot determine semantic gradability. Use mkA "jarní" nonExist
for positive forms only: jarního remains available, but comparative and
superlative forms do not. The declension constructors mladyA, jarniA,
otcuvA, matcinA and invarA likewise supply only positive forms.
All gradable entries in LexiconCze supply comparative principal parts,
including colors: bílý has bělejší,
modrý has modřejší, and hnědý has hnědší. Adjective declension alone does
not determine these forms.
mkAdv with_Prep (mkNP (mkCN (comparAP young_A) (panN "student")))
s mladším studentem
s mlad-š-ím student-em
with young-CMPR-M.SG.INS student(M)-INS.SG
"With a younger student."
A symbolic ordinal also needs an inflected ending. The spelling hyphen after
`n` separates the symbol from its suffix:
(<symb (mkSymb "n") : Ord>).s ! mascInanimate ! singular ! genitive
n-tého
n-t-ého
n-ORD-M.SG.GEN
"N-th" (masculine singular genitive).
Adjective complements: case alone does not determine a Czech pronoun's form.
In `hrdý na něho` ("proud of him"), `něho` is a prepositional form. Bare
complements use the non-prepositional forms.
mkAP (mkA2 (mkA "hrdý") (ParadigmsCze.mkPrep "na" accusative))
(mkNP he_Pron)
hrdý na něho
hrd-ý na něho
proud-M.SG.NOM on 3SG.M.ACC
"Proud of him" (masculine singular).
Predicate agreement: verb agreement doesn't suffice to choose a predicate form.
Polite singular address has a plural verb but a singular predicate. A subject
such as "five children" also separates verb and adjective agreement. For these
quantified subjects, the grammar selects a singular verb, genitive plural
for long adjectives, and neuter singular for short adjectives.
"Long" and "short" refer to adjective forms such as `připravený` and
`připraven` ("ready"). `AgPol` and `AgQuant` represent polite and quantified
agreement respectively; `R` below denotes `ResCze`.
The following expressions select the predicate forms directly. They illustrate
the distinction independently of subject construction.
(mkAP (mkA "unavený")).pred ! (R.AgPol feminine)
unavená
unaven-á
tired-F.SG.NOM
"Tired" (polite address to one woman).
(mkAP (mkA "unavený")).pred ! (R.AgQuant feminine)
unavených
unaven-ých
tired-GEN.PL
"Tired" (predicate of "five children").
(shortAP "připraven" "připravena" "připraveno"
"připraveni" "připraveny" "připravena").pred
! (R.AgQuant feminine)
připraveno
připraven-o
ready-N.SG.NOM
"Ready" (predicate of "five children").
These are different adjective paradigms, so coordination must preserve each
adjective's own predicate agreement. shortAP supplies predicate forms only:
it cannot license an attributive student rád, even in the nominative.
Standalone predicate responses such as připraven remain available.
See https://www.czechency.org/slovnik/ADJEKTIVUM.
mkUtt (shortAP "připraven" "připravena" "připraveno"
"připraveni" "připraveny" "připravena")
připraven
připraven-Ø
ready-M.SG.NOM
"Ready."
For CN predicates of quantified subjects, the grammar selects instrumental
plural, as in `studenty` ("students"). This is a formal predicative option,
not the only or necessarily the usual conversational form. Finite-verb
number alone cannot determine these predicate forms.
* Cze: supply verb principal parts and lexical negation
Irregular present and imperative forms cannot reliably be recovered from the
infinitive alone. Explicit principal parts allow ordinary Czech conjugation,
including commands addressed to several people or politely to one person.
Applications can construct verbs of the kupovat and krýt classes through
ParadigmsCze, including milovat, pít and mýt. The caller selects the class;
the infinitive ending alone does not determine conjugation. Irregular
verbs still use the full-form constructor.
mkV accepts either twelve positional forms or a VerbPrincipalParts record
with named fields. For example, učit has učí as both pressg3 and prespl3;
field names make the intended person and number explicit. The pastpartsg
and pastpartpl fields are masculine singular/plural participles.
Exceptional negative forms override the resulting V.
Keep the PositiveVerbForms alias as the twelve-field input contract:
adding required fields would break applications that use record literals.
Derived forms can extend VerbForms; additional principal parts need another
constructor or overload that preserves existing calls.
Valency constructors must return public V2/V3 values that application
grammars can pass to SyntaxCze. For example:
drink_V2 : V2 = mkV2 (krytV "pít") ;
The default V3 keeps its accusative object before its dative recipient:
mkCl (mkNP (panN "student")) (mkVP (mkV3 (kupovatV "kupovat"))
(mkNP (zenaN "kniha")) (mkNP he_Pron))
student kupuje knihu jemu
student-Ø kupuj-e knih-u jemu
student(M)-NOM.SG buy-PRS.3SG book(F)-ACC.SG 3SG.M.DAT
"A student buys a book for him."
Typed source and installed-API consumers exercise every valency overload.
Require the consumer GFO as well as a successful exit: GF can report a
type error without returning a nonzero status.
GF expressions use `open SyntaxCze, ParadigmsCze, (L = LexiconCze) in`.
mkUtt politeImpForm negativePol
(mkImp (mkVP L.read_V2 (mkNP (zenaN "kniha"))))
nečtěte knihu
ne-čt-ě-te knih-u
NEG-read-IMP-2PL book-ACC.SG
"Do not read the book."
Czech writes verbal `ne-` as part of the verb: `nečtěte` is one word.
Parsing this spelling must recover `PNeg`, the negative polarity constructor,
as well as the imperative.
Negative fields always contain complete surface forms. Regular negatives
derive from positive principal parts; the copula overrides the regular
result with není. withNeg is a lexical construction helper, not a way to
preserve overrides or reflexivity when reconstructing an existing verb.
The paradigms also store past participles, but past-tense clauses are not yet
implemented. The supported constructions remain present-tense clauses,
infinitives and imperatives.
* Cze: preserve clitic domains and make subject omission explicit
Polite and gendered pronouns
Polite address to one woman requires a plural finite verb and a feminine
singular predicate: Czech
[mixed agreement of polite address](https://www.czechency.org/slovnik/VYK%C3%81N%C3%8D).
GF expressions use `open SyntaxCze, ParadigmsCze, (L = LexiconCze), (E = ExtendCze) in`.
mkS (mkCl (mkNP (E.ProDrop E.youPolFem_Pron)) (mkA "unavený"))
jste unavená
jste unaven-á
be.PRS.2PL tired-F.SG.NOM
"You are tired."
Gender selection on first- and second-person pronouns affects agreement;
third-person plural selection also distinguishes pronoun forms:
mkUtt (mkNP E.theyFem_Pron)
ony
on-y
3-F.PL.NOM
"They."
Here the antecedent is feminine plural.
Third-person singular conversion changes the personal and possessive
paradigms too: genderPron feminine he_Pron gives ona, weak accusative ji,
prepositional accusative ni and possessive její. It preserves ProDrop.
Selecting the existing gender leaves lexical overrides intact; changing
gender selects the standard forms of the target gender.
genderPron feminine he_Pron
ona
on-a
3-F.SG.NOM
"She."
Predicate NPs
CompCN can take its predicate's number from the subject. CompNP receives
an NP whose number and reference have already been chosen. A plural
subject may identify a single group:
mkCl (mkNP we_Pron) (mkNP (zenaN "rodina"))
my jsme rodina
my jsme rodin-a
1PL.NOM be.PRS.1PL family(F)-NOM.SG
"We are a family."
Identifying NP predicates stay nominative, with their supplied number.
This does not claim to cover all Czech choices of predicative nominative
and instrumental.
Omitted subjects and focused pronouns
Czech commonly omits pronominal subjects. The GF API makes this choice
explicit: `ProDrop` requests omission, while an ordinary pronoun requests an
overt subject. Explicit control allows the subject to be expressed for
emphasis or focus.
Object cliticization is independent of that choice:
mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.love_V2 (mkNP she_Pron))
miluji ji
miluj-i=ji
love-PRS.1SG=3SG.F.ACC
"I love her."
Replacing `E.ProDrop i_Pron` with `i_Pron` gives `já ji miluji` ("I love
her", with an overt subject). In both cases `ji` is the object clitic.
The omitted subject must remain in the abstract analysis: `miluji` identifies
first-person singular, so omission must not introduce second- or third-person
parses. Ambiguities present in Czech remain possible: `myjete se` ("you wash
yourself/yourselves") identifies neither gender nor polite singular versus
plural address.
A focused pronoun must be expressed even if its input requests omission:
mkS (mkCl (mkNP only_Predet (mkNP (E.ProDrop i_Pron))) L.swim_V)
jen já plavu
jen já plav-u
only 1SG.NOM swim-PRS.1SG
"Only I swim."
Omitting `já` would lose the intended focus on the subject. Likewise, an
object modified by "only" needs a full pronoun.
With two object pronouns, the dative precedes the accusative regardless of
which V3 slot is filled first. Both constructions give the same clause:
let buy_V3 : V3 = mkV3 (kupovatV "kupovat") in
mkCl (mkNP i_Pron) (mkVP buy_V3 (mkNP she_Pron) (mkNP he_Pron))
let buy_V3 : V3 = mkV3 (kupovatV "kupovat") in
mkCl (mkNP i_Pron)
(mkVP (mkVPSlash buy_V3 (mkNP she_Pron)) (mkNP he_Pron))
já mu ji kupuji
já=mu=ji kupuj-i
1SG.NOM=3SG.M.DAT=3SG.F.ACC buy-PRS.1SG
"I am buying it for him."
Here ji refers to a feminine noun such as kniha ("book"). Focused jen jemu
("only for him") instead remains a full complement: já ji kupuji jen jemu.
Weak forms are available in bare genitive, dative and accusative; a bare
instrumental pronoun remains full. Object clitics follow the lexical
reflexive, as in já si ji kupuji ("I am buying it for myself").
Clitic domains
Czech clitics normally follow the first constituent of their clause.
Fronting an adverb changes `myji se` ("I wash myself") to:
dnes se myji
dnes=se myj-i
today=REFL.ACC wash-PRS.1SG
"Today I wash myself."
The first constituent can contain several words. With the focused subject
`jen já` ("only I"), `se` follows the whole subject:
jen já se myji
jen já=se myj-i
only 1SG.NOM=REFL.ACC wash-PRS.1SG
"Only I wash myself."
The same clause can later receive another initial constituent; its current
word order is not sufficient to recover the clitic's new position.
Coordination also must keep the second clause's clitics within that clause.
Markup must follow the original material through this movement:
`<b>myji se</b>` becomes `dnes <b>se myji</b>`. Repeated fronting can
make the marked material discontinuous: `doma <b>se</b> dnes <b>myji</b>`.
The adverbs are outside the original markup. Separately marked pieces keep
their wrappers even if later composition makes them adjacent.
A sentence without movable clitics must not acquire empty tags. Repeated
fronting of marked plavu ("I swim") gives doma dnes <b>plavu</b>, without
an empty <b></b> before dnes. A clitic in a later coordinated clause does
not make one present in the first clause.
An omitted subject contributes an empty parsing constituent, not an overt
clitic to mark. An infinitival clitic counts in the main clause only when
it climbs into that clause.
A subordinating conjunction provides the initial constituent:
jestliže se myji
jestliže=se myj-i
if=REFL.ACC wash-PRS.1SG
"If I wash myself."
The third-person imperative particle `nechť` likewise precedes the clitic,
even when an overt subject follows:
nechť se dvě děti myjí
nechť=se dvě dět-i myj-í
JUSS=REFL.ACC two.F.NOM child(F)-NOM.PL wash-PRS.3PL
"Let two children wash themselves."
Here `JUSS` labels the jussive particle ("let"). First-person plural commands
("let us") use the verb's imperative form.
Reflexive verbs and infinitives
seV and siV select the lexical reflexive clitic directly. The case-based
reflV interface accepts accusative and dative.
seV (krytV "mýt")
mýt se
mý-t=se
wash-INF=REFL.ACC
"To wash oneself."
A lexical reflexive belongs to its verb. An ordinary infinitival complement
keeps its own clitics; a modal such as `chtít` ("want") allows them in the
finite clause:
chci se mýt
chc-i=se mý-t
want-PRS.1SG=REFL.ACC wash-INF
"I want to wash myself."
An infinitive's reflexive cannot join the main verb's reflexive in one
clitic cluster. In the following example, each stays with its own verb.
The [Czech encyclopaedia describes this restriction on clitic climbing](https://www.czechency.org/slovnik/REFLEXIVN%C3%8D%20SLOVESO).
učím se mýt se
uč-í-m=se mý-t=se
teach-TH-PRS.1SG=REFL.ACC wash-INF=REFL.ACC
"I am learning to wash myself."
`Učit se` means "learn", literally "teach oneself"; `TH` glosses the theme
vowel. This contrast motivates the lexical distinction between ordinary
`mkVV` and `mkModalVV`.
Questions and embedding
An initial interrogative phrase has a different role from the subject:
kde je hotel
kde je hotel-Ø
where be.PRS.3SG hotel-NOM.SG
"Where is the hotel?"
The grammar introduces embedded yes/no questions with `jestli` ("whether").
Embedded wh-questions retain their interrogative phrase. The introductory
word precedes the subordinate clitics:
vím, jestli se myješ
ví-m, jestli=se myj-e-š
know-PRS.1SG whether=REFL.ACC wash-TH-PRS.2SG
"I know whether you wash yourself."
Statement complements similarly use `že` ("that"). A direct-question string
alone cannot represent these embedding choices.
Prepositional complements
A verb's selected preposition requires the corresponding pronoun form,
just as in other prepositional phrases:
mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.wait_V2 (mkNP she_Pron))
čekám na ni
ček-á-m na ni
wait-TH-PRS.1SG on 3SG.F.ACC
"I am waiting for her."
Polarity recovery
Selecting a verb form by polarity does not by itself preserve the abstract
polarity argument in a parsed tree. The empty string constituent supplies
that connection. Removing it leaves an unresolved argument even when the
negative spelling is recognized:
p -lang=CzeRoundTripCze -cat=Utt "nečti ji"
UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron)))
The string means "do not read it". Without the constituent, PNeg becomes ?1.
The finite treebank checks positive and negative imperatives as well as
declaratives.
* Cze: inflect cardinals and separate numeral agreement from government
Cardinal inflection and compound agreement
Compound numerals admit more than one standard agreement pattern. This grammar
selects agreement with the final component, making the counted noun singular
in "twenty-one years":
GF expressions use `open SyntaxCze, ParadigmsCze, SymbolicCze, (L = LexiconCze), (N = NumeralCze) in`.
mkUtt (mkNP (mkCard "21") (hradN "rok"))
dvacet jeden rok
dvacet-Ø jeden-Ø rok-Ø
twenty-NOM one-M.SG.NOM year-NOM.SG
"Twenty-one years."
The genitive-plural alternative, such as `dvacet jedna žáků` ("twenty-one
pupils"), is more usual in contemporary Czech. The grammar consistently
generates the final-component variant.
[The Czech language handbook describes both variants.](https://prirucka.ujc.cas.cz/?id=792)
In an oblique case, both numeral components and the counted noun inflect:
(mkNP (mkCard "23") L.child_N).s ! instrumental
dvaceti třemi dětmi
dvacet-i tř-emi dět-mi
twenty-INS three-INS child(F)-INS.PL
"Twenty-three children" (instrumental).
Decimal notation uses a comma. A fractional multiplier requires genitive
singular on the scale noun:
N.pot4decimal (N.IFrac (N.PosDecimal (N.IDig N.D_3)) N.D_5)
3,5 milionu
3,5 milion-u
3.5 million-GEN.SG
"Three and a half million."
This expression exercises the million subcategory directly. The shared
`num` constructor accepts only numbers below one million
(`Sub1000000`), so this larger value cannot pass through `num`.
A minus sign does not make an integer fractional: `-1 milion` and
`-2 miliony` retain integer agreement, whereas `-1,5 milionu` takes
genitive singular.
-2 miliony
-2 milion-y
minus.two million-NOM.PL
"Minus two million."
Zero requires genitive plural:
0 korun
0 korun-Ø
zero crown-GEN.PL
"Zero crowns."
Ordinal and superlative noun phrases
The case selected by a preposition also reaches an ordinal or superlative
modifier. In "to the best hotel", both modifier and noun are genitive:
SyntaxCze.mkAdv to_Prep
(mkNP (mkDet the_Quant (mkOrd (mkA "dobrý" "lepší"))) (hradN "hotel"))
do nejlepšího hotelu
do nej-lep-š-ího hotel-u
to SUP-good-CMPR-M.SG.GEN hotel-GEN.SG
"To the best hotel."
A symbolic ordinal follows the same agreement:
SyntaxCze.mkAdv to_Prep
(mkNP (mkDet the_Quant <symb (mkSymb "n") : Ord>) (hradN "hotel"))
do n-tého hotelu
do n-t-ého hotel-u
to n-ORD-M.SG.GEN hotel-GEN.SG
"To the n-th hotel."
Quantified noun phrases and predicates
With "five", a nominative noun phrase contains a genitive plural counted noun;
a preceding quantifier shares that genitive:
mkUtt (mkIP which_IQuant (mkNum (mkCard "5")) (mkCN L.child_N))
kterých pět dětí
kter-ých pět-Ø dět-í
which-GEN.PL five-NOM child(F)-GEN.PL
"Which five children?"
The genitive also remains in an address: mkVoc (mkNP (mkCard "5") L.child_N)
gives pět dětí, not pět děti.
Such a subject has a singular verb. For a long predicate adjective, the
grammar selects genitive plural:
mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkA "unavený"))
pět dětí je unavených
pět-Ø dět-í je unaven-ých
five-NOM child(F)-GEN.PL be.PRS.3SG tired-GEN.PL
"Five children are tired."
A short predicate adjective instead takes neuter singular:
pět dětí je připraveno
pět-Ø dět-í je připraven-o
five-NOM child(F)-GEN.PL be.PRS.3SG ready-N.SG.NOM
"Five children are ready."
For a CN used as the predicate ("are students"), the grammar selects
instrumental plural, a formal option. Treating the subject as uniformly
singular would lose all three distinctions.
pět dětí je studenty
pět-Ø dět-í je student-y
five-NOM child(F)-GEN.PL be.PRS.3SG student-INS.PL
"Five children are students."
These are selected predicate forms, not the only Czech possibilities or a
claim about the most usual conversational wording. See
https://www.czechency.org/slovnik/SPONOV%C4%9A-SUBSTANTIVN%C3%8D%20P%C5%98%C3%8DSUDEK.
Scale heads and genitive complements
A scale noun introduces another agreement controller. In the following
phrase, "this" agrees with instrumental singular "thousand", while the counted
currency remains genitive plural:
SyntaxCze.mkAdv with_Prep
(mkNP (mkDet this_Quant (mkNum (mkCard (N.num N.pot31))))
(zenaN "koruna"))
s tímto tisícem korun
s t-ím-to tisíc-em korun-Ø
with DEM-M.SG.INS-PROX thousand(M)-INS.SG crown(F)-GEN.PL
"With this thousand crowns."
With an ordinal or superlative after the scale noun, the two modifiers have
different heads. In the following phrase, "this" modifies "thousand", but
"best" modifies "crowns":
SyntaxCze.mkAdv with_Prep
(mkNP (mkDet this_Quant (mkNum (mkCard (N.num N.pot31)))
(mkOrd (mkA "dobrý" "lepší"))) (zenaN "koruna"))
s tímto tisícem nejlepších korun
s t-ím-to tisíc-em nej-lep-š-ích korun-Ø
with DEM-M.SG.INS-PROX thousand(M)-INS.SG SUP-good-CMPR-GEN.PL crown(F)-GEN.PL
"With this thousand of the best crowns."
Making both modifiers agree with the scale would change that meaning.
Genitive government does not by itself imply singular verb agreement.
A nominal scale head can control a plural verb and adjective:
dva miliony korun jsou připraveny
dv-a milion-y korun-Ø jsou připraven-y
two-M.NOM million(M)-NOM.PL crown(F)-GEN.PL be.PRS.3PL ready-M.PL.NOM
"Two million crowns are ready."
The grammar uses noun agreement for `milion` ("million") and `miliarda`
("billion"): singular with `milion`, plural with `dva miliony`. With hundreds
and thousands it instead selects quantified agreement, including a singular
verb. Plural agreement with dva tisíce ("two thousand") is also possible;
the multiplier does not require either variant in all contexts.
It also selects quantified agreement for `pět milionů` ("five million")
and `dvě stě milionů` ("two hundred million"). These are generation defaults
within a variable area of Czech usage.
[Nováková (2022), especially sections 2.5.3 and 2.5.9, documents the variation
in predicate and modifier agreement.](https://dspace.cuni.cz/handle/20.500.11956/176244)
Standalone number names
Standalone cardinals select the feminine counting convention: jedna,
dvě, dvacet jedna, dvacet dvě. The mixed sequence jedna, dva, tři is also
used. As a noun modifier, the numeral takes the noun's gender.
mkUtt (mkCard "1")
jedna
jedn-a
one-F.SG.NOM
"One" (number name).
mkUtt (mkNP (mkCard "1") L.child_N)
jedno dítě
jedn-o dít-ě
one-N.SG.NOM child(N)-NOM.SG
"One child."
mkUtt (mkCard "22")
dvacet dvě
dvacet dvě
twenty two.F.NOM
"Twenty-two."
Hrdlička documents both counting conventions (pp. 17–18):
https://studiezaplikovanelingvistiky.ff.cuni.cz/wp-content/uploads/sites/19/2016/03/milan_hrdlicka_11-22.pdf.
SSJČ also records both forms when dictating numbers:
https://ssjc.ujc.cas.cz/search.php?heslo=dvaadvacet&hsubstr=no.
* Cze: vocalize v, s and z before the realized complement
The choice between `v` and `ve` depends on the next pronounced word.
An intervening adjective can therefore change the preposition even when the
noun and case stay the same:
SyntaxCze.mkAdv in_Prep (mkNP school_N)
ve škole
ve škol-e
in school-LOC.SG
"In a school."
SyntaxCze.mkAdv in_Prep (mkNP (mkCN (mkA "moderní") school_N))
v moderní škole
v modern-í škol-e
in modern-F.SG.LOC school-LOC.SG
"In a modern school."
The vowel in `ve` eases pronunciation; it is not a case suffix. The
alternation also includes conventional choices such as `ve mlýně` ("in a
mill") alongside `v muzeu` ("in a museum"), so a general ban on consonant
clusters would be too broad. [The Czech language handbook describes these
alternations.](https://prirucka.ujc.cas.cz/?id=770)
The environments for s and z differ from those for v: ve hře but s hrou.
mkAdv with_Prep (mkNP (zenaN "žena"))
se ženou
se žen-ou
with woman(F)-INS.SG
"With a woman."
mkAdv from_Prep (mkNP school_N)
ze školy
ze škol-y
from school(F)-GEN.SG
"From a school."
The same s/z environments cover se mnou, se ženou and ze všech dětí.
The mz cluster gives ve mzdě.
The pronoun mě and the noun město do not make ve the default for every
word beginning with mě. Keep v in v měně, v měřítku and v mědi, as well
as before měsíc and měkký, while retaining ve mě/mne/mně and ve městě.
SyntaxCze.mkAdv in_Prep (mkNP (zenaN "měna"))
v měně
v měn-ě
in currency(F)-LOC.SG
"In a currency."
The built-in accusative pronoun gives ve mne ("into me"). Supplying the
alternative pacc = "mě", as in the finite PGF fixture, gives ve mě.
Both require vocalization; this does not change the pronoun default.
GF pre matches prefixes,
so the měst- default also covers derived words such as městský ("urban").
It takes priority over other longer mě- words, which in turn precede
the mě condition. Finite letter continuations distinguish the pronoun
without a growing list of lexical exclusions. Source checks and finite
PGF round trips cover all three branches.
The tř- default also applies outside numerals: ze třídy ("from the
classroom") is one of the handbook's examples. These are generation
defaults for common environments, not an exhaustive account of stylistic
and lexical variation. See https://prirucka.ujc.cas.cz/?id=770.
* Cze: inflect and place predeterminers by noun-phrase head
Czech "all" inflects, so its form must follow the noun phrase's case and
agreement. The instrumental plural is `všemi`:
GF expressions use `open SyntaxCze, ParadigmsCze, (L = LexiconCze) in`.
SyntaxCze.mkAdv with_Prep (mkNP all_Predet (mkNP plNum L.child_N))
se všemi dětmi
se vš-emi dět-mi
with all-INS.PL child(F)-INS.PL
"With all the children."
The neutral order with a personal pronoun is vy všichni ("all of you")
or s vámi všemi ("with all of you"). This is a generation default, not
a ban on every preposed use with a pronoun.
mkAdv with_Prep (mkNP all_Predet (mkNP youPl_Pron))
s vámi všemi
s vámi vš-emi
with 2PL.INS all-INS.PL
"With all of you."
A modifier does not change the head's pronominality even when weak forms
are no longer available. All remains next to the pronoun, before following
modifiers:
SyntaxCze.mkAdv with_Prep
(mkNP all_Predet
(mkNP (mkNP we_Pron) (ParadigmsCze.mkAdv "doma")))
s námi všemi doma
s námi vš-emi doma
with 1PL.INS all-INS.PL at.home
"With all of us at home."
Noun-headed phrases keep all before the noun, while jen ("only") remains
preposed in both cases. Predeterminer realization supplies agreement and
order; it does not check semantic compatibility with the NP. Do not impose
a blanket restriction on singular pronouns.
An earlier markup wrapper excludes a later predeterminer. Insertion can
split that wrapper into separately marked pieces; preposed jen ("only")
leaves it intact. Mark both pieces unconditionally, accepting an empty
wrapper in <b>my</b> všichni <b></b>. A separate presence flag used only
by markup substantially increases compilation cost.
If empty wrappers become a problem, replace isPron with a three-state NP
parameter: nominal, pronoun without a following modifier, pronoun with one.
This suppresses empty wrappers while preserving markup on both pieces.
A prototype saved less memory than unconditional wrapping. Bound RNPs need
only the pronoun distinction.
With "five children", "all" is genitive plural even when the whole phrase is
nominative and would take a singular finite verb. Clause agreement therefore
cannot determine its form:
mkUtt (mkNP all_Predet (mkNP (mkCard "5") L.child_N))
všech pět dětí
vš-ech pět-Ø dět-í
all-GEN.PL five-NOM child(F)-GEN.PL
"All five children."
The same genitive government is retained in an address:
mkVoc (mkNP all_Predet (mkNP (mkCard "5") L.child_N)) gives všech pět dětí.
A shared preposed modifier agrees with the first conjunct:
mkUtt (mkNP all_Predet
(mkNP and_Conj (mkNP plNum L.man_N) (mkNP plNum L.woman_N)))
všichni muži a ženy
vš-ichni muž-i a žen-y
all-M.PL.NOM man(M)-NOM.PL and woman(F)-NOM.PL
"All men and women."
Here všichni agrees with muži; the following feminine ženy does not change
its form. Adding a conjunct at the front makes that new conjunct the
modifier's agreement controller. This is nominal modifier agreement,
separate from agreement with the clause's verb.
See https://www.czechency.org/slovnik/KOORDINACE.
* Cze: distinguish bare case government from prepositional complements
Case alone does not select the full form of a personal pronoun. Bare
genitive uses jeho; after od it is něho. This distinction also matters
in either V3 complement.
mkAdv possess_Prep (mkNP he_Pron)
jeho
jeho
3SG.M.GEN
"Of him."
mkAdv by8agent_Prep (mkNP he_Pron)
od něho
od něho
from 3SG.M.GEN
"From him."
Use mkPrep genitive for bare government. The string overload denotes an
overt preposition, including token-dependent allomorphs; older mkPrep ""
calls should use the case-only overload. Explicit government avoids trying
to test a delayed pre expression for emptiness.
Full-form selection is independent of clitic eligibility and placement.
Source regressions cover both V3 slots and bare and prepositional forms.
The installed API consumer exercises both constructor overloads and an
allomorphic preposition.
* Cze: implement the standard subject-bound RNP interface
Reflexive possession expresses coreference with the clause's subject. The
standard RGL `RNP` interface can carry this dependency through coordination
and nested possession until the phrase is used as an object.
A full reflexive can be coordinated with a possessed noun phrase:
GF expressions use `open SyntaxCze, ParadigmsCze, (L = LexiconCze), (E = ExtendCze) in`.
mkS (mkCl (mkNP (E.ProDrop she_Pron))
(E.ReflRNP (mkVPSlash L.love_V2)
(E.ConjRNP and_Conj
(E.Base_rr_RNP E.ReflPron (E.ReflPoss plNum (mkCN L.child_N))))))
miluje sebe a své děti
miluj-e seb-e a sv-é dět-i
love-PRS.3SG REFL-ACC and REFL.POSS-F.PL.ACC child(F)-ACC.PL
"She loves herself and her own children."
The tree identifies the subject as female; the present-tense verb `miluje`
itself does not mark gender. `Sebe` is the full reflexive object, distinct
from the clitic `se` in a lexical reflexive verb.
Binding also reaches a possessor inside a larger object:
mkS (mkCl (mkNP (E.ProDrop he_Pron))
(E.ReflRNP (mkVPSlash L.love_V2)
(E.AdvRNP (mkNP (zenaN "manželka")) possess_Prep
(E.ReflPoss sgNum (mkCN (panN "syn"))))))
miluje manželku svého syna
miluj-e manželk-u sv-ého syn-a
love-PRS.3SG wife-ACC.SG REFL.POSS-M.SG.GEN son-GEN.SG
"He loves his own son's wife."
Here "his own" refers to the subject of "loves". Choosing `ReflPoss`
expresses that subject binding.
An ordinary possessive, such as `mkNP he_Pron (panN "syn")` ("his son"),
carries no such binding and cannot replace the reflexive analysis.
Focus likewise requires a full reflexive:
mkS (mkCl (mkNP (E.ProDrop she_Pron))
(E.ReflRNP (mkVPSlash L.love_V2)
(E.PredetRNP only_Predet E.ReflPron)))
miluje jen sebe
miluj-e jen seb-e
love-PRS.3SG only REFL-ACC
"She loves only herself."
The verb selects the bound phrase's case; the possessed noun controls
modifier agreement. Here `psát o` ("write about") requires locative, and
"all" and the possessive are plural because they modify "children",
although the antecedent "I" is singular:
let writeAbout_V2 : V2 = L.write_V2 ** {
c = ParadigmsCze.mkPrep "o" locative
} in
mkS (mkCl (mkNP (E.ProDrop i_Pron))
(E.ReflRNP (mkVPSlash writeAbout_V2)
(E.PredetRNP all_Predet (E.ReflPoss plNum (mkCN L.child_N)))))
píši o všech svých dětech
píš-i o vš-ech sv-ých dět-ech
write-PRS.1SG about all-LOC.PL REFL.POSS-F.PL.LOC child(F)-LOC.PL
"I write about all my own children."
A bare reflexive has no possessed noun to supply that agreement; its modifiers
instead agree with the antecedent.
All follows this pronominal head, as in o sobě všech ("about all of
themselves"); it remains preposed before a possessed noun or coordination.
With an AdvRNP headed by a personal pronoun, all stays next to that pronoun
and agrees with it, before the following bound complement. In ona plave
s námi všemi u sebe ("she swims with all of us at her place"), všemi is
plural with námi despite the singular antecedent of sebe. Preserve the
boundary before following modifiers through binding.
With a coordinated RNP, a shared preposed modifier agrees with the first
conjunct, just as with an ordinary NP. This object phrase takes the following
accusative form:
E.PredetRNP all_Predet
(E.ConjRNP and_Conj
(E.Base_rr_RNP (E.ReflPoss plNum (mkCN (panN "syn")))
(E.ReflPoss sgNum (mkCN (zenaN "dcera")))))
všechny své syny a svou dceru
vš-echny sv-é syn-y a sv-ou dcer-u
all-ACC.PL REFL.POSS-M.PL.ACC son(M)-ACC.PL and REFL.POSS-F.SG.ACC daughter(F)-ACC.SG
"All one's own sons and one's own daughter."
Všechny is plural with syny; singular dceru does not change its form.
Full complements select ordinary or post-prepositional forms after binding
the subject agreement. Coordinating a personal pronoun with a reflexive
exposes the difference: bare genitive jeho a sebe versus od něho a sebe.
Pure reflexives alone cannot check this distinction. Regressions exercise
nested and coordinated RNPs and both attributive and predicative AP forms.
* Cze: expose compositional secondary and dative predicates
Subject-oriented secondary predicates
In `mít rád` ("like", literally "have glad"), the adjective agrees with the
subject while the verb takes an accusative object. Standard `V2A` models an
object-oriented predicate, as in "paint it red"; it would give the wrong
agreement controller for this construction.
`SlashV2AP` lets the verb and adjective retain their own inflection:
GF expressions use `open SyntaxCze, ParadigmsCze, ExtraCze, (L = LexiconCze), (E = ExtendCze) in`.
let like_AP : AP = shortAP "rád" "ráda" "rádo" "rádi" "rády" "ráda" in
mkS (mkCl (mkNP (mkCard "5") L.child_N)
(mkVP (SlashV2AP have_V2 like_AP) (mkNP (zenaN "pizza"))))
pět dětí má rádo pizzu
pět-Ø dět-í má rád-o pizz-u
five-NOM child(F)-GEN.PL have.PRS.3SG glad-N.SG.NOM pizza-ACC.SG
"Five children like pizza."
The short adjective is neuter singular with this quantified subject; it does
not agree with feminine `pizza`. Keeping an object gap also permits a
subject-bound object:
let like_AP : AP = shortAP "rád" "ráda" "rádo" "rádi" "rády" "ráda" in
mkS (mkCl (mkNP (E.ProDrop she_Pron))
(E.ReflRNP (SlashV2AP have_V2 like_AP)
(E.ReflPoss sgNum (mkCN (panN "syn")))))
má ráda svého syna
má rád-a sv-ého syn-a
have.PRS.3SG glad-F.SG.NOM REFL.POSS-M.SG.ACC son-ACC.SG
"She likes her own son."
Here `ráda` agrees with the female subject, while `svého` agrees with
masculine accusative `syna`.
Dative experiencers with the copula
Czech age expressions put the experiencer in the dative. The nominative age
phrase controls the verb: "two years" takes plural `jsou`, whereas "five
years" takes singular `je`.
mkS (DativeCopulaCl (mkNP i_Pron) (mkNP (mkCard "2") L.year_N))
jsou mi dva roky
jsou=mi dv-a rok-y
be.PRS.3PL=1SG.DAT two-M.NOM year-NOM.PL
"I am two years old."
mkS (DativeCopulaCl (mkNP i_Pron) (mkNP (mkCard "5") L.year_N))
je mi pět let
je=mi pět-Ø let-Ø
be.PRS.3SG=1SG.DAT five-NOM year-GEN.PL
"I am five years old."
The same singular experiencer `mi` ("to me") occurs in both. It cannot
supply the clause's agreement features.
The question construction preserves this distinction:
mkQS (DativeCopulaQCl (mkNP youPol_Pron)
(mkIP how8many_IDet (mkCN L.year_N)))
kolik let vám je
kolik-Ø let-Ø=vám je
how.many-NOM year-GEN.PL=2PL.DAT be.PRS.3SG
"How old are you?"
Here `vám` addresses one person politely. The interrogative age phrase
`kolik let` controls the singular verb `je`.
These constructions need language-specific abstract operations: neither the
subject-oriented secondary predicate nor the dative/nominative copula has an
equivalent in the standard constructors. They belong in `ExtraCze` and
compose with the standard RGL categories.
An acyclic PGF fragment checks these constructions together with bound
objects, bare and prepositional complements, explicit subject omission,
subordinate clitics and predeterminer placement with a modified pronoun:
s námi všemi doma ("with all of us at home"). It compares complete parse
sets and requires recovery of polarity arguments, without truncation or
depending on parse order.
* Cze: implement the interrogative pronoun kdo
Kdo uses masculine animate singular agreement and inflects for case.
This grammatical agreement does not specify the referent's sex.
mkQS (mkQCl whoSg_IP (mkVP love_V2 (mkNP she_Pron)))
kdo ji miluje
kdo-Ø=ji miluj-e
who-NOM=3SG.F.ACC love-PRS.3SG
"Who loves her?"
The standard structural entry replaces the API stub. Finite round trips
check the subject question and the oblique phrase od koho ("from whom").
* Cze: implement adjective comparisons with než
A comparison term follows než in the nominative while the adjective
retains its attributive case or predicate agreement. Subject omission
does not erase a pronoun used as the comparison term.
mkCl (mkNP (mkCard "5") child_N) (mkAP young_A (mkNP she_Pron))
pět dětí je mladších než ona
pět-Ø dět-í je mlad-š-ích než ona
five-NOM child(F)-GEN.PL be.PRS.3SG young-CMPR-GEN.PL than 3SG.F.NOM
"Five children are younger than her."
The standard ComparA construction replaces the API stub. Its mkAP overload
uses the same comparative morphology as comparAP, with a postposed
comparison complement. Source and finite PGF tests exercise attributive
case, ordinary and quantified predicates, and full comparison pronouns.
The PGF fragment also checks a comparison formed by the smart mkA paradigm:
fast_A = mkA "rychlý" gives jsem rychlejší než ona ("I am faster than her").
* Cze: run the regression suite in CI
The general RGL build checks compilation but does not check Czech surface
forms or polarity recovery in parsing. Run the Czech source suites, API
imports and finite PGF round trips after installing GF, with a five-minute
step timeout.
Use the installed gf through the runner's PATH fallback and retain the
existing full RGL build.
The test overview links sh tests/czech/check.sh and the Czech README.
The runner follows the existing .gfs/.out convention and additionally
checks installed API imports and finite PGF generation/parsing.
These finite fragments do not establish full Czech RGL coverage.
Coordinated-subject person/number agreement and subordinate-clause punctuation
retain inherited gaps, as noted in the test README.
The runner accepts an explicit GF executable, including paths containing
spaces, and falls back to gf on PATH when GF is unset or empty. It reports
a missing executable before starting any builds. Manually verified these
startup cases using temporary shell stubs, without invoking a compiler.
* Cze: give reflexive modifiers their complement case
A bound reflexive inherits its antecedent's gender and number, but takes
case from its own complement position. A quantified subject's genitive
government must not spread to an accusative reflexive object.
pět dětí miluje sebe všechny
pět-Ø dět-í miluj-e sebe všechn-y
five-NOM child(F)-GEN.PL love-PRS.3SG REFL.ACC all-F.PL.ACC
"Five children love all of themselves."
The former sebe všech incorrectly used genitive on the modifier. Possessed
heads still have their own government: čekám na všech svých pět dětí
("I am waiting for all five of my children") retains genitive všech svých.
Finite round trips check ordinary and quantified antecedents, bare and
prepositional accusatives, and possessed heads. A source check exercises
instrumental se sebou všemi ("with all of themselves") inside a predicate.
* Cze: correct case forms of rok and mléko
The new lexical entries need two overrides: rok ("year") has singular
vocative roku, and mléko ("milk") has plural locative mlékách. Their default
paradigms otherwise produce roke and mlékech.
Source regressions check mkVoc (mkNP year_N) and v mlékách ("in milks",
for example when comparing types of milk).
* Cze: use quantified agreement for compound cardinals
Agreement with the final unit is a standard option for bare compounds,
but does not compose with possessive modifiers. Use the genitive-plural
pattern for compounds ending in 1--4 as well as 5--9. Counted nouns,
modifiers and predicates then receive consistent agreement.
mkS (mkCl (mkNP (mkDet i_Pron (mkNum "22")) L.child_N)
(mkA "unavený"))
Before (* marks the ungrammatical construction):
*mé dvacet dvě děti jsou unavené
m-é dvacet-Ø dv-ě dět-i jsou unaven-é
1SG.POSS-F.PL.NOM twenty-NOM two-F.NOM child(F)-NOM.PL be.PRS.3PL tired-F.PL.NOM
After:
mých dvacet dva dětí je unavených
m-ých dvacet-Ø dva dět-í je unaven-ých
1SG.POSS-GEN.PL twenty-NOM two.NOM child(F)-GEN.PL be.PRS.3SG tired-GEN.PL
"My twenty-two children are tired."
[CzechEncy describes the restriction on premodifiers.](https://www.czechency.org/slovnik/ČÍSLOVKA)
In compounds, jedna stays fixed in oblique cases, while dva inflects:
s mými dvaceti jedna dětmi / s mými dvaceti dvěma dětmi
("with my twenty-one / twenty-two children"). Simple jeden and dva/dvě
keep their existing agreement. See Naughton, Czech: An Essential Grammar,
sections 6.1.5--6.1.6:
https://jakobson.korpus.cz/~rosen/public/GGG/Czech_essent_grammar.pdf#page=126.
Exact scale nouns retain their government and agreement. A compound used
as their multiplier follows the same rule: s těmito dvaceti jedna tisíci
korun ("with these twenty-one thousand crowns").
Finite PGF round trips cover possessives with 21 and 22, instrumental
forms and a quantified predicate. Source checks cover larger compounds
and a compound multiplier of tisíc.
* Cze: retain the leading scale's agreement in sums
A sum ending in a scale word kept the final summand's agreement head.
This produced *tato dva tisíce dvě stě korun: neuter tato agreed with
stě across the preceding masculine tisíce.
Keep the leading scale's head, following the existing nominal modifier
policy. The final scale still governs the counted noun's genitive.
tyto dva tisíce dvě stě korun
t-y-to dv-a tisíc-e dv-ě st-ě korun-Ø
DEM-M.NOM.PL-PROX two-M.NOM thousand-NOM.PL two-N.NOM hundred-NOM.PL crown-GEN.PL
"These 2,200 crowns."
This selects nominal agreement, documented for compound modifiers in
Nováková (2022), section 2.6; quantified agreement is another option:
https://dspace.cuni.cz/bitstream/handle/20.500.11956/176244/120427637.pdf?isAllowed=y&sequence=1#page=81
Round trips cover demonstratives, possessives and instrumental forms.
Source checks cover all_Predet and predicate agreement in sums with
millions and billions.
* Cze: correct the náš and váš possessive paradigms
Use their shared pronoun paradigm instead of the soft-adjective defaults.
Distinguish feminine accusative naši/vaši from oblique naší/vaší, and
singular instrumental naším/vaším from plural dative našim/vašim.
miluji vaši dceru
miluj-i vaš-i dcer-u
love-PRS.1SG 2PL.POSS-ACC.SG.F daughter-ACC.SG
"I love your daughter."
The case forms follow SSJČ:
https://ssjc.ujc.cas.cz/search.php?heslo=n%C3%A1%C5%A1&hsubstr=no
Source checks cover plural and polite address, gender and case contrasts.
Finite PGF round trips cover objects, dative experiencers and possession.
* Cze: correct the irregular plural forms of jablko
Override the regular město paradigm with genitive jablek and locative
jablkách. The default forms jablk and jablkech are incorrect.
pět jablek
five.NOM apple.GEN.PL
"Five apples."
SSJČ lists jablek and the locative alternatives jablkách/jablcích:
https://ssjc.ujc.cas.cz/search.php?heslo=jablko&hsubstr=no
Finite round trips contrast dvě jablka with pět jablek; a source check
covers v jablkách. Keep these lexical exceptions out of the general paradigm.
* Cze: inflect standalone accusative and dative noun phrases
Implement UttAccNP and UttDatNP instead of inheriting the nominative
fallback. Use full pronoun forms, including after ProDrop, since a
standalone utterance cannot host an object clitic.
tuto studenou kávu
t-u-to studen-ou káv-u
DEM-ACC.SG.F-PROX cold-ACC.SG.F coffee-ACC.SG
"This cold coffee."
Source regressions cover determiner and adjective agreement, the
accusative/dative contrast, and strong jeho/jemu pronoun forms.
This commit is contained in:
@@ -2,22 +2,32 @@ concrete AdjectiveCze of Adjective = CatCze ** open ResCze, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
PositA a = adjFormsAdjective a ** {isPost = False} ;
|
||||
PositA a = let ap = adjFormsAdjective a in ap ** {pred = longPredicate ap ; isPost = False} ;
|
||||
|
||||
AdAP ada ap = ap ** {s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c} ;
|
||||
AdAP ada ap = ap ** {
|
||||
s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c ;
|
||||
pred = \\a => ada.s ++ ap.pred ! a
|
||||
} ;
|
||||
|
||||
ComplA2 a np =
|
||||
let ap = adjFormsAdjective a
|
||||
let ap = adjFormsAdjective a ;
|
||||
compl = fullComplement a.c np.s np.prep
|
||||
in
|
||||
ap ** {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ a.c.s ++ np.s ! a.c.c ;
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ compl ;
|
||||
pred = \\agr => longPredicate ap ! agr ++ compl ;
|
||||
isPost = True ;
|
||||
} ;
|
||||
|
||||
UseA2 a = adjFormsAdjective a ** {isPost = True} ;
|
||||
UseA2 a = let ap = adjFormsAdjective a in ap ** {pred = longPredicate ap ; isPost = True} ;
|
||||
|
||||
UseComparA a = adjFormsAdjective a ** {isPost = False} ; ---- TODO: this gives positive forms
|
||||
UseComparA a = let ap = adjFormsAdjective a.compar in ap ** {pred = longPredicate ap ; isPost = False} ;
|
||||
ComparA a np = AdvAP (UseComparA a) {s = "než" ++ np.s ! Nom} ;
|
||||
AdjOrd ord = ord ** {pred = longPredicate ord ; isPost = False} ;
|
||||
|
||||
AdvAP ap adv = ap ** {s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s; isPost = True} ;
|
||||
AdvAP ap adv = ap ** {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s ;
|
||||
pred = \\a => ap.pred ! a ++ adv.s ; isPost = True
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ concrete AdverbCze of Adverb = CatCze **
|
||||
|
||||
lin
|
||||
PrepNP prep np = {
|
||||
s = prep.s ++ np.prep ! prep.c
|
||||
s = fullComplement prep np.s np.prep
|
||||
} ;
|
||||
|
||||
SubjS subj s = {
|
||||
s = subj.s ++ s.s
|
||||
s = (frontSentence subj.s s).s
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
concrete AllCze of AllCzeAbs =
|
||||
LangCze,
|
||||
ExtendCze
|
||||
ExtendCze,
|
||||
ExtraCze
|
||||
;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
abstract AllCzeAbs =
|
||||
Lang,
|
||||
Extend
|
||||
Extend,
|
||||
ExtraCzeAbs
|
||||
;
|
||||
|
||||
|
||||
+27
-12
@@ -8,37 +8,52 @@ concrete CatCze of Cat =
|
||||
Phr = {s : Str} ;
|
||||
Utt = {s : Str} ;
|
||||
|
||||
S = {s : Str} ;
|
||||
Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ;
|
||||
S = ResCze.Sentence ;
|
||||
Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr ; isDrop,clitPresent : Bool} ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
QS = {s : Str} ; ---- TODO: indirect questions
|
||||
QCl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ; -- = Cl ---- check if enough
|
||||
IAdv = {s : Str} ;
|
||||
QS = {s,ind : Str} ;
|
||||
QCl = {q,subj,clit,compl : Str ; verb : VerbForms ; a : Agr ; yesNo : Bool} ;
|
||||
IAdv, IComp = {s : Str} ;
|
||||
IP = {s : Case => Str ; a : Agr} ;
|
||||
IDet = Determiner ;
|
||||
IQuant = Adjective ;
|
||||
Imp = {s : Bool => Agr => Str} ;
|
||||
|
||||
RS = {s : Agr => Str} ;
|
||||
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
|
||||
RP = AdjForms ;
|
||||
|
||||
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
|
||||
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase ; ind : Agr => Str} ; -- ind : incorporated indirect object, rendered after the object slot
|
||||
-- clitPresent records an overt clitic in this domain, not NP eligibility.
|
||||
VP = {verb : VerbForms ; clit,compl : Agr => Str ; clitPresent : Bool} ; ---- more fields probably needed
|
||||
-- clit/clitAfter surround the open slot in the eventual clitic cluster.
|
||||
-- Its presence flag covers both sides of the slot.
|
||||
VPSlash = {verb : VerbForms ; clit,clitAfter,compl : Agr => Str ; clitPresent : Bool ; c : ComplementCase ; ind : Agr => Str} ; -- ind : incorporated second object, rendered after the object slot
|
||||
V = ResCze.VerbForms ;
|
||||
V2 = ResCze.VerbForms ** {c : ComplementCase} ;
|
||||
V3 = ResCze.VerbForms ** {c,c2 : ComplementCase} ; -- c : direct object, c2 : indirect object
|
||||
VS,VQ,VV = ResCze.VerbForms ;
|
||||
VS,VQ = ResCze.VerbForms ;
|
||||
VV = ResCze.VerbForms ** {isAux : Bool} ;
|
||||
|
||||
A = ResCze.AdjForms ;
|
||||
AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}
|
||||
A2 = ResCze.AdjForms ** {c : ComplementCase} ;
|
||||
A = ResCze.DegreeForms ;
|
||||
AP = ResCze.Adjective ** {pred : Agr => Str ; isPost : Bool} ;
|
||||
A2 = ResCze.DegreeForms ** {c : ComplementCase} ;
|
||||
|
||||
AdA = {s : Str} ;
|
||||
|
||||
N = ResCze.NounForms ;
|
||||
CN = ResCze.Noun ; -- {s : Number => Case => Str ; g : Gender}
|
||||
NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns
|
||||
-- Object-clitic eligibility and subject omission are independent.
|
||||
-- Extend.ProDrop selects isDrop; clit ! Nom retains its empty constituent.
|
||||
-- Modifiers restore full forms. s and prep are always available for strong use.
|
||||
-- m controls NP modifiers; a controls the clause. Scale nouns can differ.
|
||||
-- A modified pronoun can keep its pronominal head without a weak form.
|
||||
NP = NPForms ** {clit : Case => Str ; a : Agr ; m : ModifierAgr ; hasClit,isDrop,isPron : Bool} ;
|
||||
PN = {s : Case => Str ; g : Gender} ;
|
||||
Ord = Adjective ;
|
||||
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
|
||||
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
Predet = Adjective ** {postPron : Bool} ;
|
||||
Num = Determiner ;
|
||||
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
||||
Pron = PronForms ** {poss : DemPronForms} ;
|
||||
|
||||
+19
-15
@@ -3,9 +3,9 @@ concrete ConjunctionCze of Conjunction = CatCze **
|
||||
|
||||
lincat
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[AP] = {s1,s2 : Gender => Number => Case => Str ; isPost : Bool} ;
|
||||
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr} ;
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[AP] = {s1,s2 : Gender => Number => Case => Str ; pred1,pred2 : Agr => Str ; isPost : Bool} ;
|
||||
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr ; m : ModifierAgr} ;
|
||||
[S] = {s1 : Sentence ; s2 : Str} ;
|
||||
[RS] = {s1,s2 : Agr => Str} ;
|
||||
|
||||
lin
|
||||
@@ -13,27 +13,28 @@ concrete ConjunctionCze of Conjunction = CatCze **
|
||||
ConsAdv = consrSS comma ;
|
||||
|
||||
BaseAP x y = twoTable3 Gender Number Case x y
|
||||
** {isPost = orB x.isPost y.isPost} ; ---- should be so in Pol too
|
||||
** {pred1 = x.pred ; pred2 = y.pred ; isPost = orB x.isPost y.isPost} ;
|
||||
ConsAP x xs = consrTable3 Gender Number Case comma x xs
|
||||
** {isPost = orB x.isPost xs.isPost} ;
|
||||
** {pred1 = \\a => x.pred ! a ++ comma ++ xs.pred1 ! a ; pred2 = xs.pred2 ; isPost = orB x.isPost xs.isPost} ;
|
||||
|
||||
-- A shared preposed modifier agrees with the first conjunct.
|
||||
BaseNP x y = {
|
||||
s1 = x.s ;
|
||||
s2 = y.s ;
|
||||
prep1 = x.prep ;
|
||||
prep2 = y.prep ;
|
||||
a = y.a
|
||||
a = y.a ; m = x.m
|
||||
} ; -- clitics disappear ---- Agr TODO
|
||||
ConsNP x xs = {
|
||||
s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ;
|
||||
s2 = xs.s2 ;
|
||||
prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ;
|
||||
prep2 = xs.prep2 ;
|
||||
a = xs.a ----
|
||||
a = xs.a ; m = x.m ----
|
||||
} ;
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
BaseS x y = {s1 = x ; s2 = y.s} ;
|
||||
ConsS x xs = {s1 = appendSentence x (comma ++ xs.s1.s) ; s2 = xs.s2} ;
|
||||
|
||||
BaseRS = twoTable Agr ;
|
||||
ConsRS = consrTable Agr comma ;
|
||||
@@ -41,16 +42,19 @@ concrete ConjunctionCze of Conjunction = CatCze **
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjAP conj xs = conjunctDistrTable3 Gender Number Case conj xs
|
||||
** {isPost = xs.isPost} ;
|
||||
** {pred = \\a => conj.s1 ++ xs.pred1 ! a ++ conj.s2 ++ xs.pred2 ! a ; isPost = xs.isPost} ;
|
||||
|
||||
ConjNP conj xs = {
|
||||
s,clit = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
|
||||
prep = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! c ;
|
||||
ConjNP conj xs =
|
||||
let s : Case => Str = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
|
||||
prep : Case => Str = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! c
|
||||
in npForms s prep ** {
|
||||
clit = s ;
|
||||
a = xs.a ; ---- dep. on conj as well
|
||||
hasClit = False ;
|
||||
m = xs.m ;
|
||||
hasClit = False ; isDrop = False ; isPron = False ;
|
||||
} ;
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
ConjS conj xs = prefixSentence conj.s1 (appendSentence xs.s1 (conj.s2 ++ xs.s2)) ;
|
||||
ConjRS = conjunctDistrTable Agr ;
|
||||
|
||||
}
|
||||
|
||||
+110
-4
@@ -1,8 +1,11 @@
|
||||
concrete ExtendCze of Extend = CatCze **
|
||||
ExtendFunctor - [
|
||||
ReflPossPron
|
||||
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP,
|
||||
ConjRNP, Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
|
||||
ReflPossPron, ProDrop, UttAccNP, UttDatNP,
|
||||
iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron,
|
||||
theyFem_Pron, theyNeutr_Pron, youPolFem_Pron, youPolPlFem_Pron
|
||||
---- constant not found (yet)
|
||||
,youPolFem_Pron
|
||||
,UttVPShort
|
||||
,UttAccIP
|
||||
,UttDatIP
|
||||
@@ -31,10 +34,113 @@ concrete ExtendCze of Extend = CatCze **
|
||||
with (Grammar = GrammarCze)
|
||||
**
|
||||
open
|
||||
ResCze
|
||||
ResCze, Prelude, (S = SyntaxCze), (P = ParadigmsCze)
|
||||
in {
|
||||
|
||||
lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;
|
||||
lincat
|
||||
RNP = BoundNPForms ** {m : RNPHead ; isPron : Bool} ;
|
||||
RNPList = {s1,s2,prep1,prep2 : Agr => Case => Str ; m : RNPHead} ;
|
||||
|
||||
param
|
||||
RNPHead = AntecedentHead | FixedHead ModifierAgr ;
|
||||
|
||||
lin
|
||||
-- Standalone oblique NPs use full forms, never clitics or prepositional forms.
|
||||
UttAccNP np = {s = np.s ! Acc} ;
|
||||
UttDatNP np = {s = np.s ! Dat} ;
|
||||
|
||||
-- Retain full forms for objects, coordination and NP modifiers.
|
||||
ProDrop pron = pron ** {isDrop = True} ;
|
||||
|
||||
iFem_Pron = P.genderPron Fem S.i_Pron ;
|
||||
youFem_Pron = P.genderPron Fem S.youSg_Pron ;
|
||||
weFem_Pron = P.genderPron Fem S.we_Pron ;
|
||||
youPlFem_Pron = P.genderPron Fem S.youPl_Pron ;
|
||||
theyFem_Pron = P.genderPron Fem S.they_Pron ;
|
||||
theyNeutr_Pron = P.genderPron Neutr S.they_Pron ;
|
||||
youPolFem_Pron = P.genderPron Fem S.youPol_Pron ;
|
||||
youPolPlFem_Pron = P.genderPron Fem S.youPl_Pron ;
|
||||
|
||||
ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;
|
||||
|
||||
-- RNPs are full noun phrases. ReflPron consequently uses sebe/sobě,
|
||||
-- including in coordination, rather than a lexical reflexive clitic.
|
||||
ReflPron =
|
||||
let s : Case => Str = table {
|
||||
Nom | ResCze.Voc => nonExist ; Gen | Acc => "sebe" ;
|
||||
Dat | Loc => "sobě" ; Ins => "sebou"
|
||||
}
|
||||
in boundNPForms (\\_ => npForms s s) ** {
|
||||
m = AntecedentHead ; isPron = True
|
||||
} ;
|
||||
ReflPoss num cn = fullRNP (S.mkNP (lin Quant (justDemPronFormsAdjective reflPossessivePron))
|
||||
<lin Num num : S.Num> <lin CN cn : S.CN>) ;
|
||||
ReflRNP vps rnp = vps ** {
|
||||
clit = \\a => vps.clit ! a ++ vps.clitAfter ! a ;
|
||||
compl = \\a => vps.compl ! a ++
|
||||
fullComplement vps.c (rnp.s ! a) (rnp.prep ! a) ++ vps.ind ! a
|
||||
} ;
|
||||
PredetRNP pred rnp = rnp ** boundNPForms (\\a =>
|
||||
predetNPForms (andB pred.postPron rnp.isPron)
|
||||
(\\c => predetForm pred (rnpAgr rnp.m a) c) (rnpForms rnp a)) ;
|
||||
AdvRNP np p rnp = boundNPForms (\\a =>
|
||||
appendNPForms np (fullComplement p (rnp.s ! a) (rnp.prep ! a))) ** {
|
||||
m = FixedHead np.m ; isPron = np.isPron
|
||||
} ;
|
||||
AdvRVP vp p rnp = vp ** {
|
||||
compl = \\a => vp.compl ! a ++ fullComplement p (rnp.s ! a) (rnp.prep ! a)
|
||||
} ;
|
||||
AdvRAP ap p rnp = ap ** {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ fullComplement p (rnp.s ! Ag g n P3) (rnp.prep ! Ag g n P3) ;
|
||||
pred = \\a => ap.pred ! a ++ fullComplement p (rnp.s ! a) (rnp.prep ! a) ; isPost = True
|
||||
} ;
|
||||
Base_rr_RNP x y = baseRNP (lin RNP x) (lin RNP y) ;
|
||||
Base_nr_RNP x y = baseRNP (fullRNP (lin NP x)) (lin RNP y) ;
|
||||
Base_rn_RNP x y = baseRNP (lin RNP x) (fullRNP (lin NP y)) ;
|
||||
Cons_rr_RNP x xs = consRNP (lin RNP x) (lin RNPList xs) ;
|
||||
Cons_nr_RNP x xs = consRNP (fullRNP (lin NP x)) (lin RNPList xs) ;
|
||||
ConjRNP conj xs = boundNPForms (\\a => npForms
|
||||
(\\c => conj.s1 ++ xs.s1 ! a ! c ++ conj.s2 ++ xs.s2 ! a ! c)
|
||||
(\\c => conj.s1 ++ xs.prep1 ! a ! c ++ conj.s2 ++ xs.prep2 ! a ! c)) ** {
|
||||
m = xs.m ; isPron = False
|
||||
} ;
|
||||
|
||||
oper
|
||||
BoundNPForms : Type = {
|
||||
s,prep,before,prepBefore : Agr => Case => Str ; after : Agr => Str
|
||||
} ;
|
||||
-- Placement uses the same NP operations at each antecedent agreement.
|
||||
boundNPForms : (Agr => NPForms) -> BoundNPForms = \forms -> {
|
||||
s = \\a => (forms ! a).s ; prep = \\a => (forms ! a).prep ;
|
||||
before = \\a => (forms ! a).before ; prepBefore = \\a => (forms ! a).prepBefore ;
|
||||
after = \\a => (forms ! a).after
|
||||
} ;
|
||||
rnpForms : RNP -> Agr -> NPForms = \rnp,a -> {
|
||||
s = rnp.s ! a ; prep = rnp.prep ! a ;
|
||||
before = rnp.before ! a ; prepBefore = rnp.prepBefore ! a ;
|
||||
after = rnp.after ! a
|
||||
} ;
|
||||
-- Ordinary NPs and possessed heads have their own modifier agreement.
|
||||
fullRNP : S.NP -> RNP = \np -> lin RNP (boundNPForms (\\_ => np) ** {
|
||||
m = FixedHead np.m ; isPron = np.isPron
|
||||
}) ;
|
||||
-- A reflexive inherits gender and number, but its own complement position
|
||||
-- selects case: pět dětí miluje sebe všechny, not sebe všech.
|
||||
rnpAgr : RNPHead -> Agr -> ModifierAgr = \head,a -> case head of {
|
||||
AntecedentHead => case a of {
|
||||
AgQuant g => Mod g Pl ; _ => modifierAgr a
|
||||
} ;
|
||||
FixedHead m => m
|
||||
} ;
|
||||
-- As for ordinary NPs, preposed modifiers agree with the first conjunct.
|
||||
baseRNP : RNP -> RNP -> RNPList = \x,y -> lin RNPList {
|
||||
s1 = x.s ; s2 = y.s ; prep1 = x.prep ; prep2 = y.prep ; m = x.m
|
||||
} ;
|
||||
consRNP : RNP -> RNPList -> RNPList = \x,xs -> xs ** {
|
||||
s1 = \\a,c => x.s ! a ! c ++ SOFT_BIND ++ "," ++ xs.s1 ! a ! c ;
|
||||
prep1 = \\a,c => x.prep ! a ! c ++ SOFT_BIND ++ "," ++ xs.prep1 ! a ! c ;
|
||||
m = x.m
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
concrete ExtraCze of ExtraCzeAbs = CatCze ** open ResCze, Prelude, (V = VerbCze) in {
|
||||
lin
|
||||
-- The adjective agrees with the subject; ordinary slash completion
|
||||
-- supplies the object's case, prepositional form and clitic placement.
|
||||
SlashV2AP v ap = (V.SlashV2a v) ** {compl = ap.pred} ;
|
||||
|
||||
-- Dative experiencer, with agreement controlled by the predicative NP.
|
||||
-- je mi pět let / jsou mi dva roky / mému synovi je pět let
|
||||
DativeCopulaCl experiencer predicate = {
|
||||
subj = case experiencer.hasClit of {True => [] ; False => experiencer.s ! Dat} ;
|
||||
clit = case experiencer.hasClit of {True => experiencer.clit ! Dat ; False => []} ;
|
||||
compl = predicate.s ! Nom ; verb = copulaVerbForms ; a = predicate.a ;
|
||||
isDrop = experiencer.hasClit ; clitPresent = experiencer.hasClit
|
||||
} ;
|
||||
|
||||
DativeCopulaQCl experiencer predicate = {
|
||||
q = predicate.s ! Nom ;
|
||||
subj = case experiencer.hasClit of {True => [] ; False => experiencer.s ! Dat} ;
|
||||
clit = case experiencer.hasClit of {True => experiencer.clit ! Dat ; False => []} ;
|
||||
compl = [] ; verb = copulaVerbForms ; a = predicate.a ;
|
||||
yesNo = False
|
||||
} ;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
-- Czech constructions beyond the portable Syntax API.
|
||||
abstract ExtraCzeAbs = Cat ** {
|
||||
fun
|
||||
-- Subject-oriented secondary adjective: mít rád (něco).
|
||||
-- The object remains open for ComplSlash or Extend.ReflRNP.
|
||||
SlashV2AP : V2 -> AP -> VPSlash ;
|
||||
-- First argument: dative experiencer. Second: nominative expression,
|
||||
-- which controls agreement: je mi pět let / jsou mi dva roky.
|
||||
DativeCopulaCl : NP -> NP -> Cl ;
|
||||
DativeCopulaQCl : NP -> IP -> QCl ;
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
concrete IdiomCze of Idiom = CatCze ** open Prelude, ResCze in {
|
||||
|
||||
lin
|
||||
ImpPl1 vp = {s = vp.verb.imppl1 ++ vp.clit ! Ag (Masc Anim) Pl P1 ++ vp.compl ! Ag (Masc Anim) Pl P1} ;
|
||||
ImpP3 np vp = {
|
||||
s = "nechť" ++ np.s ! Nom ++ vp.clit ! np.a ++
|
||||
s = "nechť" ++ vp.clit ! np.a ++
|
||||
(case np.isDrop of {True => np.clit ! Nom ; False => np.s ! Nom}) ++
|
||||
verbAgr vp.verb np.a True ++ vp.compl ! np.a
|
||||
} ;
|
||||
|
||||
@@ -10,7 +12,8 @@ lin
|
||||
subj = [] ;
|
||||
clit = vp.clit ! agr ;
|
||||
compl = vp.compl ! agr ;
|
||||
verb = vp.verb ;
|
||||
verb = vp.verb ; clitPresent = vp.clitPresent ;
|
||||
isDrop = True ;
|
||||
a = agr
|
||||
} ;
|
||||
|
||||
@@ -18,14 +21,17 @@ lin
|
||||
subj = [] ;
|
||||
clit = vp.clit ! agr ;
|
||||
compl = vp.compl ! agr ;
|
||||
verb = vp.verb ;
|
||||
verb = vp.verb ; clitPresent = vp.clitPresent ;
|
||||
isDrop = True ;
|
||||
a = agr
|
||||
} ;
|
||||
|
||||
ExistNP np = {
|
||||
clitPresent = False ;
|
||||
subj, clit = [] ;
|
||||
compl = np.s ! Nom ;
|
||||
verb = iii_kupovatVerbForms "existovat" ;
|
||||
isDrop = True ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
|
||||
+54
-20
@@ -6,6 +6,11 @@ concrete LexiconCze of Lexicon =
|
||||
in {
|
||||
|
||||
lin
|
||||
child_N = (kureN "dítě") ** {
|
||||
sgen = "dítěte" ; sdat,sloc = "dítěti" ; sins = "dítětem" ;
|
||||
pnom,pacc = "děti" ; pgen = "dětí" ; pdat = "dětem" ; ploc = "dětech" ; pins = "dětmi" ; gPl = Fem
|
||||
} ;
|
||||
year_N = (hradN "rok") ** {sgen,svoc = "roku" ; sloc = "roce" ; pgen = "let" ; pdat = "letům" ; ploc = "letech" ; pins = "lety"} ;
|
||||
boy_N = declPAN "kluk" ;
|
||||
man_N = declMUZ "muž" ;
|
||||
teacher_N = declMUZ "učitel" ;
|
||||
@@ -18,7 +23,7 @@ concrete LexiconCze of Lexicon =
|
||||
machine_N = declSTROJ "stroj" ;
|
||||
|
||||
woman_N = declZENA "žena" ;
|
||||
school_N = declZENA "škola" ; ----
|
||||
school_N = zenaN "škola" ;
|
||||
skirt_N = declRUZE "sukně";
|
||||
street_N = declRUZE "ulice" ;
|
||||
rose_N = declRUZE "růže" ;
|
||||
@@ -28,32 +33,61 @@ concrete LexiconCze of Lexicon =
|
||||
bone_N = declKOST "kost" ;
|
||||
village_N = declKOST "ves" ; ----
|
||||
|
||||
city_N = declMESTO "město" ;
|
||||
apple_N = declMESTO "jablko" ; ----
|
||||
city_N = (mestoN "město") ** {sloc = "městě"} ;
|
||||
apple_N = declMESTO "jablko" ** {pgen = "jablek" ; ploc = "jablkách"} ;
|
||||
sea_N = declMORE "moře" ;
|
||||
airport_N = declMORE "letiště" ;
|
||||
chicken_N = declKURE "kuře" ;
|
||||
house_N = declSTAVENI "stavení" ; --- building, house
|
||||
station_N = declSTAVENI "nádraží" ;
|
||||
|
||||
young_A = mkA "mladý" ;
|
||||
old_A = mkA "starý" ;
|
||||
good_A = mkA "dobrý" ;
|
||||
bad_A = mkA "špatný" ;
|
||||
beautiful_A = mkA "krásný" ;
|
||||
clean_A = mkA "čistý" ;
|
||||
dirty_A = mkA "špinavý" ;
|
||||
young_A = mkA "mladý" "mladší" ;
|
||||
old_A = mkA "starý" "starší" ;
|
||||
good_A = mkA "dobrý" "lepší" ;
|
||||
bad_A = mkA "špatný" "horší" ;
|
||||
beautiful_A = mkA "krásný" "krásnější" ;
|
||||
clean_A = mkA "čistý" "čistší" ;
|
||||
dirty_A = mkA "špinavý" "špinavější" ;
|
||||
|
||||
white_A = mkA "bílý" ;
|
||||
black_A = mkA "černý" ;
|
||||
red_A = mkA "červený" ;
|
||||
brown_A = mkA "hnědý" ;
|
||||
blue_A = mkA "modrý" ;
|
||||
green_A = mkA "zelený" ;
|
||||
yellow_A = mkA "žlutý" ;
|
||||
white_A = mkA "bílý" "bělejší" ;
|
||||
black_A = mkA "černý" "černější" ;
|
||||
red_A = mkA "červený" "červenější" ;
|
||||
brown_A = mkA "hnědý" "hnědší" ;
|
||||
blue_A = mkA "modrý" "modřejší" ;
|
||||
green_A = mkA "zelený" "zelenější" ;
|
||||
yellow_A = mkA "žlutý" "žlutější" ;
|
||||
|
||||
buy_V2 = mkV2 (iii_kupovatVerbForms "kupovat") ;
|
||||
love_V2 = mkV2 (iii_kupovatVerbForms "milovat") ;
|
||||
buy_V2 = mkV2 (kupovatV "kupovat") ;
|
||||
love_V2 = mkV2 (kupovatV "milovat") ;
|
||||
|
||||
drink_V2 = mkV2 (krytV "pít") ;
|
||||
eat_V2 = mkV2 (mkV "jíst" "jím" "jíš" "jí" "jíme" "jíte" "jedí" "jedl" "jedli" "jez" "jezme" "jezte") ;
|
||||
read_V2 = mkV2 (mkV "číst" "čtu" "čteš" "čte" "čteme" "čtete" "čtou" "četl" "četli" "čti" "čtěme" "čtěte") ;
|
||||
write_V2 = mkV2 (mkV "psát" "píši" "píšeš" "píše" "píšeme" "píšete" "píší" "psal" "psali" "piš" "pišme" "pište") ;
|
||||
wait_V2 = mkV2 (mkV "čekat" "čekám" "čekáš" "čeká" "čekáme" "čekáte" "čekají" "čekal" "čekali" "čekej" "čekejme" "čekejte") (mkPrep "na" accusative) ;
|
||||
play_V = mkV "hrát" "hraji" "hraješ" "hraje" "hrajeme" "hrajete" "hrají" "hrál" "hráli" "hraj" "hrajme" "hrajte" ;
|
||||
run_V = mkV "běžet" "běžím" "běžíš" "běží" "běžíme" "běžíte" "běží" "běžel" "běželi" "běž" "běžme" "běžte" ;
|
||||
sit_V = mkV "sedět" "sedím" "sedíš" "sedí" "sedíme" "sedíte" "sedí" "seděl" "seděli" "seď" "seďme" "seďte" ;
|
||||
sleep_V = mkV "spát" "spím" "spíš" "spí" "spíme" "spíte" "spí" "spal" "spali" "spi" "spěme" "spěte" ;
|
||||
swim_V = mkV "plavat" "plavu" "plaveš" "plave" "plaveme" "plavete" "plavou" "plaval" "plavali" "plav" "plavme" "plavte" ;
|
||||
walk_V = mkV "chodit" "chodím" "chodíš" "chodí" "chodíme" "chodíte" "chodí" "chodil" "chodili" "choď" "choďme" "choďte" ;
|
||||
go_V = mkV "jít" "jdu" "jdeš" "jde" "jdeme" "jdete" "jdou" "šel" "šli" "jdi" "jděme" "jděte" ;
|
||||
know_V2 = mkV2 (mkV "znát" "znám" "znáš" "zná" "známe" "znáte" "znají" "znal" "znali" "znej" "znejme" "znejte") ;
|
||||
know_VS = mkVS knowV ;
|
||||
know_VQ = mkVQ knowV ;
|
||||
today_Adv = mkAdv "dnes" ;
|
||||
|
||||
beer_N = mestoN "pivo" ;
|
||||
bread_N = mkN "chléb" "chleba" mascInanimate ;
|
||||
fish_N = zenaN "ryba" ;
|
||||
milk_N = (mestoN "mléko") ** {sloc = "mléce" ; ploc = "mlékách"} ;
|
||||
salt_N = (kostN "sol") ** {snom,sacc = "sůl" ; pdat = "solím" ; ploc = "solích" ; pins = "solemi"} ;
|
||||
water_N = zenaN "voda" ;
|
||||
wine_N = mestoN "víno" ;
|
||||
cold_A = mkA "studený" "studenější" ;
|
||||
warm_A = mkA "teplý" "teplejší" ;
|
||||
|
||||
oper
|
||||
knowV : V = mkV "vědět" "vím" "víš" "ví" "víme" "víte" "vědí" "věděl" "věděli" "věz" "vězme" "vězte" ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+20
-5
@@ -1,12 +1,12 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete MarkupCze of Markup = CatCze, MarkHTMLX ** open ResCze in {
|
||||
concrete MarkupCze of Markup = CatCze, MarkHTMLX ** open ResCze, Prelude 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,
|
||||
-- but clit ! Nom is the form selected by ProDrop, 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) ;
|
||||
@@ -14,12 +14,27 @@ lin
|
||||
Nom => np.clit ! Nom ;
|
||||
_ => appMark m (np.clit ! c)
|
||||
} ;
|
||||
prep = \\c => appMark m (np.prep ! c)
|
||||
prep = \\c => appMark m (np.prep ! c) ;
|
||||
-- Later predetermination can split the original marked constituent.
|
||||
before = \\c => appMark m (np.before ! c) ;
|
||||
prepBefore = \\c => appMark m (np.prepBefore ! c) ;
|
||||
-- Accept empty wrappers to avoid an NP parameter used only by markup.
|
||||
after = appMark m np.after
|
||||
} ;
|
||||
|
||||
MarkupAP m ap = ap ** {s = \\g,n,c => appMark m (ap.s ! g ! n ! c)} ;
|
||||
MarkupAP m ap = ap ** {
|
||||
s = \\g,n,c => appMark m (ap.s ! g ! n ! c) ;
|
||||
pred = \\a => appMark m (ap.pred ! a)
|
||||
} ;
|
||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||
MarkupS m s = {s = appMark m s.s} ;
|
||||
-- The complete s and fronted orders each use one wrapper. Later fronting
|
||||
-- composes separately marked clitic/body pieces; their wrappers remain
|
||||
-- separate even when the pieces become adjacent.
|
||||
MarkupS m s = s ** {
|
||||
s = appMark m s.s ; fronted = appMark m s.fronted ;
|
||||
clit = case s.clitPresent of {True => appMark m s.clit ; False => s.clit} ;
|
||||
body = appMark m s.body
|
||||
} ;
|
||||
MarkupUtt m utt = {s = appMark m utt.s} ;
|
||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||
MarkupText m txt = {s = appMark m txt.s} ;
|
||||
|
||||
@@ -5,62 +5,32 @@ oper AAnter : Ant = notYet "AAnter" ;
|
||||
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||
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 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 CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||
oper ComparA : A -> NP -> AP = notYet "ComparA" ;
|
||||
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
||||
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
||||
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
||||
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
|
||||
oper DetNP : Det -> NP = notYet "DetNP" ;
|
||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||
oper PassV2 : V2 -> VP = notYet "PassV2" ;
|
||||
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
||||
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
|
||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||
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 SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||
@@ -70,29 +40,11 @@ oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
|
||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||
oper TCond : Tense = notYet "TCond" ;
|
||||
oper TFut : Tense = notYet "TFut" ;
|
||||
oper TPast : Tense = notYet "TPast" ;
|
||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||
oper UttCard : Card -> Utt = notYet "UttCard" ;
|
||||
oper UttIAdv : IAdv -> Utt = notYet "UttIAdv" ;
|
||||
oper UttIP : IP -> Utt = notYet "UttIP" ;
|
||||
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
||||
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
||||
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
|
||||
oper UttQS : QS -> Utt = notYet "UttQS" ;
|
||||
oper UttVP : VP -> Utt = notYet "UttVP" ;
|
||||
oper by8agent_Prep : Prep = notYet "by8agent_Prep" ;
|
||||
oper it_Pron : Pron = notYet "it_Pron" ;
|
||||
oper they_Pron : Pron = notYet "they_Pron" ;
|
||||
oper we_Pron : Pron = notYet "we_Pron" ;
|
||||
oper whatSg_IP : IP = notYet "whatSg_IP" ;
|
||||
oper which_IQuant : IQuant = notYet "which_IQuant" ;
|
||||
oper whoSg_IP : IP = notYet "whoSg_IP" ;
|
||||
oper youPl_Pron : Pron = notYet "youPl_Pron" ;
|
||||
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
||||
|
||||
}
|
||||
|
||||
+62
-48
@@ -5,106 +5,120 @@ concrete NounCze of Noun =
|
||||
open ResCze, Prelude in {
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s,prep,clit = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ;
|
||||
a = numSizeAgr cn.g det.size P3 ;
|
||||
hasClit = False ;
|
||||
DetCN det cn =
|
||||
let s : Case => Str = \\c => det.s ! nounGender cn (numSizeNumber det.size) ! c ++ numSizeForm cn.s det.size c
|
||||
in npForms s s ** {
|
||||
clit = s ;
|
||||
a = numeralAgr (nounGender cn (numSizeNumber det.size)) det P3 ;
|
||||
m = numeralModAgr (nounGender cn (numSizeNumber det.size)) det ;
|
||||
hasClit = False ; isDrop = False ; isPron = False ;
|
||||
} ;
|
||||
|
||||
MassNP cn = {
|
||||
s,prep,clit = \\c => cn.s ! Sg ! c ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
MassNP cn =
|
||||
let s = cn.s ! Sg in npForms s s ** {
|
||||
clit = s ;
|
||||
a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ; isPron = False ;
|
||||
hasClit = False ; isDrop = False ;
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => num.s ! g ! c ++ quant.s ! g ! numSizeNumber num.size ! c ;
|
||||
size = num.size
|
||||
DetQuant = quantifyNumeral ;
|
||||
|
||||
OrdSuperl a = adjFormsAdjective a.superl ;
|
||||
-- With a scale head, the quantifier modifies the scale, but the following
|
||||
-- ordinal modifies the counted noun: s tímto tisícem nejlepších korun.
|
||||
DetQuantOrd quant num ord =
|
||||
let det = quantifyNumeral quant num in det ** {
|
||||
s = \\g,c => det.s ! g ! c ++
|
||||
ord.s ! g ! numSizeNumber num.size ! countCase num.size c
|
||||
} ;
|
||||
|
||||
DefArt = {s = \\_,_,_ => []} ;
|
||||
IndefArt = {s = \\_,_,_ => []} ;
|
||||
NumPl = {s = \\_,_ => [] ; size = Num2_4} ; ---- size
|
||||
NumSg = {s = \\_,_ => [] ; size = Num1} ;
|
||||
NumPl = invarDeterminer [] Num2_4 ;
|
||||
NumSg = invarDeterminer [] Num1 ;
|
||||
|
||||
UsePron pron = {
|
||||
s = table {
|
||||
Nom | Voc => pron.nom ;
|
||||
UsePron pron =
|
||||
let s : Case => Str = table {
|
||||
Nom | ResCze.Voc => pron.nom ;
|
||||
Gen => pron.gen ;
|
||||
Dat => pron.dat ;
|
||||
Acc => pron.acc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.ins
|
||||
} ;
|
||||
prep : Case => Str = table {
|
||||
Nom | ResCze.Voc => pron.nom ;
|
||||
Gen => pron.pgen ;
|
||||
Dat => pron.pdat ;
|
||||
Acc => pron.pacc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.pins
|
||||
}
|
||||
in npForms s prep ** {
|
||||
clit = table {
|
||||
Nom => pron.cnom ;
|
||||
Voc => pron.nom ;
|
||||
ResCze.Voc => pron.nom ;
|
||||
Gen => pron.cgen ;
|
||||
Dat => pron.cdat ;
|
||||
Acc => pron.cacc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.ins
|
||||
} ;
|
||||
prep = table {
|
||||
Nom | Voc => pron.nom ;
|
||||
Gen => pron.pgen ;
|
||||
Dat => pron.pdat ;
|
||||
Acc => pron.pacc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.pins
|
||||
} ;
|
||||
a = pron.a ;
|
||||
hasClit = True ;
|
||||
a = pron.a ; m = modifierAgr pron.a ;
|
||||
hasClit = True ; isDrop = pron.isDrop ; isPron = True ;
|
||||
} ;
|
||||
|
||||
PossPron pron = justDemPronFormsAdjective pron.poss ;
|
||||
|
||||
UsePN pn = {
|
||||
s,clit,prep = \\c => pn.s ! c ;
|
||||
a = Ag pn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
UsePN pn = npForms pn.s pn.s ** {
|
||||
clit = pn.s ;
|
||||
a = Ag pn.g Sg P3 ; m = Mod pn.g Sg ; isPron = False ;
|
||||
hasClit = False ; isDrop = False ;
|
||||
} ;
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
|
||||
g = cn.g
|
||||
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! nounGender cn n ! n ! c) (cn.s ! n ! c) ;
|
||||
g = cn.g ; gPl = cn.gPl
|
||||
} ;
|
||||
|
||||
RelCN cn rs = {
|
||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
|
||||
g = cn.g
|
||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag (nounGender cn n) n P3 ;
|
||||
g = cn.g ; gPl = cn.gPl
|
||||
} ;
|
||||
|
||||
AdvCN cn adv = {
|
||||
s = \\n,c => cn.s ! n ! c ++ adv.s ;
|
||||
g = cn.g
|
||||
g = cn.g ; gPl = cn.gPl
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s,clit = \\c => np.s ! c ++ adv.s ;
|
||||
prep = \\c => np.prep ! c ++ adv.s ;
|
||||
a = np.a ;
|
||||
hasClit = False ;
|
||||
AdvNP np adv =
|
||||
let forms = appendNPForms np adv.s in np ** forms ** {
|
||||
clit = forms.s ;
|
||||
hasClit = False ; isDrop = False ;
|
||||
} ;
|
||||
|
||||
UseN n = nounFormsNoun n ;
|
||||
|
||||
ApposCN cn np = {
|
||||
s = \\n,c => cn.s ! n ! c ++ np.s ! c ; ---- TODO check apposition order
|
||||
g = cn.g
|
||||
g = cn.g ; gPl = cn.gPl
|
||||
} ;
|
||||
|
||||
NumCard c = c ;
|
||||
NumDigits ds = ds ** {s = \\_,_ => ds.s} ;
|
||||
NumDecimal ds = ds ** {s = \\_,_ => ds.s} ;
|
||||
NumDigits ds = invarDeterminer ds.s ds.size ;
|
||||
NumDecimal ds = invarDeterminer ds.s ds.size ;
|
||||
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
|
||||
PredetNP pred np =
|
||||
let forms = predetNPForms (andB pred.postPron np.isPron)
|
||||
(\\c => predetForm pred np.m c) np
|
||||
in np ** forms ** {
|
||||
-- A predeterminer modifies a full NP: jen já, jen jeho. Its scope
|
||||
-- cannot be preserved by an omitted subject or an object clitic.
|
||||
clit = forms.s ;
|
||||
hasClit = False ; isDrop = False
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
+96
-99
@@ -1,102 +1,99 @@
|
||||
concrete NumeralCze of Numeral =
|
||||
concrete NumeralCze of Numeral = CatCze [Numeral,Digits,Decimal] **
|
||||
open ResCze, Prelude in {
|
||||
|
||||
CatCze [Numeral,Digits,Decimal] **
|
||||
|
||||
open
|
||||
ResCze,
|
||||
Prelude
|
||||
in {
|
||||
|
||||
-- from gf-contrib/numerals/czech.gf, added inflections
|
||||
-- AR 2020-03-20
|
||||
---- TODO ordinal forms
|
||||
|
||||
|
||||
oper LinNumeral = Determiner ; -- {s : NumeralForms ; size : NumSize} ;
|
||||
oper LinDigit = {unit : Gender => Case => Str ; teen, ten, hundred : Str ; size : NumSize} ;
|
||||
|
||||
lincat Digit = LinDigit ;
|
||||
lincat Sub10 = LinDigit ;
|
||||
|
||||
lincat Sub100 = LinNumeral ;
|
||||
lincat Sub1000 = LinNumeral ;
|
||||
lincat Sub1000000 = LinNumeral ;
|
||||
|
||||
oper mkNum : Determiner -> Str -> Str -> Str -> LinDigit =
|
||||
\dva, dvanast, dvadsat, dveste -> {
|
||||
unit = dva.s ;
|
||||
teen = dvanast + "náct" ;
|
||||
ten = dvadsat ;
|
||||
hundred = dveste ;
|
||||
size = dva.size ;
|
||||
} ;
|
||||
|
||||
oper mk2Num : Determiner -> Str -> Str -> Str -> LinDigit =
|
||||
\unit, teenbase, tenbase, hundred ->
|
||||
mkNum unit teenbase (tenbase + "cet") hundred ;
|
||||
|
||||
oper mk5Num : Str -> Str -> Str -> Str -> LinDigit =
|
||||
\unit,uniti, teenbase, tenbase ->
|
||||
mkNum (regNumeral unit uniti) teenbase (tenbase + "desát") (unit ++ "set") ;
|
||||
|
||||
oper bigNumeral : Str -> LinNumeral = \s -> invarNumeral s ;
|
||||
|
||||
lin num x = x ;
|
||||
|
||||
lin n2 = mk2Num twoNumeral "dva" "dva" ("dvě" ++ "stě") ;
|
||||
lin n3 = mk2Num threeNumeral "tři" "tři" ("tři" ++ "sta") ;
|
||||
lin n4 = mk2Num fourNumeral "čtr" "čtyři" ("čtyři" ++ "sta") ;
|
||||
lin n5 = mk5Num "pět" "pěti" "pat" "pa" ;
|
||||
lin n6 = mk5Num "šest" "šesti" "šest" "še" ;
|
||||
lin n7 = mk5Num "sedm" "sedmi" "sedm" "sedm";
|
||||
lin n8 = mk5Num "osm" "osmi" "osm" "osm";
|
||||
lin n9 = mk5Num "devět" "devíti" "devate" "deva" ;
|
||||
|
||||
lin pot01 = {
|
||||
unit = oneNumeral.s ; hundred = "sto" ; ten = "deset" ; teen = "jedenáct" ;
|
||||
size = Num1
|
||||
} ;
|
||||
lin pot0 d = d ;
|
||||
|
||||
lin pot110 = bigNumeral "deset" ;
|
||||
lin pot111 = bigNumeral "jedenáct" ;
|
||||
lin pot1to19 d = bigNumeral d.teen ;
|
||||
|
||||
lin pot0as1 n = {s = n.unit ; size = n.size} ;
|
||||
lin pot1 d = bigNumeral d.ten ;
|
||||
lin pot1plus d e = {
|
||||
s = (invarNumeral (d.ten ++ determinerStr (e ** {s = e.unit}))).s ; ---- TODO inflection?
|
||||
size = tfSize e.size
|
||||
} ;
|
||||
---- variants { d.s ! ten ++ e.s ! unit ; glue (glue (e.s ! unit) "a") (d.s ! ten)} ; size = tfSize e.size} ;
|
||||
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 d = bigNumeral d.hundred ;
|
||||
lin pot2plus d e = {
|
||||
s = (invarNumeral (d.hundred ++ determinerStr e)).s ; ---- TODO inflection?
|
||||
size = tfSize e.size
|
||||
} ;
|
||||
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = bigNumeral (mkTh (determinerStr n) n.size) ;
|
||||
|
||||
lin pot3plus n m = {
|
||||
s = (invarNumeral (mkTh (determinerStr n) n.size ++ determinerStr m)).s ; ---- TODO inflection?
|
||||
size = tfSize m.size
|
||||
} ;
|
||||
|
||||
oper tfSize : NumSize -> NumSize = \sz ->
|
||||
table {Num1 => Num5 ; other => other} ! sz ;
|
||||
|
||||
oper mkTh : Str -> NumSize -> Str = \attr,size ->
|
||||
case size of {
|
||||
Num1 => "tisíc" ;
|
||||
Num2_4 => attr ++ "tisíce" ;
|
||||
Num5 => attr ++ "tisíc"
|
||||
-- Keep inflection until the numeral receives its case. Compounds ending in
|
||||
-- units or tens use quantified agreement: mých dvacet jedna stromů, dvacet dva dětí.
|
||||
-- Agreement with the final unit does not compose with possessive modifiers.
|
||||
-- See https://www.czechency.org/slovnik/ČÍSLOVKA.
|
||||
oper
|
||||
-- Only units vary in count agreement. Keeping four full Determiners here
|
||||
-- would create a product of independent agreement states during compilation.
|
||||
LinDigit : Type = {unit : Determiner ; teen,ten,hundred : Gender => Case => Str} ;
|
||||
digit : Determiner -> Str -> Str -> Str -> LinDigit = \u,teen,ten,hundred -> {
|
||||
unit = u ; teen = (regNumeral teen (teen + "i")).s ;
|
||||
ten = (regNumeral ten (ten + "i")).s ;
|
||||
hundred = \\_,c => case c of {Nom|Acc|ResCze.Voc => hundred ; _ => (scale QuantifiedScale u hundredN).s ! Neutr ! c}
|
||||
} ;
|
||||
counted : (Gender => Case => Str) -> Determiner = \s -> {
|
||||
s = s ; size = Num5 ; head = CountedHead
|
||||
} ;
|
||||
hundreds : LinDigit -> Determiner = \d -> {
|
||||
s = d.hundred ; size = NumScale ; head = ScaleHead Neutr d.unit.size QuantifiedScale
|
||||
} ;
|
||||
plus : Determiner -> Determiner -> Determiner = \a,b -> {
|
||||
-- Compound jedna stays fixed even in oblique cases; dva inflects but
|
||||
-- does not vary with the counted noun's gender (CEG 6.1.5--6.1.6).
|
||||
s = \\g,c => a.s ! g ! c ++ case b.size of {
|
||||
Num1 => b.s ! Fem ! Nom ; _ => b.s ! Masc Inanim ! c
|
||||
} ;
|
||||
-- A final scale still governs genitive in every case; other compound
|
||||
-- tails take ordinary quantified agreement, including final 1--4.
|
||||
size = case b.size of {NumScale => NumScale ; _ => Num5} ;
|
||||
-- Sums ending in a scale retain the leading scale's agreement head:
|
||||
-- tyto dva tisíce dvě stě korun, not tato dva tisíce dvě stě korun.
|
||||
head = case b.size of {NumScale => a.head ; _ => CountedHead}
|
||||
} ;
|
||||
scale : ScaleAgreement -> Determiner -> Noun -> Determiner = \agr,d,n -> {
|
||||
s = \\_,c => d.s ! n.g ! c ++ numSizeForm n.s d.size c ; size = NumScale ;
|
||||
head = case d.head of {CountedHead => ScaleHead n.g d.size agr ; h => h}
|
||||
} ;
|
||||
bareScale : ScaleAgreement -> Noun -> Determiner = \agr,n -> {
|
||||
s = \\_,c => n.s ! Sg ! c ; size = NumScale ; head = ScaleHead n.g Num1 agr
|
||||
} ;
|
||||
decimalScale : ScaleAgreement -> {s : Str ; size : NumSize ; hasDot : Bool} -> Noun -> Determiner = \agr,d,n -> {
|
||||
s = \\_,c => d.s ++ case d.hasDot of {
|
||||
True => n.s ! Sg ! Gen ; False => numSizeForm n.s d.size c
|
||||
} ; size = NumScale ; head = ScaleHead n.g d.size agr
|
||||
} ;
|
||||
hundredN : Noun = nounFormsNoun ((declMESTO "sto") ** {pgen = "set" ; pdat = "stům" ; ploc = "stech"}) ;
|
||||
thousandN : Noun = nounFormsNoun ((declSTROJ "tisíc") ** {pgen = "tisíc"}) ;
|
||||
millionN : Noun = nounFormsNoun (declHRAD "milion") ;
|
||||
billionN : Noun = nounFormsNoun (declZENA "miliarda") ;
|
||||
|
||||
oper determinerStr : Determiner -> Str = \d -> d.s ! Masc Anim ! Nom ;
|
||||
|
||||
lincat
|
||||
Digit,Sub10 = LinDigit ;
|
||||
Sub100,Sub1000,Sub1000000,Sub1000000000,Sub1000000000000 = Determiner ;
|
||||
lin
|
||||
num x = x ;
|
||||
n2 = digit twoNumeral "dvanáct" "dvacet" "dvě stě" ;
|
||||
n3 = digit threeNumeral "třináct" "třicet" "tři sta" ;
|
||||
n4 = digit fourNumeral "čtrnáct" "čtyřicet" "čtyři sta" ;
|
||||
n5 = digit (regNumeral "pět" "pěti") "patnáct" "padesát" "pět set" ;
|
||||
n6 = digit (regNumeral "šest" "šesti") "šestnáct" "šedesát" "šest set" ;
|
||||
n7 = digit (regNumeral "sedm" "sedmi") "sedmnáct" "sedmdesát" "sedm set" ;
|
||||
n8 = digit (regNumeral "osm" "osmi") "osmnáct" "osmdesát" "osm set" ;
|
||||
n9 = digit (regNumeral "devět" "devíti") "devatenáct" "devadesát" "devět set" ;
|
||||
pot01 = {unit = oneNumeral ; teen = (regNumeral "jedenáct" "jedenácti").s ;
|
||||
ten = (regNumeral "deset" "deseti").s ; hundred = (bareScale QuantifiedScale hundredN).s} ;
|
||||
pot0 d = d ;
|
||||
pot0as1 d = d.unit ;
|
||||
pot110 = regNumeral "deset" "deseti" ;
|
||||
pot111 = regNumeral "jedenáct" "jedenácti" ;
|
||||
pot1to19 d = counted d.teen ;
|
||||
pot1 d = counted d.ten ;
|
||||
pot1plus d e = plus (counted d.ten) e.unit ;
|
||||
pot1as2 n = n ;
|
||||
pot21 = bareScale QuantifiedScale hundredN ;
|
||||
pot2 d = hundreds d ;
|
||||
pot2plus d e = plus (hundreds d) e ;
|
||||
pot2as3 n = n ;
|
||||
-- Generation default: hundreds/thousands take quantified agreement.
|
||||
-- Tisíc also admits nominal agreement; the noun's declension is independent.
|
||||
pot31 = bareScale QuantifiedScale thousandN ;
|
||||
pot3 n = scale QuantifiedScale n thousandN ;
|
||||
pot3plus n m = plus (scale QuantifiedScale n thousandN) m ;
|
||||
pot3as4 n = n ;
|
||||
pot3decimal d = decimalScale QuantifiedScale d thousandN ;
|
||||
-- Millions/billions instead agree with their nominal head (dva miliony jsou).
|
||||
pot41 = bareScale NominalScale millionN ;
|
||||
pot4 n = scale NominalScale n millionN ;
|
||||
pot4plus n m = plus (scale NominalScale n millionN) m ;
|
||||
pot4as5 n = n ;
|
||||
pot4decimal d = decimalScale NominalScale d millionN ;
|
||||
pot51 = bareScale NominalScale billionN ;
|
||||
pot5 n = scale NominalScale n billionN ;
|
||||
pot5plus n m = plus (scale NominalScale n billionN) m ;
|
||||
pot5decimal d = decimalScale NominalScale d billionN ;
|
||||
|
||||
-- -- Numerals as sequences of digits have a separate, simpler grammar
|
||||
lincat Dig = {s:Str ; size : NumSize} ;
|
||||
@@ -106,7 +103,7 @@ oper determinerStr : Determiner -> Str = \d -> d.s ! Masc Anim ! Nom ;
|
||||
|
||||
IIDig d dd = {s = d.s ++ Predef.BIND ++ dd.s ; size = Num5} ; ---- leading zeros ??
|
||||
|
||||
D_0 = { s = "0" ; size = Num1} ; ---- ??
|
||||
D_0 = { s = "0" ; size = Num5} ;
|
||||
D_1 = { s = "1" ; size = Num1} ;
|
||||
D_2 = { s = "2" ; size = Num2_4} ;
|
||||
D_3 = { s = "3" ; size = Num2_4} ;
|
||||
@@ -120,12 +117,12 @@ oper determinerStr : Determiner -> Str = \d -> d.s ! Masc Anim ! Nom ;
|
||||
PosDecimal d = d ** {hasDot=False} ;
|
||||
NegDecimal d = {
|
||||
s = "-" ++ Predef.BIND ++ d.s ;
|
||||
size = Num5 ;
|
||||
size = d.size ;
|
||||
hasDot=False
|
||||
} ;
|
||||
IFrac d i = {
|
||||
s = d.s ++
|
||||
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
|
||||
if_then_Str d.hasDot BIND (BIND++","++BIND) ++
|
||||
i.s ;
|
||||
size = Num5 ;
|
||||
hasDot=True
|
||||
|
||||
+106
-21
@@ -40,10 +40,19 @@ oper
|
||||
mkN = overload {
|
||||
mkN : (nom : Str) -> N
|
||||
= \nom -> lin N (guessNounForms nom) ;
|
||||
-- Select a default paradigm; mixed endings and stem alternations may
|
||||
-- still need lexical overrides on the result.
|
||||
mkN : (nom,gen : Str) -> Gender -> N
|
||||
= \nom,gen,g -> lin N (declensionNounForms nom gen g) ;
|
||||
} ;
|
||||
|
||||
mkPN = overload {
|
||||
-- Indeclinable name: every case uses the supplied string.
|
||||
mkPN : Str -> Gender -> PN = \s,g -> lin PN {s = \\_ => s ; g = g} ;
|
||||
-- Inflected name: use the noun paradigm's singular cases and gender.
|
||||
mkPN : N -> PN = \n -> lin PN {s = (nounFormsNoun n).s ! Sg ; g = n.g} ;
|
||||
} ;
|
||||
|
||||
-- The following standard declensions can be used with good accuracy.
|
||||
-- However, they have some defaults that may have to be overwritten.
|
||||
-- This can be done easily by overriding those formes with record extension (**).
|
||||
@@ -81,31 +90,47 @@ oper
|
||||
-- The full definition of the noun record is
|
||||
-- {
|
||||
-- snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ;
|
||||
-- g : Gender
|
||||
-- g,gPl : Gender
|
||||
-- }
|
||||
|
||||
|
||||
---------------------
|
||||
-- Adjectives
|
||||
|
||||
-- Only positive forms so far ----
|
||||
-- Guess regular comparison; supply a principal part for exceptions, or
|
||||
-- nonExist as the comparative for a positive-only adjective.
|
||||
|
||||
mkA = overload {
|
||||
mkA : Str -> A
|
||||
= \s -> lin A (guessAdjForms s) ;
|
||||
= \s -> lin A (degreeAdjForms s (guessComparative s)) ;
|
||||
mkA : (positive,comparative : Str) -> A
|
||||
= \p,c -> lin A (degreeAdjForms p c) ;
|
||||
} ;
|
||||
|
||||
-- Declension constructors supply positive forms only.
|
||||
mladyA : Str -> A
|
||||
= \s -> lin A (mladyAdjForms s) ;
|
||||
= \s -> lin A (positiveAdj (mladyAdjForms s)) ;
|
||||
jarniA : Str -> A
|
||||
= \s -> lin A (jarniAdjForms s) ;
|
||||
= \s -> lin A (positiveAdj (jarniAdjForms s)) ;
|
||||
otcuvA : Str -> A
|
||||
= \s -> lin A (otcuvAdjForms s) ;
|
||||
= \s -> lin A (positiveAdj (otcuvAdjForms s)) ;
|
||||
matcinA : Str -> A
|
||||
= \s -> lin A (matcinAdjForms s) ;
|
||||
= \s -> lin A (positiveAdj (matcinAdjForms s)) ;
|
||||
|
||||
invarA : Str -> A
|
||||
= \s -> lin A (invarAdjForms s) ;
|
||||
= \s -> lin A (positiveAdj (invarAdjForms s)) ;
|
||||
|
||||
-- Short adjectives supply predicates, not attributive AP forms.
|
||||
shortAP : (m,f,n,mp,fp,np : Str) -> AP = \m,f,n,mp,fp,np ->
|
||||
let ap : Adjective = {
|
||||
s = \\g,num,c => case <num,c,g> of {
|
||||
<Sg,Nom|ResCze.Voc,Masc _> => m ; <Sg,Nom|ResCze.Voc,Fem> => f ; <Sg,Nom|ResCze.Voc,Neutr> => n ;
|
||||
<Pl,Nom|ResCze.Voc,Masc Anim> => mp ; <Pl,Nom|ResCze.Voc,Neutr> => np ;
|
||||
<Pl,Nom|ResCze.Voc,_> => fp ; _ => nonExist
|
||||
}
|
||||
} in lin AP {
|
||||
s = \\_,_,_ => nonExist ; pred = shortPredicate ap ; isPost = True
|
||||
} ;
|
||||
|
||||
mkA2 : A -> Prep -> A2
|
||||
= \a,p -> lin A2 (a ** {c = p}) ;
|
||||
@@ -113,21 +138,72 @@ oper
|
||||
-------------------------
|
||||
-- Verbs
|
||||
|
||||
-- Class constructors, not guesses from an arbitrary infinitive.
|
||||
-- kupovat: -ovat, -uji, -oval, -uj; kryt: -ýt/-ít, -yji/-iji, -yl/-il.
|
||||
kupovatV : Str -> V = \s -> lin V (iii_kupovatVerbForms s) ;
|
||||
krytV : Str -> V = \s -> lin V (iii_krýtVerbForms s) ;
|
||||
|
||||
-- Full present and imperative forms, with masculine singular/plural past
|
||||
-- participles. Keep this twelve-field input compatible as VerbForms grows.
|
||||
-- Storing past participles does not yet implement past-tense clauses.
|
||||
VerbPrincipalParts : Type = PositiveVerbForms ;
|
||||
|
||||
mkV = overload {
|
||||
mkV : VerbPrincipalParts -> V = \v -> lin V (withNeg v) ;
|
||||
mkV : (inf,p1sg,p2sg,p3sg,p1pl,p2pl,p3pl,pastsg,pastpl,imp2sg,imp1pl,imp2pl : Str) -> V =
|
||||
\inf,p1sg,p2sg,p3sg,p1pl,p2pl,p3pl,pastsg,pastpl,imp2sg,imp1pl,imp2pl -> lin V (withNeg {
|
||||
inf = inf ; pressg1 = p1sg ; pressg2 = p2sg ; pressg3 = p3sg ;
|
||||
prespl1 = p1pl ; prespl2 = p2pl ; prespl3 = p3pl ;
|
||||
pastpartsg = pastsg ; pastpartpl = pastpl ;
|
||||
impsg2 = imp2sg ; imppl1 = imp1pl ; imppl2 = imp2pl
|
||||
}) ;
|
||||
} ;
|
||||
|
||||
-- Lexical reflexive clitics. The case-based interface accepts only Acc/Dat.
|
||||
seV : V -> V = \v -> reflV v Acc ;
|
||||
siV : V -> V = \v -> reflV v Dat ;
|
||||
reflV : V -> Case -> V = \v,c -> v ** {
|
||||
isRefl = True ; refl = case c of {Acc => "se" ; Dat => "si" ; _ => nonExist}
|
||||
} ;
|
||||
|
||||
mkVS : V -> VS = \v -> lin VS v ;
|
||||
mkVQ : V -> VQ = \v -> lin VQ v ;
|
||||
-- Ordinary VV: the infinitive retains its own clitic domain.
|
||||
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False}) ;
|
||||
-- Modals allow their infinitive's clitics in the finite clause. A lexical
|
||||
-- reflexive on the matrix verb blocks this climbing.
|
||||
mkModalVV : V -> VV = \v -> lin VV (v ** {isAux = notB v.isRefl}) ;
|
||||
-- Third-person singular gender selects personal and possessive forms.
|
||||
-- A no-op keeps lexical overrides; conversion uses the standard target forms.
|
||||
genderPron : Gender -> Pron -> Pron = \g,p -> case p.a of {
|
||||
Ag old Sg P3 => case <g,old> of {
|
||||
<Fem,Fem> | <Neutr,Neutr> |
|
||||
<Masc Anim,Masc Anim> | <Masc Inanim,Masc Inanim> => p ;
|
||||
_ => lin Pron ((mkPron (Ag g Sg P3)) ** {isDrop = p.isDrop})
|
||||
} ;
|
||||
_ => p ** {
|
||||
a = case p.a of {Ag _ n person => Ag g n person ; AgPol _ => AgPol g ; AgQuant _ => AgQuant g} ;
|
||||
nom = case p.a of {
|
||||
Ag _ Pl P3 => (personalPron (Ag g Pl P3)).nom ; _ => p.nom
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : VerbForms -> VerbForms ** {c : ComplementCase}
|
||||
= \vf -> vf ** {c = {s = [] ; c = Acc ; hasPrep = False}} ;
|
||||
mkV2 : VerbForms -> Case -> VerbForms ** {c : ComplementCase}
|
||||
= \vf,c -> vf ** {c = {s = [] ; c = c ; hasPrep = False}} ;
|
||||
mkV2 : VerbForms -> ComplementCase -> VerbForms ** {c : ComplementCase}
|
||||
= \vf,c -> vf ** {c = c} ;
|
||||
mkV2 : V -> V2
|
||||
= \v -> lin V2 (v ** {c = {s = [] ; c = Acc ; hasPrep = False}}) ;
|
||||
mkV2 : V -> Case -> V2
|
||||
= \v,c -> lin V2 (v ** {c = {s = [] ; c = c ; hasPrep = False}}) ;
|
||||
mkV2 : V -> Prep -> V2
|
||||
= \v,p -> lin V2 (v ** {c = p}) ;
|
||||
} ;
|
||||
|
||||
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} ;
|
||||
mkV3 : V -> V3
|
||||
= \v -> lin V3 (v ** {c = {s = [] ; c = Acc ; hasPrep = False} ;
|
||||
c2 = {s = [] ; c = Dat ; hasPrep = False}}) ;
|
||||
mkV3 : V -> Prep -> Prep -> V3
|
||||
= \v,p,p2 -> lin V3 (v ** {c = p ; c2 = p2}) ;
|
||||
} ;
|
||||
|
||||
------------------------
|
||||
@@ -139,8 +215,17 @@ oper
|
||||
mkAdv : Str -> Adv
|
||||
= \s -> lin Adv {s = s} ;
|
||||
|
||||
mkPrep : Str -> Case -> Prep
|
||||
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ; ---- True if s /= ""
|
||||
mkPrep = overload {
|
||||
-- Bare case government: use this instead of mkPrep "" c.
|
||||
mkPrep : Case -> Prep
|
||||
= \c -> lin Prep {s = [] ; c = c ; hasPrep = False} ;
|
||||
-- Overt preposition, possibly with token-dependent allomorphs.
|
||||
mkPrep : Str -> Case -> Prep
|
||||
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ;
|
||||
} ;
|
||||
|
||||
-- The same vocalization applies to locative and accusative v.
|
||||
v_Prep : Case -> Prep = \c -> mkPrep vPreposition c ;
|
||||
|
||||
mkConj : Str -> Conj
|
||||
= \s -> lin Conj {s1 = [] ; s2 = s} ;
|
||||
|
||||
+15
-7
@@ -1,16 +1,24 @@
|
||||
concrete PhraseCze of Phrase = CatCze ** open Prelude, ResCze in {
|
||||
|
||||
lin
|
||||
UttS s = s ;
|
||||
UttS s = {s = s.s} ;
|
||||
UttQS q = {s = q.s} ;
|
||||
UttIAdv a = a ;
|
||||
UttIP ip = {s = ip.s ! Nom} ;
|
||||
-- Choose feminine forms for simple units (jedna, dvě). Compounds use
|
||||
-- their own gender-independent forms (dvacet jedna, dvacet dva).
|
||||
UttCard c = {s = c.s ! Fem ! Nom} ;
|
||||
UttAdv adv = adv ;
|
||||
UttCN cn = {s = cn.s ! Sg ! Nom} ;
|
||||
UttAP ap = {s = ap.s ! Masc Anim ! Sg ! Nom} ;
|
||||
UttAP ap = {s = ap.pred ! Ag (Masc Anim) Sg P3} ;
|
||||
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} ;
|
||||
UttVP vp = let agr = Ag Neutr Sg P3 in {s = vp.verb.inf ++ vp.clit ! agr ++ 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} ;
|
||||
-- pol.p selects the verb form; empty pol.s retains the Pol constituent.
|
||||
-- Without it, parsing "nečti ji" recovers UttImpSg ?1 instead of PNeg.
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Ag (Masc Anim) Sg P2} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Ag (Masc Anim) Pl P2} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! AgPol (Masc Anim)} ;
|
||||
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
@@ -19,6 +27,6 @@ lin
|
||||
PConjConj conj = {s = conj.s2} ;
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = np.s ! Voc} ;
|
||||
VocNP np = {s = np.s ! ResCze.Voc} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
concrete QuestionCze of Question = CatCze **
|
||||
open ResCze, Prelude in {
|
||||
|
||||
concrete QuestionCze of Question = CatCze ** open ResCze, Prelude in {
|
||||
lin
|
||||
QuestCl cl = cl ; ----
|
||||
|
||||
QuestIAdv iadv cl = cl ** {clit = iadv.s ++ cl.clit} ;
|
||||
|
||||
QuestCl cl = cl ** {q = [] ; yesNo = True} ;
|
||||
QuestIAdv adv cl = cl ** {q = adv.s ; yesNo = False} ;
|
||||
QuestIComp comp np = {
|
||||
q = comp.s ; subj = case np.isDrop of {True => np.clit ! Nom ; False => np.s ! Nom} ;
|
||||
clit,compl = [] ; verb = copulaVerbForms ; a = np.a ; yesNo = False
|
||||
} ;
|
||||
QuestVP ip vp = {
|
||||
q = ip.s ! Nom ; subj = [] ; clit = vp.clit ! ip.a ;
|
||||
compl = vp.compl ! ip.a ; verb = vp.verb ; a = ip.a ; yesNo = False
|
||||
} ;
|
||||
CompIAdv adv = adv ;
|
||||
CompIP ip = {s = ip.s ! Nom} ;
|
||||
IdetCN det cn = {
|
||||
s = \\c => det.s ! nounGender cn (numSizeNumber det.size) ! c ++ numSizeForm cn.s det.size c ;
|
||||
a = numeralAgr (nounGender cn (numSizeNumber det.size)) det P3
|
||||
} ;
|
||||
IdetIP det = {s = \\c => det.s ! Neutr ! c ; a = numeralAgr Neutr det P3} ;
|
||||
IdetQuant = quantifyNumeral ;
|
||||
PrepIP p ip = {s = p.s ++ ip.s ! p.c} ;
|
||||
AdvIP ip adv = ip ** {s = \\c => ip.s ! c ++ adv.s} ;
|
||||
AdvIAdv a b = {s = a.s ++ b.s} ;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ lin
|
||||
subj =
|
||||
let rel = (adjFormsAdjective rp).s
|
||||
in \\a => case a of {
|
||||
Ag g n _ => rel ! g ! n ! Nom
|
||||
}
|
||||
Ag g n _ => rel ! g ! n ! Nom ; AgPol g => rel ! g ! Sg ! Nom ; AgQuant g => rel ! g ! Pl ! Nom
|
||||
}
|
||||
} ;
|
||||
|
||||
IdRP = mkA "který" ;
|
||||
|
||||
IdRP = guessAdjForms "který" ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+365
-121
@@ -17,7 +17,7 @@ param
|
||||
|
||||
Person = P1 | P2 | P3 ;
|
||||
|
||||
Agr = Ag Gender Number Person ;
|
||||
Agr = Ag Gender Number Person | AgPol Gender | AgQuant Gender ; -- polite singular: plural verb, singular predicate
|
||||
|
||||
CTense = CTPres | CTPast ; ----- TODO complete the tense system to match Czech verb morphology
|
||||
|
||||
@@ -71,12 +71,28 @@ oper
|
||||
_ => init (addI s) + "í"
|
||||
} ;
|
||||
|
||||
-- Before i/í/ě the vowel letter carries the dental's palatalization.
|
||||
dentalStem : Str -> Str = \s -> case s of {
|
||||
stem + "ň" => stem + "n" ; stem + "ť" => stem + "t" ;
|
||||
stem + "ď" => stem + "d" ; _ => s
|
||||
} ;
|
||||
|
||||
-- The žena ending is spelled i after a soft consonant, otherwise y.
|
||||
addY : Str -> Str = \s -> case s of {
|
||||
_ + #softConsonant => dentalStem s + "i" ; _ => s + "y"
|
||||
} ;
|
||||
|
||||
-- 3.4.10, in particular when also final 'a' is dropped
|
||||
addE : Str -> Str = \s -> case s of {
|
||||
re + "k" => re + "ce" ;
|
||||
pra + ("g"|"h") => pra + "ze" ;
|
||||
stre + "ch" => stre + "še" ;
|
||||
sest + "r" => sest + "ře" ;
|
||||
stem + "l" => stem + "le" ;
|
||||
stem + "z" => stem + "ze" ;
|
||||
stem + "s" => stem + "se" ;
|
||||
_ + ("ň"|"ť"|"ď") => dentalStem s + "ě" ;
|
||||
_ + #softConsonant => s + "e" ;
|
||||
pan => pan + "ě"
|
||||
} ;
|
||||
|
||||
@@ -106,12 +122,12 @@ oper
|
||||
|
||||
-- so this is the lincat of N
|
||||
|
||||
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ; g : Gender} ;
|
||||
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ; g,gPl : Gender} ;
|
||||
|
||||
-- But traditional tables make agreement easier to handle in syntax
|
||||
-- so this is the lincat of CN
|
||||
|
||||
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
|
||||
Noun : Type = {s : Number => Case => Str ; g,gPl : Gender} ;
|
||||
|
||||
-- this is used in UseN
|
||||
|
||||
@@ -136,7 +152,7 @@ oper
|
||||
Ins => forms.pins
|
||||
}
|
||||
} ;
|
||||
g = forms.g
|
||||
g = forms.g ; gPl = forms.gPl
|
||||
} ;
|
||||
|
||||
-- terminology of CEG
|
||||
@@ -209,7 +225,7 @@ oper
|
||||
pdat = pan + "ům" ;
|
||||
pacc,pins = pan + "y" ;
|
||||
ploc = addEch pan ;
|
||||
g = Masc Anim
|
||||
g,gPl = Masc Anim
|
||||
} ;
|
||||
|
||||
declPREDSEDA : DeclensionType = \predseda -> --- 3.5.4: sgen y/i
|
||||
@@ -231,7 +247,7 @@ oper
|
||||
pdat = predsed + "ům" ;
|
||||
pacc,pins = predsed + "y" ;
|
||||
ploc = addEch predsed ;
|
||||
g = Masc Anim
|
||||
g,gPl = Masc Anim
|
||||
} ;
|
||||
|
||||
-- the oblique stem is a separate argument, because it cannot always be
|
||||
@@ -248,7 +264,7 @@ oper
|
||||
pgen = hrd + "ů" ;
|
||||
pdat = hrd + "ům" ;
|
||||
ploc = addEch hrd ;
|
||||
g = Masc Inanim
|
||||
g,gPl = Masc Inanim
|
||||
} ;
|
||||
|
||||
declHRAD : DeclensionType = \hrad -> --- 3.5.2: sloc u/ě/e extra arg, sport-u, hrad-ě ; sgen u/a
|
||||
@@ -259,18 +275,18 @@ oper
|
||||
in
|
||||
{
|
||||
snom = zena ;
|
||||
sgen = zen + "y" ; --- i after soft cons sometimes
|
||||
sdat,sloc = zen + "ě" ; --- i after soft cons sometimes ; skol+e
|
||||
sgen = addY zen ;
|
||||
sdat,sloc = addE zen ;
|
||||
sacc = zen + "u" ;
|
||||
svoc = shortenVowel zen + "o" ; ---- shorten ?
|
||||
sins = zen + "ou" ;
|
||||
|
||||
pnom,pacc = zen + "y" ; --- also sgen
|
||||
pnom,pacc = addY zen ;
|
||||
pgen = zen ; --- sometimes with vowel shortening
|
||||
pdat = zen + "ám" ;
|
||||
ploc = zen + "ách" ;
|
||||
pins = zen + "ami" ;
|
||||
g = Fem
|
||||
g,gPl = Fem
|
||||
} ;
|
||||
|
||||
declMESTO : DeclensionType = \mesto -> --- 3.7.1 sloc u/e ; pgen vowel shortening sometimes ; ploc variations
|
||||
@@ -288,7 +304,7 @@ oper
|
||||
pdat = mest + "ům" ;
|
||||
ploc = mest + "ech" ; --- with variations
|
||||
pins = mest + "y" ;
|
||||
g = Neutr
|
||||
g,gPl = Neutr
|
||||
} ;
|
||||
|
||||
-- Latin masculines in -us: the ending is dropped outside the nominative
|
||||
@@ -301,7 +317,7 @@ oper
|
||||
} ;
|
||||
|
||||
declLATINUSA : DeclensionType = \genius ->
|
||||
declLATINUS genius ** {g = Masc Anim} ;
|
||||
declLATINUS genius ** {g,gPl = Masc Anim} ;
|
||||
|
||||
-- Latin neuters in -um: the ending is dropped outside the nominative
|
||||
-- (kontinuum - kontinua), otherwise they follow město
|
||||
@@ -324,7 +340,7 @@ oper
|
||||
pdat = schemat + "ům" ;
|
||||
ploc = schemat + "ech" ;
|
||||
pins = schemat + "y" ;
|
||||
g = Neutr
|
||||
g,gPl = Neutr
|
||||
} ;
|
||||
|
||||
-- the hrad type with genitive -a instead of -u (les - lesa, zákon - zákona)
|
||||
@@ -347,7 +363,7 @@ oper
|
||||
pgen,ploc = a.pgen ;
|
||||
pdat = a.msins ;
|
||||
pins = a.pins ;
|
||||
g = Fem
|
||||
g,gPl = Fem
|
||||
} ;
|
||||
|
||||
declADJM : DeclensionType = \nulty ->
|
||||
@@ -362,14 +378,14 @@ oper
|
||||
pgen,ploc = a.pgen ;
|
||||
pdat = a.msins ;
|
||||
pins = a.pins ;
|
||||
g = Masc Inanim
|
||||
g,gPl = 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
|
||||
g,gPl = g
|
||||
} ;
|
||||
|
||||
declMUZ : DeclensionType = \muz_ -> --- 3.5.3 : sdat,sloc ; pnom
|
||||
@@ -395,7 +411,7 @@ oper
|
||||
pdat = muz + "ům" ;
|
||||
ploc = muz + "ích" ;
|
||||
pins = muz + "i" ;
|
||||
g = Masc Anim
|
||||
g,gPl = Masc Anim
|
||||
} ;
|
||||
|
||||
declSOUDCE : DeclensionType = \soudce -> --- 3.5.3: sdat/sloc i,ovi ; pnom i/ové
|
||||
@@ -412,7 +428,7 @@ oper
|
||||
pacc = soudce ;
|
||||
ploc = soudc + "ích" ;
|
||||
pins = soudc + "i" ;
|
||||
g = Masc Anim
|
||||
g,gPl = Masc Anim
|
||||
} ;
|
||||
|
||||
declSTROJ : DeclensionType = \stroj ->
|
||||
@@ -427,7 +443,7 @@ oper
|
||||
pdat = stroj + "ům" ;
|
||||
ploc = stroj + "ích" ;
|
||||
pins = stroj + "i" ;
|
||||
g = Masc Inanim
|
||||
g,gPl = Masc Inanim
|
||||
} ;
|
||||
|
||||
declRUZE : DeclensionType = \ruze -> --- 3.6.2: pgen ulice-ulic, chvile-cvil
|
||||
@@ -443,11 +459,11 @@ oper
|
||||
pdat = ruz + "ím" ;
|
||||
ploc = ruz + "ích" ;
|
||||
pins = ruz + "emi" ;
|
||||
g = Fem
|
||||
g,gPl = Fem
|
||||
} ;
|
||||
|
||||
declPISEN : DeclensionType = \pisen ->
|
||||
let pisn = dropFleetingE pisen
|
||||
let pisn = dentalStem (dropFleetingE pisen)
|
||||
in
|
||||
{
|
||||
snom,sacc = pisen ;
|
||||
@@ -460,21 +476,23 @@ oper
|
||||
pdat = pisn + "ím" ;
|
||||
ploc = pisn + "ích" ;
|
||||
pins = pisn + "ěmi" ;
|
||||
g = Fem
|
||||
g,gPl = Fem
|
||||
} ;
|
||||
|
||||
declKOST : DeclensionType = \kost ->
|
||||
let stem = dentalStem kost
|
||||
in
|
||||
{
|
||||
snom,sacc = kost ;
|
||||
sgen,sdat,svoc,sloc = kost + "i" ; --- pnom,pacc
|
||||
sins = kost + "í" ; --- pgen
|
||||
sgen,sdat,svoc,sloc = stem + "i" ; --- pnom,pacc
|
||||
sins = stem + "í" ; --- pgen
|
||||
|
||||
pnom,pacc = kost + "i" ;
|
||||
pgen = kost + "í" ;
|
||||
pdat = kost + "em" ;
|
||||
ploc = kost + "ech" ;
|
||||
pnom,pacc = stem + "i" ;
|
||||
pgen = stem + "í" ;
|
||||
pdat = stem + "em" ;
|
||||
ploc = stem + "ech" ;
|
||||
pins = kost + "mi" ;
|
||||
g = Fem
|
||||
g,gPl = Fem
|
||||
} ;
|
||||
|
||||
declKURE : DeclensionType = \kure ->
|
||||
@@ -491,7 +509,7 @@ oper
|
||||
pdat = kur + "atům" ;
|
||||
ploc = kur + "atech" ;
|
||||
pins = kur + "aty" ;
|
||||
g = Neutr
|
||||
g,gPl = Neutr
|
||||
} ;
|
||||
|
||||
declMORE : DeclensionType = \more -> --- 3.7.2 pgen zero sometimes
|
||||
@@ -507,7 +525,7 @@ oper
|
||||
pdat = mor + "ím" ;
|
||||
ploc = mor + "ích" ;
|
||||
pins = mor + "i" ;
|
||||
g = Neutr
|
||||
g,gPl = Neutr
|
||||
} ;
|
||||
|
||||
declSTAVENI : DeclensionType = \staveni ->
|
||||
@@ -519,7 +537,7 @@ oper
|
||||
pdat = staveni + "m" ;
|
||||
ploc = staveni + "ch" ;
|
||||
pins = staveni + "mi" ;
|
||||
g = Neutr
|
||||
g,gPl = Neutr
|
||||
} ;
|
||||
|
||||
---------------------------
|
||||
@@ -528,8 +546,24 @@ oper
|
||||
-- to be used for AP: 56 forms for each degree
|
||||
Adjective : Type = {s : Gender => Number => Case => Str} ;
|
||||
|
||||
-- Long predicates agree with the counted noun; short predicates instead
|
||||
-- use neuter singular with a quantified subject.
|
||||
longPredicate : Adjective -> Agr => Str = \ap -> \\a => case a of {
|
||||
Ag g n _ => ap.s ! g ! n ! Nom ;
|
||||
AgPol g => ap.s ! g ! Sg ! Nom ;
|
||||
AgQuant g => ap.s ! g ! Pl ! Gen
|
||||
} ;
|
||||
shortPredicate : Adjective -> Agr => Str = \ap -> \\a => case a of {
|
||||
AgQuant _ => ap.s ! Neutr ! Sg ! Nom ;
|
||||
_ => longPredicate ap ! a
|
||||
} ;
|
||||
|
||||
-- to be used for A, in three degrees: 15 forms in each
|
||||
---- TODO other degrees than positive
|
||||
DegreeForms : Type = AdjForms ** {compar,superl : AdjForms} ;
|
||||
|
||||
positiveAdj : AdjForms -> DegreeForms = \a -> a ** {
|
||||
compar,superl = invarAdjForms nonExist
|
||||
} ;
|
||||
|
||||
AdjForms : Type = {
|
||||
msnom, fsnom, nsnom : Str ; -- svoc = snom
|
||||
@@ -585,6 +619,36 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
|
||||
} ;
|
||||
|
||||
-- Regular comparison plus common lexical exceptions. Spelling cannot
|
||||
-- determine semantic gradability or every stem alternation: callers can
|
||||
-- supply a comparative or nonExist explicitly.
|
||||
guessComparative : Str -> Str = \s -> case s of {
|
||||
"dobrý" => "lepší" ; "špatný" | "zlý" => "horší" ;
|
||||
"malý" => "menší" ; "velký" => "větší" ; "dlouhý" => "delší" ;
|
||||
"mladý" => "mladší" ; "starý" => "starší" ;
|
||||
"chudý" => "chudší" ; "tvrdý" => "tvrdší" ; "bledý" => "bledší" ;
|
||||
"bílý" => "bělejší" ; "hnědý" => "hnědší" ; "hezký" => "hezčí" ;
|
||||
stem + "cký" => stem + "čtější" ;
|
||||
stem + "ský" => stem + "štější" ;
|
||||
stem + ("ný" | "ní") => stem + "nější" ;
|
||||
stem + "lý" => stem + "lejší" ;
|
||||
stem + "rý" => stem + "řejší" ;
|
||||
stem + "vý" => stem + "vější" ;
|
||||
stem + "dý" => stem + "dější" ;
|
||||
stem + "tý" => stem + "tější" ;
|
||||
stem + "pý" => stem + "pější" ;
|
||||
stem + "bý" => stem + "bější" ;
|
||||
stem + "mý" => stem + "mější" ;
|
||||
stem + "zí" => stem + "zejší" ;
|
||||
stem + "ží" => stem + "žejší" ;
|
||||
_ => nonExist
|
||||
} ;
|
||||
|
||||
degreeAdjForms : Str -> Str -> DegreeForms = \p,c ->
|
||||
(guessAdjForms p) ** {
|
||||
compar = guessAdjForms c ; superl = guessAdjForms ("nej" + c)
|
||||
} ;
|
||||
|
||||
guessAdjForms : Str -> AdjForms = \s -> case s of {
|
||||
_ + "ý" => mladyAdjForms s ;
|
||||
_ + "í" => jarniAdjForms s ;
|
||||
@@ -652,32 +716,133 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
---------------------
|
||||
-- Verbs
|
||||
|
||||
VerbForms : Type = { ---- TODO more forms to add
|
||||
-- Public input schema of ParadigmsCze.VerbPrincipalParts. Keep existing
|
||||
-- record literals valid: derived forms belong in VerbForms; additional
|
||||
-- principal parts need a new constructor or overload.
|
||||
PositiveVerbForms : Type = {
|
||||
inf,
|
||||
impsg2, imppl1, imppl2,
|
||||
pressg1, pressg2, pressg3,
|
||||
prespl1, prespl2, prespl3,
|
||||
pastpartsg, pastpartpl,
|
||||
---- passpart,
|
||||
negpressg3 : Str -- matters only for copula
|
||||
pastpartsg, pastpartpl : Str
|
||||
} ;
|
||||
|
||||
VerbForms : Type = PositiveVerbForms ** {
|
||||
negpressg1,negpressg2,negpressg3,negprespl1,negprespl2,negprespl3,
|
||||
negimpsg2,negimppl1,negimppl2,refl : Str ; isRefl : Bool
|
||||
} ;
|
||||
|
||||
-- Prefix at lexical construction time, so ordinary spelling also parses.
|
||||
withNeg : PositiveVerbForms -> VerbForms = \v -> v ** {
|
||||
refl = [] ; isRefl = False ;
|
||||
negpressg1 = "ne" + v.pressg1 ; negpressg2 = "ne" + v.pressg2 ;
|
||||
negpressg3 = "ne" + v.pressg3 ;
|
||||
negprespl1 = "ne" + v.prespl1 ; negprespl2 = "ne" + v.prespl2 ;
|
||||
negprespl3 = "ne" + v.prespl3 ;
|
||||
negimpsg2 = "ne" + v.impsg2 ; negimppl1 = "ne" + v.imppl1 ; negimppl2 = "ne" + v.imppl2
|
||||
} ;
|
||||
|
||||
-- Vocalization depends on the next realized token, not on the noun head.
|
||||
-- These environments choose a neutral standard form; other clusters can
|
||||
-- admit stylistic variants (https://prirucka.ujc.cas.cz/?id=770).
|
||||
vPreposition : Str =
|
||||
let continuation : Str -> Strs = \p -> strs {
|
||||
p+"a"; p+"á"; p+"b"; p+"c"; p+"č"; p+"d"; p+"ď"; p+"e"; p+"é"; p+"ě";
|
||||
p+"f"; p+"g"; p+"h"; p+"i"; p+"í"; p+"j"; p+"k"; p+"l"; p+"m"; p+"n";
|
||||
p+"ň"; p+"o"; p+"ó"; p+"p"; p+"q"; p+"r"; p+"ř"; p+"s"; p+"š"; p+"t";
|
||||
p+"ť"; p+"u"; p+"ú"; p+"ů"; p+"v"; p+"w"; p+"x"; p+"y"; p+"ý"; p+"z"; p+"ž"
|
||||
} ;
|
||||
longerMe : Strs = continuation "mě" ;
|
||||
longerMeCapital : Strs = continuation "Mě"
|
||||
in pre {
|
||||
-- pre matches prefixes: apply the měst- default to derived words too,
|
||||
-- then distinguish pronoun mě from longer words such as měna and měřítko.
|
||||
"měst" | "Měst" => "ve" ;
|
||||
longerMe => "v" ;
|
||||
longerMeCapital => "v" ;
|
||||
"mlýn" | "Mlýn" => "ve" ;
|
||||
"v" | "V" | "f" | "F" | "mě" | "mně" | "mne" | "mz" | "dv" | "čt" | "tř" | "hř" => "ve" ;
|
||||
"sb" | "sc" | "sd" | "sf" | "sh" | "sk" | "sl" | "sm" | "sn" | "sp" | "st" | "sv" |
|
||||
"zb" | "zd" | "zh" | "zk" | "zl" | "zm" | "zn" | "zv" |
|
||||
"šk" | "šp" | "št" | "šv" | "Šk" | "Šp" | "Št" | "Šv" | "žd" | "žl" | "žr" => "ve" ;
|
||||
"Mě" | "Mně" | "Mne" | "Mz" | "Dv" | "Čt" | "Tř" | "Hř" | "Sb" | "Sc" | "Sd" | "Sf" | "Sh" | "Sk" | "Sl" | "Sm" | "Sn" | "Sp" | "St" | "Sv" | "Zb" | "Zd" | "Zh" | "Zk" | "Zl" | "Zm" | "Zn" | "Zv" | "Žd" | "Žl" | "Žr" => "ve" ;
|
||||
_ => "v"
|
||||
} ;
|
||||
|
||||
-- s/z share these common environments; v has a different profile.
|
||||
-- These defaults do not enumerate every lexical/style variant.
|
||||
szPreposition : Str -> Str -> Str = \bare,vocalized -> pre {
|
||||
"s" | "z" | "š" | "ž" | "mn" | "mz" | "vš" | "vs" | "vz" | "vč" | "dv" | "čt" | "tř" | "ps" |
|
||||
"S" | "Z" | "Š" | "Ž" | "Mn" | "Mz" | "Vš" | "Vs" | "Vz" | "Vč" | "Dv" | "Čt" | "Tř" | "Ps" => vocalized ;
|
||||
_ => bare
|
||||
} ;
|
||||
|
||||
sPreposition : Str = szPreposition "s" "se" ;
|
||||
zPreposition : Str = szPreposition "z" "ze" ;
|
||||
|
||||
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||
|
||||
verbAgr : VerbForms -> Agr -> Bool -> Str ---- TODO tenses
|
||||
= \vf,a,b -> case a of {
|
||||
Ag _ Sg P1 => vf.pressg1 ;
|
||||
Ag _ Sg P2 => vf.pressg2 ;
|
||||
Ag _ Sg P3 => case b of {
|
||||
True => vf.pressg3 ;
|
||||
False => vf.negpressg3 -- matters only for copula
|
||||
} ;
|
||||
Ag _ Pl P1 => vf.prespl1 ;
|
||||
Ag _ Pl P2 => vf.prespl2 ;
|
||||
Ag _ Pl P3 => vf.prespl3
|
||||
hasCliticComplement : ComplementCase -> Bool -> Bool = \p,hasClit ->
|
||||
case <hasClit,p.hasPrep,p.c> of {
|
||||
<True,False,Gen | Dat | Acc> => True ;
|
||||
_ => False
|
||||
} ;
|
||||
|
||||
copulaVerbForms : VerbForms = {
|
||||
-- Dative precedes genitive/accusative; otherwise retain argument order.
|
||||
cliticBefore : Case -> Case -> Bool = \first,second -> case <first,second> of {
|
||||
<Gen | Acc,Dat> => False ;
|
||||
_ => True
|
||||
} ;
|
||||
|
||||
-- Full complements: prepositions select n-forms, bare cases select j-forms.
|
||||
-- Clitic eligibility and placement are handled separately by the caller.
|
||||
fullComplement : ComplementCase -> (Case => Str) -> (Case => Str) -> Str =
|
||||
\p,bare,prep -> p.s ++ case p.hasPrep of {
|
||||
True => prep ! p.c ; False => bare ! p.c
|
||||
} ;
|
||||
|
||||
verbAgr : VerbForms -> Agr -> Bool -> Str
|
||||
= \vf,a,b -> case <a,b> of {
|
||||
<Ag _ Sg P1,True> => vf.pressg1 ; <Ag _ Sg P1,False> => vf.negpressg1 ;
|
||||
<Ag _ Sg P2,True> => vf.pressg2 ; <Ag _ Sg P2,False> => vf.negpressg2 ;
|
||||
<Ag _ Sg P3 | AgQuant _,True> => vf.pressg3 ; <Ag _ Sg P3 | AgQuant _,False> => vf.negpressg3 ;
|
||||
<Ag _ Pl P1,True> => vf.prespl1 ; <Ag _ Pl P1,False> => vf.negprespl1 ;
|
||||
<Ag _ Pl P2 | AgPol _,True> => vf.prespl2 ; <Ag _ Pl P2 | AgPol _,False> => vf.negprespl2 ;
|
||||
<Ag _ Pl P3,True> => vf.prespl3 ; <Ag _ Pl P3,False> => vf.negprespl3
|
||||
} ;
|
||||
|
||||
imperativeAgr : VerbForms -> Agr -> Bool -> Str = \v,a,pos -> case <a,pos> of {
|
||||
<Ag _ Sg _,True> => v.impsg2 ; <Ag _ Sg _,False> => v.negimpsg2 ;
|
||||
<Ag _ Pl P1,True> => v.imppl1 ; <Ag _ Pl P1,False> => v.negimppl1 ;
|
||||
<_,True> => v.imppl2 ; <_,False> => v.negimppl2
|
||||
} ;
|
||||
|
||||
|
||||
-- s is the ordinary order; fronted places the clitics first, ready for
|
||||
-- an external host. clit/body retain the pieces needed by further fronting.
|
||||
-- Keep complete orders as well as pieces so markup can enclose a sentence
|
||||
-- in either order without leaking the moved clitics outside its scope.
|
||||
Sentence : Type = {s,fronted,clit,body : Str ; clitPresent : Bool} ;
|
||||
sentence : Bool -> Str -> Str -> Str -> Sentence = \present,first,clit,rest -> {
|
||||
s = first ++ clit ++ rest ; fronted = clit ++ first ++ rest ;
|
||||
clit = clit ; body = first ++ rest ; clitPresent = present
|
||||
} ;
|
||||
frontSentence : Str -> Sentence -> Sentence = \first,s -> s ** {
|
||||
s = first ++ s.fronted ; fronted = s.clit ++ first ++ s.body ;
|
||||
body = first ++ s.body
|
||||
} ;
|
||||
prefixSentence : Str -> Sentence -> Sentence = \first,s -> s ** {
|
||||
s = first ++ s.s ; fronted = s.clit ++ first ++ s.body ;
|
||||
body = first ++ s.body
|
||||
} ;
|
||||
-- Appended clauses retain their own domains; only s's clitics can move.
|
||||
appendSentence : Sentence -> Str -> Sentence = \s,last -> s ** {
|
||||
s = s.s ++ last ; fronted = s.fronted ++ last ; body = s.body ++ last
|
||||
} ;
|
||||
|
||||
copulaVerbForms : VerbForms = (withNeg {
|
||||
inf = "být" ;
|
||||
impsg2 = "buď" ; imppl1 = "buďme" ; imppl2 = "buďte" ;
|
||||
pressg1 = "jsem" ;
|
||||
pressg2 = "jsi" ;
|
||||
pressg3 = "je" ;
|
||||
@@ -686,14 +851,14 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
prespl3 = "jsou" ;
|
||||
pastpartsg = "byl" ;
|
||||
pastpartpl = "byli" ;
|
||||
negpressg3 = "ní" ; -- ne is added to this
|
||||
} ;
|
||||
}) ** {negpressg3 = "není"} ;
|
||||
|
||||
haveVerbForms : VerbForms = {
|
||||
haveVerbForms : VerbForms = withNeg {
|
||||
inf = "mít" ;
|
||||
impsg2 = "měj" ; imppl1 = "mějme" ; imppl2 = "mějte" ;
|
||||
pressg1 = "mám" ;
|
||||
pressg2 = "máš" ;
|
||||
pressg3, negpressg3 = "má" ;
|
||||
pressg3 = "má" ;
|
||||
prespl1 = "máme" ;
|
||||
prespl2 = "máte" ;
|
||||
prespl3 = "mají" ;
|
||||
@@ -709,11 +874,12 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
kupo = Predef.tk 3 kupovat ;
|
||||
kupu = Predef.tk 1 kupo + "u"
|
||||
in
|
||||
{
|
||||
withNeg {
|
||||
inf = kupovat ;
|
||||
impsg2 = kupu + "j" ; imppl1 = kupu + "jme" ; imppl2 = kupu + "jte" ;
|
||||
pressg1 = kupu + "ji" ; --- kupuju
|
||||
pressg2 = kupu + "ješ" ;
|
||||
pressg3, negpressg3 = kupu + "je" ;
|
||||
pressg3 = kupu + "je" ;
|
||||
prespl1 = kupu + "jeme" ;
|
||||
prespl2 = kupu + "jete" ;
|
||||
prespl3 = kupu + "jí" ; --- kupujou
|
||||
@@ -725,11 +891,12 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
let
|
||||
kry = shortenVowel (Predef.tk 1 krýt) ;
|
||||
in
|
||||
{
|
||||
withNeg {
|
||||
inf = krýt ;
|
||||
impsg2 = kry + "j" ; imppl1 = kry + "jme" ; imppl2 = kry + "jte" ;
|
||||
pressg1 = kry + "ji" ;
|
||||
pressg2 = kry + "ješ" ;
|
||||
pressg3, negpressg3 = kry + "je" ;
|
||||
pressg3 = kry + "je" ;
|
||||
prespl1 = kry + "jeme" ;
|
||||
prespl2 = kry + "jete" ;
|
||||
prespl3 = kry + "jí" ;
|
||||
@@ -747,12 +914,13 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
dat, cdat,pdat,
|
||||
loc,
|
||||
ins,pins : Str ;
|
||||
a : Agr
|
||||
a : Agr ; isDrop : Bool
|
||||
} ;
|
||||
|
||||
personalPron : Agr -> PronForms = \a ->
|
||||
{a = a ; cnom = []} **
|
||||
{a = a ; cnom = [] ; isDrop = False} **
|
||||
case a of {
|
||||
AgQuant _ => {nom,gen,cgen,pgen,acc,cacc,pacc,dat,cdat,pdat,loc,ins,pins = nonExist} ;
|
||||
Ag _ Sg P1 => {
|
||||
nom = "já" ;
|
||||
gen,acc,pgen,pacc = "mne" ;
|
||||
@@ -783,9 +951,10 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
} ;
|
||||
Ag Fem Sg P3 => {
|
||||
nom = "ona" ;
|
||||
gen = "její" ;
|
||||
dat,acc,cgen,cacc,cdat,ins = "ji" ;
|
||||
pgen,pdat,pacc,loc,pins = "ní" ;
|
||||
gen,dat,cgen,cdat,ins = "jí" ;
|
||||
acc,cacc = "ji" ;
|
||||
pacc = "ni" ;
|
||||
pgen,pdat,loc,pins = "ní" ;
|
||||
} ;
|
||||
Ag Neutr Sg P3 => {
|
||||
nom = "ono" ;
|
||||
@@ -810,7 +979,7 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
dat,cdat,pdat = "nám" ;
|
||||
ins,pins = "námi" ;
|
||||
} ;
|
||||
Ag _ Pl P2 => {
|
||||
Ag _ Pl P2 | AgPol _ => {
|
||||
nom = "vy" ;
|
||||
gen,acc,
|
||||
cgen,cacc,
|
||||
@@ -821,7 +990,8 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
} ;
|
||||
Ag g Pl P3 => {
|
||||
nom = case g of {
|
||||
Masc _ => "oni" ;
|
||||
Masc Anim => "oni" ;
|
||||
Masc Inanim => "ony" ;
|
||||
Fem => "ony" ;
|
||||
Neutr => "ona"
|
||||
} ;
|
||||
@@ -842,31 +1012,33 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
Ag _ Sg P1 => mladyAdjForms "my" ** {msnom = "můj" ; pdat = "mým"} ; --- alts: moje, moji,...
|
||||
Ag _ Sg P2 => mladyAdjForms "tvy" ** {msnom = "tvůj" ; pdat = "tvým"} ;
|
||||
|
||||
Ag _ Pl P1 => jarniAdjForms "naše" ** {
|
||||
msnom = "náš" ;
|
||||
fsgen,mpnom = "naši" ;
|
||||
fsins = "naší" ;
|
||||
pdat, msins = "našim" ;
|
||||
pgen = "našich" ;
|
||||
pins = "našimi" ;
|
||||
} ;
|
||||
Ag _ Pl P2 => jarniAdjForms "vaše" ** {
|
||||
msnom = "váš" ;
|
||||
fsgen,mpnom = "vaši" ;
|
||||
fsins = "vaší" ;
|
||||
pdat, msins = "vašim" ;
|
||||
pgen = "vašich" ;
|
||||
pins = "vašimi" ;
|
||||
} ;
|
||||
Ag _ Pl P1 => nasPossessiveForms "náš" "naš" ;
|
||||
Ag _ Pl P2 | AgPol _ => nasPossessiveForms "váš" "vaš" ;
|
||||
|
||||
Ag Fem Sg P3 => jarniAdjForms "její" ** {pdat = "jejím"} ;
|
||||
|
||||
Ag (Masc _ | Neutr) Sg P3 => invarDemPronForms "jeho" ** {pdat = "jeho"} ;
|
||||
Ag _ Pl P3 => invarDemPronForms "jejich" ** {pdat = "jejich"}
|
||||
Ag _ Pl P3 | AgQuant _ => invarDemPronForms "jejich" ** {pdat = "jejich"}
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
-- Náš/váš distinguish feminine accusative naši from oblique naší,
|
||||
-- and singular instrumental naším from plural dative našim.
|
||||
nasPossessiveForms : Str -> Str -> DemPronForms = \nas,nasStem -> {
|
||||
msnom = nas ;
|
||||
fsnom,nsnom,fpnom = nasStem + "e" ;
|
||||
msgen = nasStem + "eho" ;
|
||||
fsgen,fsins = nasStem + "í" ;
|
||||
msdat = nasStem + "emu" ;
|
||||
fsacc,mpnom = nasStem + "i" ;
|
||||
msloc = nasStem + "em" ;
|
||||
msins = nasStem + "ím" ;
|
||||
pgen = nasStem + "ich" ;
|
||||
pdat = nasStem + "im" ;
|
||||
pins = nasStem + "imi"
|
||||
} ;
|
||||
|
||||
reflPossessivePron : DemPronForms = mladyAdjForms "svy" ** {msnom = "svůj" ; pdat = "svým"} ;
|
||||
|
||||
mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a ->
|
||||
@@ -918,7 +1090,8 @@ oper
|
||||
|
||||
Determiner : Type = {
|
||||
s : Gender => Case => Str ;
|
||||
size : NumSize
|
||||
size : NumSize ; -- number and case of the counted noun
|
||||
head : NumHead -- agreement of a quantifier preceding the numeral
|
||||
} ;
|
||||
|
||||
mkDemPronForms : Str -> DemPronForms = \t -> {
|
||||
@@ -984,50 +1157,38 @@ oper
|
||||
adjAdj = adjFormsAdjective demAdj
|
||||
in {
|
||||
s = \\g,c => adjAdj.s ! g ! Sg ! c ;
|
||||
size = size
|
||||
size = size ; head = CountedHead
|
||||
} ;
|
||||
|
||||
-- example: number 1
|
||||
oneNumeral : Determiner = numeralFormsDeterminer ((mkDemPronForms "jedn") ** {msnom = "jeden"}) Num1 ;
|
||||
|
||||
-- numbers 2,3,4 ---- to check if everything comes out right with the determiner type
|
||||
twoNumeral : Determiner =
|
||||
let forms = {
|
||||
msnom = "dva" ; fsnom, nsnom, fsacc = "dvě" ;
|
||||
msgen, fsgen, msloc = "dvou" ;
|
||||
msdat, msins, fsins = "dvěma"
|
||||
}
|
||||
in numeralFormsDeterminer forms Num2_4 ;
|
||||
|
||||
threeNumeral : Determiner =
|
||||
let forms = {
|
||||
msnom, fsnom, nsnom, fsacc, msgen, fsgen = "tři" ;
|
||||
msdat = "třem" ;
|
||||
msloc = "třech" ;
|
||||
msins,fsins = "třemi" ;
|
||||
}
|
||||
in numeralFormsDeterminer forms Num2_4 ;
|
||||
|
||||
fourNumeral : Determiner =
|
||||
let forms = {
|
||||
msnom, fsnom, nsnom, fsacc = "čtyři" ;
|
||||
msgen, fsgen = "čtyř" ;
|
||||
msdat = "čtyřem" ;
|
||||
msloc = "čtyřech" ;
|
||||
msins,fsins = "čtyřmi" ;
|
||||
}
|
||||
in numeralFormsDeterminer forms Num2_4 ;
|
||||
-- Unlike adjectives, 2--4 do not use the genitive for animate accusatives.
|
||||
twoNumeral : Determiner = {
|
||||
s = \\g,c => case c of {
|
||||
Nom|Acc|Voc => case g of {Masc _ => "dva" ; _ => "dvě"} ;
|
||||
Gen|Loc => "dvou" ; Dat|Ins => "dvěma"
|
||||
} ; size = Num2_4 ; head = CountedHead
|
||||
} ;
|
||||
threeNumeral : Determiner = {
|
||||
s = \\_,c => case c of {
|
||||
Nom|Acc|Voc => "tři" ; Gen => "tří" ; Dat => "třem" ; Loc => "třech" ; Ins => "třemi"
|
||||
} ; size = Num2_4 ; head = CountedHead
|
||||
} ;
|
||||
fourNumeral : Determiner = {
|
||||
s = \\_,c => case c of {
|
||||
Nom|Acc|Voc => "čtyři" ; Gen => "čtyř" ; Dat => "čtyřem" ; Loc => "čtyřech" ; Ins => "čtyřmi"
|
||||
} ; size = Num2_4 ; head = CountedHead
|
||||
} ;
|
||||
|
||||
-- for the numbers 5 upwards
|
||||
regNumeral : Str -> Str -> Determiner = \pet,peti ->
|
||||
let forms = {
|
||||
msnom,fsnom,nsnom = pet ;
|
||||
msgen, fsgen, msdat, fsacc, msloc, msins, fsins = peti
|
||||
}
|
||||
in numeralFormsDeterminer forms Num5 ;
|
||||
regNumeral : Str -> Str -> Determiner = \pet,peti -> {
|
||||
s = \\_,c => case c of {Nom | Acc | Voc => pet ; _ => peti} ;
|
||||
size = Num5 ; head = CountedHead
|
||||
} ;
|
||||
|
||||
invarDeterminer : Str -> NumSize -> Determiner = \sto,size ->
|
||||
regNumeral sto sto ;
|
||||
(regNumeral sto sto) ** {size = size} ;
|
||||
|
||||
invarNumeral : Str -> Determiner = \s -> invarDeterminer s Num5 ;
|
||||
|
||||
@@ -1035,22 +1196,105 @@ oper
|
||||
-- combining nouns with numerals
|
||||
|
||||
param
|
||||
NumSize = Num1 | Num2_4 | Num5 ; -- CEG 6.1
|
||||
NumSize = Num1 | Num2_4 | Num5 | NumScale ; -- CEG 6.1
|
||||
-- A scale noun has its own agreement: tímto tisícem vs. těchto pěti tisíců.
|
||||
-- Nested scales retain the outer head: tato dvě stě tisíc korun.
|
||||
ScaleAgreement = QuantifiedScale | NominalScale ;
|
||||
NumHead = CountedHead | ScaleHead Gender NumSize ScaleAgreement ;
|
||||
-- NP modifiers have gender/number/case agreement, never verbal person.
|
||||
ModifierAgr = Mod Gender Number | ModQuant Gender ;
|
||||
|
||||
oper
|
||||
quantifierForm : Adjective -> Determiner -> Gender -> Case -> Str = \q,num,g,c ->
|
||||
case num.head of {
|
||||
CountedHead => q.s ! g ! numSizeNumber num.size ! countCase num.size c ;
|
||||
ScaleHead sg size _ => q.s ! sg ! numSizeNumber size ! countCase size c
|
||||
} ;
|
||||
|
||||
quantifyNumeral : Adjective -> Determiner -> Determiner = \q,num -> num ** {
|
||||
s = \\g,c => quantifierForm q num g c ++ num.s ! g ! c
|
||||
} ;
|
||||
|
||||
-- Predeterminers agree with the NP head, including a quantified head in
|
||||
-- the genitive. This differs from clause agreement for e.g. tisíc korun.
|
||||
numeralModAgr : Gender -> Determiner -> ModifierAgr = \g,num -> case num.head of {
|
||||
CountedHead => modifierAgr (numSizeAgr g num.size P3) ;
|
||||
ScaleHead sg size _ => modifierAgr (numSizeAgr sg size P3)
|
||||
} ;
|
||||
|
||||
modifierAgr : Agr -> ModifierAgr = \a -> case a of {
|
||||
Ag g n _ => Mod g n ; AgPol g => Mod g Sg ; AgQuant g => ModQuant g
|
||||
} ;
|
||||
|
||||
predetForm : Adjective -> ModifierAgr -> Case -> Str = \pred,a,c -> case a of {
|
||||
Mod g n => pred.s ! g ! n ! c ;
|
||||
ModQuant g => pred.s ! g ! Pl ! countCase Num5 c
|
||||
} ;
|
||||
|
||||
-- Keep the boundary for my všichni doma, also after AdvNP. Complete forms
|
||||
-- retain a single markup wrapper; insertion can use separately marked pieces.
|
||||
NPForms : Type = {
|
||||
s,prep,before,prepBefore : Case => Str ;
|
||||
after : Str
|
||||
} ;
|
||||
|
||||
npForms : (Case => Str) -> (Case => Str) -> NPForms = \s,prep -> {
|
||||
s,before = s ; prep,prepBefore = prep ; after = []
|
||||
} ;
|
||||
|
||||
appendNPForms : NPForms -> Str -> NPForms = \np,adv -> np ** {
|
||||
s = \\c => np.s ! c ++ adv ; prep = \\c => np.prep ! c ++ adv ;
|
||||
after = np.after ++ adv
|
||||
} ;
|
||||
|
||||
predetNPForms : Bool -> (Case => Str) -> NPForms -> NPForms = \post,pred,np ->
|
||||
case post of {
|
||||
True => np ** {
|
||||
s = \\c => np.before ! c ++ pred ! c ++ np.after ;
|
||||
prep = \\c => np.prepBefore ! c ++ pred ! c ++ np.after ;
|
||||
before = \\c => np.before ! c ++ pred ! c ;
|
||||
prepBefore = \\c => np.prepBefore ! c ++ pred ! c
|
||||
} ;
|
||||
False => np ** {
|
||||
s = \\c => pred ! c ++ np.s ! c ;
|
||||
prep = \\c => pred ! c ++ np.prep ! c ;
|
||||
before = \\c => pred ! c ++ np.before ! c ;
|
||||
prepBefore = \\c => pred ! c ++ np.prepBefore ! c
|
||||
}
|
||||
} ;
|
||||
|
||||
nounGender : Noun -> Number -> Gender = \cn,n -> case n of {
|
||||
Sg => cn.g ; Pl => cn.gPl
|
||||
} ;
|
||||
|
||||
countCase : NumSize -> Case -> Case = \n,c -> case <n,c> of {
|
||||
<NumScale,_> | <Num5, Nom | Acc | Voc> => Gen ; _ => c
|
||||
} ;
|
||||
|
||||
numSizeForm : (Number => Case => Str) -> NumSize -> Case -> Str
|
||||
= \cns,n,c -> case n of {
|
||||
Num1 => cns ! Sg ! c ;
|
||||
NumScale => cns ! Pl ! Gen ;
|
||||
Num2_4 => cns ! Pl ! c ;
|
||||
Num5 => case c of {
|
||||
Nom | Acc => cns ! Pl ! Gen ;
|
||||
Nom | Acc | Voc => cns ! Pl ! Gen ;
|
||||
_ => cns ! Pl ! c
|
||||
}
|
||||
} ;
|
||||
|
||||
-- Clause agreement is independent of the counted noun's genitive case.
|
||||
-- Millions/billions normally agree with their scale head; hundreds and
|
||||
-- thousands use quantified agreement by default. Five million still has
|
||||
-- a quantified head, while two million has a plural nominal head.
|
||||
numeralAgr : Gender -> Determiner -> Person -> Agr = \g,num,p ->
|
||||
case num.head of {
|
||||
ScaleHead sg size NominalScale => numSizeAgr sg size p ;
|
||||
_ => numSizeAgr g num.size p
|
||||
} ;
|
||||
|
||||
numSizeAgr : Gender -> NumSize -> Person -> Agr
|
||||
= \g,ns,p -> case ns of {
|
||||
Num5 => Ag Neutr Sg p ; -- essential grammar 6.1.4
|
||||
Num5 | NumScale => AgQuant g ; -- essential grammar 6.1.4
|
||||
Num2_4 => Ag g Pl p ;
|
||||
Num1 => Ag g Sg p
|
||||
} ;
|
||||
|
||||
+31
-40
@@ -1,51 +1,42 @@
|
||||
concrete SentenceCze of Sentence = CatCze **
|
||||
open Prelude, ResCze in {
|
||||
|
||||
concrete SentenceCze of Sentence = CatCze ** open Prelude, ResCze in {
|
||||
lin
|
||||
PredVP np vp = {
|
||||
subj = case np.hasClit of {
|
||||
True => np.clit ! Nom ; -- pro-drop
|
||||
False => np.s ! Nom
|
||||
} ;
|
||||
verb = vp.verb ;
|
||||
clit = vp.clit ! np.a ;
|
||||
compl = vp.compl ! np.a ;
|
||||
a = np.a ;
|
||||
-- A dropped subject still contributes an empty constituent, so PGF
|
||||
-- retains the pronoun and constrains its person through agreement.
|
||||
subj = case np.isDrop of {True => np.clit ! Nom ; False => np.s ! Nom} ;
|
||||
verb = vp.verb ; clit = vp.clit ! np.a ; compl = vp.compl ! np.a ;
|
||||
a = np.a ; isDrop = np.isDrop ; clitPresent = vp.clitPresent
|
||||
} ;
|
||||
|
||||
UseCl temp pol cl = {
|
||||
s = temp.s ++ cl.subj ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.compl ;
|
||||
} ;
|
||||
UseCl temp pol cl = let v = pol.s ++ verbAgr cl.verb cl.a pol.p in
|
||||
case cl.isDrop of {
|
||||
True => sentence cl.clitPresent (temp.s ++ cl.subj ++ v) cl.clit cl.compl ;
|
||||
False => sentence cl.clitPresent (temp.s ++ cl.subj) cl.clit (v ++ cl.compl)
|
||||
} ;
|
||||
|
||||
--- TODO is inversion the standard? ; add indirect questions
|
||||
UseQCl temp pol cl = {
|
||||
s = temp.s ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.subj ++ cl.compl ;
|
||||
UseQCl temp pol cl = let v = pol.s ++ verbAgr cl.verb cl.a pol.p in {
|
||||
s = temp.s ++ case cl.yesNo of {
|
||||
True => v ++ cl.clit ++ cl.subj ++ cl.compl ;
|
||||
False => cl.q ++ cl.clit ++ v ++ cl.subj ++ cl.compl
|
||||
} ;
|
||||
ind = temp.s ++ case cl.yesNo of {
|
||||
True => "jestli" ++ cl.clit ++ cl.subj ++ v ++ cl.compl ;
|
||||
False => cl.q ++ cl.clit ++ v ++ cl.subj ++ cl.compl
|
||||
}
|
||||
} ;
|
||||
|
||||
UseRCl temp pol rcl = {
|
||||
s = \\a => temp.s ++
|
||||
rcl.subj ! a ++ rcl.clit ! a ++
|
||||
pol.s ++ verbAgr rcl.verb a pol.p ++
|
||||
rcl.compl ! a ;
|
||||
s = \\a => temp.s ++ rcl.subj ! a ++ rcl.clit ! a ++
|
||||
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} ;
|
||||
|
||||
ImpVP vp = {s = \\pos,a =>
|
||||
imperativeAgr vp.verb a pos ++ vp.clit ! a ++ vp.compl ! a
|
||||
} ;
|
||||
EmbedS s = {s = (frontSentence "že" s).s} ;
|
||||
EmbedQS qs = {s = qs.ind} ;
|
||||
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} ;
|
||||
|
||||
{s = vp.verb.inf ++ vp.clit ! agr ++ vp.compl ! agr} ;
|
||||
AdvS a s = frontSentence a.s s ;
|
||||
ExtAdvS a s = prefixSentence (a.s ++ SOFT_BIND ++ ",") s ;
|
||||
SSubjS a subj b = appendSentence a (SOFT_BIND ++ "," ++ (frontSentence subj.s b).s) ;
|
||||
}
|
||||
|
||||
+42
-13
@@ -5,27 +5,38 @@ concrete StructuralCze of Structural = CatCze **
|
||||
oper
|
||||
adjDet : AdjForms -> Determiner = \afs -> {
|
||||
s = \\g,c => (adjFormsAdjective afs).s ! g ! Sg ! c ;
|
||||
size = Num1
|
||||
size = Num1 ; head = CountedHead
|
||||
} ;
|
||||
|
||||
lin
|
||||
all_Predet = {s = "všechny"} ;
|
||||
all_Predet = {s = \\g,n,c => case <n,c,g> of {
|
||||
<Pl,Gen | Loc,_> => "všech" ; <Pl,Dat,_> => "všem" ; <Pl,Ins,_> => "všemi" ;
|
||||
<Pl,Nom | ResCze.Voc,Masc Anim> => "všichni" ;
|
||||
<Pl,_,Neutr> => "všechna" ; <Pl,_,_> => "všechny" ;
|
||||
<Sg,Nom | ResCze.Voc,Fem> => "všechna" ; <Sg,Acc,Fem> => "všechnu" ;
|
||||
<Sg,_,Fem> => "vší" ;
|
||||
<Sg,Gen,_> | <Sg,Acc,Masc Anim> => "všeho" ;
|
||||
<Sg,Dat,_> => "všemu" ; <Sg,Loc,_> => "všem" ; <Sg,Ins,_> => "vším" ;
|
||||
<Sg,_,Neutr> => "všechno" ; <Sg,_,_> => "všechen"
|
||||
} ; postPron = True} ;
|
||||
only_Predet = {s = \\_,_,_ => "jen" ; postPron = False} ;
|
||||
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 = {
|
||||
can_VV = mkModalVV (lin V (withNeg {
|
||||
inf = "moci" ;
|
||||
impsg2,imppl1,imppl2 = nonExist ;
|
||||
pressg1 = "mohu" ;
|
||||
pressg2 = "můžeš" ;
|
||||
pressg3, negpressg3 = "může" ;
|
||||
pressg3 = "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
|
||||
@@ -37,20 +48,24 @@ lin
|
||||
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 ; ----
|
||||
from_Prep = mkPrep zPreposition Gen ;
|
||||
have_V2 = mkV2 <lin V haveVerbForms : CatCze.V> ;
|
||||
in_Prep = v_Prep Loc ;
|
||||
many_Det = regNumeral "mnoho" "mnoha" ; -- CEG 6.8 ----
|
||||
or_Conj = mkConj "nebo" ;
|
||||
somePl_Det = regNumeral "několik" "několika" ; -- CEG 6.8 ----
|
||||
something_NP = {s,clit,prep = \\c => "ně" + coForms ! c ; a = Ag Neutr Sg P3 ; hasClit = False} ; -- CEG 5.6.3
|
||||
possess_Prep = mkPrep "" Gen ;
|
||||
something_NP =
|
||||
let s : Case => Str = \\c => "ně" + coForms ! c in npForms s s ** {
|
||||
clit = s ; a = Ag Neutr Sg P3 ; m = Mod Neutr Sg ;
|
||||
hasClit = False ; isDrop = False ; isPron = False
|
||||
} ; -- CEG 5.6.3
|
||||
possess_Prep = mkPrep Gen ;
|
||||
that_Quant = demPronFormsAdjective (mkDemPronForms "tamt") "" ;
|
||||
this_Quant = demPronFormsAdjective (mkDemPronForms "t") "to" ;
|
||||
to_Prep = mkPrep "do" Gen ;
|
||||
with_Prep = mkPrep (pre {"s"|"z" => "se" ; _ => "s"}) Ins ; ----
|
||||
with_Prep = mkPrep sPreposition Ins ;
|
||||
|
||||
i_Pron = mkPron (Ag (Masc Anim) Sg P1) ; --- to add Fem pronouns in Extend
|
||||
i_Pron = mkPron (Ag (Masc Anim) Sg P1) ;
|
||||
youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ;
|
||||
he_Pron = mkPron (Ag (Masc Anim) Sg P3) ;
|
||||
she_Pron = mkPron (Ag Fem Sg P3) ;
|
||||
@@ -58,5 +73,19 @@ lin
|
||||
we_Pron = mkPron (Ag (Masc Anim) Pl P1) ;
|
||||
youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ;
|
||||
they_Pron = mkPron (Ag (Masc Anim) Pl P3) ;
|
||||
|
||||
youPol_Pron = mkPron (AgPol (Masc Anim)) ;
|
||||
want_VV = mkModalVV (mkV "chtít" "chci" "chceš" "chce" "chceme" "chcete" "chtějí" "chtěl" "chtěli" "chtěj" "chtějme" "chtějte") ;
|
||||
must_VV = mkModalVV (mkV "muset" "musím" "musíš" "musí" "musíme" "musíte" "musí" "musel" "museli" nonExist nonExist nonExist) ;
|
||||
can8know_VV = mkModalVV (mkV "umět" "umím" "umíš" "umí" "umíme" "umíte" "umějí" "uměl" "uměli" "uměj" "umějme" "umějte") ;
|
||||
yes_Utt = {s = "ano"} ;
|
||||
no_Utt = {s = "ne"} ;
|
||||
please_Voc = {s = "prosím"} ;
|
||||
very_AdA = mkAdA "velmi" ;
|
||||
too_AdA = mkAdA "příliš" ;
|
||||
how_IAdv = {s = "jak"} ;
|
||||
how8much_IAdv = {s = "kolik"} ;
|
||||
whatSg_IP = {s = coForms ; a = Ag Neutr Sg P3} ;
|
||||
whoSg_IP = {s = kdoForms ; a = Ag (Masc Anim) Sg P3} ;
|
||||
how8many_IDet = regNumeral "kolik" "kolika" ;
|
||||
which_IQuant = adjFormsAdjective (guessAdjForms "který") ;
|
||||
}
|
||||
|
||||
+22
-15
@@ -19,29 +19,36 @@ lin
|
||||
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 ;
|
||||
CNNumNP cn card =
|
||||
let s : Case => Str = \\c => cn.s ! Sg ! c ++ card.s ! cn.g ! Nom in npForms s s ** {
|
||||
clit = s ;
|
||||
a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ;
|
||||
hasClit = False ; isDrop = False ; isPron = False ;
|
||||
} ;
|
||||
|
||||
CNIntNP cn i = {
|
||||
s,clit,prep = \\c => cn.s ! Sg ! c ++ i.s ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
hasClit = False ;
|
||||
CNIntNP cn i =
|
||||
let s : Case => Str = \\c => cn.s ! Sg ! c ++ i.s in npForms s s ** {
|
||||
clit = s ;
|
||||
a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ;
|
||||
hasClit = False ; isDrop = False ; isPron = 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 ;
|
||||
CNSymbNP det cn xs =
|
||||
let s : Case => Str = \\c => det.s ! nounGender cn (numSizeNumber det.size) ! c ++ numSizeForm cn.s det.size c ++ xs.s
|
||||
in npForms s s ** {
|
||||
clit = s ;
|
||||
a = numeralAgr (nounGender cn (numSizeNumber det.size)) det P3 ;
|
||||
m = numeralModAgr (nounGender cn (numSizeNumber det.size)) det ;
|
||||
hasClit = False ; isDrop = False ; isPron = False ;
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
SymbS sy = sentence False sy.s [] [] ;
|
||||
|
||||
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
|
||||
SymbNum sy = invarNumeral sy.s ; -- "n čísel", like numerals from 5 up
|
||||
SymbOrd sy = {s = \\g,n,c =>
|
||||
glue sy.s ((adjFormsAdjective (mladyAdjForms "-tý")).s ! g ! n ! c)
|
||||
} ;
|
||||
|
||||
oper
|
||||
symbolPN : Str -> PN
|
||||
|
||||
@@ -6,7 +6,7 @@ concrete TenseCze of Tense =
|
||||
in {
|
||||
lin
|
||||
PNeg = {
|
||||
s = "ne" ++ Predef.BIND ;
|
||||
s = [] ;
|
||||
p = False
|
||||
} ;
|
||||
PPos = {
|
||||
|
||||
+49
-34
@@ -2,62 +2,73 @@ concrete VerbCze of Verb = CatCze ** open ResCze, Prelude in {
|
||||
|
||||
lin
|
||||
UseV v = {
|
||||
verb = v ;
|
||||
clit,compl = \\_ => []
|
||||
verb = v ; clitPresent = v.isRefl ;
|
||||
clit = \\_ => v.refl ; compl = \\_ => []
|
||||
} ;
|
||||
|
||||
ComplSlash vps np = case <np.hasClit, vps.c.hasPrep> of {
|
||||
<True,False> => vps ** {
|
||||
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c ;
|
||||
ComplSlash vps np = case hasCliticComplement vps.c np.hasClit of {
|
||||
True => vps ** {
|
||||
clitPresent = True ;
|
||||
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c ++ vps.clitAfter ! a ;
|
||||
compl = \\a => vps.compl ! a ++ vps.ind ! a
|
||||
} ;
|
||||
_ => vps ** {
|
||||
compl = \\a => vps.compl ! a ++ vps.c.s ++ np.s ! vps.c.c ++ vps.ind ! a
|
||||
False => vps ** {
|
||||
clit = \\a => vps.clit ! a ++ vps.clitAfter ! a ;
|
||||
compl = \\a => vps.compl ! a ++ fullComplement vps.c np.s np.prep ++ vps.ind ! a
|
||||
}
|
||||
} ;
|
||||
|
||||
SlashV2a v = {
|
||||
verb = v ;
|
||||
clit,compl = \\_ => [] ;
|
||||
verb = v ; clitPresent = v.isRefl ;
|
||||
clit = \\_ => v.refl ; compl = \\_ => [] ;
|
||||
c = v.c ;
|
||||
ind = \\_ => []
|
||||
ind = \\_ => [] ; clitAfter = \\_ => []
|
||||
} ;
|
||||
|
||||
-- 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 ;
|
||||
-- Full objects retain c-before-c2 order; weak objects follow case order.
|
||||
Slash2V3 v np = let
|
||||
isClit = hasCliticComplement v.c np.hasClit ;
|
||||
weak = case isClit of {True => np.clit ! v.c.c ; False => []} ;
|
||||
before = cliticBefore v.c.c v.c2.c
|
||||
in {
|
||||
verb = v ; clitPresent = orB v.isRefl isClit ;
|
||||
clit = \\_ => v.refl ++ case before of {True => weak ; False => []} ;
|
||||
clitAfter = \\_ => case before of {True => [] ; False => weak} ;
|
||||
compl = \\_ => case isClit of {True => [] ; False => fullComplement v.c np.s np.prep} ;
|
||||
c = v.c2 ;
|
||||
ind = \\_ => []
|
||||
} ;
|
||||
Slash3V3 v np = { -- fill the indirect object (rendered after the object slot)
|
||||
verb = v ;
|
||||
clit = \\_ => [] ;
|
||||
Slash3V3 v np = let
|
||||
isClit = hasCliticComplement v.c2 np.hasClit ;
|
||||
weak = case isClit of {True => np.clit ! v.c2.c ; False => []} ;
|
||||
before = cliticBefore v.c.c v.c2.c
|
||||
in {
|
||||
verb = v ; clitPresent = orB v.isRefl isClit ;
|
||||
clit = \\_ => v.refl ++ case before of {True => [] ; False => weak} ;
|
||||
clitAfter = \\_ => case before of {True => weak ; False => []} ;
|
||||
compl = \\_ => [] ;
|
||||
c = v.c ;
|
||||
ind = \\_ => v.c2.s ++ np.s ! v.c2.c
|
||||
ind = \\_ => case isClit of {True => [] ; False => fullComplement v.c2 np.s np.prep}
|
||||
} ;
|
||||
|
||||
UseComp comp = {
|
||||
verb = copulaVerbForms ;
|
||||
verb = copulaVerbForms ; clitPresent = False ;
|
||||
clit = \\_ => [] ;
|
||||
compl = comp.s
|
||||
} ;
|
||||
|
||||
CompAP ap = {
|
||||
s = \\a => case a of {
|
||||
Ag g n p_ => ap.s ! g ! n ! Nom
|
||||
}
|
||||
} ;
|
||||
CompAP ap = {s = ap.pred} ;
|
||||
|
||||
CompNP np = {
|
||||
s = \\a_ => np.s ! Nom ; ---- InstrC in Pol
|
||||
-- An identifying NP retains its own number; only its case is selected.
|
||||
s = \\a_ => np.s ! Nom ;
|
||||
} ;
|
||||
|
||||
CompCN cn = {
|
||||
s = \\a => case a of {
|
||||
Ag _ n _ => cn.s ! n ! Nom ---- InstrC also possible
|
||||
Ag _ n _ => cn.s ! n ! Nom ;
|
||||
AgQuant _ => cn.s ! Pl ! Ins ; -- selected formal predicative instrumental
|
||||
AgPol _ => cn.s ! Sg ! Nom
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -72,21 +83,25 @@ lin
|
||||
-- VerbForms has no passive participle yet, so the reflexive passive is used:
|
||||
-- "číslo se dělí" = "the number is divided"
|
||||
PassV2 v = {
|
||||
verb = v ;
|
||||
verb = v ; clitPresent = True ;
|
||||
clit = \\_ => "se" ;
|
||||
compl = \\_ => []
|
||||
} ;
|
||||
|
||||
ComplVV vv vp = {
|
||||
verb = vv ;
|
||||
clit = vp.clit ;
|
||||
compl = \\a => vp.verb.inf ++ vp.compl ! a
|
||||
verb = vv ; clitPresent = orB vv.isRefl (andB vv.isAux vp.clitPresent) ;
|
||||
clit = \\a => vv.refl ++ case vv.isAux of {True => vp.clit ! a ; False => []} ;
|
||||
compl = \\a => vp.verb.inf ++ case vv.isAux of {True => [] ; False => vp.clit ! a} ++ vp.compl ! a
|
||||
} ;
|
||||
|
||||
ComplVS vs s = {
|
||||
verb = vs ;
|
||||
clit = \\_ => [] ;
|
||||
compl = \\_ => SOFT_BIND ++ "," ++ "že" ++ s.s
|
||||
verb = vs ; clitPresent = vs.isRefl ;
|
||||
clit = \\_ => vs.refl ;
|
||||
compl = \\_ => SOFT_BIND ++ "," ++ (frontSentence "že" s).s
|
||||
} ;
|
||||
|
||||
ComplVQ v q = {
|
||||
verb = v ; clitPresent = v.isRefl ; clit = \\_ => v.refl ;
|
||||
compl = \\_ => SOFT_BIND ++ "," ++ q.ind
|
||||
} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user