wikinews: drop markup residue (v2#116), label by contribution date with the switch window (v2#110)
Cleans the wikinews text (v2#116, option A) and relabels it by contribution date (v2#110, option B), with the licence switch treated as a window of most of a day rather than a whole day.
Labels per record (23,573 documents, 10,970,210 tokens; was 24,386 / 12,141,355)
| label | documents | tokens | share |
|---|---|---|---|
CC-BY-2.5 |
19,823 | 9,347,380 | 85.2% |
CC-BY-2.5 AND CC-BY-4.0 |
113 | 81,128 | 0.7% |
CC-BY-4.0 |
3,637 | 1,541,702 | 14.1% |
Before (by last revision, 4.0 from 2024-12-16 00:00 UTC): 2.5 17,581 / 4.0 6,805. Every 2.5 row stays 2.5. Of the 6,404 4.0 rows still released, 2,654 are now 2.5, 113 both and 3,637 stay 4.0. Basis per row: the stub dump plwikinews-20261001-stub-meta-history.xml.gz (sha1 4ad674a2…), plus the pre-cutoff revision text converted with the same strip and compared word by word with the shipped text. Each sidecar line gains license_basis and pre_cutoff_revid, and license_flags where one applies.
Switch window: the configuration change was merged at 2024-12-16 08:07:33 UTC (Gerrit 1101867), but the licence notice under the edit box (MediaWiki:Copyrightwarning) named CC BY 2.5 until revision 342971 at 23:19:21 UTC. Text saved in between is labelled both, since CC BY 2.5 has no later-version clause. This affects 25 rows with a revision in the window (edited_in_switch_window): 15 pages created in it (both, new basis created_in_switch_window), 5 whose window edits left the text unchanged (2.5) and 5 that gain words after the cutoff anyway (both). The evidence's cutoff.by_contribution holds the window and the notice revisions.
Created before 2005-09-25: 1,250 rows are of pages created before the date from which the terms page says articles are public domain (created_before_cc_by_2_5). The statement is not relied on: they are labelled by contribution (1,237 2.5, 13 both).
Cleanup (v2#116): drop_residue changed 24,204 rows and removed 3,124,102 characters (89% of them category lines) and 1,171,145 tokens. 812 pages fell under 200 characters and were dropped. One more, wikinews_24619, was dropped because its cleaned text repeats wikinews_24618's. Leftovers are listed in the card. The main one is a lone mały/right/left line in 371 rows (the first line in 365). A rule for it would also change the released wikivoyage and wikibooks text, so it is not in v0.2.6.
Code:
wiki_history.compareadds thecreated_in_switch_windowcase for a source with awindow_end.fetch_wikimedia.retextdrops a row whose cleaned text repeats a lower page id's, aspreparewould.- The card's licensing text covers the window.
relabelwrites the window to the evidence.
Tests: the wiki contract tests pass, and wikivoyage and wikibooks cards are unchanged. The full suite shows no new failures against the baseline, which comes from LFS-pointer shards in the worktree. A rerun of retext, relabel and datasheet is byte-identical. README, CHANGELOG and totals are left to v2#80. Details are in artifacts/source_findings.md.
🤖 Generated with Claude Code
refs/pr/130 ref