Add source: eli_pdf_acts — Dziennik Ustaw and Monitor Polski acts published only as PDF

#47

Adds eli_pdf_acts (release: None): 33,795 acts / 209,434,373 cl100k_base tokens of Polish official-journal text that dziennik_ustaw cannot contain.

Why. src/fetch_eli.py reads text.html and skips acts with textHTML: false. In the ELI lists (GET https://api.sejm.gov.pl/eli/acts/{DU|MP}/{year}, all years, checked 2026-10-01) no Monitor Polski act has HTML (0 of 66,697), no Dziennik Ustaw act of 2025–2026 has it (0 of 3,185), and of 2000–2011 only 3,984 of 23,604 do. So dziennik_ustaw has no MP act and no act of 2025. This source keeps only acts with textHTML: false in the current list, so the two never hold the same act.

What's in it. Monitor Polski 2012–2026 (18,162 acts), Dziennik Ustaw 2000–2006 (12,357), Dziennik Ustaw 2025–2026 plus the 98 PDF-only acts of 2020–2023 (3,276). Statutes, regulations, notices, Constitutional Tribunal rulings, ratified agreements with annexes, consolidated texts; in MP also appointments, financial reports of parties and election committees, reports of state bodies. id = ELI address (eli_pdf_acts_DU_2003_991), created = the act's own date.

Provenance and license. The official PDFs (https://api.sejm.gov.pl/eli/acts/{DU|MP}/{year}/{pos}/text.pdf) converted by eli2md (MIT), read from three HF datasets pinned by revision (PolskiAgentW/monitor-polski-md, dziennik-ustaw-md, dziennik-ustaw-2000-2011-md, CC0). eli_pdf_acts.attribution.jsonl has per document the PDF URL, the PDF's SHA-256 and the converter version. Not subject to copyright: Copyright Act art. 4 pkt 1 (normative acts) and pkt 2 (official documents), the same basis as dziennik_ustaw.

Why not plain PDF extraction. Dz.U. 2000–2010 PDFs use QuarkXPress fonts with Polish letters in Mac CE codes mapped as Mac Roman. pdftotext, Dz.U. 2003 poz. 991: ROZPORZÑDZENIE MINISTRA KULTURY1) w sprawie okreÊlenia kategorii urzàdzeƒ i noÊników s∏u˝àcych; here: ROZPORZĄDZENIE MINISTRA KULTURY1) … w sprawie określenia kategorii urządzeń i nośników służących. On 53 random Dz.U. 2000–2009 acts that also have HTML, share of reference words recovered in order: eli2md 0.993, PyMuPDF 0.676, pdftotext 0.641, pdfplumber 0.358 (eval). MP and Dz.U. 2025–2026 cannot be scored this way (no HTML exists); MP was checked by eye on samples.

Normalization (all in src/fetch_eli_pdf_acts.py, counts in the datasheet): eli2md markdown → text (metadata title line and converter page notes dropped; OCR lines that are image/grid noise dropped, 2.8% of OCR characters; heading hashes, **, signature-line *…* and escapes removed; footnotes [^3] → 3) as printed); NFKC and whitespace; NERGAL 1.1.2 rules layer (scrub_pii.py at e0caa8b, SHA-256 checked): 8,847 masks in 661 documents. The NERGAL model layer was not run (no GPU), so the shard needs a full NERGAL pass before a release. is_ocr: False on purpose: the document-level alpha gate would drop 20% of acts (dates, amounts, tables); OCR noise is filtered per line instead. 14% of characters come from OCR. Gates: 0 short, 0 non-Polish, 1 exact duplicate (M.P. 2020 poz. 747 = poz. 736, printed twice).

Before → after (markdown as published → text in the shard):
(blank lines omitted, long lines cut with …)

DU/2003/991 before:

# Rozporządzenie Ministra Kultury z dnia 2 czerwca 2003 r. w sprawie określenia kategorii urządzeń i nośników służących do utrwalania utw…
ROZPORZĄDZENIE MINISTRA KULTURY[^1]
z dnia 2 czerwca 2003 r.
w sprawie określenia kategorii urządzeń i nośników służących do utrwalania utworów oraz opłat od tych urządzeń i nośników z tytułu ich sp…
Na podstawie art. 20 ust. 5 ustawy z dnia 4 lutego 1994 r. o prawie autorskim i prawach pokrewnych (Dz. U. z 2000 r. Nr 80, poz. 904, z 2…
##### § 1.

after:

ROZPORZĄDZENIE MINISTRA KULTURY1)
z dnia 2 czerwca 2003 r.
w sprawie określenia kategorii urządzeń i nośników służących do utrwalania utworów oraz opłat od tych urządzeń i nośników z tytułu ich sp…
Na podstawie art. 20 ust. 5 ustawy z dnia 4 lutego 1994 r. o prawie autorskim i prawach pokrewnych (Dz. U. z 2000 r. Nr 80, poz. 904, z 2…
§ 1.

MP/2012/531 before:

Na podstawie art. 133 ust. 1 pkt 2 Konstytucji Rzeczypospolitej Polskiej z dnia 2 kwietnia 1997 r. mianuję Pana Stefana CZMURA Ambasadore…
*Prezydent Rzeczypospolitej Polskiej: B. Komorowski*
Prezes Rady Ministrów: D. Tusk

after:

Na podstawie art. 133 ust. 1 pkt 2 Konstytucji Rzeczypospolitej Polskiej z dnia 2 kwietnia 1997 r. mianuję Pana Stefana CZMURA Ambasadore…
Prezydent Rzeczypospolitej Polskiej: B. Komorowski
Prezes Rady Ministrów: D. Tusk

DU/2005/439 before:

> Czy kwota podlegająca zwrotowi została zwrócona?
> RAZEM
> 97 IN MEJSf) AluusIzq
> — 066: —
> 6c7 “20d
> [Strona 20 PDF nie ma czytelnej warstwy tekstowej. Tekst poniżej odczytał OCR (tesseract 5.5.0, pol+eng). Może zawierać błędy i pomija …
> C.1
> ZESTAWIENIE WYKORZYSTANIA DOTACJI PRZEKAZANEJ JEDNOSTKOM UPRAWNIONYM

after:

Czy kwota podlegająca zwrotowi została zwrócona?
RAZEM
97 IN MEJSf) AluusIzq
ZESTAWIENIE WYKORZYSTANIA DOTACJI PRZEKAZANEJ JEDNOSTKOM UPRAWNIONYM

The OCR line filter is a heuristic: in the last excerpt it drops the noise — 066: — and 6c7 “20d, but keeps 97 IN MEJSf) AluusIzq (enough letters) and drops the real label C.1 (no 3-letter word).

Sample (python3 src/render_sample.py data/eli_pdf_acts/eli_pdf_acts.parquet -n 3):

id: eli_pdf_acts_MP_2012_531
source: eli_pdf_acts
added: 2026-07-19
created: 2012-06-12
token_count: 183
license: public-domain (official documents)
author: 

POSTANOWIENIE

PREZYDENTA RZECZYPOSPOLITEJ POLSKIEJ

z dnia 12 czerwca 2012 r.

nr 110-23-12

w sprawie mianowania Ambasadora Rzeczypospolitej Polskiej

Na podstawie art. 133 ust. 1 pkt 2 Konstytucji Rzeczypospolitej Polskiej z dnia 2 kwietnia 1997 r. mianuję Pana Stefana CZMURA Ambasadorem Nadzwyczajnym i Pełnomocnym Rzeczypospolitej Polskiej w Republice Islandii.

Prezydent Rzeczypospolitej Polskiej: B. Komorowski

Prezes Rady Ministrów: D. Tusk
id: eli_pdf_acts_DU_2004_2492
source: eli_pdf_acts
added: 2026-07-19
created: 2004-11-18
token_count: 2176
license: public-domain (official documents)
author: 

ROZPORZĄDZENIE MINISTRA FINANSÓW1)

z dnia 18 listopada 2004 r.

zmieniające rozporządzenie w sprawie zwolnień od podatku akcyzowego

Na podstawie art. 24 ust. 2 i art. 25 ust. 5 ustawy z dnia 23 stycznia 2004 r. o podatku akcyzowym (Dz. U. Nr 29, poz. 257 i Nr 68, poz. 623) zarządza się, co następuje:

§ 1.

W rozporządzeniu Ministra Finansów z dnia 26 kwietnia 2004 r. w sprawie zwolnień od podatku akcyzowego (Dz. U. Nr 97, poz. 966 i Nr 181, poz. 1875) wprowadza się następujące zmiany:

1) w § 12 w ust. 1 pkt 2 otrzymuje brzmienie:

„2) paliwa ciekłe z zawartością biokomponentów od 2 % do 5 % — w wysokości 1,50 zł od każdego litra biokomponentów dodanych do tych paliw oraz biopaliwa ciekłe z zawartością powyżej 5 % do 10 % biokomponentów, w kwocie 1,80 zł od każdego litra biokomponentów […]
id: eli_pdf_acts_DU_2006_925
source: eli_pdf_acts
added: 2026-07-19
created: 2006-07-18
token_count: 866
license: public-domain (official documents)
author: 

ROZPORZĄDZENIE PREZESA RADY MINISTRÓW

z dnia 18 lipca 2006 r.

zmieniające rozporządzenie w sprawie grup zaszeregowania stanowisk służbowych funkcjonariuszy Agencji Wywiadu i stawek uposażenia zasadniczego w tych grupach oraz wzrostu uposażenia zasadniczego z tytułu wysługi lat

Na podstawie art. 116 ust. 1 ustawy z dnia 24 maja 2002 r. o Agencji Bezpieczeństwa Wewnętrznego oraz Agencji Wywiadu (Dz. U. Nr 74, poz. 676, z późn. zm.1)) zarządza się, co następuje:

§ 1.

W rozporządzeniu Prezesa Rady Ministrów z dnia 31 marca 2004 r. w sprawie grup zaszeregowania stanowisk służbowych funkcjonariuszy Agencji Wywiadu i stawek uposażenia zasadniczego w tych grupach oraz wzrostu uposażenia zasadniczego z tytułu wysługi lat (Dz. U. Nr 53, poz. 526, z 2005 r. Nr 39, poz. 369 oraz z 2006 r. Nr 50, […]

Caveats (more in the datasheet): unofficial text, the PDF is binding; OCR errors remain in scanned tables and forms; MP names private persons in official records (NERGAL keeps names by design); near-duplicates with dziennik_ustaw (2025–2026 consolidated texts repeat earlier ones); Dz.U. 2007–2011 is not included yet (still being converted).

Two notes. (1) build_dynaword.py stamps every record with the global ADDED, so the shard's added column is 2026-07-19 while sources.py says 2026-10-01. The builder is unchanged; the shard can be re-stamped or the builder given an opt-in flag, if you prefer. (2) src/sources.py on main has CRLF line endings; the new entry keeps them, so the diff is one entry.

Changes: data/eli_pdf_acts/*, src/fetch_eli_pdf_acts.py, src/test_eli_pdf_acts_contract.py (python3 -m pytest src/test_eli_pdf_acts_contract.py: 15 passed), one entry in src/sources.py, one entry in artifacts/source_findings.md.

This PR was prepared with the use of AI.

Cannot merge
This branch has merge conflicts in the following files:
  • artifacts/source_findings.md

Sign up or log in to comment