Add source: Studia BAS peer-reviewed policy articles

#19

Add source: studia_bas — peer-reviewed Polish public-policy articles

Summary

Adds 112 full-length articles from Studia BAS, the peer-reviewed quarterly of the Bureau of Research (Biuro Analiz Sejmowych), Chancellery of the Sejm. The retained collection covers issues 2(66)/2021–82/2025 and contributes long-form academic Polish on economics, law and public policy.

Documents 112
Tokens 2,256,009
Characters 6,089,085
Years 2021–2025
Issues 66–82
License CC-BY-3.0-PL
OCR No — born-digital PDF text layers

Data samples

Real records with all canonical metadata fields. Text is truncated only at […].

Record 1

id source added created token_count license author
studia_bas_2021_15 studia_bas 2026-07-19 2021 27079 CC-BY-3.0-PL Anna Szelągowska
Wyzwania współczesnej polskiej polityki mieszkaniowej

Streszczenie

The article presents the author's insights into the Polish housing policy in the context of the
country's current housing needs and challenges. Special attention is given to the role of housing
policy and citizens' right to adequate and affordable housing[…]

Wstęp

Problematyka potrzeb mieszkaniowych jest z jednej strony tematem ważnym i bardzo potrzebnym w
teorii i praktyce, z drugiej zaś należy do zagadnień niewdzięcznych do analizy. Wynika to m.in. z
faktu, że pod względem sytuacji mieszkaniowej obywateli Polska plasuje się w niechlubnej czołówce
państw członkowskich Unii Europejskiej[…]

Record 2

id source added created token_count license author
studia_bas_2023_12 studia_bas 2026-07-19 2023 22504 CC-BY-3.0-PL Agnieszka Paulina Smoleńska
Zrównoważone banki? Czynniki ESG w unijnych regulacjach mikroostrożnościowych

Streszczenie

The financial sector is highly affected by the spectre of climate change and other
sustainability-related factors, as recognised by various global and EU policies.[…]

Wstęp

Ryzyko środowiskowe, a w szczególności ryzyko klimatyczne wiąże się z wymiernymi stratami
finansowymi dla przedsiębiorstw gospodarki realnej, a więc również instytucji finansowych.[…]

The English abstract present in each article is retained. It represents roughly 1–2% of a document; the article body is Polish.

Provenance and license

  • Origin: official issue PDFs from the Studia BAS archive, published by Kancelaria Sejmu RP / Biuro Analiz Sejmowych.
  • Collection: src/fetch_studia_bas.py enumerates eligible issues, downloads the PDFs and splits them into articles at DOI title pages using PyMuPDF layout data. No OCR, scraped HTML or third-party mirror is used.
  • Integrity: studia_bas.license-evidence.json records the SHA-256 and byte size of all 17 input PDFs. The row-aligned attribution sidecar records each article's DOI, issue, publisher, attribution URL, license URL and modification flag.
  • License: Creative Commons Attribution 3.0 Poland.

The license is stated by the journal on its open-access page, in its author instructions, and inside every retained issue PDF. The journal explicitly permits users to read, download, copy, distribute, index and use the articles as software data under CC BY 3.0 PL.

The cutoff is enforced in code: issues before 2(66)/2021 say Wszelkie prawa zastrzeżone and are excluded. Only issues 66 onward, to which the journal applies CC BY 3.0 PL, are downloaded and built.

Normalization and filtering

Normalization runs in the committed fetcher before the intermediate JSONL is built. It includes NFKC Unicode normalization, typography and whitespace cleanup, PDF line-wrap repair, running-header removal, exclusion of author affiliation/contact blocks, terminal bibliography removal, and PII replacement for email addresses, ORCIDs, phone numbers, PESEL, NIP and REGON values. Paragraph boundaries are preserved. Bibliography removal is structure-aware: it removes terminal reference sections while preserving article body and post-bibliography annexes; seven annexes in the source collection are explicitly covered by regression checks.

Real examples:

soft line wrap:     'skut-\nki' → 'skutki'
compound wrap:      'program-\n-mieszkaniowy' → 'program-mieszkaniowy'
non-breaking space: 'w\xa0dniu 11\xa0marca' → 'w dniu 11 marca'
PII:                'jan.kowalski@sejm.gov.pl' → '[PII]'

Bibliography removal from studia_bas_2021_15:

before:
...umożliwiać im jednocześnie korzystanie ze wsparcia publicznego w sytuacji
uniemożliwiającej ponoszenie kosztów utrzymania mieszkania.

Bibliografia

Acocella N., Zasady polityki gospodarczej, PWN, Warszawa 2002. Bryx M., Rudzka I., ...

after:
...umożliwiać im jednocześnie korzystanie ze wsparcia publicznego w sytuacji
uniemożliwiającej ponoszenie kosztów utrzymania mieszkania.

Post-bibliography annex preservation in studia_bas_2021_23:

before:
...szacunkową wartość rynkową nieruchomości potencjalnego sprzedającego.

Bibliografia

Czerniak A., Housing Market [w:] Diversity of Patchwork Capitalism...
[bibliography removed]

Aneks

Ogółem Bydgoszcz Gdynia Katowice Kraków Olsztyn Poznań Warszawa Wrocław

after:
...szacunkową wartość rynkową nieruchomości potencjalnego sprzedającego.

Aneks

Ogółem Bydgoszcz Gdynia Katowice Kraków Olsztyn Poznań Warszawa Wrocław

The released corpus has no standalone Bibliografia, Bibiliografia or
References paragraph. Contract tests separately pin every one of the seven
documents with substantive post-bibliography annexes.

Build results:

Result Count
Read 115
Kept 112
Dropped as non-Polish 3
Dropped as short 0
Exact duplicates 0
OCR-gate drops 0

The three rejected records are English-only articles. All 112 retained rows have a non-empty author, uniform CC-BY-3.0-PL licensing, unique IDs and distinct text. The committed audit reports zero email, ORCID, PESEL, NIP or REGON matches across all 115 extracted records.

Why include it

The source adds 2.26M tokens of long-form, expert-written Polish on housing, public finance, labour, energy, demography, healthcare and EU regulation. Its formal academic register, legal/economic terminology and citation-dense argument differ materially from the parliamentary speech and institutional-web sources already present in DynaWord.

This source has zero exact-text overlap with the existing local corpus. All 112
retained texts were compared byte-for-byte with 4,366,651 documents across the
other 20 local Parquets; no match was found. A deeper audit of the released
DynaWord biblioteka_nauki shard also found no match by full-text SHA-1,
normalized attribution title, title n-grams in document text or DOI. The current
Biblioteka Nauki journal catalogue
does host 105 of these articles (issues 66–80), but they are absent from
DynaWord's released biblioteka_nauki.parquet; the remaining seven articles,
from issues 81–82/2025, are not present in that catalogue. Keeping a dedicated
source also preserves exact publisher provenance and the specific
CC-BY-3.0-PL license rather than relying on the portal's generic cc-by
classification.

Known limitations:

  • the collection is intentionally skewed toward socioeconomic policy and a legislative audience;
  • English abstracts and non-Polish quotations embedded in the article body are retained;
  • terminal bibliographies are removed, while citation-like material embedded in the article body is retained;
  • extraction depends on the journal's post-2021 PDF layout and may require adjustment if that layout changes.

Implementation

  • data/studia_bas/: Parquet, statistics, datasheet, attribution sidecar, license evidence and attribution notice;
  • src/fetch_studia_bas.py: download, article splitting and normalization;
  • src/audit_studia_bas.py and src/report_studia_bas_audit.py: PII and integrity audit;
  • src/test_studia_bas_contract.py, src/test_audit_studia_bas.py: source contracts;
  • src/sources.py: source registration;
  • src/build_dynaword.py: opt-in preserve_id and preserve_created flags, scoped to sources that request them; existing source behavior is unchanged.

src/test_build_dynaword_flags.py verifies the new flags and the unchanged default behavior. The compressed-input path also closes its input handle correctly.

Verification

  • Studia BAS contract tests: 30 passed.
  • Studia BAS PII/audit tests: 14 passed.
  • Cross-source exact-text dedup: 0 matches against 4,366,651 documents
    in all 20 other local Parquets.
  • Full src suite: 73 passed, 1 failed out of 74 collected. The sole
    failure is the unrelated Windows-only
    test_samorzad_gov_pl_contract.py::test_release_replacement_rolls_back_on_failure,
    already reproducible on main.
  • git diff --check passes.
  • Rebuilding from the intermediate JSONL reproduces the released Parquet row-for-row and the statistics apart from the elapsed-time field.

Release files (README.md, CHANGELOG.md, version/date constants and phrase-frequency artifacts) are intentionally left for the maintainers.

gzawadzki changed pull request status to open
gzawadzki changed pull request title from [Draft] Add source: Studia BAS peer-reviewed policy articles to Add source: Studia BAS peer-reviewed policy articles
Fabryka AI org

Review against AGENTS.md ("What the PR must show", "Normalize the text before you build"). Needed before merge:

  1. PII. Replace the regex scrubber in fetch_studia_bas.py with SlayerLab/NERGAL. The source can merge with release: None after another scrubber, but it won't be admitted to a release until the shard is re-run through NERGAL. State in the datasheet which scrubber ran.
  2. build_dynaword.py flags (preserve_id / preserve_created) change shared build logic — fine with the test, but please split into its own small PR so it's reviewed separately.
  3. Rebase onto current main. git fetch of this PR's ref currently fails on our side; a fresh push after the rebase should fix it.
Fabryka AI org

Correction to my review comment above: the git fetch failure was on the Hub side (have/ack negotiation), not a problem with this PR. It fetches fine with git -c fetch.negotiationAlgorithm=noop fetch. No re-push needed for that; the rebase ask still stands.

Fabryka AI org

Review addressed — with the same permissions wrinkle as #24: this PR is authored by @gzawadzki , so this account cannot push to refs/pr/19 (git: "Forbidden to push on refs/pr/19") nor edit the description. The fix is delivered as two PRs, per your split ask (review item 2):

  • PR #44 — the studia_bas source only: data/studia_bas/* (112 articles / 2,256,009 tokens, CC-BY-3.0-PL), src/fetch_studia_bas.py, src/audit_studia_bas.py, src/report_studia_bas_audit.py, both studia_bas tests, the registry entry (added/release: None added) and the source_findings.md entry. One clean commit on main @ 34e7ea3 — no shared-file drift.
  • PR #45 — the shared-build change: build_dynaword.py preserve_id / preserve_created opt-in flags + test_build_dynaword_flags.py (3 tests pinning that sources without the flags gate exactly as before) + the .gitignore tooling lines (personal scratch lines dropped).

Merge order is free (the flags are inert registry keys until PR #45 lands; the committed shard is pre-built). Once both merge, #19 can be closed as superseded.

Point by point:

  1. PII. The datasheet now states which scrubber ran: scrub_pii() in src/fetch_studia_bas.py — regex pass (e-mail, ORCID, labelled PESEL/NIP/REGON, labelled phone -> [PII]) — plus structural exclusion of author-affiliation/contact blocks and ORCID values at extraction time. Not NERGAL: per AGENTS.md the shard must be re-run through SlayerLab/NERGAL before it is admitted to a release (quoted case material and third-party names survive regex passes); merge with release: None is fine meanwhile. The existing src/audit_studia_bas.py audit (0 structured residuals across all 115 extracted records) is kept as evidence for the current build, explicitly not as a substitute for the model pass.
  2. Split done — see PRs #44 / #45 above. (The .gitignore change rides with the shared-build PR; the source's build-input patterns are listed there.)
  3. Rebase — both branches are single clean commits on main @ 34e7ea3; the original branch's shared-file and tooling drift is gone.

The strong parts of the original contribution are unchanged and still reviewable in #44: per-article DOI/attribution/PDF-hash sidecar for CC BY attribution, the issue-66 license cutoff with per-PDF CC BY 3.0 PL statements verified 17/17, and Crossref-verified coverage (issues 66–82; zero missing journal-articles; the 17-DOI gap is all journal-issue front matter).

Verification: python3 -m pytest src/test_studia_bas_contract.py src/test_audit_studia_bas.py — passed (PR #44 tree); python3 -m pytest src/test_build_dynaword_flags.py — 3 passed (PR #45 tree).

ppuzio changed pull request status to closed

Sign up or log in to comment