polish-dynaword / data /sejm_api /sejm_api.md
ppuzio's picture
parliamentary: rebuild from IPI PAN's PPC TEI dump, official speakers only (v0.2.6 rights audit) (#108)
ceb3dc0
|
Raw History Blame Contribute Delete
4.35 kB

sejm_api

Contemporary official Polish Sejm speeches, supplementing existing parliamentary sources.

Dataset description

  • Source (upstream): https://api.sejm.gov.pl/
  • Source documentation: https://api.sejm.gov.pl/sejm.html
  • Domain: political/spoken
  • Language: Polish (pl)
  • License: public-domain (official documents)
  • Created (range): 2023-01-11, 2026-07-03
  • Added: 2026-08-22
  • Contributor: Piotr Styła (PiotrSty on Hugging Face; PiotrStyla on GitHub).

Licensing — traceable basis

Official parliamentary documents and materials are excluded from copyright by article 4(2) of the Polish Copyright Act: https://eli.gov.pl/api/acts/DU/2025/24/text/O/D20250024.pdf.

Reuse of public-sector information is governed by articles 2(12), 5, 6, 14, 15 and 17 of the Polish Open Data Act: https://eli.gov.pl/api/acts/DU/2023/1524/text.html.

The per-document value intentionally matches the existing parliamentary source. No unverified upstream Creative Commons license is asserted.

Provenance and reproducibility

  • Official provider: Kancelaria Sejmu RP.
  • Data route: Sejm API data via contributor snapshot. The text comes from the Hugging Face dataset PiotrSty/sejm-speeches-corpus@v1.0.1, not from the live API; SlayerLab did not re-fetch it from api.sejm.gov.pl.
  • Immutable source release: PiotrSty/sejm-speeches-corpus@v1.0.1.
  • Pinned source commit: 124557799608ce4212cf22fa90ca7904618de1b6.
  • Reviewed DynaWord base commit: 8cc48a3c564ac9edabfbbf012842ad11f70a3e5c.
  • Rebuild: python src/fetch_sejm_api.py --help, then python3 src/clean_sejm_api.py (trailer cut, below).
  • Speaker attribution and source URLs are in sejm_api.attribution.jsonl. Each source_url is a day-level listing (https://api.sejm.gov.pl/sejm/term{N}/videos/{date}), not a per-speech URL.
  • Slayer contribution digest: sha256:38e42a791d68d593f82e1125f2bb94cd8f68212433e71d3e3da90f82d78eaf32.

Temporal novelty and deduplication

The Sejm material of parliamentary ends with term 8 (2019-11-11; its Senate material is not compared: this source is Sejm-only). Every contributed record is dated on or after 2023-01-01, so its date range does not overlap it. Exact duplicate speech texts within the contribution are removed using SHA-1 fingerprints; this is not a claim of global cross-domain near-deduplication.

Statistics

Measure Value
Source rows inspected 157,714
Rows before 2023-01-01 118,902
Statements split into rows of their own 2,466
Rows under 200 characters 1,371
Exact duplicate texts removed 8
Documents published 39,899
Characters 83,482,628
Tokens (cl100k_base proxy) 30,860,439
Documents with speaker attribution 39,899

Statistics are recomputed from the released Parquet file. The canonical schema is id, text, source, added, created, token_count, license, author.

Trailer cut

The rights audit (slayerlabs/polish-dynaword-v2#57) found that the snapshot appends to 34,980 of the 38,812 fetched speeches a "Przebieg posiedzenia" header of a later statement of the same sitting day, and sometimes that statement's text. src/clean_sejm_api.py cuts every trailer (23,485,670 characters). An appended statement with text becomes a row of its own (2,466 rows), credited to the speaker the header names ("Przebieg posiedzenia Janusz Kowalski: …"), without the office in its label. Its date and term are those of the row it was cut from: the snapshot labels the 11th sitting of term 10 (2024-05-08, 2024-05-09, 2024-05-15) "11. kadencja" in 696 headers. A split row's id hashes its date, term, speaker and text like every other row; its sidecar line carries split_from (the id of the row it was cut from in v0.2.5) and has_events: null, since the snapshot's events flag describes the whole parent row. Rows that fall under the fetch's 200-character minimum after the cut (1,318 cut speeches and 53 split rows) and 8 texts that became exact duplicates are dropped.

Privacy and limitations

The upstream release heuristically redacts email addresses, PESEL identifiers and unambiguous Polish telephone numbers. Public-official names and speech attribution remain. Regex redaction is not a guarantee of zero personal data. Downstream users must review applicable privacy, third-party and source terms.