Datasets:
sejm_interpellations data files (scoped fix for #24)
#43
by PiotrSty - opened
artifacts/source_findings.md
CHANGED
|
@@ -541,3 +541,36 @@ Crawl the corpus already draws on.
|
|
| 541 |
If the goal is raw scale: SAOS. If the goal is a corpus that is not two-thirds
|
| 542 |
legalese, **there is no billion-scale option**, and the honest plan is a number of
|
| 543 |
50–200M-token sources across different registers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
If the goal is raw scale: SAOS. If the goal is a corpus that is not two-thirds
|
| 542 |
legalese, **there is no billion-scale option**, and the honest plan is a number of
|
| 543 |
50–200M-token sources across different registers.
|
| 544 |
+
|
| 545 |
+
---
|
| 546 |
+
|
| 547 |
+
## sejm_interpellations — 10th-term written Q&A (interpellations + replies)
|
| 548 |
+
|
| 549 |
+
**Investigated** — 2026-09-05 (review round 2026-09-28).
|
| 550 |
+
|
| 551 |
+
**Verdict** — `added` (proposed with `release: None`). 25,950 documents /
|
| 552 |
+
28.2M `cl100k_base` tokens of written MP questions and ministry replies —
|
| 553 |
+
argumentative administrative prose, a register the floor-speech shards do not
|
| 554 |
+
carry.
|
| 555 |
+
|
| 556 |
+
**Enumeration** — `GET /sejm/term10/interpellations` and `.../writtenQuestions`
|
| 557 |
+
plus `/reply/{key}/body` on api.sejm.gov.pl (the endpoints the 2026-08-27
|
| 558 |
+
"hold — recheck" entry above could not confirm; they exist and page fine).
|
| 559 |
+
PDF-only replies (`onlyAttachment`) and keyless stubs skipped. Term 9 returned
|
| 560 |
+
`X-Total-Count: 0`; terms 7–8 skipped (PPC covers through 2019).
|
| 561 |
+
|
| 562 |
+
**License evidence** — same basis as `sejm_api`: Copyright Act art. 4(2)
|
| 563 |
+
(<https://eli.gov.pl/api/acts/DU/2025/24/text/O/D20250024.pdf>) + Open Data Act
|
| 564 |
+
arts. 2(12), 5, 14, 17 (<https://eli.gov.pl/api/acts/DU/2023/1524/text.html>).
|
| 565 |
+
No CC grant claimed.
|
| 566 |
+
|
| 567 |
+
**Blockers** — none to merge with `release: None`. Before release: **NERGAL
|
| 568 |
+
pass** — interpellations name private constituents (constituent letters and
|
| 569 |
+
citizen cases are quoted in questions), which is exactly the case the old
|
| 570 |
+
`scrub_pii` (#20) could not cover and #38 moved out of this repo. Caveats for
|
| 571 |
+
the card: single term (10th), private citizens named.
|
| 572 |
+
|
| 573 |
+
**Lesson** — the header chrome (nr / recipient / title / signatories / date)
|
| 574 |
+
belongs in meta, not text: stripping it makes the body comparable across
|
| 575 |
+
question and reply docs, and the before/after is the fastest reviewer evidence
|
| 576 |
+
for any Sejm HTML source.
|
data/sejm_interpellations/sejm_interpellations.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# sejm_interpellations
|
| 2 |
+
|
| 3 |
+
Interpelacje i zapytania pisemne z 10. kadencji Sejmu, wraz z odpowiedziami
|
| 4 |
+
ministerstw dostępnymi jako HTML.
|
| 5 |
+
|
| 6 |
+
## Dataset description
|
| 7 |
+
|
| 8 |
+
- **Source (upstream):** https://api.sejm.gov.pl/
|
| 9 |
+
- **Source documentation:** https://api.sejm.gov.pl/sejm.html
|
| 10 |
+
- **Domain:** political/written
|
| 11 |
+
- **Language:** Polish (`pl`)
|
| 12 |
+
- **License:** `public-domain (official documents)`
|
| 13 |
+
- **Created (range):** 2023-11-15, 2026-09-03
|
| 14 |
+
- **Added:** 2026-09-05
|
| 15 |
+
- **OCR:** no
|
| 16 |
+
|
| 17 |
+
## Licensing — traceable basis
|
| 18 |
+
|
| 19 |
+
Official parliamentary materials are excluded from copyright under Polish
|
| 20 |
+
Copyright Act art. 4 pkt 2
|
| 21 |
+
(https://eli.gov.pl/api/acts/DU/2025/24/text/O/D20250024.pdf). Reuse of
|
| 22 |
+
public-sector information is governed by the Polish Open Data Act arts. 2(12),
|
| 23 |
+
5, 14 and 17 (https://eli.gov.pl/api/acts/DU/2023/1524/text.html). Same basis
|
| 24 |
+
as the shipped `sejm_api` shard. No Creative Commons grant is asserted.
|
| 25 |
+
|
| 26 |
+
## What the texts are
|
| 27 |
+
|
| 28 |
+
Written questions from MPs to ministers (`interpellations`,
|
| 29 |
+
`writtenQuestions`) and the ministry replies that the API serves as HTML.
|
| 30 |
+
Spoken floor speeches are **not** included — those are `sejm_api` (2023–) and
|
| 31 |
+
[#18](https://huggingface.co/datasets/SlayerLab/polish-dynaword/discussions/18)
|
| 32 |
+
(2011–2022). Same kadencja, different genre.
|
| 33 |
+
|
| 34 |
+
PDF-only replies (`onlyAttachment: true`) and keyless prolongation stubs are
|
| 35 |
+
skipped. Term 9 listed `X-Total-Count: 0` on both collections at fetch time
|
| 36 |
+
and is not in this shard. Terms 7–8 were not fetched (PPC already covers
|
| 37 |
+
interpellations through 2019).
|
| 38 |
+
|
| 39 |
+
## Provenance and reproducibility
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
python3 src/fetch_sejm_interpellations.py --out ~/speakleash --terms 9,10 --workers 4
|
| 43 |
+
python3 src/build_dynaword.py --sources sejm_interpellations --speakleash-dir ~/speakleash --out .
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
`src/fetch_sejm_interpellations.py` pulls HTML `/body` endpoints, strips
|
| 47 |
+
header chrome (nr / recipient / title / signatory / date) into `meta`, then
|
| 48 |
+
runs pattern PII redaction (the `scrub_pii` pass from #20 at build time —
|
| 49 |
+
phones → `[Telefon]`; e-mail / PESEL / NIP / REGON / IBAN → `[PII]`). That
|
| 50 |
+
in-repo scrubber was removed in #38; PII now goes through
|
| 51 |
+
[SlayerLab/NERGAL](https://huggingface.co/SlayerLab/NERGAL) and **this shard
|
| 52 |
+
must be re-run through NERGAL before it is admitted to a release** (it quotes
|
| 53 |
+
constituency casework naming private persons). Names of public officials stay.
|
| 54 |
+
`build_dynaword.py` applies the usual gates (strip, `< 200` chars, Polish
|
| 55 |
+
diacritic ratio, exact sha1).
|
| 56 |
+
|
| 57 |
+
## Why include it
|
| 58 |
+
|
| 59 |
+
The corpus already has spoken Sejm (`parliamentary`, `sejm_api`). This adds
|
| 60 |
+
the written Q&A register for the current term: longer, formal, ministry-voiced
|
| 61 |
+
replies that do not appear in the speech shards — the argumentative
|
| 62 |
+
question/answer pair is a document type the corpus otherwise lacks entirely.
|
| 63 |
+
Caveats for downstream users: single term (10th, 2023-11-15 – 2026-09-03), and
|
| 64 |
+
interpellations quote constituency casework that can name private citizens (see
|
| 65 |
+
Privacy below — a NERGAL pass is a release gate).
|
| 66 |
+
|
| 67 |
+
## Statistics
|
| 68 |
+
|
| 69 |
+
| Measure | Value |
|
| 70 |
+
|---|---:|
|
| 71 |
+
| JSONL rows read | 26,503 |
|
| 72 |
+
| Exact duplicate texts removed | 553 |
|
| 73 |
+
| Documents published | 25,950 |
|
| 74 |
+
| Characters | 78,607,831 |
|
| 75 |
+
| Tokens (`cl100k_base` proxy) | 28,180,895 |
|
| 76 |
+
| Documents with author attribution | 25,950 |
|
| 77 |
+
|
| 78 |
+
JSONL mix before dedup: 19,413 interpellations, 3,889 written questions,
|
| 79 |
+
2,730 interpellation replies, 471 written-question replies. All term 10.
|
| 80 |
+
|
| 81 |
+
## Filters applied (build_dynaword.py)
|
| 82 |
+
|
| 83 |
+
- drop documents < 200 chars: **0**
|
| 84 |
+
- drop non-Polish (diacritic ratio): **0**
|
| 85 |
+
- exact sha1 dedup: **553**
|
| 86 |
+
- OCR alpha-ratio: **0**
|
| 87 |
+
- read 26,503 → kept 25,950
|
| 88 |
+
|
| 89 |
+
## Sample
|
| 90 |
+
|
| 91 |
+
Question (author `Daniel Milewski`):
|
| 92 |
+
|
| 93 |
+
```
|
| 94 |
+
Szanowny Panie Ministrze,
|
| 95 |
+
|
| 96 |
+
latem 2022 roku na podlaskiej części granicy z Białorusią ukończono zaporę
|
| 97 |
+
fizyczną, czyli 5,5-metrowy płot ze stalowych przęseł zwieńczony drutem
|
| 98 |
+
żyletkowym. Ogrodzenie stoi na 186 kilometrach. […]
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Reply (author `sekretarz stanu w Ministerstwie Spraw Zagranicznych
|
| 102 |
+
Władysław Teofil Bartoszewski`):
|
| 103 |
+
|
| 104 |
+
```
|
| 105 |
+
Szanowny Panie Marszałku,
|
| 106 |
+
|
| 107 |
+
w odpowiedzi na zapytanie poselskie nr 3472 pana posła Bronisława Foltyna
|
| 108 |
+
w sprawie Instytutu Polskiego w Szwajcarii, uprzejmie informuję, co
|
| 109 |
+
następuje. […]
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
## Privacy and limitations
|
| 113 |
+
|
| 114 |
+
Regex PII scrub at fetch time is not a guarantee of zero personal data.
|
| 115 |
+
Constituency casework in interpellations can name private persons; those
|
| 116 |
+
names are left in (officials acting in capacity are not treated as PII).
|
| 117 |
+
Downstream users must review applicable privacy and source terms. Per
|
| 118 |
+
AGENTS.md the shard must be re-run through
|
| 119 |
+
[SlayerLab/NERGAL](https://huggingface.co/SlayerLab/NERGAL) before release;
|
| 120 |
+
merge with `release: None` is fine meanwhile.
|
data/sejm_interpellations/sejm_interpellations.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a309b9300933ee772d3c8fcda7546461cbf072807ea37939b6101fc2eb33bead
|
| 3 |
+
size 27168758
|
data/sejm_interpellations/sejm_interpellations.stats.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"read": 26503,
|
| 3 |
+
"kept": 25950,
|
| 4 |
+
"drop_short": 0,
|
| 5 |
+
"drop_lang": 0,
|
| 6 |
+
"drop_dup": 553,
|
| 7 |
+
"drop_ocr": 0,
|
| 8 |
+
"chars": 78607831,
|
| 9 |
+
"tokens": 28180895,
|
| 10 |
+
"licenses": {
|
| 11 |
+
"public-domain (official documents)": 25950
|
| 12 |
+
},
|
| 13 |
+
"authors_with_value": 25950,
|
| 14 |
+
"secs": 1.8,
|
| 15 |
+
"license": "public-domain (official documents)"
|
| 16 |
+
}
|