wikinews: label each page CC BY 2.5 or 4.0 by its last revision (v0.2.6, v2#57)

#77
by ppuzio - opened
Fabryka AI org
•
edited 2 days ago

What and why

Relabels wikinews (Polish Wikinews) per record: CC-BY-2.5 or CC-BY-4.0 by the page's last revision. v0.2.0-v0.2.5 labelled every row CC-BY-2.5. Part of the October 2026 rights audit, slayerlabs/polish-dynaword-v2#57 (artifacts/rights_audit_2026-10/reports/wikis_ugc.md, reports/citations.md L17-26).

Rebased onto main after #68 (wikipedia) merged, so it is no longer stacked on it. The lawyer's answer to E1 (wiki 3.0/4.0 labelling, slayerlabs/polish-dynaword-v2#56) is still pending; the labels apply the cutover dates of the rights-audit task (v2#57) and are not a legal opinion.

The v0.2.5 parquet has no last-revision timestamp, so the source is rebuilt from the official Wikimedia dump plwikinews-20260601-pages-articles (sha1 bfad5f33… matched to the dump's sha1sums.txt) by src/fetch_wikimedia.py. Checked against the v0.2.5 parquet: same schema, same rows, same text multiset, characters and tokens; only license, id, author, created and added change.
author = Wikinews contributors, <page URL> (v0.2.5: empty); created = the last-revision date (v0.2.5: one range string on every row); the parquet added column is 2026-07-19 (v0.2.5: 2026-06-15; the registry's added stays 2026-07-02, release stays 0.2.0). The first commit of this PR (cf0470c, rebased from 5ebb578, which the sibling wikivoyage / wikibooks PRs are based on) moves license_for_revision from src/fetch_wikipedia.py into src/rights.py (generalised with a cutoff and two labels; fetch_wikipedia.py re-exports it, the wikipedia tests are unchanged), rewrites src/fetch_wikimedia.py and adds src/test_wikimedia_contract.py.

Before → after

v0.2.5 this PR
documents 24,386 24,386
characters 32,524,646 32,524,646
tokens (cl100k proxy) 12,141,355 12,141,355
CC-BY-2.5 rows 24,386 17,581 (8,956,397 tokens, 73.8%)
CC-BY-4.0 rows 0 6,805 (3,184,958 tokens, 26.2%)

Rules, counts, hand-checks

src/fetch_wikimedia.py (acquire → prepare → build_dynaword.py → attribution → datasheet), then build_dynaword.py's own gates. Samples: seed 20261006 (random.Random), 8 per rule unless all were read.

rule count hand-check
pages in the dump 65,253
not namespace 0 17,408
redirects 23,366 8 sampled: all redirects (the dump's <redirect> element)
empty pages / parser failures 0 / 0
< 200 characters after conversion (same gate as build_dynaword.py) 87 8 sampled: all under 200 characters; 2 auto-generated death lists, 2 result tables, 2 photo-report galleries, 2 one-line news items
exact duplicates of stripped text (lower page id kept) 0 none
build_dynaword.py non-Polish (diacritic ratio) 6 all 6 read: 4 cycling result / start-list tables of rider names, 2 audio-transcription index pages with no text. None is Polish prose; existing shared filter, not changed here
kept 24,386

Funnel: 65,253 → 47,845 in namespace 0 → 24,392 written → 24,386 kept. Labels before the language filter: CC-BY-2.5 17,587, CC-BY-4.0 6,805. Every row's label is rechecked against its last-revision time in the attribution sidecar by check_released (see Tests).

Label rule license_for_revision(…, cutoff=WIKINEWS_BY_4_CUTOFF, before="CC-BY-2.5", after="CC-BY-4.0"): last revision before 2024-12-16T00:00:00Z → CC-BY-2.5, at or after → CC-BY-4.0; a missing or zone-less timestamp stops the build. 6 pages were last edited on 2024-12-16 itself and all get 4.0, but 2 of them were edited before the 08:32:24 UTC config sync (the time is from the audit and was not re-read; Gerrit 1101867 merged at 08:07:33 UTC), so those 2 are strictly 2.5 text under a 4.0 label. The cutoff is one constant; moving it to the sync time relabels exactly those 2 documents.

Provenance and licence

  • Contributors' text: pl.wikinews terms of use (oldid 342796, sha256 8b461acb…): CC BY 2.5 until 2024-12-16, CC BY 4.0 from that day; Gerrit 1101867 (mediawiki-config, merged 2024-12-16 08:07:33 UTC); Phabricator T381421; pl.wikinews rightsinfo CC BY 4.0; CC BY 2.5 legal code §4(a) (sha256 6f53ec15…). Read 2026-10-06.
  • CC BY 2.5 has no later-version clause, so the CC-BY-4.0 label for pages edited after the switch rests on the site's terms page alone (inferred, not a lawyer's opinion). That is a question for the lawyer separate from E1.
  • The terms page also puts articles created before 2005-09-25 in the public domain. 0 released documents were last edited before that date, so no label changes; creation dates are not in the dump's current-revision file, so an older article edited later is not covered by that count.
  • Attribution: each row's author links its page, whose history names the contributors; data/wikinews/wikinews.attribution.jsonl (LFS) has id, page id, revision id, title, URL, last-revision time and licence per row; wikinews.license-evidence.json pins the sources above; wikinews.build.json pins the dump and the counts.
  • Registry: src/sources.py provenance, licence (license_spdx MIXED), traceable text and upstream updated; the card is generated by fetch_wikimedia.py datasheet (custom_datasheet); make_docs.py, README and CHANGELOG are not touched.
  • Text conversion is the v0.2.5 one (plain mwparserfromhell.strip_code), so <ref> bodies, Kategoria: links and thumb| file options stay in the text. That is unchanged and stated in the card; fixing it would change the text of every release and is not part of this PR.

Dedup (reported, not fixed)

The text multiset is identical to v0.2.5, so exact-text overlap with other sources is unchanged by construction; it was not re-measured. No overlap_audit.json in the repo mentions this source.

Follow-up audit checks (2026-10-06)

Measured and reported only. Nothing was dropped or relabelled; the Parquet is unchanged.

Press-copying sample (audit item). Earwig does not support wikinews (bad_site), so this check is our own. Sample: 100 documents, random.seed(20261006) then random.sample over the ids sorted by number. For each, the URLs linked in the dumped revision's wikitext were fetched live (robots.txt honoured, 3 s per host), with a Wayback capture as fallback (5 s). Overlap is word 6-gram sharing between the article and the source. A source was flagged at 10% or more of the article's words covered, or a shared run of 15 words or more, and every flag was read by hand. Limits: only sources the article cites are searched, so copying from an uncited source is not found; wiki links inside a sentence break the run counter, so paraphrase is under-counted.

Coverage: 62 of 100 had a fetchable cited source (28,531 of the 46,561 sampled tokens); 13 cite no URL; 25 cite only URLs that are dead and not archived, or blocked by robots.txt. 28 of the 62 were flagged, 34 had no flag.

class n ids, matched URLs, overlap (share of the article's words; longest shared run)
A: verbatim or near-verbatim copy, free licence of the source not established 4 wikinews_58647 https://www.linux.pl/2023/07/13/suse-stworzy-fork-publicznie-dostepnego-systemu-red-hat-enterprise-linux/ (0.99; 190 words) and https://www.suse.com/c/pl/suse-stworzy-fork-publicznie-dostepnego-systemu-red-hat-enterprise-linux/ (0.98). linux.pl states GNU FDL or CC BY 3.0 PL for its own publications, but the text is SUSE's, whose page licence was not checked. wikinews_17931 http://media2.pl/rss/technologie/32316-hp-czolowym-producentem-komputerow.html (0.99; 91). wikinews_19302 http://media2.pl/internet/36101-przez-skype-z-ing.html (0.88; 87). wikinews_56222 https://otwartanauka.pl/wydarzenia/1313-seminarium-na-temat-otwartych-danych-badawczych (0.39; 87; its licence not verified; the other cited page, lib.amu.edu.pl, is blocked by robots.txt and has no capture)
B: partial copy or close paraphrase of a source's lead 4 wikinews_19660 http://osnews.pl/encykolpedia-britannica-przyjmie-poprawki-uzytkownikow/ (0.37; 51). wikinews_58955 https://www.mmarocks.pl/tomasz-adamek/szokujacy-kontrakt-46-letniej-legendy-boksu-tomasz-adamek-w-organizacji-fame (0.41; 14). wikinews_76247 https://leszno.pl/Rozpoczyna_sie_przebudowa_ulicy_Krolowej_Jadwigi_-_zmiany_w_organizacji_ruchu.html (0.13) and https://leszno.naszemiasto.pl/rusza-przebudowa-ulicy-krolowej-jadwigi-co-czeka-na-kierowcow-w-centrum-leszna/ar/c1p2-27672807 (0.22; 13). wikinews_54943 https://www.rmf24.pl/fakty/swiat/news-wypadek-autokaru-w-chorwacji-zginelo-co-najmniej-10-osob,nId,5379839 (0.33; 9)
C: facts, short attributed quotations and stock phrases only (read, not copying) 10 wikinews_75984, 56420, 52715, 54864, 67352, 56312, 24690, 11706, 79251, 14015 (for example 11706, 14015 and 79251 have longest shared runs of 9 to 19 words with gazetaprawna.pl, wprost.pl and kontakt24.tvn24.pl)

Wilson 95% upper bounds: class A 4 of 100 is 9.8% (4 of the 62 checkable: 15.4%); A and B together 8 of 100 is 15.0% (8 of 62: 23.4%). The first figure counts the 38 unchecked documents as clean, the second assumes they resemble the checked ones.

e-Polityka. The audit's 6 documents (e-polityka.pl in the wikitext): wikinews_2400, 2785, 3534, 5299, 9152, 23657. All six carry the e-Polityka credit. A text comparison with the live e-Polityka page was possible for two: 2400 shares no 6-gram, 23657 shares 27 of 266 words (9.4%, longest run 14). The other four have no usable source URL.

The real population is larger. 3,669 released documents (15.0% of documents and of tokens; 1,825,635 tokens) carry the import template {{e-polityka}} or {{E-polityka.pl}} (both redirect to {{Zaimportowany}}): 3,459 labelled CC-BY-2.5 and 210 CC-BY-4.0. By article date: 2005: 395, 2006: 296, 2007: 1,560, 2008: 806, 2009: 399, 2010: 189, 2011: 24; 2,251 documents (1,152,808 tokens) are dated 2005-2007. In the sample, 17 of 100 are templated (Wilson 95% upper bound 25.5%; the exact population share is 15.0%). Of those 17, 12 have a fetchable e-Polityka URL and 8 share 18% to 79% of their words with it (wikinews_14657 0.79, longest run 44; 18451, 20877, 20349, 23515, 13769, 10679, 19127); 12499 and 11437 share 8%, 12817 and 14412 none; 5 cite no URL (3951, 6340, 4480, 4320, 4927). So the templated documents do reproduce e-Polityka text; the open point is permission, not detection.

Permission is documented only on the wiki: the 2005-05 offer (copying with the credit "Pierwotna wersja newsa pobrana z serwisu e-Polityka.pl"); the page Dyskusja Wikinews:Współpraca z innymi serwisami (revision of 2008-01-12), which gives CC BY 2.0 PL; a consent of 2009-07-28 (mailing list). The live e-Polityka site says "Wszelkie Prawa Zastrzeżone" and does not mention CC. Question for the lawyer: do the 2005 offer and the 2008-09 CC BY 2.0 PL consent cover the 2,251 documents imported in 2005-2007 and the later ones, does the credit line meet the attribution term, and is a re-release as CC BY 2.5 / 4.0 covered.

Non-commercial and all-rights-reserved wording. 30 documents (39,145 tokens) contain non-commercial wording (niekomercyjn, BY-NC) and none contains "all rights reserved" or "wszelkie prawa zastrzeżone". The contexts read are news about licences, non-profit bodies and Wikipedia, not a licence notice on the article's own text.

Open

  • lawyer: the 2.5 → 4.0 label (above) and E1
  • lawyer: the e-Polityka import (3,669 documents, 2,251 dated 2005-2007)
  • 8 of 100 sampled documents copy a cited press page (4 verbatim, 4 partial); no drop made, maintainers decide on drops and on a wider scan
  • copying from sources the articles do not cite is not searched; 38 of the 100 had no fetchable source
  • the 2 documents edited on 2024-12-16 before the sync time (midnight cutoff kept; one constant to change)
  • the markup residue

Tests

$PY -m pytest -q src on main 6fc9141 with the wikipedia and wikinews data pulled: 426 passed. With this PR: 471 passed (44 new tests in src/test_wikimedia_contract.py for the shared code, 1 in src/test_wikinews_contract.py); the same 37 failures and 10 errors on both come from other sources' Parquets that were not pulled (LFS pointers). check_released pins the parquet schema, counts equal to v0.2.5, every row's label / created / author / id against the attribution sidecar, the evidence file, the registry entry and the committed card; moving the cutoff by a day or the v0.2.5 token total by one makes it fail (tried).

python3 src/render_sample.py data/wikinews/wikinews.parquet -n 3

id: wikinews_67009
source: wikinews
added: 2026-07-19
created: 2025-01-20
token_count: 338
license: CC-BY-4.0
author: Wikinews contributors, https://pl.wikinews.org/wiki/2024-01-21:_Plan_bud%C5%BCetowy_Wikimedia_Polska_na_rok_2024

Plan budżetowy  na rok 2024 został przyjęty uchwałą zarządu z 19 stycznia 2024 roku. Uchwała zwiera prognozowane przychody w kwocie 2 337 435 zł oraz wydatki: 2 599 446 zł.

Uchwała zarządu UZ 2024-02 została przyjęta jednogłośnie. Zawiera planowane wydatki w podziale na kategorie główne oraz załącznik zwierający bardziej szczegółowe wyliczenia wraz ze wskazaniem pracowników upoważnionych do dysponowania nimi.

Stowarzyszenie zamierza środki przeznaczyć na następujące kategorie:
 Otwarta Kultura: 171 782 zł
 Wsparcie społeczności: 798 612 zł
 Komunikacja i Fundraising: 376 016 zł
 Otwarta Edukacja i Nauka: 325 064 zł
 Administracja: 832 972 zł
 Wzrost organizacyjny i wzmocnienie struktury 95 000 zł

 Zobacz też 
 Załącznik nr 1 zawierający podział na kategorię prognozowanych wydatków i […]
id: wikinews_75021
source: wikinews
added: 2026-07-19
created: 2025-04-01
token_count: 292
license: CC-BY-4.0
author: Wikinews contributors, https://pl.wikinews.org/wiki/Pomorskie:_poci%C4%85g_%C5%9Bmiertelnie_potr%C4%85ci%C5%82_kobiet%C4%99_za_przystankiem_Pruszcz_Gda%C5%84ski

mały|Stacja kolejowa Pruszcz Gdański (2013)  
1 kwietnia 2025 roku po godzinie 16:00 w okolicach przystanku kolejowego  w kierunku  doszło do wypadku - 25-letnia kobieta została śmiertelnie potrącona przez pociąg relacji -.

Służby mają wyjaśnić dokładne okoliczności zdarzenia. W związku z wypadkiem nastąpiły utrudnienia w ruchu kolejowym – od godziny 17:00 pociągi były kierowane na jeden tor, co spowodowało kilkudziesięciominutowe opóźnienia w kursowaniu składów, m.in. na trasach: -, -, - oraz -.

 poinformowało, że pełny ruch pociągów został przywrócony zgodnie z rozkładem około godziny 18:30.

 Źródła 
 

Kategoria:Polska
Kategoria:Pruszcz Gdański
Kategoria:Gdańsk
Kategoria:Wypadki kolejowe
Kategoria:Wypadki
Kategoria:Transport kolejowy
id: wikinews_47381
source: wikinews
added: 2026-07-19
created: 2023-11-02
token_count: 161
license: CC-BY-2.5
author: Wikinews contributors, https://pl.wikinews.org/wiki/2015-01-22:_Janusz_Korwin-Mikke_zapowiedzia%C5%82_utworzenie_Koalicji_Odnowy_Rzeczypospolitej_Wolno%C5%9B%C4%87_i_Nadzieja

22 stycznia 2015 roku Janusz Korwin-Mikke zapowiedział utworzenie partii politycznej pod nazwą Koalicji Odnowy Rzeczypospolitej Wolność i Nadzieja, zachęcając jednocześnie do używania skrótu nazwy: KORWiN. Inicjatywę wspiera Przemysław Wipler.
 
 Źródła 
 

Kategoria:Polska
Kategoria:Polityka
Kategoria:Polskie partie polityczne
Kategoria:Polska polityka
Kategoria:Janusz Korwin-Mikke
Kategoria:Przemysław Wipler
Kategoria:Archiwalne

🤖 Generated with Claude Code

ppuzio changed pull request status to open
ppuzio changed pull request status to merged
ppuzio deleted the refs/pr/77 ref

Sign up or log in to comment