Files
gf-rgl/src/polish/StructuralPol.gf
T
aarneranta 8c4cd58bd1 polish: complete the RGL enough to build an application grammar
Adding Polish to informath (grammars/next) exposed a set of gaps. Unlike
Czech, StructuralPol was already complete; what was missing was a handful
of lins, a way to govern the nominative, and some outright mistakes.

Missing lins, all reached as qualified Grammar.X by the application's
functors and so not shimmable from the application side:

  AdjectivePol  AdvAP
  SentencePol   SSubjS
  IdiomPol      ImpP3
  StructuralPol that_Subj
  MarkupPol     new module (Markup is not part of the RGL build script,
                so it is compiled on demand, as MarkupCze is)
  ParadigmsPol  mkAdv (every other ParadigmsX has it; the application
                interfaces reach it as Paradigms.mkAdv)

ImpP3 has no third-person imperative to use, so it takes the standard
"niech" periphrasis. The copula takes the future ("niech x będzie grupą")
and every other verb the present ("niech x należy do A"): być is the only
Polish verb with a synthetic future, and imienne marks exactly the copular
VPs.

NomPrep: ComplCase had no nominative at all, so "jako", "niż" and
"zdefiniowany jako" -- all of which govern the nominative -- came out
locative ("mniejszy niż liczbie"). mkCompl now maps Nom to a new NomPrep,
and the dep tables of the pronouns, nounPN, mkPN and the structural NPs
cover it. LexiconNounPol is marked DO NOT EDIT, but paris_PN and john_PN
inline their own dep tables and so had to be extended too.

Two corrections:

  VerbPol.CompCN used the nominative for a predicative noun, giving
  "x jest grupa"; Polish uses the instrumental, as CompNP right below it
  already does.

  ExtendPol.ExistsNP inherited ExistNP from ExtendFunctor, giving
  "jest macierz". Polish distinguishes the two: "there exists" is istnieć,
  which is what mathematical prose uses.

ParadigmsPol.guess_paradigm_basic never matched -ość, the productive
feminine abstract suffix, so sprzeczność took a masculine declension
(*sprzeczności/a, *sprzecznościowi) despite being tagged feminine. It now
routes to the kość paradigm.

Also documents, without changing, why the 2-string mkN throws its genitive
away: guess_paradigm's 2-string table is unsound (its first branch matches
every noun in -a, and its branches disagree about whether mkNTable* takes
the nominative or the bare stem), so passing sggen to it turns
"liczba"/"liczby" into *liczbaa. The 1-string guesser is the sound path
until that table is repaired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 19:22:24 +02:00

125 lines
4.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--# -path=.:../abstract:../common:../prelude
-- Ilona Nowak Wintersemester 2007/08
-- Adam Slaski, 2009, 2010 <adam.slaski@gmail.com>
-- In Polish language they aren't determiners like in english or german.
concrete StructuralPol of Structural = CatPol **
open ResPol, MorphoPol, Prelude in {
flags optimize=all; coding=utf8;
lin
above_Prep = nadPrep;
after_Prep = mkPrep "po" Loc;
all_Predet = { s=wszystek; np=wszystko; adj=True };
almost_AdA, almost_AdN = ss "prawie";
although_Subj = ss "pomimo";
always_AdV = ss "zawsze";
and_Conj = {s1=""; s2 = "i"; sent1=""; sent2=["i"]};
at_least_AdN = ss "co najmniej";
at_most_AdN = ss "co najwyżej";
because_Subj = ss "ponieważ";
before_Prep = mkPrep "przed" Instr;
behind_Prep = mkPrep "za" Instr;
between_Prep = mkPrep "między" Instr;
both7and_DConj = {s1="zarówno"; s2=["jak i"]; sent1="zarówno"; sent2=[", jak i"]};
but_PConj = ss "ale";
by8agent_Prep = mkPrep "przez" Acc;
by8means_Prep = mkPrep "przez" Acc;
can8know_VV = mkItVerb (mkMonoVerb "umieć" conj101 Imperfective);
can_VV = mkItVerb (mkMonoVerb "móc" conj27 Imperfective);
during_Prep = mkPrep "podczas" Gen;
either7or_DConj = {s1="albo"; s2="albo"; sent1="albo"; sent2=[", albo"]};
every_Det = kazdyDet;
everybody_NP = wszyscy;
everything_NP = wszystko;
everywhere_Adv = ss "wszędzie";
except_Prep = mkPrep "z wyjątkiem" Acc;
few_Det = pareDet;
for_Prep = mkPrep "dla" Gen;
from_Prep = zGenPrep;
have_V2 = dirV2 (mkMonoVerb "mieć" conj100 Imperfective);
he_Pron = pronOn;
here_Adv = ss "tutaj";
here7to_Adv = ss "tutaj";
here7from_Adv = ss "stąd";
how_IAdv = ss "jak";
how8many_IDet = ileDet;
i_Pron = pronJa MascPersSg;
if_Subj = ss "jeśli";
if_then_Conj = {s1="jeżeli"; s2=[", to"]; sent1="jeżeli"; sent2=[", to"]};
in8front_Prep = mkPrep "przed" Instr;
in_Prep = mkPrep "w" Loc;
it_Pron = pronOno;
language_title_Utt = ss "polski";
less_CAdv = {s,sn = "mniej" ; p,pn = "niż" } ;
many_Det = wieleDet;
more_CAdv = {s = "bardziej" ; pn,p = "niż"; sn="więcej"} ;
most_Predet = { s=wszystek; np={nom="większość"; voc="większości";
dep=table{AccPrep|AccNoPrep=>"większość"; InstrC=>"większością"; _=>"większości"};
p=P3; gn=FemSg}; adj=False };
much_Det = duzoDet;
must_VV = mkItVerb (mkMonoVerb "musieć" conj93 Imperfective);
no_Quant = zadenQuant;
no_Utt = ss "nie";
nobody_NP = niktNP;
not_Predet = { s=zadenQuant.s; np=wszystko; adj=True };
nothing_NP = nicNP;
on_Prep = mkPrep "nа" Loc;
only_Predet = { s=\\_=>"tylko"; np=wszystko; adj=True };
or_Conj = {s1=""; s2="lub"; sent1=""; sent2=["lub"]};
otherwise_PConj = ss "inaczej";
part_Prep = mkPrep "z" Gen;
please_Voc = ss "proszę";
possess_Prep = mkPrep "" Gen; --overgenerating with pronouns
quite_Adv = ss "całkiem";
she_Pron = pronOna;
so_AdA = ss "tak";
somebody_NP = ktos ;
someSg_Det = pewienDet;
somePl_Det = pewniDet;
something_NP = cos ;
somewhere_Adv = ss "gdzieś";
that_Quant = demPronTen "tamten";
-- Polish always sets off a "że" clause with a comma, so the subordinator
-- carries it, as IdiomPol/SentencePol already do for EmbedS and SlashVS
that_Subj = ss [", że"];
there_Adv = ss "tam";
there7to_Adv = ss "tam";
there7from_Adv = ss "stamtąd";
therefore_PConj = ss "dlatego";
they_Pron = pronOni;
this_Quant = demPronTen "ten";
through_Prep = mkPrep "przez" Acc;
to_Prep = doPrep;
too_AdA = ss "za";
under_Prep = mkPrep "pod" Instr; -- with Acc too
very_AdA = ss "bardzo";
want_VV = mkV "chcieć" conj45 "zechcieć" conj45;
we_Pron = pronMy;
whatPl_IP = co;
whatSg_IP = co;
when_IAdv = ss "kiedy";
when_Subj = ss "jeśli";
where_IAdv = ss "gdzie";
which_IQuant = { s = ktory };
whoPl_IP = kto;
whoSg_IP = kto;
why_IAdv = ss "dlaczego";
with_Prep = mkPrep "z" Instr;
without_Prep = mkPrep "bez" Gen;
youPl_Pron = pronWy;
yes_Utt = ss "tak";
youSg_Pron = pronTy MascPersSg;
youPol_Pron = pronWy;
as_CAdv = { s,sn="tak"; p,pn="jak"} ;
};