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:
adelon
2026-10-02 14:34:24 +02:00
committed by GitHub
parent 652e33c4d4
commit bc7afae589
42 changed files with 1969 additions and 530 deletions
+4
View File
@@ -27,6 +27,10 @@ jobs:
run: | run: |
sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb
- name: Czech regression tests
timeout-minutes: 5
run: sh tests/czech/check.sh
- name: Build RGL - name: Build RGL
run: | run: |
mkdir -p ${DEST} mkdir -p ${DEST}
+1 -2
View File
@@ -1,6 +1,6 @@
--# -path=.:../czech:../common:../abstract:../prelude --# -path=.:../czech:../common:../abstract:../prelude
resource TryCze = SyntaxCze, LexiconCze, ParadigmsCze -[mkAdv, mkDet,mkQuant]** resource TryCze = ExtraCze, SyntaxCze, LexiconCze, ParadigmsCze -[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsCze) in { open (P = ParadigmsCze) in {
-- oper -- oper
@@ -10,4 +10,3 @@ resource TryCze = SyntaxCze, LexiconCze, ParadigmsCze -[mkAdv, mkDet,mkQuant]**
-- } ; -- } ;
} }
+17 -7
View File
@@ -2,22 +2,32 @@ concrete AdjectiveCze of Adjective = CatCze ** open ResCze, Prelude in {
lin 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 = ComplA2 a np =
let ap = adjFormsAdjective a let ap = adjFormsAdjective a ;
compl = fullComplement a.c np.s np.prep
in in
ap ** { 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 ; 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
} ;
} }
+2 -2
View File
@@ -3,11 +3,11 @@ concrete AdverbCze of Adverb = CatCze **
lin lin
PrepNP prep np = { PrepNP prep np = {
s = prep.s ++ np.prep ! prep.c s = fullComplement prep np.s np.prep
} ; } ;
SubjS subj s = { SubjS subj s = {
s = subj.s ++ s.s s = (frontSentence subj.s s).s
} ; } ;
} }
+2 -1
View File
@@ -2,6 +2,7 @@
concrete AllCze of AllCzeAbs = concrete AllCze of AllCzeAbs =
LangCze, LangCze,
ExtendCze ExtendCze,
ExtraCze
; ;
+2 -1
View File
@@ -2,6 +2,7 @@
abstract AllCzeAbs = abstract AllCzeAbs =
Lang, Lang,
Extend Extend,
ExtraCzeAbs
; ;
+27 -12
View File
@@ -8,37 +8,52 @@ concrete CatCze of Cat =
Phr = {s : Str} ; Phr = {s : Str} ;
Utt = {s : Str} ; Utt = {s : Str} ;
S = {s : Str} ; S = ResCze.Sentence ;
Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ; Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr ; isDrop,clitPresent : Bool} ;
Comp = {s : Agr => Str} ; Comp = {s : Agr => Str} ;
QS = {s : Str} ; ---- TODO: indirect questions QS = {s,ind : Str} ;
QCl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ; -- = Cl ---- check if enough QCl = {q,subj,clit,compl : Str ; verb : VerbForms ; a : Agr ; yesNo : Bool} ;
IAdv = {s : Str} ; IAdv, IComp = {s : Str} ;
IP = {s : Case => Str ; a : Agr} ;
IDet = Determiner ;
IQuant = Adjective ;
Imp = {s : Bool => Agr => Str} ;
RS = {s : Agr => Str} ; RS = {s : Agr => Str} ;
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
RP = AdjForms ; RP = AdjForms ;
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed -- clitPresent records an overt clitic in this domain, not NP eligibility.
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase ; ind : Agr => Str} ; -- ind : incorporated indirect object, rendered after the object slot 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 ; V = ResCze.VerbForms ;
V2 = ResCze.VerbForms ** {c : ComplementCase} ; V2 = ResCze.VerbForms ** {c : ComplementCase} ;
V3 = ResCze.VerbForms ** {c,c2 : ComplementCase} ; -- c : direct object, c2 : indirect object 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 ; A = ResCze.DegreeForms ;
AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} AP = ResCze.Adjective ** {pred : Agr => Str ; isPost : Bool} ;
A2 = ResCze.AdjForms ** {c : ComplementCase} ; A2 = ResCze.DegreeForms ** {c : ComplementCase} ;
AdA = {s : Str} ; AdA = {s : Str} ;
N = ResCze.NounForms ; N = ResCze.NounForms ;
CN = ResCze.Noun ; -- {s : Number => Case => Str ; g : Gender} 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} ; PN = {s : Case => Str ; g : Gender} ;
Ord = Adjective ;
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
Quant = {s : Gender => Number => Case => Str} ; -- same as AP Quant = {s : Gender => Number => Case => Str} ; -- same as AP
Predet = Adjective ** {postPron : Bool} ;
Num = Determiner ; Num = Determiner ;
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
Pron = PronForms ** {poss : DemPronForms} ; Pron = PronForms ** {poss : DemPronForms} ;
+19 -15
View File
@@ -3,9 +3,9 @@ concrete ConjunctionCze of Conjunction = CatCze **
lincat lincat
[Adv] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ;
[AP] = {s1,s2 : Gender => Number => Case => Str ; isPost : Bool} ; [AP] = {s1,s2 : Gender => Number => Case => Str ; pred1,pred2 : Agr => Str ; isPost : Bool} ;
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr} ; [NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr ; m : ModifierAgr} ;
[S] = {s1,s2 : Str} ; [S] = {s1 : Sentence ; s2 : Str} ;
[RS] = {s1,s2 : Agr => Str} ; [RS] = {s1,s2 : Agr => Str} ;
lin lin
@@ -13,27 +13,28 @@ concrete ConjunctionCze of Conjunction = CatCze **
ConsAdv = consrSS comma ; ConsAdv = consrSS comma ;
BaseAP x y = twoTable3 Gender Number Case x y 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 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 = { BaseNP x y = {
s1 = x.s ; s1 = x.s ;
s2 = y.s ; s2 = y.s ;
prep1 = x.prep ; prep1 = x.prep ;
prep2 = y.prep ; prep2 = y.prep ;
a = y.a a = y.a ; m = x.m
} ; -- clitics disappear ---- Agr TODO } ; -- clitics disappear ---- Agr TODO
ConsNP x xs = { ConsNP x xs = {
s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ; s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ;
s2 = xs.s2 ; s2 = xs.s2 ;
prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ; prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ;
prep2 = xs.prep2 ; prep2 = xs.prep2 ;
a = xs.a ---- a = xs.a ; m = x.m ----
} ; } ;
BaseS = twoSS ; BaseS x y = {s1 = x ; s2 = y.s} ;
ConsS = consrSS comma ; ConsS x xs = {s1 = appendSentence x (comma ++ xs.s1.s) ; s2 = xs.s2} ;
BaseRS = twoTable Agr ; BaseRS = twoTable Agr ;
ConsRS = consrTable Agr comma ; ConsRS = consrTable Agr comma ;
@@ -41,16 +42,19 @@ concrete ConjunctionCze of Conjunction = CatCze **
ConjAdv = conjunctDistrSS ; ConjAdv = conjunctDistrSS ;
ConjAP conj xs = conjunctDistrTable3 Gender Number Case conj xs 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 = { ConjNP conj xs =
s,clit = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ; let s : Case => Str = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
prep = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! 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 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 ; ConjRS = conjunctDistrTable Agr ;
} }
+110 -4
View File
@@ -1,8 +1,11 @@
concrete ExtendCze of Extend = CatCze ** concrete ExtendCze of Extend = CatCze **
ExtendFunctor - [ 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) ---- constant not found (yet)
,youPolFem_Pron
,UttVPShort ,UttVPShort
,UttAccIP ,UttAccIP
,UttDatIP ,UttDatIP
@@ -31,10 +34,113 @@ concrete ExtendCze of Extend = CatCze **
with (Grammar = GrammarCze) with (Grammar = GrammarCze)
** **
open open
ResCze ResCze, Prelude, (S = SyntaxCze), (P = ParadigmsCze)
in { 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
} ;
} }
+23
View File
@@ -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
} ;
}
+11
View File
@@ -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 ;
}
+9 -3
View File
@@ -1,8 +1,10 @@
concrete IdiomCze of Idiom = CatCze ** open Prelude, ResCze in { concrete IdiomCze of Idiom = CatCze ** open Prelude, ResCze in {
lin lin
ImpPl1 vp = {s = vp.verb.imppl1 ++ vp.clit ! Ag (Masc Anim) Pl P1 ++ vp.compl ! Ag (Masc Anim) Pl P1} ;
ImpP3 np vp = { 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 verbAgr vp.verb np.a True ++ vp.compl ! np.a
} ; } ;
@@ -10,7 +12,8 @@ lin
subj = [] ; subj = [] ;
clit = vp.clit ! agr ; clit = vp.clit ! agr ;
compl = vp.compl ! agr ; compl = vp.compl ! agr ;
verb = vp.verb ; verb = vp.verb ; clitPresent = vp.clitPresent ;
isDrop = True ;
a = agr a = agr
} ; } ;
@@ -18,14 +21,17 @@ lin
subj = [] ; subj = [] ;
clit = vp.clit ! agr ; clit = vp.clit ! agr ;
compl = vp.compl ! agr ; compl = vp.compl ! agr ;
verb = vp.verb ; verb = vp.verb ; clitPresent = vp.clitPresent ;
isDrop = True ;
a = agr a = agr
} ; } ;
ExistNP np = { ExistNP np = {
clitPresent = False ;
subj, clit = [] ; subj, clit = [] ;
compl = np.s ! Nom ; compl = np.s ! Nom ;
verb = iii_kupovatVerbForms "existovat" ; verb = iii_kupovatVerbForms "existovat" ;
isDrop = True ;
a = np.a a = np.a
} ; } ;
+54 -20
View File
@@ -6,6 +6,11 @@ concrete LexiconCze of Lexicon =
in { in {
lin 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" ; boy_N = declPAN "kluk" ;
man_N = declMUZ "muž" ; man_N = declMUZ "muž" ;
teacher_N = declMUZ "učitel" ; teacher_N = declMUZ "učitel" ;
@@ -18,7 +23,7 @@ concrete LexiconCze of Lexicon =
machine_N = declSTROJ "stroj" ; machine_N = declSTROJ "stroj" ;
woman_N = declZENA "žena" ; woman_N = declZENA "žena" ;
school_N = declZENA "škola" ; ---- school_N = zenaN "škola" ;
skirt_N = declRUZE "sukně"; skirt_N = declRUZE "sukně";
street_N = declRUZE "ulice" ; street_N = declRUZE "ulice" ;
rose_N = declRUZE "růže" ; rose_N = declRUZE "růže" ;
@@ -28,32 +33,61 @@ concrete LexiconCze of Lexicon =
bone_N = declKOST "kost" ; bone_N = declKOST "kost" ;
village_N = declKOST "ves" ; ---- village_N = declKOST "ves" ; ----
city_N = declMESTO "město" ; city_N = (mestoN "město") ** {sloc = "městě"} ;
apple_N = declMESTO "jablko" ; ---- apple_N = declMESTO "jablko" ** {pgen = "jablek" ; ploc = "jablkách"} ;
sea_N = declMORE "moře" ; sea_N = declMORE "moře" ;
airport_N = declMORE "letiště" ; airport_N = declMORE "letiště" ;
chicken_N = declKURE "kuře" ; chicken_N = declKURE "kuře" ;
house_N = declSTAVENI "stavení" ; --- building, house house_N = declSTAVENI "stavení" ; --- building, house
station_N = declSTAVENI "nádraží" ; station_N = declSTAVENI "nádraží" ;
young_A = mkA "mladý" ; young_A = mkA "mladý" "mladší" ;
old_A = mkA "starý" ; old_A = mkA "starý" "starší" ;
good_A = mkA "dobrý" ; good_A = mkA "dobrý" "lepší" ;
bad_A = mkA "špatný" ; bad_A = mkA "špatný" "horší" ;
beautiful_A = mkA "krásný" ; beautiful_A = mkA "krásný" "krásnější" ;
clean_A = mkA "čistý" ; clean_A = mkA "čistý" "čistší" ;
dirty_A = mkA "špinavý" ; dirty_A = mkA "špinavý" "špinavější" ;
white_A = mkA "bílý" ; white_A = mkA "bílý" "bělejší" ;
black_A = mkA "černý" ; black_A = mkA "černý" "černější" ;
red_A = mkA "červený" ; red_A = mkA "červený" "červenější" ;
brown_A = mkA "hnědý" ; brown_A = mkA "hnědý" "hnědší" ;
blue_A = mkA "modrý" ; blue_A = mkA "modrý" "modřejší" ;
green_A = mkA "zelený" ; green_A = mkA "zelený" "zelenější" ;
yellow_A = mkA "žlutý" ; yellow_A = mkA "žlutý" "žlutější" ;
buy_V2 = mkV2 (iii_kupovatVerbForms "kupovat") ; buy_V2 = mkV2 (kupovatV "kupovat") ;
love_V2 = mkV2 (iii_kupovatVerbForms "milovat") ; 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
View File
@@ -1,12 +1,12 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
concrete MarkupCze of Markup = CatCze, MarkHTMLX ** open ResCze in { concrete MarkupCze of Markup = CatCze, MarkHTMLX ** open ResCze, Prelude in {
lin lin
MarkupCN m cn = cn ** {s = \\n,c => appMark m (cn.s ! n ! c)} ; 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; -- 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 -- and marking it up would leave the tags around nothing
MarkupNP m np = np ** { MarkupNP m np = np ** {
s = \\c => appMark m (np.s ! c) ; s = \\c => appMark m (np.s ! c) ;
@@ -14,12 +14,27 @@ lin
Nom => np.clit ! Nom ; Nom => np.clit ! Nom ;
_ => appMark m (np.clit ! c) _ => 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} ; 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} ; MarkupUtt m utt = {s = appMark m utt.s} ;
MarkupPhr m phr = {s = appMark m phr.s} ; MarkupPhr m phr = {s = appMark m phr.s} ;
MarkupText m txt = {s = appMark m txt.s} ; MarkupText m txt = {s = appMark m txt.s} ;
-48
View File
@@ -5,62 +5,32 @@ oper AAnter : Ant = notYet "AAnter" ;
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ; oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ; oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ; oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ; 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 AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ; oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; 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 ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ; oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ; oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ; oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ; 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 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 ExistIP : IP -> QCl = notYet "ExistIP" ;
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ; 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 OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PassV2 : V2 -> VP = notYet "PassV2" ;
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ; oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
oper PossPron : Pron -> Quant = notYet "PossPron" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; 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 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 QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
oper ReflA2 : A2 -> AP = notYet "ReflA2" ; oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ; oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
oper RelCl : Cl -> RCl = notYet "RelCl" ; oper RelCl : Cl -> RCl = notYet "RelCl" ;
oper RelNP : NP -> RS -> NP = notYet "RelNP" ; oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ; oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
oper SentAP : AP -> SC -> AP = notYet "SentAP" ; oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ; oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ; oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ; 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 SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ; oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ; oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper TCond : Tense = notYet "TCond" ; oper TCond : Tense = notYet "TCond" ;
oper TFut : Tense = notYet "TFut" ; oper TFut : Tense = notYet "TFut" ;
oper TPast : Tense = notYet "TPast" ; oper TPast : Tense = notYet "TPast" ;
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ; oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
oper UseN2 : N2 -> CN = notYet "UseN2" ; oper UseN2 : N2 -> CN = notYet "UseN2" ;
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ; 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
View File
@@ -5,106 +5,120 @@ concrete NounCze of Noun =
open ResCze, Prelude in { open ResCze, Prelude in {
lin lin
DetCN det cn = { DetCN det cn =
s,prep,clit = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ; let s : Case => Str = \\c => det.s ! nounGender cn (numSizeNumber det.size) ! c ++ numSizeForm cn.s det.size c
a = numSizeAgr cn.g det.size P3 ; in npForms s s ** {
hasClit = False ; 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 = { MassNP cn =
s,prep,clit = \\c => cn.s ! Sg ! c ; let s = cn.s ! Sg in npForms s s ** {
a = Ag cn.g Sg P3 ; clit = s ;
hasClit = False ; a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ; isPron = False ;
hasClit = False ; isDrop = False ;
} ; } ;
DetQuant quant num = { DetQuant = quantifyNumeral ;
s = \\g,c => num.s ! g ! c ++ quant.s ! g ! numSizeNumber num.size ! c ;
size = num.size 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 = \\_,_,_ => []} ; DefArt = {s = \\_,_,_ => []} ;
IndefArt = {s = \\_,_,_ => []} ; IndefArt = {s = \\_,_,_ => []} ;
NumPl = {s = \\_,_ => [] ; size = Num2_4} ; ---- size NumPl = invarDeterminer [] Num2_4 ;
NumSg = {s = \\_,_ => [] ; size = Num1} ; NumSg = invarDeterminer [] Num1 ;
UsePron pron = { UsePron pron =
s = table { let s : Case => Str = table {
Nom | Voc => pron.nom ; Nom | ResCze.Voc => pron.nom ;
Gen => pron.gen ; Gen => pron.gen ;
Dat => pron.dat ; Dat => pron.dat ;
Acc => pron.acc ; Acc => pron.acc ;
Loc => pron.loc ; Loc => pron.loc ;
Ins => pron.ins 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 { clit = table {
Nom => pron.cnom ; Nom => pron.cnom ;
Voc => pron.nom ; ResCze.Voc => pron.nom ;
Gen => pron.cgen ; Gen => pron.cgen ;
Dat => pron.cdat ; Dat => pron.cdat ;
Acc => pron.cacc ; Acc => pron.cacc ;
Loc => pron.loc ; Loc => pron.loc ;
Ins => pron.ins Ins => pron.ins
} ; } ;
prep = table { a = pron.a ; m = modifierAgr pron.a ;
Nom | Voc => pron.nom ; hasClit = True ; isDrop = pron.isDrop ; isPron = True ;
Gen => pron.pgen ;
Dat => pron.pdat ;
Acc => pron.pacc ;
Loc => pron.loc ;
Ins => pron.pins
} ;
a = pron.a ;
hasClit = True ;
} ; } ;
PossPron pron = justDemPronFormsAdjective pron.poss ; PossPron pron = justDemPronFormsAdjective pron.poss ;
UsePN pn = { UsePN pn = npForms pn.s pn.s ** {
s,clit,prep = \\c => pn.s ! c ; clit = pn.s ;
a = Ag pn.g Sg P3 ; a = Ag pn.g Sg P3 ; m = Mod pn.g Sg ; isPron = False ;
hasClit = False ; hasClit = False ; isDrop = False ;
} ; } ;
AdjCN ap cn = { AdjCN ap cn = {
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ; s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! nounGender cn n ! n ! c) (cn.s ! n ! c) ;
g = cn.g g = cn.g ; gPl = cn.gPl
} ; } ;
RelCN cn rs = { RelCN cn rs = {
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ; s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag (nounGender cn n) n P3 ;
g = cn.g g = cn.g ; gPl = cn.gPl
} ; } ;
AdvCN cn adv = { AdvCN cn adv = {
s = \\n,c => cn.s ! n ! c ++ adv.s ; s = \\n,c => cn.s ! n ! c ++ adv.s ;
g = cn.g g = cn.g ; gPl = cn.gPl
} ; } ;
AdvNP np adv = { AdvNP np adv =
s,clit = \\c => np.s ! c ++ adv.s ; let forms = appendNPForms np adv.s in np ** forms ** {
prep = \\c => np.prep ! c ++ adv.s ; clit = forms.s ;
a = np.a ; hasClit = False ; isDrop = False ;
hasClit = False ;
} ; } ;
UseN n = nounFormsNoun n ; UseN n = nounFormsNoun n ;
ApposCN cn np = { ApposCN cn np = {
s = \\n,c => cn.s ! n ! c ++ np.s ! c ; ---- TODO check apposition order 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 ; NumCard c = c ;
NumDigits ds = ds ** {s = \\_,_ => ds.s} ; NumDigits ds = invarDeterminer ds.s ds.size ;
NumDecimal ds = ds ** {s = \\_,_ => ds.s} ; NumDecimal ds = invarDeterminer ds.s ds.size ;
NumNumeral nu = nu ; NumNumeral nu = nu ;
SentCN cn sc = cn ** {s = \\n,c => cn.s ! n ! c ++ sc.s} ; SentCN cn sc = cn ** {s = \\n,c => cn.s ! n ! c ++ sc.s} ;
PredetNP pred np = np ** { PredetNP pred np =
s = \\c => pred.s ++ np.s ! c ; let forms = predetNPForms (andB pred.postPron np.isPron)
clit = \\c => pred.s ++ np.clit ! c ; (\\c => predetForm pred np.m c) np
prep = \\c => pred.s ++ np.prep ! c 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
} ; } ;
} }
+91 -94
View File
@@ -1,102 +1,99 @@
concrete NumeralCze of Numeral = concrete NumeralCze of Numeral = CatCze [Numeral,Digits,Decimal] **
open ResCze, Prelude in {
CatCze [Numeral,Digits,Decimal] ** -- 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í.
open -- Agreement with the final unit does not compose with possessive modifiers.
ResCze, -- See https://www.czechency.org/slovnik/ČÍSLOVKA.
Prelude oper
in { -- Only units vary in count agreement. Keeping four full Determiners here
-- would create a product of independent agreement states during compilation.
-- from gf-contrib/numerals/czech.gf, added inflections LinDigit : Type = {unit : Determiner ; teen,ten,hundred : Gender => Case => Str} ;
-- AR 2020-03-20 digit : Determiner -> Str -> Str -> Str -> LinDigit = \u,teen,ten,hundred -> {
---- TODO ordinal forms 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}
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 ;
} ; } ;
counted : (Gender => Case => Str) -> Determiner = \s -> {
oper mk2Num : Determiner -> Str -> Str -> Str -> LinDigit = s = s ; size = Num5 ; head = CountedHead
\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 ; hundreds : LinDigit -> Determiner = \d -> {
s = d.hundred ; size = NumScale ; head = ScaleHead Neutr d.unit.size QuantifiedScale
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} ; plus : Determiner -> Determiner -> Determiner = \a,b -> {
-- Compound jedna stays fixed even in oblique cases; dva inflects but
lin pot1as2 n = n ; -- does not vary with the counted noun's gender (CEG 6.1.5--6.1.6).
lin pot2 d = bigNumeral d.hundred ; s = \\g,c => a.s ! g ! c ++ case b.size of {
lin pot2plus d e = { Num1 => b.s ! Fem ! Nom ; _ => b.s ! Masc Inanim ! c
s = (invarNumeral (d.hundred ++ determinerStr e)).s ; ---- TODO inflection?
size = tfSize e.size
} ; } ;
-- A final scale still governs genitive in every case; other compound
lin pot2as3 n = n ; -- tails take ordinary quantified agreement, including final 1--4.
lin pot3 n = bigNumeral (mkTh (determinerStr n) n.size) ; size = case b.size of {NumScale => NumScale ; _ => Num5} ;
-- Sums ending in a scale retain the leading scale's agreement head:
lin pot3plus n m = { -- tyto dva tisíce dvě stě korun, not tato dva tisíce dvě stě korun.
s = (invarNumeral (mkTh (determinerStr n) n.size ++ determinerStr m)).s ; ---- TODO inflection? head = case b.size of {NumScale => a.head ; _ => CountedHead}
size = tfSize m.size
} ; } ;
scale : ScaleAgreement -> Determiner -> Noun -> Determiner = \agr,d,n -> {
oper tfSize : NumSize -> NumSize = \sz -> s = \\_,c => d.s ! n.g ! c ++ numSizeForm n.s d.size c ; size = NumScale ;
table {Num1 => Num5 ; other => other} ! sz ; head = case d.head of {CountedHead => ScaleHead n.g d.size agr ; h => h}
oper mkTh : Str -> NumSize -> Str = \attr,size ->
case size of {
Num1 => "tisíc" ;
Num2_4 => attr ++ "tisíce" ;
Num5 => attr ++ "tisíc"
} ; } ;
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 -- -- Numerals as sequences of digits have a separate, simpler grammar
lincat Dig = {s:Str ; size : NumSize} ; 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 ?? 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_1 = { s = "1" ; size = Num1} ;
D_2 = { s = "2" ; size = Num2_4} ; D_2 = { s = "2" ; size = Num2_4} ;
D_3 = { s = "3" ; 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} ; PosDecimal d = d ** {hasDot=False} ;
NegDecimal d = { NegDecimal d = {
s = "-" ++ Predef.BIND ++ d.s ; s = "-" ++ Predef.BIND ++ d.s ;
size = Num5 ; size = d.size ;
hasDot=False hasDot=False
} ; } ;
IFrac d i = { IFrac d i = {
s = d.s ++ s = d.s ++
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ; i.s ;
size = Num5 ; size = Num5 ;
hasDot=True hasDot=True
+105 -20
View File
@@ -40,10 +40,19 @@ oper
mkN = overload { mkN = overload {
mkN : (nom : Str) -> N mkN : (nom : Str) -> N
= \nom -> lin N (guessNounForms nom) ; = \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 mkN : (nom,gen : Str) -> Gender -> N
= \nom,gen,g -> lin N (declensionNounForms nom gen g) ; = \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. -- The following standard declensions can be used with good accuracy.
-- However, they have some defaults that may have to be overwritten. -- However, they have some defaults that may have to be overwritten.
-- This can be done easily by overriding those formes with record extension (**). -- 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 -- The full definition of the noun record is
-- { -- {
-- snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ; -- snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ;
-- g : Gender -- g,gPl : Gender
-- } -- }
--------------------- ---------------------
-- Adjectives -- 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 = overload {
mkA : Str -> A 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 mladyA : Str -> A
= \s -> lin A (mladyAdjForms s) ; = \s -> lin A (positiveAdj (mladyAdjForms s)) ;
jarniA : Str -> A jarniA : Str -> A
= \s -> lin A (jarniAdjForms s) ; = \s -> lin A (positiveAdj (jarniAdjForms s)) ;
otcuvA : Str -> A otcuvA : Str -> A
= \s -> lin A (otcuvAdjForms s) ; = \s -> lin A (positiveAdj (otcuvAdjForms s)) ;
matcinA : Str -> A matcinA : Str -> A
= \s -> lin A (matcinAdjForms s) ; = \s -> lin A (positiveAdj (matcinAdjForms s)) ;
invarA : Str -> A 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 mkA2 : A -> Prep -> A2
= \a,p -> lin A2 (a ** {c = p}) ; = \a,p -> lin A2 (a ** {c = p}) ;
@@ -113,21 +138,72 @@ oper
------------------------- -------------------------
-- Verbs -- 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 = overload {
mkV2 : VerbForms -> VerbForms ** {c : ComplementCase} mkV2 : V -> V2
= \vf -> vf ** {c = {s = [] ; c = Acc ; hasPrep = False}} ; = \v -> lin V2 (v ** {c = {s = [] ; c = Acc ; hasPrep = False}}) ;
mkV2 : VerbForms -> Case -> VerbForms ** {c : ComplementCase} mkV2 : V -> Case -> V2
= \vf,c -> vf ** {c = {s = [] ; c = c ; hasPrep = False}} ; = \v,c -> lin V2 (v ** {c = {s = [] ; c = c ; hasPrep = False}}) ;
mkV2 : VerbForms -> ComplementCase -> VerbForms ** {c : ComplementCase} mkV2 : V -> Prep -> V2
= \vf,c -> vf ** {c = c} ; = \v,p -> lin V2 (v ** {c = p}) ;
} ; } ;
mkV3 = overload { mkV3 = overload {
mkV3 : VerbForms -> VerbForms ** {c,c2 : ComplementCase} mkV3 : V -> V3
= \vf -> vf ** {c = {s = [] ; c = Acc ; hasPrep = False} ; = \v -> lin V3 (v ** {c = {s = [] ; c = Acc ; hasPrep = False} ;
c2 = {s = [] ; c = Dat ; hasPrep = False}} ; c2 = {s = [] ; c = Dat ; hasPrep = False}}) ;
mkV3 : VerbForms -> ComplementCase -> ComplementCase -> VerbForms ** {c,c2 : ComplementCase} mkV3 : V -> Prep -> Prep -> V3
= \vf,c,c2 -> vf ** {c = c ; c2 = c2} ; = \v,p,p2 -> lin V3 (v ** {c = p ; c2 = p2}) ;
} ; } ;
------------------------ ------------------------
@@ -139,8 +215,17 @@ oper
mkAdv : Str -> Adv mkAdv : Str -> Adv
= \s -> lin Adv {s = s} ; = \s -> lin Adv {s = 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 mkPrep : Str -> Case -> Prep
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ; ---- True if s /= "" = \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 mkConj : Str -> Conj
= \s -> lin Conj {s1 = [] ; s2 = s} ; = \s -> lin Conj {s1 = [] ; s2 = s} ;
+15 -7
View File
@@ -1,16 +1,24 @@
concrete PhraseCze of Phrase = CatCze ** open Prelude, ResCze in { concrete PhraseCze of Phrase = CatCze ** open Prelude, ResCze in {
lin 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 ; UttAdv adv = adv ;
UttCN cn = {s = cn.s ! Sg ! Nom} ; 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} ; 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} ; -- pol.p selects the verb form; empty pol.s retains the Pol constituent.
UttImpPl pol imp = {s = pol.s ++ imp.s} ; -- Without it, parsing "nečti ji" recovers UttImpSg ?1 instead of PNeg.
UttImpPol pol imp = {s = pol.s ++ imp.s} ; 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} ; PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
@@ -19,6 +27,6 @@ lin
PConjConj conj = {s = conj.s2} ; PConjConj conj = {s = conj.s2} ;
NoVoc = {s = []} ; NoVoc = {s = []} ;
VocNP np = {s = np.s ! Voc} ; VocNP np = {s = np.s ! ResCze.Voc} ;
} }
+22 -7
View File
@@ -1,9 +1,24 @@
concrete QuestionCze of Question = CatCze ** concrete QuestionCze of Question = CatCze ** open ResCze, Prelude in {
open ResCze, Prelude in {
lin lin
QuestCl cl = cl ; ---- QuestCl cl = cl ** {q = [] ; yesNo = True} ;
QuestIAdv adv cl = cl ** {q = adv.s ; yesNo = False} ;
QuestIAdv iadv cl = cl ** {clit = iadv.s ++ cl.clit} ; 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} ;
} }
+2 -2
View File
@@ -8,11 +8,11 @@ lin
subj = subj =
let rel = (adjFormsAdjective rp).s let rel = (adjFormsAdjective rp).s
in \\a => case a of { 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
View File
@@ -17,7 +17,7 @@ param
Person = P1 | P2 | P3 ; 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 CTense = CTPres | CTPast ; ----- TODO complete the tense system to match Czech verb morphology
@@ -71,12 +71,28 @@ oper
_ => init (addI s) + "í" _ => 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 -- 3.4.10, in particular when also final 'a' is dropped
addE : Str -> Str = \s -> case s of { addE : Str -> Str = \s -> case s of {
re + "k" => re + "ce" ; re + "k" => re + "ce" ;
pra + ("g"|"h") => pra + "ze" ; pra + ("g"|"h") => pra + "ze" ;
stre + "ch" => stre + "še" ; stre + "ch" => stre + "še" ;
sest + "r" => sest + "ře" ; sest + "r" => sest + "ře" ;
stem + "l" => stem + "le" ;
stem + "z" => stem + "ze" ;
stem + "s" => stem + "se" ;
_ + ("ň"|"ť"|"ď") => dentalStem s + "ě" ;
_ + #softConsonant => s + "e" ;
pan => pan + "ě" pan => pan + "ě"
} ; } ;
@@ -106,12 +122,12 @@ oper
-- so this is the lincat of N -- 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 -- But traditional tables make agreement easier to handle in syntax
-- so this is the lincat of CN -- 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 -- this is used in UseN
@@ -136,7 +152,7 @@ oper
Ins => forms.pins Ins => forms.pins
} }
} ; } ;
g = forms.g g = forms.g ; gPl = forms.gPl
} ; } ;
-- terminology of CEG -- terminology of CEG
@@ -209,7 +225,7 @@ oper
pdat = pan + "ům" ; pdat = pan + "ům" ;
pacc,pins = pan + "y" ; pacc,pins = pan + "y" ;
ploc = addEch pan ; ploc = addEch pan ;
g = Masc Anim g,gPl = Masc Anim
} ; } ;
declPREDSEDA : DeclensionType = \predseda -> --- 3.5.4: sgen y/i declPREDSEDA : DeclensionType = \predseda -> --- 3.5.4: sgen y/i
@@ -231,7 +247,7 @@ oper
pdat = predsed + "ům" ; pdat = predsed + "ům" ;
pacc,pins = predsed + "y" ; pacc,pins = predsed + "y" ;
ploc = addEch predsed ; ploc = addEch predsed ;
g = Masc Anim g,gPl = Masc Anim
} ; } ;
-- the oblique stem is a separate argument, because it cannot always be -- the oblique stem is a separate argument, because it cannot always be
@@ -248,7 +264,7 @@ oper
pgen = hrd + "ů" ; pgen = hrd + "ů" ;
pdat = hrd + "ům" ; pdat = hrd + "ům" ;
ploc = addEch hrd ; 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 declHRAD : DeclensionType = \hrad -> --- 3.5.2: sloc u/ě/e extra arg, sport-u, hrad-ě ; sgen u/a
@@ -259,18 +275,18 @@ oper
in in
{ {
snom = zena ; snom = zena ;
sgen = zen + "y" ; --- i after soft cons sometimes sgen = addY zen ;
sdat,sloc = zen + "ě" ; --- i after soft cons sometimes ; skol+e sdat,sloc = addE zen ;
sacc = zen + "u" ; sacc = zen + "u" ;
svoc = shortenVowel zen + "o" ; ---- shorten ? svoc = shortenVowel zen + "o" ; ---- shorten ?
sins = zen + "ou" ; sins = zen + "ou" ;
pnom,pacc = zen + "y" ; --- also sgen pnom,pacc = addY zen ;
pgen = zen ; --- sometimes with vowel shortening pgen = zen ; --- sometimes with vowel shortening
pdat = zen + "ám" ; pdat = zen + "ám" ;
ploc = zen + "ách" ; ploc = zen + "ách" ;
pins = zen + "ami" ; pins = zen + "ami" ;
g = Fem g,gPl = Fem
} ; } ;
declMESTO : DeclensionType = \mesto -> --- 3.7.1 sloc u/e ; pgen vowel shortening sometimes ; ploc variations declMESTO : DeclensionType = \mesto -> --- 3.7.1 sloc u/e ; pgen vowel shortening sometimes ; ploc variations
@@ -288,7 +304,7 @@ oper
pdat = mest + "ům" ; pdat = mest + "ům" ;
ploc = mest + "ech" ; --- with variations ploc = mest + "ech" ; --- with variations
pins = mest + "y" ; pins = mest + "y" ;
g = Neutr g,gPl = Neutr
} ; } ;
-- Latin masculines in -us: the ending is dropped outside the nominative -- Latin masculines in -us: the ending is dropped outside the nominative
@@ -301,7 +317,7 @@ oper
} ; } ;
declLATINUSA : DeclensionType = \genius -> 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 -- Latin neuters in -um: the ending is dropped outside the nominative
-- (kontinuum - kontinua), otherwise they follow město -- (kontinuum - kontinua), otherwise they follow město
@@ -324,7 +340,7 @@ oper
pdat = schemat + "ům" ; pdat = schemat + "ům" ;
ploc = schemat + "ech" ; ploc = schemat + "ech" ;
pins = schemat + "y" ; pins = schemat + "y" ;
g = Neutr g,gPl = Neutr
} ; } ;
-- the hrad type with genitive -a instead of -u (les - lesa, zákon - zákona) -- the hrad type with genitive -a instead of -u (les - lesa, zákon - zákona)
@@ -347,7 +363,7 @@ oper
pgen,ploc = a.pgen ; pgen,ploc = a.pgen ;
pdat = a.msins ; pdat = a.msins ;
pins = a.pins ; pins = a.pins ;
g = Fem g,gPl = Fem
} ; } ;
declADJM : DeclensionType = \nulty -> declADJM : DeclensionType = \nulty ->
@@ -362,14 +378,14 @@ oper
pgen,ploc = a.pgen ; pgen,ploc = a.pgen ;
pdat = a.msins ; pdat = a.msins ;
pins = a.pins ; pins = a.pins ;
g = Masc Inanim g,gPl = Masc Inanim
} ; } ;
-- indeclinable loans: bombé, tamari, software -- indeclinable loans: bombé, tamari, software
declINVAR : Gender -> DeclensionType = \g,s -> { declINVAR : Gender -> DeclensionType = \g,s -> {
snom,sgen,sdat,sacc,svoc,sloc,sins = s ; snom,sgen,sdat,sacc,svoc,sloc,sins = s ;
pnom,pgen,pdat,pacc,ploc,pins = s ; pnom,pgen,pdat,pacc,ploc,pins = s ;
g = g g,gPl = g
} ; } ;
declMUZ : DeclensionType = \muz_ -> --- 3.5.3 : sdat,sloc ; pnom declMUZ : DeclensionType = \muz_ -> --- 3.5.3 : sdat,sloc ; pnom
@@ -395,7 +411,7 @@ oper
pdat = muz + "ům" ; pdat = muz + "ům" ;
ploc = muz + "ích" ; ploc = muz + "ích" ;
pins = muz + "i" ; pins = muz + "i" ;
g = Masc Anim g,gPl = Masc Anim
} ; } ;
declSOUDCE : DeclensionType = \soudce -> --- 3.5.3: sdat/sloc i,ovi ; pnom i/ové declSOUDCE : DeclensionType = \soudce -> --- 3.5.3: sdat/sloc i,ovi ; pnom i/ové
@@ -412,7 +428,7 @@ oper
pacc = soudce ; pacc = soudce ;
ploc = soudc + "ích" ; ploc = soudc + "ích" ;
pins = soudc + "i" ; pins = soudc + "i" ;
g = Masc Anim g,gPl = Masc Anim
} ; } ;
declSTROJ : DeclensionType = \stroj -> declSTROJ : DeclensionType = \stroj ->
@@ -427,7 +443,7 @@ oper
pdat = stroj + "ům" ; pdat = stroj + "ům" ;
ploc = stroj + "ích" ; ploc = stroj + "ích" ;
pins = stroj + "i" ; pins = stroj + "i" ;
g = Masc Inanim g,gPl = Masc Inanim
} ; } ;
declRUZE : DeclensionType = \ruze -> --- 3.6.2: pgen ulice-ulic, chvile-cvil declRUZE : DeclensionType = \ruze -> --- 3.6.2: pgen ulice-ulic, chvile-cvil
@@ -443,11 +459,11 @@ oper
pdat = ruz + "ím" ; pdat = ruz + "ím" ;
ploc = ruz + "ích" ; ploc = ruz + "ích" ;
pins = ruz + "emi" ; pins = ruz + "emi" ;
g = Fem g,gPl = Fem
} ; } ;
declPISEN : DeclensionType = \pisen -> declPISEN : DeclensionType = \pisen ->
let pisn = dropFleetingE pisen let pisn = dentalStem (dropFleetingE pisen)
in in
{ {
snom,sacc = pisen ; snom,sacc = pisen ;
@@ -460,21 +476,23 @@ oper
pdat = pisn + "ím" ; pdat = pisn + "ím" ;
ploc = pisn + "ích" ; ploc = pisn + "ích" ;
pins = pisn + "ěmi" ; pins = pisn + "ěmi" ;
g = Fem g,gPl = Fem
} ; } ;
declKOST : DeclensionType = \kost -> declKOST : DeclensionType = \kost ->
let stem = dentalStem kost
in
{ {
snom,sacc = kost ; snom,sacc = kost ;
sgen,sdat,svoc,sloc = kost + "i" ; --- pnom,pacc sgen,sdat,svoc,sloc = stem + "i" ; --- pnom,pacc
sins = kost + "í" ; --- pgen sins = stem + "í" ; --- pgen
pnom,pacc = kost + "i" ; pnom,pacc = stem + "i" ;
pgen = kost + "í" ; pgen = stem + "í" ;
pdat = kost + "em" ; pdat = stem + "em" ;
ploc = kost + "ech" ; ploc = stem + "ech" ;
pins = kost + "mi" ; pins = kost + "mi" ;
g = Fem g,gPl = Fem
} ; } ;
declKURE : DeclensionType = \kure -> declKURE : DeclensionType = \kure ->
@@ -491,7 +509,7 @@ oper
pdat = kur + "atům" ; pdat = kur + "atům" ;
ploc = kur + "atech" ; ploc = kur + "atech" ;
pins = kur + "aty" ; pins = kur + "aty" ;
g = Neutr g,gPl = Neutr
} ; } ;
declMORE : DeclensionType = \more -> --- 3.7.2 pgen zero sometimes declMORE : DeclensionType = \more -> --- 3.7.2 pgen zero sometimes
@@ -507,7 +525,7 @@ oper
pdat = mor + "ím" ; pdat = mor + "ím" ;
ploc = mor + "ích" ; ploc = mor + "ích" ;
pins = mor + "i" ; pins = mor + "i" ;
g = Neutr g,gPl = Neutr
} ; } ;
declSTAVENI : DeclensionType = \staveni -> declSTAVENI : DeclensionType = \staveni ->
@@ -519,7 +537,7 @@ oper
pdat = staveni + "m" ; pdat = staveni + "m" ;
ploc = staveni + "ch" ; ploc = staveni + "ch" ;
pins = staveni + "mi" ; pins = staveni + "mi" ;
g = Neutr g,gPl = Neutr
} ; } ;
--------------------------- ---------------------------
@@ -528,8 +546,24 @@ oper
-- to be used for AP: 56 forms for each degree -- to be used for AP: 56 forms for each degree
Adjective : Type = {s : Gender => Number => Case => Str} ; 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 -- 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 = { AdjForms : Type = {
msnom, fsnom, nsnom : Str ; -- svoc = snom 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 { guessAdjForms : Str -> AdjForms = \s -> case s of {
_ + "ý" => mladyAdjForms s ; _ + "ý" => mladyAdjForms s ;
_ + "í" => jarniAdjForms s ; _ + "í" => jarniAdjForms s ;
@@ -652,32 +716,133 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
--------------------- ---------------------
-- Verbs -- 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, inf,
impsg2, imppl1, imppl2,
pressg1, pressg2, pressg3, pressg1, pressg2, pressg3,
prespl1, prespl2, prespl3, prespl1, prespl2, prespl3,
pastpartsg, pastpartpl, pastpartsg, pastpartpl : Str
---- passpart,
negpressg3 : Str -- matters only for copula
} ; } ;
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} ; ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
verbAgr : VerbForms -> Agr -> Bool -> Str ---- TODO tenses hasCliticComplement : ComplementCase -> Bool -> Bool = \p,hasClit ->
= \vf,a,b -> case a of { case <hasClit,p.hasPrep,p.c> of {
Ag _ Sg P1 => vf.pressg1 ; <True,False,Gen | Dat | Acc> => True ;
Ag _ Sg P2 => vf.pressg2 ; _ => False
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
} ; } ;
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" ; inf = "být" ;
impsg2 = "buď" ; imppl1 = "buďme" ; imppl2 = "buďte" ;
pressg1 = "jsem" ; pressg1 = "jsem" ;
pressg2 = "jsi" ; pressg2 = "jsi" ;
pressg3 = "je" ; pressg3 = "je" ;
@@ -686,14 +851,14 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
prespl3 = "jsou" ; prespl3 = "jsou" ;
pastpartsg = "byl" ; pastpartsg = "byl" ;
pastpartpl = "byli" ; pastpartpl = "byli" ;
negpressg3 = "ní" ; -- ne is added to this }) ** {negpressg3 = "není"} ;
} ;
haveVerbForms : VerbForms = { haveVerbForms : VerbForms = withNeg {
inf = "mít" ; inf = "mít" ;
impsg2 = "měj" ; imppl1 = "mějme" ; imppl2 = "mějte" ;
pressg1 = "mám" ; pressg1 = "mám" ;
pressg2 = "máš" ; pressg2 = "máš" ;
pressg3, negpressg3 = "má" ; pressg3 = "má" ;
prespl1 = "máme" ; prespl1 = "máme" ;
prespl2 = "máte" ; prespl2 = "máte" ;
prespl3 = "mají" ; prespl3 = "mají" ;
@@ -709,11 +874,12 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
kupo = Predef.tk 3 kupovat ; kupo = Predef.tk 3 kupovat ;
kupu = Predef.tk 1 kupo + "u" kupu = Predef.tk 1 kupo + "u"
in in
{ withNeg {
inf = kupovat ; inf = kupovat ;
impsg2 = kupu + "j" ; imppl1 = kupu + "jme" ; imppl2 = kupu + "jte" ;
pressg1 = kupu + "ji" ; --- kupuju pressg1 = kupu + "ji" ; --- kupuju
pressg2 = kupu + "ješ" ; pressg2 = kupu + "ješ" ;
pressg3, negpressg3 = kupu + "je" ; pressg3 = kupu + "je" ;
prespl1 = kupu + "jeme" ; prespl1 = kupu + "jeme" ;
prespl2 = kupu + "jete" ; prespl2 = kupu + "jete" ;
prespl3 = kupu + "jí" ; --- kupujou prespl3 = kupu + "jí" ; --- kupujou
@@ -725,11 +891,12 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
let let
kry = shortenVowel (Predef.tk 1 krýt) ; kry = shortenVowel (Predef.tk 1 krýt) ;
in in
{ withNeg {
inf = krýt ; inf = krýt ;
impsg2 = kry + "j" ; imppl1 = kry + "jme" ; imppl2 = kry + "jte" ;
pressg1 = kry + "ji" ; pressg1 = kry + "ji" ;
pressg2 = kry + "ješ" ; pressg2 = kry + "ješ" ;
pressg3, negpressg3 = kry + "je" ; pressg3 = kry + "je" ;
prespl1 = kry + "jeme" ; prespl1 = kry + "jeme" ;
prespl2 = kry + "jete" ; prespl2 = kry + "jete" ;
prespl3 = kry + "jí" ; prespl3 = kry + "jí" ;
@@ -747,12 +914,13 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
dat, cdat,pdat, dat, cdat,pdat,
loc, loc,
ins,pins : Str ; ins,pins : Str ;
a : Agr a : Agr ; isDrop : Bool
} ; } ;
personalPron : Agr -> PronForms = \a -> personalPron : Agr -> PronForms = \a ->
{a = a ; cnom = []} ** {a = a ; cnom = [] ; isDrop = False} **
case a of { case a of {
AgQuant _ => {nom,gen,cgen,pgen,acc,cacc,pacc,dat,cdat,pdat,loc,ins,pins = nonExist} ;
Ag _ Sg P1 => { Ag _ Sg P1 => {
nom = "já" ; nom = "já" ;
gen,acc,pgen,pacc = "mne" ; gen,acc,pgen,pacc = "mne" ;
@@ -783,9 +951,10 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
} ; } ;
Ag Fem Sg P3 => { Ag Fem Sg P3 => {
nom = "ona" ; nom = "ona" ;
gen = "její" ; gen,dat,cgen,cdat,ins = "jí" ;
dat,acc,cgen,cacc,cdat,ins = "ji" ; acc,cacc = "ji" ;
pgen,pdat,pacc,loc,pins = "ní" ; pacc = "ni" ;
pgen,pdat,loc,pins = "ní" ;
} ; } ;
Ag Neutr Sg P3 => { Ag Neutr Sg P3 => {
nom = "ono" ; nom = "ono" ;
@@ -810,7 +979,7 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
dat,cdat,pdat = "nám" ; dat,cdat,pdat = "nám" ;
ins,pins = "námi" ; ins,pins = "námi" ;
} ; } ;
Ag _ Pl P2 => { Ag _ Pl P2 | AgPol _ => {
nom = "vy" ; nom = "vy" ;
gen,acc, gen,acc,
cgen,cacc, cgen,cacc,
@@ -821,7 +990,8 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
} ; } ;
Ag g Pl P3 => { Ag g Pl P3 => {
nom = case g of { nom = case g of {
Masc _ => "oni" ; Masc Anim => "oni" ;
Masc Inanim => "ony" ;
Fem => "ony" ; Fem => "ony" ;
Neutr => "ona" 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 P1 => mladyAdjForms "my" ** {msnom = "můj" ; pdat = "mým"} ; --- alts: moje, moji,...
Ag _ Sg P2 => mladyAdjForms "tvy" ** {msnom = "tvůj" ; pdat = "tvým"} ; Ag _ Sg P2 => mladyAdjForms "tvy" ** {msnom = "tvůj" ; pdat = "tvým"} ;
Ag _ Pl P1 => jarniAdjForms "naše" ** { Ag _ Pl P1 => nasPossessiveForms "náš" "naš" ;
msnom = "náš" ; Ag _ Pl P2 | AgPol _ => nasPossessiveForms "váš" "vaš" ;
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 Fem Sg P3 => jarniAdjForms "její" ** {pdat = "jejím"} ; Ag Fem Sg P3 => jarniAdjForms "její" ** {pdat = "jejím"} ;
Ag (Masc _ | Neutr) Sg P3 => invarDemPronForms "jeho" ** {pdat = "jeho"} ; 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"} ; reflPossessivePron : DemPronForms = mladyAdjForms "svy" ** {msnom = "svůj" ; pdat = "svým"} ;
mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a -> mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a ->
@@ -918,7 +1090,8 @@ oper
Determiner : Type = { Determiner : Type = {
s : Gender => Case => Str ; 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 -> { mkDemPronForms : Str -> DemPronForms = \t -> {
@@ -984,50 +1157,38 @@ oper
adjAdj = adjFormsAdjective demAdj adjAdj = adjFormsAdjective demAdj
in { in {
s = \\g,c => adjAdj.s ! g ! Sg ! c ; s = \\g,c => adjAdj.s ! g ! Sg ! c ;
size = size size = size ; head = CountedHead
} ; } ;
-- example: number 1 -- example: number 1
oneNumeral : Determiner = numeralFormsDeterminer ((mkDemPronForms "jedn") ** {msnom = "jeden"}) Num1 ; oneNumeral : Determiner = numeralFormsDeterminer ((mkDemPronForms "jedn") ** {msnom = "jeden"}) Num1 ;
-- numbers 2,3,4 ---- to check if everything comes out right with the determiner type -- Unlike adjectives, 2--4 do not use the genitive for animate accusatives.
twoNumeral : Determiner = twoNumeral : Determiner = {
let forms = { s = \\g,c => case c of {
msnom = "dva" ; fsnom, nsnom, fsacc = "dvě" ; Nom|Acc|Voc => case g of {Masc _ => "dva" ; _ => "dvě"} ;
msgen, fsgen, msloc = "dvou" ; Gen|Loc => "dvou" ; Dat|Ins => "dvěma"
msdat, msins, fsins = "dvěma" } ; size = Num2_4 ; head = CountedHead
} } ;
in numeralFormsDeterminer forms Num2_4 ; threeNumeral : Determiner = {
s = \\_,c => case c of {
threeNumeral : Determiner = Nom|Acc|Voc => "tři" ; Gen => "tří" ; Dat => "třem" ; Loc => "třech" ; Ins => "třemi"
let forms = { } ; size = Num2_4 ; head = CountedHead
msnom, fsnom, nsnom, fsacc, msgen, fsgen = "tři" ; } ;
msdat = "třem" ; fourNumeral : Determiner = {
msloc = "třech" ; s = \\_,c => case c of {
msins,fsins = "třemi" ; Nom|Acc|Voc => "čtyři" ; Gen => "čtyř" ; Dat => "čtyřem" ; Loc => "čtyřech" ; Ins => "čtyřmi"
} } ; size = Num2_4 ; head = CountedHead
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 ;
-- for the numbers 5 upwards -- for the numbers 5 upwards
regNumeral : Str -> Str -> Determiner = \pet,peti -> regNumeral : Str -> Str -> Determiner = \pet,peti -> {
let forms = { s = \\_,c => case c of {Nom | Acc | Voc => pet ; _ => peti} ;
msnom,fsnom,nsnom = pet ; size = Num5 ; head = CountedHead
msgen, fsgen, msdat, fsacc, msloc, msins, fsins = peti } ;
}
in numeralFormsDeterminer forms Num5 ;
invarDeterminer : Str -> NumSize -> Determiner = \sto,size -> invarDeterminer : Str -> NumSize -> Determiner = \sto,size ->
regNumeral sto sto ; (regNumeral sto sto) ** {size = size} ;
invarNumeral : Str -> Determiner = \s -> invarDeterminer s Num5 ; invarNumeral : Str -> Determiner = \s -> invarDeterminer s Num5 ;
@@ -1035,22 +1196,105 @@ oper
-- combining nouns with numerals -- combining nouns with numerals
param 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 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 numSizeForm : (Number => Case => Str) -> NumSize -> Case -> Str
= \cns,n,c -> case n of { = \cns,n,c -> case n of {
Num1 => cns ! Sg ! c ; Num1 => cns ! Sg ! c ;
NumScale => cns ! Pl ! Gen ;
Num2_4 => cns ! Pl ! c ; Num2_4 => cns ! Pl ! c ;
Num5 => case c of { Num5 => case c of {
Nom | Acc => cns ! Pl ! Gen ; Nom | Acc | Voc => cns ! Pl ! Gen ;
_ => cns ! Pl ! c _ => 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 numSizeAgr : Gender -> NumSize -> Person -> Agr
= \g,ns,p -> case ns of { = \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 ; Num2_4 => Ag g Pl p ;
Num1 => Ag g Sg p Num1 => Ag g Sg p
} ; } ;
+30 -39
View File
@@ -1,51 +1,42 @@
concrete SentenceCze of Sentence = CatCze ** concrete SentenceCze of Sentence = CatCze ** open Prelude, ResCze in {
open Prelude, ResCze in {
lin lin
PredVP np vp = { PredVP np vp = {
subj = case np.hasClit of { -- A dropped subject still contributes an empty constituent, so PGF
True => np.clit ! Nom ; -- pro-drop -- retains the pronoun and constrains its person through agreement.
False => np.s ! Nom 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 ;
verb = vp.verb ; a = np.a ; isDrop = np.isDrop ; clitPresent = vp.clitPresent
clit = vp.clit ! np.a ;
compl = vp.compl ! np.a ;
a = np.a ;
} ; } ;
UseCl temp pol cl = { UseCl temp pol cl = let v = pol.s ++ verbAgr cl.verb cl.a pol.p in
s = temp.s ++ cl.subj ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.compl ; 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 = let v = pol.s ++ verbAgr cl.verb cl.a pol.p in {
UseQCl temp pol cl = { s = temp.s ++ case cl.yesNo of {
s = temp.s ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.subj ++ cl.compl ; 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 = { UseRCl temp pol rcl = {
s = \\a => temp.s ++ s = \\a => temp.s ++ rcl.subj ! a ++ rcl.clit ! a ++
rcl.subj ! a ++ rcl.clit ! a ++ pol.s ++ verbAgr rcl.verb a pol.p ++ rcl.compl ! a
pol.s ++ verbAgr rcl.verb a pol.p ++
rcl.compl ! a ;
} ; } ;
ImpVP vp = {s = \\pos,a =>
-- no imperative in VerbForms yet; the 1st person plural present is used imperativeAgr vp.verb a pos ++ vp.clit ! a ++ vp.compl ! a
-- instead, which is the normal register in mathematical Czech } ;
-- ("předpokládáme, že ..." = "we assume that ...") EmbedS s = {s = (frontSentence "že" s).s} ;
ImpVP vp = let agr = Ag (Masc Anim) Pl P1 in EmbedQS qs = {s = qs.ind} ;
{s = vp.clit ! agr ++ verbAgr vp.verb agr True ++ vp.compl ! agr} ;
EmbedS s = {s = "že" ++ s.s} ;
EmbedQS qs = {s = qs.s} ;
EmbedVP vp = let agr = Ag Neutr Sg P3 in EmbedVP vp = let agr = Ag Neutr Sg P3 in
{s = vp.clit ! agr ++ vp.verb.inf ++ vp.compl ! agr} ; {s = vp.verb.inf ++ vp.clit ! agr ++ vp.compl ! agr} ;
AdvS a s = frontSentence a.s s ;
AdvS a s = {s = a.s ++ s.s} ; ExtAdvS a s = prefixSentence (a.s ++ SOFT_BIND ++ ",") s ;
SSubjS a subj b = appendSentence a (SOFT_BIND ++ "," ++ (frontSentence subj.s b).s) ;
ExtAdvS a s = {s = a.s ++ SOFT_BIND ++ "," ++ s.s} ;
SSubjS a subj b = {s = a.s ++ SOFT_BIND ++ "," ++ subj.s ++ b.s} ;
} }
+42 -13
View File
@@ -5,27 +5,38 @@ concrete StructuralCze of Structural = CatCze **
oper oper
adjDet : AdjForms -> Determiner = \afs -> { adjDet : AdjForms -> Determiner = \afs -> {
s = \\g,c => (adjFormsAdjective afs).s ! g ! Sg ! c ; s = \\g,c => (adjFormsAdjective afs).s ! g ! Sg ! c ;
size = Num1 size = Num1 ; head = CountedHead
} ; } ;
lin 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" ; and_Conj = mkConj "a" ;
both7and_DConj = {s1 = "jak" ; s2 = "tak"} ; both7and_DConj = {s1 = "jak" ; s2 = "tak"} ;
between_Prep = mkPrep "mezi" Ins ; between_Prep = mkPrep "mezi" Ins ;
by8agent_Prep = mkPrep "od" Gen ; ---- TODO this means "from", there might be no good translation by8agent_Prep = mkPrep "od" Gen ; ---- TODO this means "from", there might be no good translation
by8means_Prep = mkPrep "pomocí" Gen ; by8means_Prep = mkPrep "pomocí" Gen ;
can_VV = { can_VV = mkModalVV (lin V (withNeg {
inf = "moci" ; inf = "moci" ;
impsg2,imppl1,imppl2 = nonExist ;
pressg1 = "mohu" ; pressg1 = "mohu" ;
pressg2 = "můžeš" ; pressg2 = "můžeš" ;
pressg3, negpressg3 = "může" ; pressg3 = "může" ;
prespl1 = "můžeme" ; prespl1 = "můžeme" ;
prespl2 = "můžete" ; prespl2 = "můžete" ;
prespl3 = "mohou" ; prespl3 = "mohou" ;
pastpartsg = "mohl" ; pastpartsg = "mohl" ;
pastpartpl = "mohli" ; pastpartpl = "mohli" ;
} ; })) ;
either7or_DConj = {s1 = "buď" ; s2 = "nebo"} ; either7or_DConj = {s1 = "buď" ; s2 = "nebo"} ;
every_Det = adjDet (mladyAdjForms "každý") ; every_Det = adjDet (mladyAdjForms "každý") ;
few_Det = invarNumeral "málo" ; -- CEG 6.8 --- TODO genitive mála few_Det = invarNumeral "málo" ; -- CEG 6.8 --- TODO genitive mála
@@ -37,20 +48,24 @@ lin
that_Subj = {s = "že"} ; that_Subj = {s = "že"} ;
under_Prep = mkPrep "pod" Ins ; under_Prep = mkPrep "pod" Ins ;
where_IAdv = {s = "kde"} ; where_IAdv = {s = "kde"} ;
from_Prep = mkPrep (pre {"s"|"z" => "ze" ; _ => "z"}) Gen ; ---- consonant clusters from_Prep = mkPrep zPreposition Gen ;
have_V2 = mkV2 haveVerbForms ; have_V2 = mkV2 <lin V haveVerbForms : CatCze.V> ;
in_Prep = mkPrep (pre {"v"|"m" => "ve" ; _ => "v"}) Loc ; ---- in_Prep = v_Prep Loc ;
many_Det = regNumeral "mnoho" "mnoha" ; -- CEG 6.8 ---- many_Det = regNumeral "mnoho" "mnoha" ; -- CEG 6.8 ----
or_Conj = mkConj "nebo" ; or_Conj = mkConj "nebo" ;
somePl_Det = regNumeral "několik" "několika" ; -- CEG 6.8 ---- 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 something_NP =
possess_Prep = mkPrep "" Gen ; 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") "" ; that_Quant = demPronFormsAdjective (mkDemPronForms "tamt") "" ;
this_Quant = demPronFormsAdjective (mkDemPronForms "t") "to" ; this_Quant = demPronFormsAdjective (mkDemPronForms "t") "to" ;
to_Prep = mkPrep "do" Gen ; 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) ; youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ;
he_Pron = mkPron (Ag (Masc Anim) Sg P3) ; he_Pron = mkPron (Ag (Masc Anim) Sg P3) ;
she_Pron = mkPron (Ag Fem Sg P3) ; she_Pron = mkPron (Ag Fem Sg P3) ;
@@ -58,5 +73,19 @@ lin
we_Pron = mkPron (Ag (Masc Anim) Pl P1) ; we_Pron = mkPron (Ag (Masc Anim) Pl P1) ;
youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ; youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ;
they_Pron = mkPron (Ag (Masc Anim) Pl P3) ; 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
View File
@@ -19,29 +19,36 @@ lin
NumPN card = lin PN {s = \\c => card.s ! Neutr ! c ; g = Neutr} ; 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" -- the numeral is an invariable label: "úroveň pět", "na úrovni pět"
CNNumNP cn card = { CNNumNP cn card =
s,clit,prep = \\c => cn.s ! Sg ! c ++ card.s ! cn.g ! Nom ; let s : Case => Str = \\c => cn.s ! Sg ! c ++ card.s ! cn.g ! Nom in npForms s s ** {
a = Ag cn.g Sg P3 ; clit = s ;
hasClit = False ; a = Ag cn.g Sg P3 ; m = Mod cn.g Sg ;
hasClit = False ; isDrop = False ; isPron = False ;
} ; } ;
CNIntNP cn i = { CNIntNP cn i =
s,clit,prep = \\c => cn.s ! Sg ! c ++ i.s ; let s : Case => Str = \\c => cn.s ! Sg ! c ++ i.s in npForms s s ** {
a = Ag cn.g Sg P3 ; clit = s ;
hasClit = False ; 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 -- as DetCN in NounCze, with the symbols in apposition
CNSymbNP det cn xs = { CNSymbNP det cn xs =
s,clit,prep = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ++ xs.s ; let s : Case => Str = \\c => det.s ! nounGender cn (numSizeNumber det.size) ! c ++ numSizeForm cn.s det.size c ++ xs.s
a = numSizeAgr cn.g det.size P3 ; in npForms s s ** {
hasClit = False ; 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 SymbNum sy = invarNumeral sy.s ; -- "n čísel", like numerals from 5 up
SymbOrd sy = {s = glue sy.s "-tý"} ; ---- Ord is still an uninflected string SymbOrd sy = {s = \\g,n,c =>
glue sy.s ((adjFormsAdjective (mladyAdjForms "-tý")).s ! g ! n ! c)
} ;
oper oper
symbolPN : Str -> PN symbolPN : Str -> PN
+1 -1
View File
@@ -6,7 +6,7 @@ concrete TenseCze of Tense =
in { in {
lin lin
PNeg = { PNeg = {
s = "ne" ++ Predef.BIND ; s = [] ;
p = False p = False
} ; } ;
PPos = { PPos = {
+49 -34
View File
@@ -2,62 +2,73 @@ concrete VerbCze of Verb = CatCze ** open ResCze, Prelude in {
lin lin
UseV v = { UseV v = {
verb = v ; verb = v ; clitPresent = v.isRefl ;
clit,compl = \\_ => [] clit = \\_ => v.refl ; compl = \\_ => []
} ; } ;
ComplSlash vps np = case <np.hasClit, vps.c.hasPrep> of { ComplSlash vps np = case hasCliticComplement vps.c np.hasClit of {
<True,False> => vps ** { True => vps ** {
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c ; clitPresent = True ;
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c ++ vps.clitAfter ! a ;
compl = \\a => vps.compl ! a ++ vps.ind ! a compl = \\a => vps.compl ! a ++ vps.ind ! a
} ; } ;
_ => vps ** { False => vps ** {
compl = \\a => vps.compl ! a ++ vps.c.s ++ np.s ! vps.c.c ++ vps.ind ! a 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 = { SlashV2a v = {
verb = v ; verb = v ; clitPresent = v.isRefl ;
clit,compl = \\_ => [] ; clit = \\_ => v.refl ; compl = \\_ => [] ;
c = v.c ; c = v.c ;
ind = \\_ => [] ind = \\_ => [] ; clitAfter = \\_ => []
} ; } ;
-- three-place verbs: c = direct object case, c2 = indirect object case -- Full objects retain c-before-c2 order; weak objects follow case order.
Slash2V3 v np = { -- fill the direct object, leave the indirect open Slash2V3 v np = let
verb = v ; isClit = hasCliticComplement v.c np.hasClit ;
clit = \\_ => [] ; weak = case isClit of {True => np.clit ! v.c.c ; False => []} ;
compl = \\_ => v.c.s ++ np.s ! v.c.c ; 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 ; c = v.c2 ;
ind = \\_ => [] ind = \\_ => []
} ; } ;
Slash3V3 v np = { -- fill the indirect object (rendered after the object slot) Slash3V3 v np = let
verb = v ; isClit = hasCliticComplement v.c2 np.hasClit ;
clit = \\_ => [] ; 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 = \\_ => [] ; compl = \\_ => [] ;
c = v.c ; 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 = { UseComp comp = {
verb = copulaVerbForms ; verb = copulaVerbForms ; clitPresent = False ;
clit = \\_ => [] ; clit = \\_ => [] ;
compl = comp.s compl = comp.s
} ; } ;
CompAP ap = { CompAP ap = {s = ap.pred} ;
s = \\a => case a of {
Ag g n p_ => ap.s ! g ! n ! Nom
}
} ;
CompNP np = { 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 = { CompCN cn = {
s = \\a => case a of { 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: -- VerbForms has no passive participle yet, so the reflexive passive is used:
-- "číslo se dělí" = "the number is divided" -- "číslo se dělí" = "the number is divided"
PassV2 v = { PassV2 v = {
verb = v ; verb = v ; clitPresent = True ;
clit = \\_ => "se" ; clit = \\_ => "se" ;
compl = \\_ => [] compl = \\_ => []
} ; } ;
ComplVV vv vp = { ComplVV vv vp = {
verb = vv ; verb = vv ; clitPresent = orB vv.isRefl (andB vv.isAux vp.clitPresent) ;
clit = vp.clit ; clit = \\a => vv.refl ++ case vv.isAux of {True => vp.clit ! a ; False => []} ;
compl = \\a => vp.verb.inf ++ vp.compl ! a compl = \\a => vp.verb.inf ++ case vv.isAux of {True => [] ; False => vp.clit ! a} ++ vp.compl ! a
} ; } ;
ComplVS vs s = { ComplVS vs s = {
verb = vs ; verb = vs ; clitPresent = vs.isRefl ;
clit = \\_ => [] ; clit = \\_ => vs.refl ;
compl = \\_ => SOFT_BIND ++ "," ++ "že" ++ s.s compl = \\_ => SOFT_BIND ++ "," ++ (frontSentence "že" s).s
} ; } ;
ComplVQ v q = {
verb = v ; clitPresent = v.isRefl ; clit = \\_ => v.refl ;
compl = \\_ => SOFT_BIND ++ "," ++ q.ind
} ;
} }
+39
View File
@@ -0,0 +1,39 @@
-- A finite fragment of the Czech extensions. Subject and BareRNP limit
-- ProDrop and predeterminers to one application without recursive aliases.
abstract CzeExtensionRoundTrip = AllCzeAbs [
Utt, S, Cl, NP, VP, VPSlash, Pron, V, V2, AP, QCl, QS, IP,
N, CN, Det, Quant, Num, IDet, Predet, Adv, Prep, Subj, Temp, Tense, Ant, Pol,
PrepNP, possess_Prep, by8agent_Prep, with_Prep, he_Pron, we_Pron,
IAdv, UttIAdv, PrepIP, QuestVP, whoSg_IP,
A, Comp, UseComp, CompAP, young_A,
UttS, UttQS, UttAdv, UseCl, UseQCl, UsePron, UseV, SlashV2a, ComplSlash,
SlashV2AP, DativeCopulaCl, DativeCopulaQCl, SubjS,
UseN, DetCN, DetQuant, DefArt, PossPron, this_Quant, NumSg, NumPl, IdetCN, UttNP,
TTAnt, TPres, ASimul, PPos, PNeg,
i_Pron, she_Pron, youPol_Pron, have_V2, love_V2, wait_V2,
year_N, child_N, woman_N, apple_N, how8many_IDet, only_Predet, all_Predet, if_Subj
] ** {
flags startcat = Utt ;
cat Subject ; BareRNP ; RNP ; ComparisonNP ; ModifiedNP ; NPModifier ;
fun
-- NPModifier excludes PrepNP, avoiding recursion through NP and Adv.
AdvPron : Pron -> NPModifier -> ModifiedNP ;
PredetNP : Predet -> ModifiedNP -> NP ;
home_Adv : NPModifier ;
ComparisonPron : Pron -> ComparisonNP ;
Compare : A -> ComparisonNP -> AP ;
ModifiedN : AP -> N -> CN ;
FullSubject : NP -> Subject ;
DroppedSubject : Pron -> Subject ;
PredSubject : Subject -> VP -> Cl ;
ReflPron : BareRNP ;
ReflPoss : Num -> CN -> BareRNP ;
UseRNP : BareRNP -> RNP ;
PredetRNP : Predet -> BareRNP -> RNP ;
ReflRNP : VPSlash -> RNP -> VP ;
like_AP : AP ; son_N : N ; wash_V : V ;
fast_A : A ;
two_Num, five_Num, twentyOne_Num, twentyTwo_Num : Num ;
twelveHundred_Num, twentyTwoHundred_Num : Num ;
writeAbout_V2 : V2 ;
}
+44
View File
@@ -0,0 +1,44 @@
concrete CzeExtensionRoundTripCze of CzeExtensionRoundTrip = AllCze [
Utt, S, Cl, NP, VP, VPSlash, Pron, V, V2, AP, QCl, QS, IP,
N, CN, Det, Quant, Num, IDet, Predet, Adv, Prep, Subj, Temp, Tense, Ant, Pol,
PrepNP, possess_Prep, by8agent_Prep, with_Prep, he_Pron, we_Pron,
IAdv, UttIAdv, PrepIP, QuestVP, whoSg_IP,
A, Comp, UseComp, CompAP, young_A,
UttS, UttQS, UttAdv, UseCl, UseQCl, UsePron, UseV, SlashV2a, ComplSlash,
SlashV2AP, DativeCopulaCl, DativeCopulaQCl, SubjS,
UseN, DetCN, DetQuant, DefArt, PossPron, this_Quant, NumSg, NumPl, IdetCN, UttNP,
TTAnt, TPres, ASimul, PPos, PNeg,
i_Pron, she_Pron, youPol_Pron, have_V2, love_V2, wait_V2,
year_N, child_N, woman_N, apple_N, how8many_IDet, only_Predet, all_Predet, if_Subj
] ** open SyntaxCze, ParadigmsCze, (E = ExtendCze), (N = NumeralCze) in {
lincat Subject, ComparisonNP, ModifiedNP = NP ; BareRNP, RNP = E.RNP ;
NPModifier = Adv ;
lin
AdvPron p adv = SyntaxCze.mkNP (SyntaxCze.mkNP p) adv ;
PredetNP pred np = SyntaxCze.mkNP pred np ;
home_Adv = ParadigmsCze.mkAdv "doma" ;
ComparisonPron = UsePron ;
Compare a np = mkAP a np ;
ModifiedN ap n = mkCN ap n ;
FullSubject np = np ;
DroppedSubject p = UsePron (E.ProDrop p) ;
PredSubject = PredVP ;
ReflPron = E.ReflPron ;
ReflPoss = E.ReflPoss ;
UseRNP rnp = rnp ;
PredetRNP = E.PredetRNP ;
ReflRNP = E.ReflRNP ;
like_AP = shortAP "rád" "ráda" "rádo" "rádi" "rády" "ráda" ;
fast_A = mkA "rychlý" ;
son_N = panN "syn" ;
wash_V = seV (krytV "mýt") ;
two_Num = mkNum "2" ;
five_Num = mkNum "5" ;
twentyOne_Num = mkNum "21" ;
twentyTwo_Num = mkNum "22" ;
twelveHundred_Num = mkNum (N.num
(N.pot3plus (N.pot1as2 (N.pot0as1 N.pot01)) (N.pot2 (N.pot0 N.n2)))) ;
twentyTwoHundred_Num = mkNum (N.num
(N.pot3plus (N.pot1as2 (N.pot0as1 (N.pot0 N.n2))) (N.pot2 (N.pot0 N.n2)))) ;
writeAbout_V2 = LexiconCze.write_V2 ** {c = mkPrep "o" locative} ;
}
+9
View File
@@ -0,0 +1,9 @@
resource CzeMarkup = CzeTests ** open Prelude, SyntaxCze, ParadigmsCze,
(L = LexiconCze), (E = ExtendCze), (G = GrammarCze), (M = MarkupCze) in {
oper
washing : S = mkS (mkCl (mkNP (E.ProDrop i_Pron)) wash_V) ;
markedWashing : S = M.MarkupS M.b_Mark washing ;
todayMarked : S = G.AdvS L.today_Adv markedWashing ;
swimming : S = mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.swim_V) ;
loving : S = mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.love_V2 (mkNP she_Pron)) ;
}
+16
View File
@@ -0,0 +1,16 @@
-- A finite RGL fragment: all parses can be checked without truncation.
abstract CzeRoundTrip = Lang [
Utt, S, Cl, NP, VP, VPSlash, Pron, V2, V3, A, AP, Comp, Imp,
Adv, Prep, N, CN, Det, Quant, Num,
PrepNP, UttAdv, UseN, DetCN, DetQuant, DefArt, NumSg, in_Prep, city_N,
Temp, Tense, Ant, Pol,
UttS, UseCl, PredVP, UsePron, ComplSlash, SlashV2a, Slash2V3, Slash3V3,
UseComp, CompAP, PositA, ImpVP, UttImpSg, UttImpPl, UttImpPol,
TTAnt, TPres, ASimul, PPos, PNeg,
i_Pron, youSg_Pron, he_Pron, she_Pron, youPl_Pron, youPol_Pron,
love_V2, read_V2, young_A
] ** {
flags startcat = Utt ;
fun buy_V3 : V3 ;
fun currency_N : N ; vAcc_Prep : Prep ;
}
+18
View File
@@ -0,0 +1,18 @@
concrete CzeRoundTripCze of CzeRoundTrip = LangCze [
Utt, S, Cl, NP, VP, VPSlash, Pron, V2, V3, A, AP, Comp, Imp,
Adv, Prep, N, CN, Det, Quant, Num,
PrepNP, UttAdv, UseN, DetCN, DetQuant, DefArt, NumSg, in_Prep, city_N,
Temp, Tense, Ant, Pol,
UttS, UseCl, PredVP, UsePron, ComplSlash, SlashV2a, Slash2V3, Slash3V3,
UseComp, CompAP, PositA, ImpVP, UttImpSg, UttImpPl, UttImpPol,
TTAnt, TPres, ASimul, PPos, PNeg,
youSg_Pron, he_Pron, she_Pron, youPl_Pron, youPol_Pron,
love_V2, read_V2, young_A
] ** open ParadigmsCze in {
lin
buy_V3 = mkV3 (kupovatV "kupovat") ;
currency_N = zenaN "měna" ;
vAcc_Prep = v_Prep accusative ;
-- Select the short prepositional accusative without a duplicate Pron.
i_Pron = StructuralCze.i_Pron ** {pacc = "mě"} ;
}
+25
View File
@@ -0,0 +1,25 @@
resource CzeTests = open Prelude, SyntaxCze, SymbolicCze, ExtraCze, ParadigmsCze, (L = LexiconCze), (N = NumeralCze), (I = IdiomCze), (E = ExtendCze) in {
oper
vocalized_Prep : Prep = v_Prep locative ;
-- Typed consumers exercise every public verb-valency overload.
drink_V2 : V2 = mkV2 (krytV "pít") ;
drinkAcc_V2 : V2 = mkV2 (krytV "pít") accusative ;
drinkFrom_V2 : V2 = mkV2 (krytV "pít") (ParadigmsCze.mkPrep "z" genitive) ;
buy_V3 : V3 = mkV3 (kupovatV "kupovat") ;
-- Buying from a source for a recipient: both complements are prepositional.
buyFor_V3 : V3 = mkV3 (kupovatV "kupovat")
(ParadigmsCze.mkPrep "od" genitive) (ParadigmsCze.mkPrep "pro" accusative) ;
himSelf_RNP : E.RNP = E.ConjRNP and_Conj (E.Base_nr_RNP (mkNP he_Pron) E.ReflPron) ;
about_Prep : Prep = ParadigmsCze.mkPrep "o" locative ;
like_AP : AP = shortAP "rád" "ráda" "rádo" "rádi" "rády" "ráda" ;
ready_AP : AP = shortAP "připraven" "připravena" "připraveno" "připraveni" "připraveny" "připravena" ;
wash_V : V = seV (krytV "mýt") ;
learn_V : V = seV (mkV {
inf = "učit" ;
pressg1 = "učím" ; pressg2 = "učíš" ; pressg3 = "učí" ;
prespl1 = "učíme" ; prespl2 = "učíte" ; prespl3 = "učí" ;
pastpartsg = "učil" ; pastpartpl = "učili" ;
impsg2 = "uč" ; imppl1 = "učme" ; imppl2 = "učte"
}) ;
learn_VV : VV = mkVV learn_V ;
}
+57
View File
@@ -0,0 +1,57 @@
# Czech RGL regression tests
From the RGL checkout, run:
sh tests/czech/check.sh
The script uses `gf` from `PATH` when `GF` is unset or empty. To select another
executable, including a path containing spaces, use:
GF='/path/to/gf' sh tests/czech/check.sh
`GF` names one executable, not a command with flags. Generated files go into
a temporary directory removed on exit. No application grammar is required.
`regressions.gfs` checks morphology and grammatical composition through the
source API, grouped by feature. Its expected output is in `regressions.out`.
`markup.gfs` separately checks clitic movement through fronting, embedding
and coordination, including discontinuous marked constituents. It also checks
that NP predetermination preserves markup scope when inserting before a modifier.
Source computation exposes `Predef.BIND` and `Predef.SOFT_BIND` markers;
PGF linearization handles them as token joining and punctuation.
The runner also builds `AllCze`, `TryCze` and `SymbolicCze` into a fresh
directory, then compiles `CzeTests.gf` using only that distribution.
Typed declarations check every public V2/V3 paradigm overload. The runner
requires the consumer's `.gfo`, since GF can report errors and still exit
successfully.
`CzeRoundTrip` and `roundtrip.tsv` check PGF generation and parsing, including
joined negation, polarity recovery and polite/plural ambiguity.
`CzeExtensionRoundTrip` and `extension-roundtrip.tsv` cover secondary and
dative predicates, bound objects, subject omission, complement forms and
predeterminer placement with a modified pronoun. Compound cardinals are checked
with possessives, oblique case and predicate agreement, including agreement
with the leading scale in sums such as 2,200.
The abstract fragments are acyclic: parsing must return the complete
expected set of trees, without truncation or reliance on enumeration order.
Repeated strings record distinct intended analyses. These small fragments
do not establish parsing coverage for the full Czech RGL.
Preserve the empty `Pol.s` constituent: selecting a verb form with `pol.p`
alone does not recover polarity. For example, parsing `nečti ji` should give:
UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron)))
Removing the constituent leaves `?1` in place of `PNeg`, even though the
negative spelling is recognized.
Prefer treebank coverage where practical. Keep source checks for paradigms
and distinctions outside those fragments; do not repeat treebank examples
unless the source API adds a separate contract. These tests cover present
clauses, infinitives and imperatives, not the unimplemented RGL tenses or
anteriority.
Coordinated-subject person/number agreement and subordinate-clause punctuation
also retain inherited gaps. The finite fragments do not establish coverage
of those constructions.
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
set -eu
: "${GF:=gf}"
command -v "$GF" >/dev/null 2>&1 || {
printf 'GF executable not found: %s\n' "$GF" >&2
exit 1
}
cd "$(dirname "$0")/../.."
work=$(mktemp -d "${TMPDIR:-/tmp}/czech-rgl-tests.XXXXXX")
trap 'rm -rf "$work"' EXIT HUP INT TERM
src=src/api:src/czech:src/common:src/abstract:src/prelude
mkdir -p "$work/source" "$work/api" "$work/consumer" "$work/pgf"
for suite in regressions markup; do
"$GF" -run -path="$src" -gfo-dir="$work/source" \
< "tests/czech/$suite.gfs" > "$work/$suite.out"
diff -u "tests/czech/$suite.out" "$work/$suite.out"
done
# These are the normal Setup.hs language and API roots. AllCze includes ExtendCze.
"$GF" -c -path="$src" -gfo-dir="$work/api" \
src/czech/AllCze.gf src/api/TryCze.gf src/api/SymbolicCze.gf \
</dev/null > "$work/api.log" 2>&1 || { cat "$work/api.log"; exit 1; }
test -f "$work/api/ExtraCze.gfo"
test -f "$work/api/ExtendCze.gfo"
# Compile a consumer with only the resulting distribution on its search path.
GF_LIB_PATH="$work/api" "$GF" -c -path="$work/api" -gfo-dir="$work/consumer" \
tests/czech/CzeTests.gf \
</dev/null > "$work/consumer.log" 2>&1 || { cat "$work/consumer.log"; exit 1; }
test -s "$work/consumer/CzeTests.gfo" || { cat "$work/consumer.log"; exit 1; }
# Acyclic abstract grammars make the complete parse sets finite. Compare
# whole trees without relying on parser enumeration order; repeated strings in
# the treebank record genuine ambiguity, including polite/plural address.
for grammar in CzeRoundTrip CzeExtensionRoundTrip; do
case "$grammar" in
CzeRoundTrip) bank=tests/czech/roundtrip.tsv ;;
CzeExtensionRoundTrip) bank=tests/czech/extension-roundtrip.tsv ;;
esac
"$GF" -make -path="$src":tests/czech -gfo-dir="$work/api" -output-dir="$work/pgf" \
"tests/czech/${grammar}Cze.gf" \
</dev/null > "$work/pgf.log" 2>&1 || { cat "$work/pgf.log"; exit 1; }
while IFS="$(printf '\t')" read -r tree surface; do
printf 'i %s\nl -lang=%sCze %s\np -lang=%sCze -cat=Utt "%s"\nq\n' \
"$work/pgf/$grammar.pgf" "$grammar" "$tree" "$grammar" "$surface" \
| "$GF" -run > "$work/roundtrip.out"
sed '/^$/d' "$work/roundtrip.out" > "$work/roundtrip.lines"
sed -n '1p' "$work/roundtrip.lines" > "$work/linearization.out"
printf '%s\n' "$surface" > "$work/linearization.expected"
diff -u "$work/linearization.expected" "$work/linearization.out"
sed '1d' "$work/roundtrip.lines" | LC_ALL=C sort > "$work/parses.out"
awk -F '\t' -v surface="$surface" '$2 == surface {print $1}' "$bank" \
| LC_ALL=C sort > "$work/parses.expected"
diff -u "$work/parses.expected" "$work/parses.out"
done < "$bank"
done
printf 'Czech source regressions, AllCze, installed API imports and PGF round trips passed.\n'
+44
View File
@@ -0,0 +1,44 @@
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (UsePron i_Pron)) (ComplSlash (SlashV2AP have_V2 like_AP) (UsePron she_Pron)))) já ji mám rád
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2AP have_V2 like_AP) (UsePron she_Pron)))) mám ji rád
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject she_Pron) (ReflRNP (SlashV2AP have_V2 like_AP) (UseRNP (ReflPoss NumSg (UseN son_N)))))) má ráda svého syna
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject she_Pron) (ReflRNP (SlashV2AP have_V2 like_AP) (PredetRNP only_Predet ReflPron)))) má ráda jen sebe
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet (ReflPoss NumPl (UseN child_N)))))) čekám na všechny své děti
UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (UsePron i_Pron) (DetCN (DetQuant DefArt two_Num) (UseN year_N)))) jsou mi dva roky
UttS (UseCl (TTAnt TPres ASimul) PNeg (DativeCopulaCl (UsePron i_Pron) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) není mi pět let
UttQS (UseQCl (TTAnt TPres ASimul) PPos (DativeCopulaQCl (UsePron youPol_Pron) (IdetCN how8many_IDet (UseN year_N)))) kolik let vám je
UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant DefArt NumSg) (UseN son_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) synovi je pět let
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (UsePron i_Pron)) (UseV wash_V))) já se myji
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseV wash_V))) myji se
UttAdv (SubjS if_Subj (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseV wash_V)))) jestliže se myji
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a writeAbout_V2) (PredetRNP all_Predet (ReflPoss NumPl (UseN child_N)))))) píši o všech svých dětech
UttAdv (PrepNP possess_Prep (UsePron he_Pron)) jeho
UttAdv (PrepNP by8agent_Prep (UsePron he_Pron)) od něho
UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) kdo ji miluje
UttIAdv (PrepIP by8agent_Prep whoSg_IP) od koho
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) jsem mladší než ona
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseComp (CompAP (Compare fast_A (ComparisonPron she_Pron)))))) jsem rychlejší než ona
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) pět dětí je mladších než ona
UttAdv (PrepNP by8agent_Prep (DetCN (DetQuant DefArt NumSg) (ModifiedN (Compare young_A (ComparisonPron she_Pron)) child_N))) od dítěte mladšího než ona
UttAdv (PrepNP with_Prep (PredetNP all_Predet (AdvPron we_Pron home_Adv))) s námi všemi doma
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt two_Num) (UseN child_N))) (ReflRNP (SlashV2a love_V2) (PredetRNP all_Predet ReflPron)))) dvě děti milují sebe všechny
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (ReflRNP (SlashV2a love_V2) (PredetRNP all_Predet ReflPron)))) pět dětí miluje sebe všechny
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet ReflPron)))) pět dětí čeká na sebe všechny
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet (ReflPoss five_Num (UseN child_N)))))) čekám na všech svých pět dětí
UttNP (DetCN (DetQuant (PossPron i_Pron) twentyOne_Num) (UseN child_N)) mých dvacet jedna dětí
UttNP (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N)) mých dvacet dva dětí
UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron i_Pron) twentyOne_Num) (UseN child_N))) s mými dvaceti jedna dětmi
UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N))) s mými dvaceti dvěma dětmi
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N))) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) mých dvacet dva dětí je mladších než ona
UttNP (DetCN (DetQuant this_Quant twentyTwoHundred_Num) (UseN child_N)) tyto dva tisíce dvě stě dětí
UttNP (DetCN (DetQuant (PossPron i_Pron) twentyTwoHundred_Num) (UseN child_N)) mé dva tisíce dvě stě dětí
UttAdv (PrepNP with_Prep (DetCN (DetQuant this_Quant twelveHundred_Num) (UseN child_N))) s tímto jedním tisícem dvěma sty dětí
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N))))) miluji vaši ženu
UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN woman_N))))) miluji naši ženu
UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN woman_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) naší ženě je pět let
UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) vaší ženě je pět let
UttAdv (PrepNP possess_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N))) vaší ženy
UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN son_N))) s naším synem
UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN child_N))) s vaším dítětem
UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumPl) (UseN child_N))) s vašimi dětmi
UttNP (DetCN (DetQuant DefArt two_Num) (UseN apple_N)) dvě jablka
UttNP (DetCN (DetQuant DefArt five_Num) (UseN apple_N)) pět jablek
1 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (UsePron i_Pron)) (ComplSlash (SlashV2AP have_V2 like_AP) (UsePron she_Pron)))) já ji mám rád
2 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2AP have_V2 like_AP) (UsePron she_Pron)))) mám ji rád
3 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject she_Pron) (ReflRNP (SlashV2AP have_V2 like_AP) (UseRNP (ReflPoss NumSg (UseN son_N)))))) má ráda svého syna
4 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject she_Pron) (ReflRNP (SlashV2AP have_V2 like_AP) (PredetRNP only_Predet ReflPron)))) má ráda jen sebe
5 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet (ReflPoss NumPl (UseN child_N)))))) čekám na všechny své děti
6 UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (UsePron i_Pron) (DetCN (DetQuant DefArt two_Num) (UseN year_N)))) jsou mi dva roky
7 UttS (UseCl (TTAnt TPres ASimul) PNeg (DativeCopulaCl (UsePron i_Pron) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) není mi pět let
8 UttQS (UseQCl (TTAnt TPres ASimul) PPos (DativeCopulaQCl (UsePron youPol_Pron) (IdetCN how8many_IDet (UseN year_N)))) kolik let vám je
9 UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant DefArt NumSg) (UseN son_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) synovi je pět let
10 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (UsePron i_Pron)) (UseV wash_V))) já se myji
11 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseV wash_V))) myji se
12 UttAdv (SubjS if_Subj (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseV wash_V)))) jestliže se myji
13 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a writeAbout_V2) (PredetRNP all_Predet (ReflPoss NumPl (UseN child_N)))))) píši o všech svých dětech
14 UttAdv (PrepNP possess_Prep (UsePron he_Pron)) jeho
15 UttAdv (PrepNP by8agent_Prep (UsePron he_Pron)) od něho
16 UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) kdo ji miluje
17 UttIAdv (PrepIP by8agent_Prep whoSg_IP) od koho
18 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) jsem mladší než ona
19 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (UseComp (CompAP (Compare fast_A (ComparisonPron she_Pron)))))) jsem rychlejší než ona
20 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) pět dětí je mladších než ona
21 UttAdv (PrepNP by8agent_Prep (DetCN (DetQuant DefArt NumSg) (ModifiedN (Compare young_A (ComparisonPron she_Pron)) child_N))) od dítěte mladšího než ona
22 UttAdv (PrepNP with_Prep (PredetNP all_Predet (AdvPron we_Pron home_Adv))) s námi všemi doma
23 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt two_Num) (UseN child_N))) (ReflRNP (SlashV2a love_V2) (PredetRNP all_Predet ReflPron)))) dvě děti milují sebe všechny
24 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (ReflRNP (SlashV2a love_V2) (PredetRNP all_Predet ReflPron)))) pět dětí miluje sebe všechny
25 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant DefArt five_Num) (UseN child_N))) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet ReflPron)))) pět dětí čeká na sebe všechny
26 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ReflRNP (SlashV2a wait_V2) (PredetRNP all_Predet (ReflPoss five_Num (UseN child_N)))))) čekám na všech svých pět dětí
27 UttNP (DetCN (DetQuant (PossPron i_Pron) twentyOne_Num) (UseN child_N)) mých dvacet jedna dětí
28 UttNP (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N)) mých dvacet dva dětí
29 UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron i_Pron) twentyOne_Num) (UseN child_N))) s mými dvaceti jedna dětmi
30 UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N))) s mými dvaceti dvěma dětmi
31 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (FullSubject (DetCN (DetQuant (PossPron i_Pron) twentyTwo_Num) (UseN child_N))) (UseComp (CompAP (Compare young_A (ComparisonPron she_Pron)))))) mých dvacet dva dětí je mladších než ona
32 UttNP (DetCN (DetQuant this_Quant twentyTwoHundred_Num) (UseN child_N)) tyto dva tisíce dvě stě dětí
33 UttNP (DetCN (DetQuant (PossPron i_Pron) twentyTwoHundred_Num) (UseN child_N)) mé dva tisíce dvě stě dětí
34 UttAdv (PrepNP with_Prep (DetCN (DetQuant this_Quant twelveHundred_Num) (UseN child_N))) s tímto jedním tisícem dvěma sty dětí
35 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N))))) miluji vaši ženu
36 UttS (UseCl (TTAnt TPres ASimul) PPos (PredSubject (DroppedSubject i_Pron) (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN woman_N))))) miluji naši ženu
37 UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN woman_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) naší ženě je pět let
38 UttS (UseCl (TTAnt TPres ASimul) PPos (DativeCopulaCl (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N)) (DetCN (DetQuant DefArt five_Num) (UseN year_N)))) vaší ženě je pět let
39 UttAdv (PrepNP possess_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN woman_N))) vaší ženy
40 UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron we_Pron) NumSg) (UseN son_N))) s naším synem
41 UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (UseN child_N))) s vaším dítětem
42 UttAdv (PrepNP with_Prep (DetCN (DetQuant (PossPron youPol_Pron) NumPl) (UseN child_N))) s vašimi dětmi
43 UttNP (DetCN (DetQuant DefArt two_Num) (UseN apple_N)) dvě jablka
44 UttNP (DetCN (DetQuant DefArt five_Num) (UseN apple_N)) pět jablek
+24
View File
@@ -0,0 +1,24 @@
i -retain tests/czech/CzeMarkup.gf
cc -one (mkUtt markedWashing)
cc -one (mkUtt todayMarked)
cc -one (G.SubjS if_Subj markedWashing)
-- Repeated fronting splits the marked constituent; both pieces retain nested markup.
cc -one (mkUtt (G.AdvS (ParadigmsCze.mkAdv "doma") (G.AdvS L.today_Adv (M.MarkupS M.i_Mark markedWashing))))
cc -one (G.SubjS if_Subj todayMarked)
-- Coordination keeps the second clause's clitics in their own domain.
cc -one (mkUtt (mkS and_Conj markedWashing washing))
cc -one (G.SubjS if_Subj (mkS and_Conj markedWashing washing))
cc -one (G.SubjS if_Subj (M.MarkupS M.b_Mark (mkS and_Conj washing washing)))
cc -one (mkUtt (G.ExtAdvS L.today_Adv markedWashing))
cc -one (G.SubjS if_Subj (G.ExtAdvS L.today_Adv markedWashing))
cc -one (G.SubjS if_Subj (G.SSubjS markedWashing if_Subj washing))
-- Empty movable components must not gain tags, even across coordination.
cc -one (mkUtt (G.AdvS (ParadigmsCze.mkAdv "doma") (G.AdvS L.today_Adv (M.MarkupS M.b_Mark swimming))))
cc -one (mkUtt (G.AdvS (ParadigmsCze.mkAdv "doma") (G.AdvS L.today_Adv (M.MarkupS M.b_Mark loving))))
cc -one (mkUtt (G.AdvS (ParadigmsCze.mkAdv "doma") (G.AdvS L.today_Adv (M.MarkupS M.b_Mark (mkS and_Conj swimming washing)))))
-- Predetermination respects the scope of an already marked NP.
cc -one (mkUtt (mkNP all_Predet (M.MarkupNP M.b_Mark (mkNP (mkNP we_Pron) (ParadigmsCze.mkAdv "doma")))))
cc -one (mkUtt (mkNP only_Predet (M.MarkupNP M.b_Mark (mkNP (mkNP we_Pron) (ParadigmsCze.mkAdv "doma")))))
-- An empty following piece may retain a wrapper after insertion.
cc -one (mkUtt (mkNP all_Predet (M.MarkupNP M.b_Mark (mkNP we_Pron))))
q
+17
View File
@@ -0,0 +1,17 @@
<b> myji se </b>
dnes <b> se myji </b>
jestliže <b> se myji </b>
doma <i> <b> se </b> </i> dnes <i> <b> myji </b> </i>
jestliže <b> se </b> dnes <b> myji </b>
<b> myji se </b> a myji se
jestliže <b> se </b> <b> myji </b> a myji se
jestliže <b> se myji a myji se </b>
dnes Predef.SOFT_BIND , <b> myji se </b>
jestliže <b> se </b> dnes Predef.SOFT_BIND , <b> myji </b>
jestliže <b> se myji </b> Predef.SOFT_BIND , jestliže se myji
doma dnes <b> plavu </b>
doma <b> ji </b> dnes <b> miluji </b>
doma dnes <b> plavu a myji se </b>
<b> my </b> všichni <b> doma </b>
jen <b> my doma </b>
<b> my </b> všichni <b> </b>
+267
View File
@@ -0,0 +1,267 @@
i -retain tests/czech/CzeTests.gf
-- Noun inflection, possession and proper names.
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (zenaN "banka")))
cc -one (SyntaxCze.mkAdv to_Prep (mkNP (zenaN "banka")))
cc -one (SyntaxCze.mkAdv possess_Prep (mkNP i_Pron (zenaN "manželka")))
cc -one (mkUtt (mkS (mkCl (mkNP this_Quant plNum L.child_N) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP this_Quant L.child_N) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkPN "NN" mascAnimate)) (mkA "unavený"))))
cc -one (SyntaxCze.mkAdv to_Prep (mkNP (mkPN (zenaN "Praha"))))
cc -one ((kostN "paměť").snom ++ (kostN "paměť").sacc ++ (kostN "paměť").sgen ++ (kostN "paměť").sins ++ (kostN "paměť").pdat ++ (kostN "paměť").ploc ++ (kostN "paměť").pins)
cc -one ((mkN "loď" "lodi" feminine).sgen ++ (mkN "loď" "lodi" feminine).sins ++ (mkN "loď" "lodi" feminine).pins)
cc -one ((pisenN "dlaň").snom ++ (pisenN "dlaň").sacc ++ (pisenN "dlaň").sgen ++ (pisenN "dlaň").sdat ++ (pisenN "dlaň").sins ++ (pisenN "dlaň").pins)
cc -one ((pisenN "píseň").sgen ++ (pisenN "píseň").sdat ++ (pisenN "píseň").pins)
cc -one ((zenaN "Nataša").sgen ++ (zenaN "Nataša").sdat ++ (zenaN "Nataša").sloc ++ (zenaN "Nataša").pnom ++ (zenaN "Nataša").pacc)
cc -one ((zenaN "Máňa").sgen ++ (zenaN "Máňa").sdat ++ (zenaN "Máňa").sloc ++ (zenaN "Máňa").pnom ++ (zenaN "Máňa").pacc)
cc -one ((zenaN "Naďa").sgen ++ (zenaN "Naďa").sdat ++ (zenaN "Káťa").sgen ++ (zenaN "Káťa").sdat)
cc -one ((zenaN "Zoja").sgen ++ (zenaN "Zoja").sdat)
cc -one (L.school_N.sdat ++ (zenaN "váza").sdat ++ (zenaN "mísa").sdat ++ (zenaN "banka").sdat)
cc -one (L.salt_N.snom ++ L.salt_N.sacc ++ L.salt_N.svoc)
cc -one (SyntaxCze.mkAdv in_Prep (mkNP plNum L.milk_N))
cc -one (mkVoc (mkNP L.year_N))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP plNum L.apple_N))
-- Náš/váš inflect for the possessed noun, independently of addressee number.
cc -one (SyntaxCze.mkAdv possess_Prep (mkNP we_Pron L.woman_N))
cc -one (SyntaxCze.mkAdv about_Prep (mkNP we_Pron L.woman_N))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP youPol_Pron L.woman_N))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP youPol_Pron L.city_N))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP youPl_Pron L.man_N))
cc -one (SyntaxCze.mkAdv (ParadigmsCze.mkPrep dative) (mkNP (mkDet we_Pron plNum) L.man_N))
cc -one (SyntaxCze.mkAdv (ParadigmsCze.mkPrep dative) (mkNP (mkDet youPl_Pron plNum) L.man_N))
cc -one (mkUtt (mkNP (mkDet we_Pron plNum) L.man_N))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop she_Pron)) L.love_V2 (mkNP (mkDet we_Pron plNum) L.man_N))))
cc -one (mkUtt (mkNP (mkDet youPol_Pron plNum) L.city_N))
-- Adjective degrees retain case and agreement.
cc -one (SyntaxCze.mkAdv to_Prep (mkNP (mkDet the_Quant (mkOrd L.good_A)) (hradN "hotel")))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkDet the_Quant (mkOrd L.blue_A)) (zenaN "barva")))
cc -one ((mkA "mladý").compar.msnom)
cc -one ((mkA "hrdý").compar.msnom ++ (mkA "rudý").superl.msgen ++ (mkA "chudý").compar.msnom)
cc -one ((mkA "rychlý").compar.msnom ++ (mkA "rychlý").superl.msnom)
cc -one ((mkA "krásný").compar.msnom ++ (mkA "moderní").compar.msnom ++ (mkA "chytrý").compar.msnom)
cc -one ((mkA "praktický").compar.msnom ++ (mkA "lidský").compar.msnom ++ (mkA "cizí").compar.msnom)
cc -one ((mkA "čistý" "čistší").compar.msnom)
cc -one ((mkA "jarní" nonExist).msgen)
cc -one ((mkA "jarní" nonExist).compar.msnom)
cc -one ((mkA "jarní" nonExist).superl.msnom)
cc -one ((mkA "lehký").compar.msnom)
cc -one ((mkA "lehký" "lehčí").compar.msnom)
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (mkCN (comparAP L.young_A) (panN "student"))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (comparAP L.young_A))))
-- Verb principal parts and public valency constructors.
cc -one (mkUtt (mkCl (mkNP i_Pron) (mkVP drink_V2 (mkNP (zenaN "voda")))))
cc -one (mkUtt (mkCl (mkNP i_Pron) (mkVP buy_V3 (mkNP (zenaN "kniha")) (mkNP (panN "syn")))))
cc -one ((kupovatV "kupovat").pressg1 ++ (kupovatV "kupovat").negprespl3 ++ (kupovatV "kupovat").pastpartsg ++ (kupovatV "kupovat").impsg2 ++ (kupovatV "kupovat").negimppl2)
cc -one ((krytV "krýt").pressg1 ++ (krytV "krýt").negprespl3 ++ (krytV "krýt").pastpartsg ++ (krytV "krýt").impsg2 ++ (krytV "krýt").negimppl2)
cc -one ((krytV "pít").pressg1 ++ (krytV "pít").pastpartsg ++ (krytV "pít").impsg2)
-- Pronoun gender and polite singular versus plural predicate agreement.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop youPol_Pron)) (mkA "unavený"))))
cc -one (mkUtt (mkS negativePol (mkCl (mkNP (E.ProDrop (genderPron feminine youPol_Pron))) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop (genderPron feminine youPol_Pron))) (mkVP (mkCN (zenaN "Angličanka"))))))
cc -one (mkUtt (mkS (mkCl (mkNP E.theyFem_Pron) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP E.theyNeutr_Pron) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP E.youPolFem_Pron) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP E.youPolPlFem_Pron) (mkA "unavený"))))
-- CN predicates take predicative case; NP predicates retain their own number.
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkVP (mkCN (panN "student"))))))
cc -one (mkUtt (mkS (mkCl (mkNP he_Pron) (mkNP (mkPN (panN "Petr"))))))
cc -one (mkUtt (mkS (mkCl (mkNP we_Pron) (mkNP (mkDet the_Quant plNum) (panN "student")))))
cc -one (mkUtt (mkS (mkCl (mkNP we_Pron) (mkNP (mkCard "2") L.child_N))))
cc -one (mkUtt (mkS (mkCl (mkNP we_Pron) (mkNP (zenaN "rodina")))))
-- Clitic domains in clauses, questions, infinitives and imperatives.
cc -one (mkUtt (mkCl (mkNP i_Pron) (mkVP buy_V3 (mkNP (zenaN "kniha")) (mkNP he_Pron))))
cc -one (mkUtt (mkCl (mkNP i_Pron) (mkVP (mkVPSlash buy_V3 (mkNP she_Pron)) (mkNP only_Predet (mkNP he_Pron)))))
cc -one (mkUtt (mkQS (mkQCl where_IAdv (mkNP (hradN "hotel")))))
cc -one (mkUtt (mkS negativePol (mkCl (mkNP (E.ProDrop i_Pron)) want_VV (mkVP L.swim_V))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkVP L.wait_V2 (mkNP she_Pron)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.know_VQ (mkQS (mkQCl (mkCl (mkNP (E.ProDrop youSg_Pron)) (mkA "unavený")))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.know_VQ (mkQS (mkQCl where_IAdv (mkNP (hradN "hotel")))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.love_V2 (mkNP she_Pron))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) want_VV (mkVP wash_V))))
cc -one (mkUtt politeImpForm negativePol (mkImp (mkVP wash_V)))
cc -one (mkUtt (mkVP wash_V))
-- Ordinary VV keeps the embedded reflexive in its infinitive domain.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) learn_VV (mkVP wash_V))))
cc -one (mkUtt (mkS L.today_Adv (mkS (mkCl (mkNP (E.ProDrop i_Pron)) wash_V))))
cc -one (mkUtt (mkS L.today_Adv (mkS (ParadigmsCze.mkAdv "doma") (mkS (mkCl (mkNP (E.ProDrop i_Pron)) wash_V)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.know_VS (mkS (mkCl (mkNP (E.ProDrop she_Pron)) wash_V)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.know_VQ (mkQS (mkQCl (mkCl (mkNP (E.ProDrop youSg_Pron)) wash_V))))))
cc -one (I.ImpP3 (mkNP (E.ProDrop he_Pron)) (mkVP wash_V))
cc -one (I.ImpP3 (mkNP (mkCard "2") L.child_N) (mkVP wash_V))
cc -one (I.ImpP3 (mkNP (E.ProDrop she_Pron)) (mkVP L.love_V2 (mkNP he_Pron)))
cc -one (SyntaxCze.mkAdv if_Subj (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.love_V2 (mkNP she_Pron))))
cc -one (SyntaxCze.mkAdv if_Subj (mkS L.today_Adv (mkS (mkCl (mkNP (E.ProDrop i_Pron)) wash_V))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (siV (kupovatV "kupovat")))))
cc -one (mkUtt negativePol (mkImp (siV (kupovatV "kupovat"))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) can_VV (mkVP (siV (kupovatV "kupovat"))))))
-- A reflexive matrix verb blocks climbing even through mkModalVV.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkModalVV learn_V) (mkVP wash_V))))
-- Cardinal agreement and case government, including oblique compound numerals.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) have_V2 (mkNP (mkCard "5") (zenaN "pizza")))))
cc -one (mkUtt (mkNP (mkCard "21") (hradN "rok")))
cc -one (mkUtt (mkNP (mkCard "22") L.child_N))
cc -one (mkUtt (mkNP (mkCard "101") L.child_N))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (mkCard (N.num (N.pot3plus (N.pot1as2 (N.pot0as1 N.n2)) (N.pot1as2 (N.pot0as1 N.pot01))))) L.child_N))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP this_Quant (mkNum (N.num (N.pot3 (N.pot1as2 (N.pot1plus N.n2 N.pot01))))) (zenaN "koruna")))
cc -one (SyntaxCze.mkAdv possess_Prep (mkNP (mkCard "3") L.child_N))
cc -one (SyntaxCze.mkAdv (ParadigmsCze.mkPrep "s" instrumental) (mkNP (mkCard "23") L.child_N))
cc -one (SyntaxCze.mkAdv (ParadigmsCze.mkPrep "s" instrumental) (mkNP (mkCard "200") L.child_N))
cc -one (SyntaxCze.mkAdv (ParadigmsCze.mkPrep "s" instrumental) (mkNP (mkCard (N.num N.pot31)) (zenaN "koruna")))
cc -one (mkUtt (mkNP (mkCard (N.IDig N.D_0)) (zenaN "koruna")))
cc -one (SyntaxCze.mkAdv to_Prep (mkNP (mkDet the_Quant <symb (mkSymb "n") : Ord>) (hradN "hotel")))
cc -one (N.pot5 (N.pot1as2 (N.pot0as1 (N.pot0 N.n2))))
cc -one (N.pot4decimal (N.IFrac (N.PosDecimal (N.IDig N.D_3)) N.D_5))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkA "unavený"))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard (N.num (N.pot3 (N.pot1as2 (N.pot0as1 (N.pot0 N.n2)))))) L.child_N) (mkA "unavený"))))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (mkDet this_Quant (mkNum (mkCard (N.num N.pot31)))) (zenaN "koruna")))
cc -one (mkUtt (mkNP (mkDet this_Quant (mkNum (mkCard (N.num (N.pot3 (N.pot1as2 (N.pot0as1 (N.pot0 N.n2)))))))) L.child_N))
cc -one (SyntaxCze.mkAdv possess_Prep (mkNP (mkDet this_Quant (mkNum (mkCard (N.num (N.pot3 (N.pot1as2 (N.pot0as1 (N.pot0 N.n2)))))))) L.child_N))
cc -one (mkUtt (mkNP (mkDet this_Quant (mkNum (mkCard "200"))) (zenaN "koruna")))
cc -one (mkUtt (mkNP (mkDet this_Quant (mkNum (mkCard "500"))) (zenaN "koruna")))
cc -one (mkUtt (mkNP (mkDet this_Quant (mkNum (mkCard (N.num (N.pot3 (N.pot2 N.n2)))))) L.child_N))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (mkDet this_Quant (mkNum (mkCard (N.num N.pot31))) (mkOrd (mkA "dobrý" "lepší"))) (zenaN "koruna")))
cc -one (mkUtt (mkIP which_IQuant (mkNum (mkCard "5")) (mkCN L.child_N)))
cc -one (mkUtt (mkIP which_IQuant (mkNum (mkCard "2")) (mkCN L.child_N)))
cc -one (mkUtt (mkIP which_IQuant (mkNum (mkCard (N.num N.pot31))) (mkCN L.child_N)))
cc -one (mkUtt (mkCard "1"))
cc -one (mkUtt (mkCard "21"))
cc -one (mkUtt (mkCard "2"))
cc -one (mkUtt (mkNP (mkCard "1") L.child_N))
-- Scale heads control agreement independently of their genitive complements.
-- The shared num stops below a million; larger subcategories are used directly.
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral (N.pot4 (N.pot1as2 (N.pot0as1 (N.pot0 N.n2)))) : Numeral>) (zenaN "koruna")) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral N.pot51 : Numeral>) (zenaN "koruna")) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral (N.pot4 (N.pot1as2 (N.pot0as1 (N.pot0 N.n5)))) : Numeral>) (zenaN "koruna")) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral (N.pot2 N.n2) : Numeral>) (zenaN "koruna")) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral (N.pot4 (N.pot2 N.n2)) : Numeral>) (zenaN "koruna")) ready_AP)))
-- Sums ending in a scale retain their leading head for modifiers and predicates.
cc -one (mkUtt (mkNP all_Predet (mkNP (mkCard (N.num (N.pot3plus (N.pot1as2 (N.pot0as1 (N.pot0 N.n2))) (N.pot2 (N.pot0 N.n2))))) L.child_N)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard <lin Numeral (N.pot4plus (N.pot1as2 (N.pot0as1 (N.pot0 N.n2))) (N.pot2as3 (N.pot2 (N.pot0 N.n2)))) : Numeral>) (zenaN "koruna")) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP this_Quant (mkNum (mkCard <lin Numeral (N.pot5plus (N.pot1as2 (N.pot0as1 N.pot01)) (N.pot4plus (N.pot1as2 (N.pot0as1 (N.pot0 N.n2))) (N.pot2as3 (N.pot2 (N.pot0 N.n2))))) : Numeral>)) (zenaN "koruna")) ready_AP)))
-- Signed integers retain agreement; fractions govern genitive.
cc -one (mkUtt (mkCard <lin Numeral (N.pot4decimal (N.PosDecimal (N.IDig N.D_1))) : Numeral>))
cc -one (mkUtt (mkCard <lin Numeral (N.pot4decimal (N.NegDecimal (N.IDig N.D_1))) : Numeral>))
cc -one (mkUtt (mkCard <lin Numeral (N.pot4decimal (N.NegDecimal (N.IDig N.D_2))) : Numeral>))
cc -one (mkUtt (mkNP (mkCard (N.num (N.pot3decimal (N.NegDecimal (N.IDig N.D_2))))) (zenaN "koruna")))
cc -one (mkUtt (mkCard <lin Numeral (N.pot4decimal (N.IFrac (N.NegDecimal (N.IDig N.D_1)) N.D_5)) : Numeral>))
-- Preposition vocalization follows the next word, including modifiers and capitals.
cc -one (SyntaxCze.mkAdv in_Prep (mkNP L.school_N))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkDet the_Quant (mkOrd L.good_A)) L.school_N))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkCN (mkA "moderní") L.school_N)))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkN "muzeum" "muzea" neuter)))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkPN (zenaN "Stromovka"))))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (zenaN "Měna")))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (L.city_N ** {sloc = "Městě"})))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkCN (mkA "mělký") L.city_N)))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP ((hradN "mlýn") ** {sloc = "mlýně"})))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (mkCN (mkA "nový") ((hradN "mlýn") ** {sloc = "mlýně"}))))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP i_Pron))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (zenaN "žena")))
cc -one (SyntaxCze.mkAdv from_Prep (mkNP L.school_N))
cc -one (SyntaxCze.mkAdv from_Prep (mkNP all_Predet (mkNP plNum L.child_N)))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (zenaN "mzda")))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP i_Pron))
cc -one (SyntaxCze.mkAdv (v_Prep accusative) (mkNP i_Pron))
cc -one (SyntaxCze.mkAdv in_Prep (mkNP (zenaN "hra")))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (zenaN "hra")))
cc -one (SyntaxCze.mkAdv from_Prep (mkNP (mkPN (zenaN "Škola"))))
-- Predeterminers retain full pronouns and inflect with the NP head.
cc -one (mkUtt (mkS (mkCl (mkNP only_Predet (mkNP i_Pron)) L.swim_V)))
cc -one (mkUtt (mkS (mkCl (mkNP only_Predet (mkNP i_Pron)) wash_V)))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) L.love_V2 (mkNP only_Predet (mkNP he_Pron)))))
cc -one (mkUtt (mkS (mkCl (mkNP all_Predet (mkNP (genderPron feminine they_Pron))) wash_V)))
-- NP focus restores the full form even when given a ProDrop pronoun.
cc -one (mkUtt (mkS (mkCl (mkNP only_Predet (mkNP (E.ProDrop i_Pron))) wash_V)))
cc -one (mkUtt (mkNP all_Predet (mkNP plNum (panN "student"))))
cc -one (mkUtt (mkNP all_Predet (mkNP (mkCard "5") L.child_N)))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP all_Predet (mkNP plNum L.child_N)))
cc -one (mkUtt (mkNP all_Predet (mkNP (mkCN (zenaN "voda")))))
cc -one (mkUtt (mkNP all_Predet (mkNP (mkCard (N.num N.pot31)) (zenaN "koruna"))))
-- Shared preposed modifiers agree with the first conjunct, also after ConsNP.
cc -one (mkUtt (mkNP all_Predet (mkNP and_Conj (mkNP plNum L.man_N) (mkNP plNum L.woman_N))))
cc -one (mkUtt (mkNP all_Predet (mkNP and_Conj (mkListNP (mkNP plNum L.woman_N) (mkListNP (mkNP plNum L.man_N) (mkNP plNum L.child_N))))))
-- Complement forms distinguish bare case government from prepositions.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkAP (mkA2 (mkA "hrdý") (ParadigmsCze.mkPrep "na" accusative)) (mkNP he_Pron)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkAP (mkA2 (mkA "hrdý") (ParadigmsCze.mkPrep "na" accusative)) (mkNP she_Pron)))))
cc -one (mkUtt (mkNP (mkCN (mkAP (mkA2 (mkA "hrdý") (ParadigmsCze.mkPrep "na" accusative)) (mkNP she_Pron)) L.child_N)))
cc -one (mkUtt (mkNP (mkCN (mkAP (mkA2 (mkA "věrný") (lin Prep {s = [] ; c = dative ; hasPrep = False})) (mkNP he_Pron)) L.child_N)))
cc -one (SyntaxCze.mkAdv vocalized_Prep (mkNP he_Pron))
-- mkVPSlash V3 NP completes Slash2V3.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkVP (mkVPSlash buyFor_V3 (mkNP he_Pron)) (mkNP she_Pron)))))
-- mkVP V3 NP NP instead completes Slash3V3; both must preserve slot order.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkVP buyFor_V3 (mkNP he_Pron) (mkNP she_Pron)))))
-- Subject-bound RNPs compose with possession, coordination and modifiers.
cc -one (mkUtt (mkCl (mkNP i_Pron) (E.ReflRNP (mkVPSlash buy_V3 (mkNP she_Pron)) E.ReflPron)))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop he_Pron)) (E.ReflRNP (mkVPSlash L.love_V2) E.ReflPron))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop she_Pron)) (E.ReflRNP (mkVPSlash L.wait_V2) E.ReflPron))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop he_Pron)) (E.ReflRNP (mkVPSlash L.love_V2) (E.ReflPoss sgNum (mkCN (zenaN "manželka")))))))
cc -one (mkUtt (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"))))))))
cc -one (mkUtt (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))))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.AdvRVP (mkVP <lin V learn_VV : V>) (ParadigmsCze.mkPrep "o" locative) E.ReflPron))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (E.AdvRAP (mkAP (mkA "hrdý")) (ParadigmsCze.mkPrep "na" accusative) E.ReflPron))))
-- Reflexive modifiers take the complement's case, also with quantified subjects.
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (E.AdvRAP (mkAP (mkA "spokojený")) with_Prep (E.PredetRNP all_Predet E.ReflPron)))))
cc -one (mkUtt (mkNP (mkCN (E.AdvRAP (mkAP (mkA "hrdý")) (ParadigmsCze.mkPrep "na" accusative) E.ReflPron) L.child_N)))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.ReflRNP (mkVPSlash L.wait_V2) (E.ConjRNP and_Conj (E.Base_nr_RNP (mkNP she_Pron) E.ReflPron))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop she_Pron)) (E.ReflRNP (mkVPSlash L.love_V2) (E.PredetRNP only_Predet E.ReflPron)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.AdvRVP (mkVP L.write_V2 (mkNP (zenaN "kniha"))) about_Prep (E.PredetRNP all_Predet (E.ReflPoss plNum (mkCN L.child_N)))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.ReflRNP (mkVPSlash have_V2) (E.PredetRNP all_Predet (E.ReflPoss (mkNum (mkCard (N.num N.pot31))) (mkCN (zenaN "koruna"))))))))
-- RNP coordination keeps the same first-conjunct rule through list extension.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.ReflRNP (mkVPSlash L.love_V2) (E.PredetRNP all_Predet (E.ConjRNP and_Conj (E.Base_rr_RNP (E.ReflPoss plNum (mkCN (panN "syn"))) (E.ReflPoss sgNum (mkCN (zenaN "dcera"))))))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.ReflRNP (mkVPSlash L.love_V2) (E.PredetRNP all_Predet (E.ConjRNP and_Conj (E.Cons_rr_RNP (E.ReflPoss plNum (mkCN (panN "syn"))) (E.Base_rr_RNP (E.ReflPoss sgNum (mkCN (zenaN "dcera"))) E.ReflPron))))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.ReflRNP (mkVPSlash have_V2) (E.AdvRNP (mkNP L.child_N) possess_Prep himSelf_RNP)))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.AdvRVP (mkVP L.write_V2 (mkNP (zenaN "kniha"))) (ParadigmsCze.mkPrep dative) himSelf_RNP))))
cc -one (mkUtt (mkNP (mkCN (E.AdvRAP (mkAP (mkA "plný")) possess_Prep himSelf_RNP) (zenaN "kniha"))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (E.AdvRAP (mkAP (mkA "plný")) possess_Prep himSelf_RNP))))
-- Secondary and short predicates retain agreement through modification and coordination.
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkVP (SlashV2AP have_V2 like_AP) (mkNP (zenaN "pizza"))))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) ready_AP)))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkAP very_AdA ready_AP))))
cc -one (mkUtt (mkS (mkCl (mkNP (mkCard "5") L.child_N) (mkAP and_Conj ready_AP (mkAP (mkA "unavený"))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkVP (SlashV2AP have_V2 like_AP) (mkNP he_Pron)))))
-- Kdo has masculine singular agreement and inflects for case.
cc -one (mkUtt (mkQS (mkQCl whoSg_IP (mkAP L.young_A))))
cc -one (whoSg_IP.s ! genitive ++ whoSg_IP.s ! dative ++ whoSg_IP.s ! instrumental)
-- Comparison terms remain nominative while the adjective inflects.
cc -one (mkUtt (mkNP (mkCN (mkAP L.young_A (mkNP he_Pron)) (panN "student"))))
cc -one (SyntaxCze.mkAdv with_Prep (mkNP (mkCN (mkAP L.young_A (mkNP he_Pron)) (panN "student"))))
-- A ProDrop comparison pronoun must still be overt.
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop i_Pron)) (mkAP L.young_A (mkNP (E.ProDrop she_Pron))))))
-- Addressing a quantified group retains genitive government.
cc -one (mkVoc (mkNP (mkCard "5") L.child_N))
cc -one (mkVoc (mkNP all_Predet (mkNP (mkCard "5") L.child_N)))
-- Pronominal heads retain their order after modification and binding.
cc -one (SyntaxCze.mkAdv with_Prep (mkNP all_Predet (mkNP youPl_Pron)))
-- The outer pronoun controls all, independently of the reflexive's antecedent.
cc -one (mkUtt (mkS (mkCl (mkNP she_Pron) (E.AdvRVP (mkVP L.swim_V) with_Prep (E.PredetRNP all_Predet (E.AdvRNP (mkNP we_Pron) (ParadigmsCze.mkPrep "u" genitive) E.ReflPron))))))
cc -one (mkUtt (mkS (mkCl (mkNP (E.ProDrop they_Pron)) (E.AdvRVP (mkVP L.write_V2 (mkNP (zenaN "kniha"))) about_Prep (E.PredetRNP all_Predet E.ReflPron)))))
-- Short forms allow predicate responses but cannot modify a noun.
cc -one (mkUtt (mkNP (mkCN like_AP (panN "student"))))
cc -one (mkUtt ready_AP)
-- Third-person gender changes the whole paradigm and preserves omission.
cc -one ((genderPron feminine he_Pron).nom ++ (genderPron feminine he_Pron).cacc ++ (genderPron feminine he_Pron).pacc ++ (genderPron feminine he_Pron).poss.msnom)
cc -one (mkUtt (mkS (mkCl (mkNP (genderPron feminine (E.ProDrop he_Pron))) ready_AP)))
cc -one ((genderPron mascAnimate (he_Pron ** {pacc = "něj"})).pacc)
-- Standalone case utterances preserve NP inflection and strong pronoun forms.
cc -one (E.UttAccNP (mkNP this_Quant (mkCN (mkA "studený") (zenaN "káva"))))
cc -one (E.UttDatNP (mkNP this_Quant (mkCN (mkA "studený") (zenaN "káva"))))
cc -one (E.UttAccNP (mkNP he_Pron))
cc -one (E.UttDatNP (mkNP (E.ProDrop he_Pron)))
q
+213
View File
@@ -0,0 +1,213 @@
v bance
do banky
mé manželky
tyto děti jsou unavené
toto dítě je unavené
NN je unavený
do Prahy
paměť paměť paměti pamětí pamětem pamětech paměťmi
lodi lodí loďmi
dlaň dlaň dlaně dlani dlaní dlaněmi
písně písni písněmi
Nataši Nataše Nataše Nataši Nataši
Máni Máně Máně Máni Máni
Nadi Nadě Káti Kátě
Zoji Zoje
škole váze míse bance
sůl sůl soli
v mlékách
roku
v jablkách
naší ženy
o naší ženě
s vaší ženou
ve vašem městě
s vaším mužem
našim mužům
vašim mužům
naši muži
miluje naše muže
vaše města
do nejlepšího hotelu
v nejmodřejší barvě
mladší
hrdější nejrudějšího chudší
rychlejší nejrychlejší
krásnější modernější chytřejší
praktičtější lidštější cizejší
čistší
jarního
Predef.nonExist
Predef.nonExist
Predef.nonExist
lehčí
s mladším studentem
pět dětí je mladších
já piji vodu
já kupuji knihu synovi
kupuji nekupují kupoval kupuj nekupujte
kryji nekryjí kryl kryj nekryjte
piji pil pij
jste unavený
nejste unavená
jste Angličanka
ony jsou unavené
ona jsou unavená
vy jste unavená
vy jste unavené
pět dětí je studenty
on je Petr
my jsme studenti
my jsme dvě děti
my jsme rodina
já mu kupuji knihu
já ji kupuji jen jemu
kde je hotel
nechci plavat
čekám na ni
vím Predef.SOFT_BIND , jestli jsi unavený
vím Predef.SOFT_BIND , kde je hotel
miluji ji
chci se mýt
nemyjte se
mýt se
učím se mýt se
dnes se myji
dnes se doma myji
vím Predef.SOFT_BIND , že se myje
vím Predef.SOFT_BIND , jestli se myješ
nechť se myje
nechť se dvě děti myjí
nechť ho miluje
jestliže ji miluji
jestliže se dnes myji
kupuji si
nekupuj si
mohu si kupovat
učím se mýt se
mám pět pizz
dvacet jedna roků
dvacet dva dětí
sto jedna dětí
se dvěma tisíci jedna dětmi
s těmito dvaceti jedna tisíci korun
tří dětí
s dvaceti třemi dětmi
s dvěma sty dětí
s tisícem korun
0 korun
do n Predef.BIND -tého hotelu
dvě miliardy
3 Predef.BIND , Predef.BIND 5 milionu
pět dětí je unavených
dva tisíce dětí je unavených
s tímto tisícem korun
tyto dva tisíce dětí
těchto dvou tisíc dětí
tato dvě stě korun
těchto pět set korun
tato dvě stě tisíc dětí
s tímto tisícem nejlepších korun
kterých pět dětí
které dvě děti
který tisíc dětí
jedna
dvacet jedna
dvě
jedno dítě
dva miliony korun jsou připraveny
miliarda korun je připravena
pět milionů korun je připraveno
dvě stě korun je připraveno
dvě stě milionů korun je připraveno
všechny dva tisíce dvě stě dětí
dva miliony dvě stě korun jsou připraveny
tato jedna miliarda dva miliony dvě stě korun je připravena
1 milion
- Predef.BIND 1 milion
- Predef.BIND 2 miliony
- Predef.BIND 2 tisíce korun
- Predef.BIND 1 Predef.BIND , Predef.BIND 5 milionu
ve škole
v nejlepší škole
v moderní škole
v muzeu
ve Stromovce
v Měně
ve Městě
v mělkém městě
ve mlýně
v novém mlýně
se mnou
se ženou
ze školy
ze všech dětí
ve mzdě
ve mně
ve mne
ve hře
s hrou
ze Školy
jen já plavu
jen já se myji
miluji jen jeho
ony všechny se myjí
jen já se myji
všichni studenti
všech pět dětí
se všemi dětmi
všechna voda
všechen tisíc korun
všichni muži a ženy
všechny ženy Predef.SOFT_BIND , muži a děti
jsem hrdý na něho
jsem hrdý na ni
dítě hrdé na ni
dítě věrné jemu
v něm
kupuji od něho pro ni
kupuji od něho pro ni
já ji kupuji sobě
miluje sebe
čeká na sebe
miluje svou manželku
miluje manželku svého syna
miluje sebe a své děti
učím se o sobě
pět dětí je hrdých na sebe
pět dětí je spokojených se sebou všemi
dítě hrdé na sebe
čekám na ni a sebe
miluje jen sebe
píši knihu o všech svých dětech
mám všechen svůj tisíc korun
miluji všechny své syny a svou dceru
miluji všechny své syny Predef.SOFT_BIND , svou dceru a sebe
mám dítě jeho a sebe
píši knihu jemu a sobě
kniha plná jeho a sebe
jsem plný jeho a sebe
pět dětí má rádo pizzu
pět dětí je připraveno
pět dětí je velmi připraveno
pět dětí je připraveno a unavených
mám ho rád
kdo je mladý
koho komu kým
student mladší než on
se studentem mladším než on
jsem mladší než ona
pět dětí
všech pět dětí
s vámi všemi
ona plave s námi všemi u sebe
píší knihu o sobě všech
Predef.nonExist
připraven
ona ji ni její
je připravena
něj
tuto studenou kávu
této studené kávě
jeho
jemu
+18
View File
@@ -0,0 +1,18 @@
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) já ji miluji
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) ty ji miluješ
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) on ji miluje
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) ona ji miluje
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youPl_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) vy ji milujete
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youPol_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) vy ji milujete
UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) já ji nemiluji
UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youPol_Pron) (UseComp (CompAP (PositA young_A))))) vy nejste mladý
UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youPl_Pron) (UseComp (CompAP (PositA young_A))))) vy nejste mladí
UttImpPl PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečtěte ji
UttImpPol PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečtěte ji
UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečti ji
UttImpSg PPos (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) čti ji
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (Slash3V3 buy_V3 (UsePron he_Pron)) (UsePron she_Pron)))) já mu ji kupuji
UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (Slash2V3 buy_V3 (UsePron she_Pron)) (UsePron he_Pron)))) já mu ji kupuji
UttAdv (PrepNP vAcc_Prep (UsePron i_Pron)) ve mě
UttAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN currency_N))) v měně
UttAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN city_N))) ve městě
1 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) já ji miluji
2 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) ty ji miluješ
3 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) on ji miluje
4 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) ona ji miluje
5 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youPl_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) vy ji milujete
6 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youPol_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) vy ji milujete
7 UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))) já ji nemiluji
8 UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youPol_Pron) (UseComp (CompAP (PositA young_A))))) vy nejste mladý
9 UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youPl_Pron) (UseComp (CompAP (PositA young_A))))) vy nejste mladí
10 UttImpPl PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečtěte ji
11 UttImpPol PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečtěte ji
12 UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) nečti ji
13 UttImpSg PPos (ImpVP (ComplSlash (SlashV2a read_V2) (UsePron she_Pron))) čti ji
14 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (Slash3V3 buy_V3 (UsePron he_Pron)) (UsePron she_Pron)))) já mu ji kupuji
15 UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (Slash2V3 buy_V3 (UsePron she_Pron)) (UsePron he_Pron)))) já mu ji kupuji
16 UttAdv (PrepNP vAcc_Prep (UsePron i_Pron)) ve mě
17 UttAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN currency_N))) v měně
18 UttAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN city_N))) ve městě
+8
View File
@@ -17,3 +17,11 @@ For a test to pass
For instance, if there is a test named ``my-test``, the gf commands should be For instance, if there is a test named ``my-test``, the gf commands should be
in ``my-test.gfs`` and the expected output in ``my-test.out`` in ``my-test.gfs`` and the expected output in ``my-test.out``
Czech tests
-----------
From the checkout root, run ``sh tests/czech/check.sh``. See the
`Czech test README <czech/README.md>`_ for executable selection and coverage.
The runner uses the same ``.gfs``/``.out`` convention and additionally checks
API imports and generation/parsing through finite PGF fragments.