wikivoyage: drop markup residue (v2#116), label by contribution date (v2#110)
Implements v2#110 option B and v2#116 option A for wikivoyage.
Markup residue (v2#116). strip is now v0.2.5's strip_code followed by drop_residue. That step removes Kategoria:... lines, bare file titles and file-link options (thumb|250px|...) and keeps captions. fetch_wikimedia.py retext applied it to the committed text:
- 13,171 rows changed;
- 456,509 characters and 166,060 tokens removed;
- 3 pages fell under 200 characters and were dropped:
wikivoyage_11830Żulin;wikivoyage_14345Zachodnie Wybrzeże;wikivoyage_15641Gorzewo (powiat gostyniński).
Other ids and the row order are unchanged.
Labels by contribution date (v2#110). Each row is labelled by the contributions its text holds. The page histories come from the stub dump plwikivoyage-20261001-stub-meta-history.xml.gz. For each page edited after 2023-06-07, the last pre-cutoff revision's text was fetched from the API, converted with the same strip, and diffed against the shipped text. Any added word makes the row CC-BY-SA-3.0 AND CC-BY-SA-4.0, with no threshold (src/wiki_history.py, then fetch_wikimedia.py relabel).
license |
documents | tokens |
|---|---|---|
CC-BY-SA-3.0 |
11,220 | 6,163,617 |
CC-BY-SA-3.0 AND CC-BY-SA-4.0 |
1,672 | 9,834,655 |
CC-BY-SA-4.0 |
748 | 960,908 |
On main the labels follow the last revision only: 3.0 9,040, 4.0 4,603. The cleanup moved 600 pages from "3.0 AND 4.0" to 3.0, because category and file-link lines added after the cutoff no longer count as added words. The sidecar gains license_basis and pre_cutoff_revid; the card explains each basis.
Totals go from 13,643 / 45,176,480 / 17,125,240 (docs / chars / tokens) to 13,640 / 44,719,971 / 16,959,180.
Tests. The wikivoyage, wikimedia and wiki_history suites pass (93). The full suite has no new failures against main in an LFS-skip worktree: 95 failed / 18 errors, against 98 / 18 on main. The 3 that now pass are wikivoyage's own. A rerun of relabel, retext and datasheet is byte-identical.
Not done here. The other wiki sources (wikibooks, wikinews, wikipedia, the talk pages and wiktionary_examples) each get their own PR with the same cleanup and relabel. README, CHANGELOG and totals go to v2#80.
Left in the text, listed in the card:
- file-link options glued to the word before them;
- a line holding only
mały; - category links inside prose;
<ref>bodies.
🤖 Generated with Claude Code
refs/pr/125 ref