sejm_api_2011_2022: re-pin the dedup to the PPC TEI parliamentary (v2#54, 5A)

#110
by ppuzio - opened
Fabryka AI org

Re-pins the cross-source dedup of sejm_api_2011_2022 to the rebuilt parliamentary of Hub PR 108 (merged as ceb3dc0), decision 5A on slayerlabs/polish-dynaword-v2#54. src/clean_sejm_api_2011_2022.py is rerun; src/fetch_sejm_api_2011_2022.py is unchanged (the ontology manifest pins its hash).

What changes

  • REFERENCES pins data/parliamentary/parliamentary.parquet at 5f21252e… (main).
  • Reference groups come from the PPC record id (house sjm/snt and the dump's directory code: plenary, interpellation, reply; every other code is a committee) instead of the old heuristic.
  • The outcome key sejm_api_only is removed: it duplicated only_sejm_api.

Result: the same 126,967 rows are scored after the trailer cut. 92,369 contained (v0.2.5 reference: 93,861), 34,598 published (33,106), 77,313,079 characters, 28,712,009 cl100k_base tokens. Parquet sha256 f6ec51df….

Outcome key Dropped
all_references 92,369
parliamentary_all 92,347
only_parliamentary_sjm-plenary 92,312
only_parliamentary_sjm-interpellation 281
only_parliamentary_sjm-committee 125
only_parliamentary_snt-plenary 86
only_parliamentary_snt-committee 27
only_parliamentary_sjm-reply 19
only_sejm_api 45

Against the v0.2.5 reference, 22 rows are newly dropped (2020-2022 Sejm speeches 0.50-0.71 contained in a 2019-2023 Senate document) and 1,514 rows (7,126,113 characters) are kept again:

  • 573 (4,908,128 characters): in the dump, but the allowlist drops the speaker (citizens' initiative representatives, the President's Chancellery, the Prosecutor General's office, agency heads). They stay here until v2#99 applies the allowlist to this source.
  • 470 (1,084,769): not in the dump; 435 are "(tekst niewygłoszony)" statements.
  • 357 (911,196): mostly in text the rebuild keeps but under 0.5; in 315 the rest is mainly floor interjections.
  • 114 (222,020): other rebuild drops (speakers without a role in the header, interjection lines, free-text labels, speaker lines inside a turn, one non-member chair).

The 23 speeches of MP Piotr van der Coghen stay dropped: PR 108's name check (decision 1A) keeps them in parliamentary.

Files: the card (overlap section, statistics, cleaning steps), src/clean_sejm_api_2011_2022.py, src/sources.py (doc count, created 2011-11-08), src/test_sejm_api_2011_2022_contract.py (reference groups, removed key), artifacts/source_findings.md, and the regenerated parquet, attribution, decisions and stats.

Tests: contract tests 18/18; full suite 0 new failures against the baseline (the 8 baseline failures of this source pass with the data present).

Sample (python3 src/render_sample.py data/sejm_api_2011_2022/sejm_api_2011_2022.parquet -n 3 --max-chars 700):

id: sejm_api_2011_2022_304abf16419d8f45dbdd14f3e867266141b48c640559d54b8960104fbf832bbb
source: sejm_api_2011_2022
added: 2026-08-31
created: 2019-12-20
token_count: 3825
license: public-domain (official documents)
author: Ryszard Terlecki

Wznawiam obrady. Pan poseł z wnioskiem formalnym? Bardzo proszę. (Poseł Sławomir Nitras: Można?) Bardzo proszę. Troszkę jesteśmy w niedoczasie. (Poseł Sławomir Nitras: Przed czasem, bo pytań nie było.) (Poseł Krystyna Skowrońska: Panie marszałku...) Jesteśmy trochę w niedoczasie. Poseł Sławomir Nitras Przystępujemy do rozpatrzenia punktu 15. porządku dziennego: Wybór sędziego Trybunału Konstytucyjnego (druki nr 50 i 88). Na podstawie art. 194 ust. 1 Konstytucji Rzeczypospolitej Polskiej oraz art. 2 ust. 2 ustawy o statusie sędziów Trybunału Konstytucyjnego, a także art. 30 ust. 1 i ust. 3 pkt 1 w związku z art. 26 ust. 1 regulaminu Sejmu grupa posłów zgłosiła kandydaturę pana Rafała […]
id: sejm_api_2011_2022_b9c83b149bda002481b2400ebef5cfd3c3f51cc98fc9588b5a4de0c14b1c2d1a
source: sejm_api_2011_2022
added: 2026-08-31
created: 2022-05-26
token_count: 153
license: public-domain (official documents)
author: Łukasz Schreiber

Już kończę. Edmund Burke powiedział, że do triumfu zła wystarczy tylko jedno, by dobrzy ludzie nie wykazywali aktywności. I dzisiaj jest rzeczywiście czas na to, byśmy wspólnie działali. Wnoszę i proszę wszystkie kluby byśmy razem, wspólnie, nie licytując się, kto jest bardziej przeciwko Putinowi, walczyli, rzucili wyzwanie imperium zła. Dziękuję bardzo. (Oklaski) (Poseł Krystyna Skowrońska: Nawet skończył.)
id: sejm_api_2011_2022_41d0f92bfad3cf1742400088da995ea03f902241de7961847abb979f447e070c
source: sejm_api_2011_2022
added: 2026-08-31
created: 2022-07-20
token_count: 361
license: public-domain (official documents)
author: Grzegorz Rusiecki

Szanowna Pani Marszałek! Panie Ministrze! Wysoka Izbo! Każda forma wsparcia kredytobiorców hipotecznych zasługuje na uznanie. Pewnie ten projekt ustawy również będzie miał poparcie szerokiego grona politycznego w tej Izbie. Natomiast trzeba powiedzieć, że sytuacja kredytobiorców rzeczywiście nie jest łatwa. Ten wzrost wysokości kredytów w stosunku do ubiegłego roku to jest często dwukrotność. 85% raty kredytowej to są odsetki, tylko 15% to jest spłata kapitału, a więc zobowiązania wobec banków nie maleją. Zyski banków w tym roku wynoszą 12 mld, zyski budżetu państwa - 30 mld, a państwo proponujecie taką ustawę, która nie przyniesie przyspieszenia wpisu do hipoteki, tylko ewentualną ulgę […]

🤖 Generated with Claude Code

ppuzio changed pull request status to open
ppuzio changed pull request status to merged

Sign up or log in to comment