feat(data): add samorzad.gov.pl institutional corpus

#13

Add samorzad_gov_pl public-sector-institution corpus

Summary

This PR adds samorzad_gov_pl, a directly collected Polish corpus from 246 local public institutions and one central platform tenant using the shared samorzad.gov.pl platform.

The contribution contains:

  • 72,771 documents;
  • 109,513,754 characters;
  • 41,154,506 cl100k_base proxy tokens;
  • human-readable publishing institution names in every author value;
  • discovered source_url, fetched final_url, recommended attribution_url, titles, institution names and license information in a one-to-one attribution sidecar;
  • a frozen 247-institution publisher manifest;
  • reproducible conversion code, contract tests, datasheet, NOTICE and release-time license evidence.

For 693 retained records the platform redirected the discovered address. Their attribution_url uses the fetched final_url; both addresses remain available in the sidecar.

Provenance and licensing

The conversion uses the published source dataset dawidmajewski/samorzad-gov-pl-articles at revision:

d5eaefc32c3f17cfa5a01d14573f8e4ee7d43385

The converter verifies the pinned manifest SHA-256, exact ten-shard artifact set, individual shard sizes and SHA-256 values, row counts, schema, unique record IDs and the release-wide record-text digest before conversion. Outputs are prepared and cross-checked in temporary files, synced, then transactionally replaced with rollback on a failed replacement.

The shared platform footer publishes textual content under CC BY-SA 4.0. The release-time shared footer script still matched the audited SHA-256:

b36ec507901ed443195479d8d8009386159ae59d7486ce266bfb3308043e99aa

Images, audiovisual media and attachment bytes are not included.

Filtering and deduplication

From 81,422 source records, the conversion removed:

  • 6,624 documents shorter than 200 characters;
  • 35 documents below the existing Polish-language heuristic;
  • 1,992 exact-text duplicates.

The retained artifact contains no internal exact-text duplicates and has zero exact-text overlap with the other 17 DynaWord source Parquets. Existing sources retain priority during cross-source deduplication.

The original corpus has many missing publication dates. In the retained artifact, 52,214 records use an empty created value rather than an inferred date.

Release integration

This PR prepares v0.2.5 and updates:

  • the source registry and source table;
  • README totals and version history;
  • CHANGELOG and contributor credit;
  • corpus-growth and phrase-frequency reports and plots.

New full-corpus totals:

  • 4,319,200 documents;
  • 9,639,062,573 cl100k_base proxy tokens;
  • 18 sources.

Verification

  • 15 passed in the full src/ pytest suite;
  • Ruff passed for the new converter and contract test;
  • contract checks cover the canonical eight-column schema, unique and deterministic IDs, exact-text uniqueness, token/character totals, institution authors, source/final URL handling, one-to-one ordered attribution, pinned-input verification, transactional rollback and stats consistency;
  • a second full conversion produced identical SHA-256 hashes;
  • 20 institution names were checked against live og:site_name metadata;
  • all 72,771 sidecar publishers match their Parquet author values;
  • static security scan found no matches.

Artifact SHA-256:

  • Parquet: b4f788030bb987b6c12487ea3e2e587bca1d1fd86294c1488961045bfe8fd137;
  • attribution sidecar: e50acff3137b4680dc63a402667227b24cdd362e9c07895f1485a530ea5116c3;
  • stats: c761ba969e8a946b4ee1917d5180fea6dbd99dd6a0c7b304b47f6b452ccf26e6;
  • publisher manifest: 178d19808d40be399df52946b9a66c3b6ff0f698395b16cf88eed80cdc2769a4;
  • pinned upstream manifest: 97b5a266b2fd4f043648b7d3c757721cd826c7ca1048301761084b0abdee5c48.
kacperwikiel changed pull request status to merged

Sign up or log in to comment