wikivoyage: label each page CC BY-SA 3.0 or 4.0 by its last revision (v0.2.6, v2#57)
#78
by ppuzio - opened
- artifacts/source_findings.md +68 -0
- data/wikivoyage/wikivoyage.attribution.jsonl +3 -0
- data/wikivoyage/wikivoyage.build.json +69 -0
- data/wikivoyage/wikivoyage.license-evidence.json +77 -0
- data/wikivoyage/wikivoyage.md +70 -16
- data/wikivoyage/wikivoyage.parquet +2 -2
- data/wikivoyage/wikivoyage.stats.json +11 -10
- src/rights.py +6 -0
- src/sources.py +25 -9
- src/test_wikivoyage_contract.py +31 -0
artifacts/source_findings.md
CHANGED
|
@@ -2068,3 +2068,71 @@ name; kept) and `wikibooks_27071` (1,287 tokens, original licence not stated; ke
|
|
| 2068 |
the 25 released pages that the "Od lamera do hakera" hub links in other books were not
|
| 2069 |
traced; E1 (v2#56); the 2 boundary documents; the 17 own-text and upstream GFDL documents;
|
| 2070 |
the markup residue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2068 |
the 25 released pages that the "Od lamera do hakera" hub links in other books were not
|
| 2069 |
traced; E1 (v2#56); the 2 boundary documents; the 17 own-text and upstream GFDL documents;
|
| 2070 |
the markup residue.
|
| 2071 |
+
|
| 2072 |
+
## wikivoyage — Polish Wikivoyage (rebuild from the official dump, 3.0/4.0 labels)
|
| 2073 |
+
|
| 2074 |
+
**Investigated** — 2026-10-06 (October 2026 rights audit, `artifacts/rights_audit_2026-10/reports/wikis_ugc.md`,
|
| 2075 |
+
`reports/citations.md` L17-26; slayerlabs/polish-dynaword-v2#57).
|
| 2076 |
+
|
| 2077 |
+
**Verdict** — `kept`, relabelled; rebuilt from the official dump so the label follows the
|
| 2078 |
+
page's last revision. Documents, characters and tokens are unchanged from v0.2.5
|
| 2079 |
+
(13,645 / 45,184,300 / 17,128,200); the text multiset is identical. Labels per record:
|
| 2080 |
+
`CC-BY-SA-3.0` 9,041 documents (4,233,610 tokens, 24.7%), `CC-BY-SA-4.0` 4,604 (12,894,590,
|
| 2081 |
+
75.3%); v0.2.5 labelled every row 3.0. Row ids are now `wikivoyage_<page id>`; `author` is
|
| 2082 |
+
the page URL and `created` the last-revision date (v0.2.5: empty `author`, and the same range
|
| 2083 |
+
string "2012-01-01, 2025-12-31" as `created` on every row). The parquet `added` column is
|
| 2084 |
+
2026-07-19 (v0.2.5: 2026-06-15).
|
| 2085 |
+
|
| 2086 |
+
**Enumeration** — `plwikivoyage-20260601-pages-articles.xml.bz2` (sha1 `1a790d37…` matched to
|
| 2087 |
+
the dump's `sha1sums.txt`), parsed by `src/fetch_wikimedia.py`: 15,468 pages → 14,321 in
|
| 2088 |
+
namespace 0 → 630 redirects, 36 pages under 200 characters and 1 exact duplicate skipped →
|
| 2089 |
+
13,654 written → 9 non-Polish dropped by `build_dynaword.py` → 13,645. Text conversion is the
|
| 2090 |
+
v0.2.5 one (plain `strip_code`): `<ref>` bodies, `Kategoria:` links and `thumb|` file options
|
| 2091 |
+
stay in the text; nothing was changed in this PR. One sidecar line per row
|
| 2092 |
+
(`wikivoyage.attribution.jsonl`).
|
| 2093 |
+
|
| 2094 |
+
**License evidence** — verified, read 2026-10-06: Wikimedia Terms of Use oldid 554823 (CC BY-SA
|
| 2095 |
+
4.0 and GFDL, in effect June 7, 2023; sha256 `c96ef93b…`), oldid 98524 (CC BY-SA 3.0, June 16,
|
| 2096 |
+
2014), the 3.0 and 4.0 legal code, pl.wikivoyage `rightsinfo` (BY-SA 4.0). Inferred: a page
|
| 2097 |
+
edited after the switch may carry earlier 3.0 text under 4.0 (3.0 §4(b)(ii)). The cutoff is
|
| 2098 |
+
2023-06-07 00:00 UTC, not the audit's "06-08 if time of day unknown": 06-08 would put that
|
| 2099 |
+
day's 4.0 edits under 3.0, which 4.0 §3(b)(1) does not allow; 6 documents were last edited on
|
| 2100 |
+
2023-06-07 and may carry 3.0 text under a 4.0 label. The footer switch date was not checked.
|
| 2101 |
+
The answer to E1 (v2#56) is still pending. GFDL era (last edit before 2009-06-15): 0
|
| 2102 |
+
documents. Evidence in `data/wikivoyage/wikivoyage.license-evidence.json`.
|
| 2103 |
+
|
| 2104 |
+
**Blockers** — none to merge. Open: E1; the 6 boundary documents; copyright pastes (travel
|
| 2105 |
+
text copied from guidebooks and tourist sites was not sampled for Wikivoyage); the markup
|
| 2106 |
+
residue above.
|
| 2107 |
+
|
| 2108 |
+
## wikivoyage — two pages withheld (update to the section above)
|
| 2109 |
+
|
| 2110 |
+
**Investigated** — 2026-10-06 (copyright sample of the follow-up, then the maintainer's
|
| 2111 |
+
decision; slayerlabs/polish-dynaword-v2#57).
|
| 2112 |
+
|
| 2113 |
+
**Verdict** — `kept`, two pages withheld: `wikivoyage_1219` (Barcelona/Sagrada Família) and
|
| 2114 |
+
`wikivoyage_910` (Królewiec). Maintainer approval 2026-10-06, relayed by the coordinator. The
|
| 2115 |
+
numbers in the section above (13,645 documents, 45,184,300 characters, 17,128,200 tokens;
|
| 2116 |
+
3.0: 9,041 / 4,233,610 tokens; 4.0: 4,604 / 12,894,590) are the v0.2.5 and pre-drop values;
|
| 2117 |
+
the release now holds 13,643 documents, 45,176,480 characters and 17,125,240 tokens (3.0:
|
| 2118 |
+
9,040 / 4,232,587; 4.0: 4,603 / 12,892,653). Withheld: 1219 is 3.0, 1,023 tokens, 2,771
|
| 2119 |
+
characters; 910 is 4.0, 1,937 tokens, 5,049 characters.
|
| 2120 |
+
|
| 2121 |
+
**Reasons** — 1219: edited from barcelona.przewodnik-turystyczny.pl (the page's own
|
| 2122 |
+
bibliography names it); 432 of 2,782 characters shared verbatim (Earwig 0.23), a Wayback
|
| 2123 |
+
capture of 2006-06-16 already holds the passages, the wiki page was created 2009-06-04. 910:
|
| 2124 |
+
2,021 of 5,006 characters shared with kaliningraddotblog.wordpress.com/2018/05/07/krolewiec-konigsberg/
|
| 2125 |
+
(Earwig 0.78); the blog post is dated 2018-05-07, the text was added to the wiki on
|
| 2126 |
+
2021-02-23 (revision 108903).
|
| 2127 |
+
|
| 2128 |
+
**Mechanism** — the ids and reasons live in `DROPPED_PAGES["wikivoyage"]` in `src/rights.py`;
|
| 2129 |
+
`fetch_wikimedia.py prepare` skips them and fails if one is not reached. Funnel: 15,468 pages
|
| 2130 |
+
→ 14,321 in namespace 0 → 630 redirects, 36 short pages, 1 exact duplicate and the 2 withheld
|
| 2131 |
+
pages skipped → 13,652 written → 9 non-Polish dropped → 13,643. Diff against the previous
|
| 2132 |
+
parquet: only the two ids removed, every other row identical; the 6 documents of the boundary
|
| 2133 |
+
day and the 0 GFDL-era documents are unchanged.
|
| 2134 |
+
|
| 2135 |
+
**Blockers** — none. Open: the copyright sample read 80 of the 13,645 pages (40 per label),
|
| 2136 |
+
so 13,565 were not checked; two further pages stay in the release with the source's direction
|
| 2137 |
+
unresolved (`wikivoyage_2477`, `wikivoyage_989`); E1 (v2#56); the 6 boundary documents; the
|
| 2138 |
+
markup residue.
|
data/wikivoyage/wikivoyage.attribution.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1eab71549b98104753eca2e7ba8ea518b7bd7740a366bbb10e7587f451e4f75e
|
| 3 |
+
size 2859349
|
data/wikivoyage/wikivoyage.build.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"attribution_rows": 13643,
|
| 3 |
+
"attribution_sha256": "1eab71549b98104753eca2e7ba8ea518b7bd7740a366bbb10e7587f451e4f75e",
|
| 4 |
+
"cutoff": "2023-06-07T00:00:00+00:00",
|
| 5 |
+
"discovered_at": "2026-10-06T00:00:17.595298+00:00",
|
| 6 |
+
"dump_base": "https://dumps.wikimedia.org/plwikivoyage/20260601",
|
| 7 |
+
"dump_date": "20260601",
|
| 8 |
+
"file": {
|
| 9 |
+
"name": "plwikivoyage-20260601-pages-articles.xml.bz2",
|
| 10 |
+
"sha1": "1a790d37f5a05acd42a57023d28de2af36b13bd2",
|
| 11 |
+
"size": 20269251,
|
| 12 |
+
"url": "https://dumps.wikimedia.org/plwikivoyage/20260601/plwikivoyage-20260601-pages-articles.xml.bz2"
|
| 13 |
+
},
|
| 14 |
+
"labels": {
|
| 15 |
+
"after": "CC-BY-SA-4.0",
|
| 16 |
+
"before": "CC-BY-SA-3.0"
|
| 17 |
+
},
|
| 18 |
+
"prepare": {
|
| 19 |
+
"counts": {
|
| 20 |
+
"CC-BY-SA-3.0": 9048,
|
| 21 |
+
"CC-BY-SA-4.0": 4604,
|
| 22 |
+
"dropped_page": 2,
|
| 23 |
+
"exact_duplicate": 1,
|
| 24 |
+
"ns0": 14321,
|
| 25 |
+
"ns0_redirect": 630,
|
| 26 |
+
"ns0_short": 36,
|
| 27 |
+
"pages": 15468,
|
| 28 |
+
"written": 13652
|
| 29 |
+
},
|
| 30 |
+
"dropped_pages": [
|
| 31 |
+
{
|
| 32 |
+
"pageid": "910",
|
| 33 |
+
"reason": "Królewiec: 2,021 of 5,006 characters shared with kaliningraddotblog.wordpress.com/2018/05/07/krolewiec-konigsberg/ (Earwig 0.78); the blog post is dated 2018-05-07, the text was added to the wiki on 2021-02-23 (revision 108903)",
|
| 34 |
+
"title": "Królewiec"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"pageid": "1219",
|
| 38 |
+
"reason": "Barcelona/Sagrada Família: edited from barcelona.przewodnik-turystyczny.pl (the page's own bibliography names it); 432 of 2,782 characters shared verbatim (Earwig 0.23), a Wayback capture of 2006-06-16 already holds the passages, the wiki page was created 2009-06-04",
|
| 39 |
+
"title": "Barcelona/Sagrada Família"
|
| 40 |
+
}
|
| 41 |
+
],
|
| 42 |
+
"exact_duplicate_pageids": [
|
| 43 |
+
"12746"
|
| 44 |
+
]
|
| 45 |
+
},
|
| 46 |
+
"rightsinfo": {
|
| 47 |
+
"text": "Creative Commons Attribution-Share Alike 4.0",
|
| 48 |
+
"url": "https://creativecommons.org/licenses/by-sa/4.0/deed.pl",
|
| 49 |
+
"url_queried": "https://pl.wikivoyage.org/w/api.php?action=query&meta=siteinfo&siprop=rightsinfo"
|
| 50 |
+
},
|
| 51 |
+
"sha1sums_url": "https://dumps.wikimedia.org/plwikivoyage/20260601/plwikivoyage-20260601-sha1sums.txt",
|
| 52 |
+
"switch": null,
|
| 53 |
+
"terms": [
|
| 54 |
+
{
|
| 55 |
+
"effective": "These Terms of Use went into effect on June 7, 2023",
|
| 56 |
+
"sha256": "c96ef93b439ff9b8242dc3233f41ede57c0984ef9153fafa51aa5f8cf0678832",
|
| 57 |
+
"statement": "Creative Commons Attribution-ShareAlike 4.0 International License",
|
| 58 |
+
"title": "Wikimedia Terms of Use in force since 7 June 2023 (CC BY-SA 4.0)",
|
| 59 |
+
"url": "https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=554823&action=raw"
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"effective": "These Terms of Use went into effect on June 16, 2014",
|
| 63 |
+
"sha256": "46617e3576a507b8f83a0cf7b28b60e43817ad93cc5d747a558b503e7d1cc6de",
|
| 64 |
+
"statement": "Creative Commons Attribution-ShareAlike 3.0 Unported License",
|
| 65 |
+
"title": "Wikimedia Terms of Use of 2014-2023 (CC BY-SA 3.0)",
|
| 66 |
+
"url": "https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=98524&action=raw"
|
| 67 |
+
}
|
| 68 |
+
]
|
| 69 |
+
}
|
data/wikivoyage/wikivoyage.license-evidence.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"checked_at": "2026-10-06",
|
| 3 |
+
"cutoff": {
|
| 4 |
+
"after": "CC-BY-SA-4.0",
|
| 5 |
+
"at": "2023-06-07T00:00:00+00:00",
|
| 6 |
+
"before": "CC-BY-SA-3.0",
|
| 7 |
+
"boundary_day": {
|
| 8 |
+
"day": "2023-06-07",
|
| 9 |
+
"docs_last_edited_that_day": 6
|
| 10 |
+
}
|
| 11 |
+
},
|
| 12 |
+
"legal": [
|
| 13 |
+
{
|
| 14 |
+
"section": "4(b)(ii)",
|
| 15 |
+
"sha256": "c33d7ebdbcc5c8db073e69a794b2ac44805f5d7d9edcfb8b5181a71869a9b7d5",
|
| 16 |
+
"statement": "a later version of this License with the same License Elements as this License",
|
| 17 |
+
"url": "https://creativecommons.org/licenses/by-sa/3.0/legalcode"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"section": "3(b)(1)",
|
| 21 |
+
"sha256": "47c0a954c88d793bdefe92fb007ae3c038fb3807f1a27083433d01aa7542c0d8",
|
| 22 |
+
"statement": "this version or later, or a BY-SA Compatible License",
|
| 23 |
+
"url": "https://creativecommons.org/licenses/by-sa/4.0/legalcode"
|
| 24 |
+
}
|
| 25 |
+
],
|
| 26 |
+
"license": "CC-BY-SA-3.0 or CC-BY-SA-4.0 per record, by the page's last revision",
|
| 27 |
+
"release_scope": {
|
| 28 |
+
"created_range": [
|
| 29 |
+
"2013-04-21",
|
| 30 |
+
"2026-06-01"
|
| 31 |
+
],
|
| 32 |
+
"labels": {
|
| 33 |
+
"CC-BY-SA-3.0": 9040,
|
| 34 |
+
"CC-BY-SA-4.0": 4603
|
| 35 |
+
},
|
| 36 |
+
"last_edited_before_era_end": {
|
| 37 |
+
"date": "2009-06-15",
|
| 38 |
+
"docs": 0,
|
| 39 |
+
"tokens": 0
|
| 40 |
+
},
|
| 41 |
+
"tokens": {
|
| 42 |
+
"CC-BY-SA-3.0": 4232587,
|
| 43 |
+
"CC-BY-SA-4.0": 12892653
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
"review_scope": "licence of contributors' text on pl.wikivoyage.org and its version per page; not independent legal advice",
|
| 47 |
+
"site_licence": {
|
| 48 |
+
"observed_at": "2026-10-06T00:00:17.595298+00:00",
|
| 49 |
+
"rightsinfo": {
|
| 50 |
+
"text": "Creative Commons Attribution-Share Alike 4.0",
|
| 51 |
+
"url": "https://creativecommons.org/licenses/by-sa/4.0/deed.pl",
|
| 52 |
+
"url_queried": "https://pl.wikivoyage.org/w/api.php?action=query&meta=siteinfo&siprop=rightsinfo"
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
+
"spdx": [
|
| 56 |
+
"https://spdx.org/licenses/CC-BY-SA-3.0.html",
|
| 57 |
+
"https://spdx.org/licenses/CC-BY-SA-4.0.html"
|
| 58 |
+
],
|
| 59 |
+
"status": "documented-open-cc-by-sa",
|
| 60 |
+
"switch": null,
|
| 61 |
+
"terms": [
|
| 62 |
+
{
|
| 63 |
+
"effective": "These Terms of Use went into effect on June 7, 2023",
|
| 64 |
+
"sha256": "c96ef93b439ff9b8242dc3233f41ede57c0984ef9153fafa51aa5f8cf0678832",
|
| 65 |
+
"statement": "Creative Commons Attribution-ShareAlike 4.0 International License",
|
| 66 |
+
"title": "Wikimedia Terms of Use in force since 7 June 2023 (CC BY-SA 4.0)",
|
| 67 |
+
"url": "https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=554823&action=raw"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"effective": "These Terms of Use went into effect on June 16, 2014",
|
| 71 |
+
"sha256": "46617e3576a507b8f83a0cf7b28b60e43817ad93cc5d747a558b503e7d1cc6de",
|
| 72 |
+
"statement": "Creative Commons Attribution-ShareAlike 3.0 Unported License",
|
| 73 |
+
"title": "Wikimedia Terms of Use of 2014-2023 (CC BY-SA 3.0)",
|
| 74 |
+
"url": "https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=98524&action=raw"
|
| 75 |
+
}
|
| 76 |
+
]
|
| 77 |
+
}
|
data/wikivoyage/wikivoyage.md
CHANGED
|
@@ -1,43 +1,97 @@
|
|
| 1 |
# wikivoyage
|
| 2 |
|
| 3 |
-
Polish Wikivoyage
|
| 4 |
|
| 5 |
## Dataset description
|
| 6 |
-
- **Source (upstream):** https://
|
| 7 |
- **Domain:** travel
|
| 8 |
- **Language:** Polish (pl)
|
| 9 |
-
- **License:** `CC-BY-SA-3.0`
|
| 10 |
-
- **Created (range):**
|
| 11 |
-
- **Added:** 2026-07-02
|
| 12 |
|
| 13 |
## Licensing — traceable basis
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## Provenance
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Statistics
|
| 20 |
| documents | characters | tokens (tiktoken proxy) |
|
| 21 |
|---:|---:|---:|
|
| 22 |
-
| 13,
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
## Per-document license metadata
|
| 26 |
| license | documents |
|
| 27 |
|---|---:|
|
| 28 |
-
| `CC-BY-SA-3.0` |
|
|
|
|
| 29 |
|
| 30 |
-
Author metadata present for **
|
| 31 |
-
|
| 32 |
-
Statistics were recomputed directly from the released parquet file.
|
| 33 |
|
| 34 |
## Filters applied (build_dynaword.py)
|
| 35 |
-
|
| 36 |
-
- drop
|
| 37 |
-
- drop non-Polish (diacritic ratio): **0**
|
| 38 |
- exact cross-source dedup (sha1): **0**
|
| 39 |
- OCR alpha-ratio < 0.70 (OCR sources only): **0**
|
| 40 |
-
- read 13,
|
| 41 |
|
| 42 |
Token counts are a fast tiktoken (cl100k) proxy (~1% off Llama-3); the canonical
|
| 43 |
Llama-3 count is computed at release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# wikivoyage
|
| 2 |
|
| 3 |
+
Polish Wikivoyage
|
| 4 |
|
| 5 |
## Dataset description
|
| 6 |
+
- **Source (upstream):** https://dumps.wikimedia.org/plwikivoyage/20260601/
|
| 7 |
- **Domain:** travel
|
| 8 |
- **Language:** Polish (pl)
|
| 9 |
+
- **License:** `CC-BY-SA-3.0` or `CC-BY-SA-4.0` per record (by last-revision date)
|
| 10 |
+
- **Created (range):** 2013-04-21, 2026-06-01 (date of the page's last revision in the dump)
|
| 11 |
+
- **Added:** 2026-07-02; rebuilt 2026-10-06 (UTC) from the official Wikimedia dump
|
| 12 |
|
| 13 |
## Licensing — traceable basis
|
| 14 |
+
Contributors' text on pl.wikivoyage.org is licensed CC BY-SA: [Wikimedia Terms of Use in force since 7 June 2023 (CC BY-SA 4.0)](https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=554823&action=raw); [Wikimedia Terms of Use of 2014-2023 (CC BY-SA 3.0)](https://foundation.wikimedia.org/w/index.php?title=Policy:Terms_of_Use&oldid=98524&action=raw) (read 2026-10-06 UTC). The site licence
|
| 15 |
+
(`rightsinfo`) reads "Creative Commons Attribution-Share Alike 4.0". Each row is labelled by its page's last revision in the dump:
|
| 16 |
+
|
| 17 |
+
| last revision (UTC) | `license` | documents | tokens | share of tokens |
|
| 18 |
+
|---|---|---:|---:|---:|
|
| 19 |
+
| before 2023-06-07 | `CC-BY-SA-3.0` | 9,040 | 4,232,587 | 24.7% |
|
| 20 |
+
| 2023-06-07 or later | `CC-BY-SA-4.0` | 4,603 | 12,892,653 | 75.3% |
|
| 21 |
+
|
| 22 |
+
A page last edited on or after the cutoff can still hold 3.0 text from earlier edits;
|
| 23 |
+
[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/legalcode) §4(b)(ii) lets such an adaptation be licensed under "a later
|
| 24 |
+
version of this License with the same License Elements", so it is labelled 4.0. The Terms
|
| 25 |
+
of Use give the day of the switch, not the time. The cutoff is midnight UTC, so the
|
| 26 |
+
6 pages last edited on 2023-06-07 itself are labelled 4.0. If the switch came later
|
| 27 |
+
that day, those last edited before it are 3.0 text under a 4.0 label; a 2023-06-08 cutoff
|
| 28 |
+
(the citation pass's fallback) would instead put that day's 4.0 edits under a 3.0 label,
|
| 29 |
+
which [4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode) §3(b)(1) ("this version or later") does not allow. Neither choice is
|
| 30 |
+
exact without the time of the switch. The rule is `license_for_revision` in `src/rights.py`,
|
| 31 |
+
tested at the cutoff second, across time zones, and on a missing timestamp, which stops the
|
| 32 |
+
build. v0.2.0-v0.2.5 labelled every row `CC-BY-SA-3.0`.
|
| 33 |
+
|
| 34 |
+
0 documents (0 tokens, 0.0%) were last edited before 2009-06-15, when the Wikimedia sites
|
| 35 |
+
began dual licensing under CC BY-SA 3.0 and the GFDL. Text first contributed before the 2009 move was
|
| 36 |
+
under the GFDL only. They are labelled `CC-BY-SA-3.0`, so only the CC BY-SA grant is relied on; the count is recorded, not acted on.
|
| 37 |
+
|
| 38 |
+
Evidence: `wikivoyage.license-evidence.json`.
|
| 39 |
+
|
| 40 |
+
## Attribution
|
| 41 |
+
Each row's `author` is `Wikivoyage contributors, <page URL>`, e.g.
|
| 42 |
+
`Wikivoyage contributors, https://pl.wikivoyage.org/wiki/Azja`. The page history names the contributors; the Terms of Use (section 7b) accept a hyperlink or URL to the page as attribution.
|
| 43 |
+
`wikivoyage.attribution.jsonl` has one line per row: `id`, `pageid`, `revid` (the revision
|
| 44 |
+
in the dump), `title`, `url`, `last_revision_at`, `license`. The row `id` is
|
| 45 |
+
`wikivoyage_<page id>` and `created` is the date of `last_revision_at`.
|
| 46 |
+
|
| 47 |
+
The text is modified: wiki markup is converted to plain text (see Provenance).
|
| 48 |
|
| 49 |
## Provenance
|
| 50 |
+
Parsed from the official Wikimedia dump `plwikivoyage-20260601-pages-articles` by
|
| 51 |
+
`src/fetch_wikimedia.py`; the file (20,269,251 bytes, sha1 `1a790d37f5a05acd42a57023d28de2af36b13bd2`) was matched against the
|
| 52 |
+
dump's `dumpstatus.json` and `sha1sums.txt` (`wikivoyage.build.json`). v0.2.0-v0.2.5 used the same dump
|
| 53 |
+
date; the text set is the same except for the withheld pages (the rebuild adds the last-revision time).
|
| 54 |
+
|
| 55 |
+
Articles (namespace 0) only. Redirects, empty pages and pages shorter than 200 characters are skipped.
|
| 56 |
+
Wikitext is converted with mwparserfromhell `strip_code(normalize=True, collapse=True)`, as in v0.2.5.
|
| 57 |
+
Templates and comments are dropped. `<ref>` bodies, category links (`Kategoria:...`) and file-link
|
| 58 |
+
options (`thumb|...`) are not removed and stay in the text; the wikipedia fetcher's `strip_article`
|
| 59 |
+
removes them, this one does not, because that would change the text set. Of two pages with the same
|
| 60 |
+
text (sha1 of the stripped text), the lower page id is kept.
|
| 61 |
+
|
| 62 |
+
15,468 pages scanned → 14,321 in namespace 0 → 630 redirects, 0 empty pages, 0 parser failures, 36 shorter than 200 characters skipped, 1 exact duplicates dropped, 2 pages withheld by the rights review (`DROPPED_PAGES` in `src/rights.py`; ids, titles and reasons in `wikivoyage.build.json`) → 13,652 read by the build → 13,643 released.
|
| 63 |
|
| 64 |
## Statistics
|
| 65 |
| documents | characters | tokens (tiktoken proxy) |
|
| 66 |
|---:|---:|---:|
|
| 67 |
+
| 13,643 | 45,176,480 | 17,125,240 |
|
| 68 |
|
| 69 |
+
v0.2.5 had 13,645 documents, 45,184,300 characters and 17,128,200 tokens; the difference is the 2 pages withheld by the rights review.
|
| 70 |
|
| 71 |
## Per-document license metadata
|
| 72 |
| license | documents |
|
| 73 |
|---|---:|
|
| 74 |
+
| `CC-BY-SA-3.0` | 9,040 |
|
| 75 |
+
| `CC-BY-SA-4.0` | 4,603 |
|
| 76 |
|
| 77 |
+
Author metadata present for **13,643** documents.
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## Filters applied (build_dynaword.py)
|
| 80 |
+
- drop documents < 200 chars: **0** (the fetcher already dropped 36)
|
| 81 |
+
- drop non-Polish (diacritic ratio): **9**
|
|
|
|
| 82 |
- exact cross-source dedup (sha1): **0**
|
| 83 |
- OCR alpha-ratio < 0.70 (OCR sources only): **0**
|
| 84 |
+
- read 13,652 → kept 13,643
|
| 85 |
|
| 86 |
Token counts are a fast tiktoken (cl100k) proxy (~1% off Llama-3); the canonical
|
| 87 |
Llama-3 count is computed at release.
|
| 88 |
+
|
| 89 |
+
## Not checked
|
| 90 |
+
- pastes from copyrighted sources (no sample was run)
|
| 91 |
+
- the 3.0 → 4.0 label of pages edited after the cutoff (a reading of 3.0 §4(b)(ii), not a lawyer's opinion;
|
| 92 |
+
the lawyer's answer to E1, the wiki 3.0/4.0 labelling, is still pending), and the time of day of the switch
|
| 93 |
+
- text imported from elsewhere under another licence or with extra attribution requirements
|
| 94 |
+
- text first contributed under GFDL before the 2009 move to CC BY-SA, and GFDL dual
|
| 95 |
+
licensing; only the CC BY-SA grant is relied on
|
| 96 |
+
- quotations inside articles (Art. 29 of the Polish copyright act)
|
| 97 |
+
- personal data (the NERGAL scrub runs before release)
|
data/wikivoyage/wikivoyage.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:436e7a4b6ab0cb3e9b0cb8d133a93c8033f756fcff459653f4a26ef3881fe6d3
|
| 3 |
+
size 19965350
|
data/wikivoyage/wikivoyage.stats.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
{
|
| 2 |
-
"read":
|
| 3 |
-
"kept":
|
| 4 |
"drop_short": 0,
|
| 5 |
-
"drop_lang":
|
| 6 |
"drop_dup": 0,
|
| 7 |
"drop_ocr": 0,
|
| 8 |
-
"chars":
|
| 9 |
-
"tokens":
|
| 10 |
"licenses": {
|
| 11 |
-
"CC-BY-SA-3.0":
|
|
|
|
| 12 |
},
|
| 13 |
-
"authors_with_value":
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"read": 13652,
|
| 3 |
+
"kept": 13643,
|
| 4 |
"drop_short": 0,
|
| 5 |
+
"drop_lang": 9,
|
| 6 |
"drop_dup": 0,
|
| 7 |
"drop_ocr": 0,
|
| 8 |
+
"chars": 45176480,
|
| 9 |
+
"tokens": 17125240,
|
| 10 |
"licenses": {
|
| 11 |
+
"CC-BY-SA-3.0": 9040,
|
| 12 |
+
"CC-BY-SA-4.0": 4603
|
| 13 |
},
|
| 14 |
+
"authors_with_value": 13643,
|
| 15 |
+
"secs": 2.5,
|
| 16 |
+
"license": "CC BY-SA (3.0 or 4.0 per record, by last-revision date)"
|
| 17 |
+
}
|
src/rights.py
CHANGED
|
@@ -81,6 +81,12 @@ DROPPED_PAGES: dict[str, dict[int, str]] = {
|
|
| 81 |
"wikinews": {
|
| 82 |
},
|
| 83 |
"wikivoyage": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
},
|
| 85 |
"wikibooks": {
|
| 86 |
23933: "Historia powszechna/Rzeczpospolita pod panowaniem królów elekcyjnych: copy of sciaga.pl/tekst/"
|
|
|
|
| 81 |
"wikinews": {
|
| 82 |
},
|
| 83 |
"wikivoyage": {
|
| 84 |
+
1219: "Barcelona/Sagrada Família: edited from barcelona.przewodnik-turystyczny.pl (the page's own "
|
| 85 |
+
"bibliography names it); 432 of 2,782 characters shared verbatim (Earwig 0.23), a Wayback capture "
|
| 86 |
+
"of 2006-06-16 already holds the passages, the wiki page was created 2009-06-04",
|
| 87 |
+
910: "Królewiec: 2,021 of 5,006 characters shared with kaliningraddotblog.wordpress.com/2018/05/07/"
|
| 88 |
+
"krolewiec-konigsberg/ (Earwig 0.78); the blog post is dated 2018-05-07, the text was added to "
|
| 89 |
+
"the wiki on 2021-02-23 (revision 108903)",
|
| 90 |
},
|
| 91 |
"wikibooks": {
|
| 92 |
23933: "Historia powszechna/Rzeczpospolita pod panowaniem królów elekcyjnych: copy of sciaga.pl/tekst/"
|
src/sources.py
CHANGED
|
@@ -420,18 +420,34 @@ SOURCES = {
|
|
| 420 |
"added": "2026-07-02",
|
| 421 |
"release": "0.2.0",
|
| 422 |
"file_key": "plwikivoyage",
|
|
|
|
|
|
|
| 423 |
"pretty": "Polish Wikivoyage (travel guides)",
|
| 424 |
-
"
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
"(
|
| 431 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
"domain": "travel",
|
| 433 |
-
"created": "
|
| 434 |
"is_ocr": False,
|
|
|
|
| 435 |
},
|
| 436 |
"wikibooks": {
|
| 437 |
"added": "2026-07-02",
|
|
|
|
| 420 |
"added": "2026-07-02",
|
| 421 |
"release": "0.2.0",
|
| 422 |
"file_key": "plwikivoyage",
|
| 423 |
+
"preserve_id": True,
|
| 424 |
+
"preserve_created": True,
|
| 425 |
"pretty": "Polish Wikivoyage (travel guides)",
|
| 426 |
+
"provenance": "Parsed directly from the official Wikimedia dump "
|
| 427 |
+
"plwikivoyage-20260601-pages-articles (sha1 checked against the "
|
| 428 |
+
"dump's dumpstatus.json and sha1sums.txt) by "
|
| 429 |
+
"src/fetch_wikimedia.py. Articles (namespace 0) only, no "
|
| 430 |
+
"redirects; one document per page, id from the page id. The text "
|
| 431 |
+
"set is the one released in v0.2.0-v0.2.5 without the 2 pages the "
|
| 432 |
+
"rights review withheld (DROPPED_PAGES in src/rights.py); the "
|
| 433 |
+
"rebuild adds the page's last-revision time, which sets the "
|
| 434 |
+
"licence label.",
|
| 435 |
+
"license": "CC BY-SA (3.0 or 4.0 per record, by last-revision date)",
|
| 436 |
+
"license_spdx": "MIXED",
|
| 437 |
+
"traceable": "Contributors license their text under CC BY-SA 4.0 since the "
|
| 438 |
+
"Wikimedia Terms of Use of 2023-06-07, under CC BY-SA 3.0 before. "
|
| 439 |
+
"A page whose last revision predates 2023-06-07 is labelled "
|
| 440 |
+
"CC-BY-SA-3.0; a page revised on or after that day is an "
|
| 441 |
+
"adaptation of the 3.0 text, which 3.0 §4(b)(ii) allows under 4.0, "
|
| 442 |
+
"and is labelled CC-BY-SA-4.0. Each row's author field links its "
|
| 443 |
+
"page, whose history names the contributors; "
|
| 444 |
+
"wikivoyage.attribution.jsonl gives page id, revision id, title "
|
| 445 |
+
"and last-revision time per row.",
|
| 446 |
+
"upstream": "https://dumps.wikimedia.org/plwikivoyage/20260601/",
|
| 447 |
"domain": "travel",
|
| 448 |
+
"created": "2013-04-21, 2026-06-01",
|
| 449 |
"is_ocr": False,
|
| 450 |
+
"custom_datasheet": True,
|
| 451 |
},
|
| 452 |
"wikibooks": {
|
| 453 |
"added": "2026-07-02",
|
src/test_wikivoyage_contract.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Contract checks for the released wikivoyage source (Polish Wikivoyage, CC BY-SA 3.0 until 2023-06-07 and CC BY-SA 4.0 after); the shared checks live in test_wikimedia_contract.py."""
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
import pyarrow.parquet as pq
|
| 6 |
+
|
| 7 |
+
import rights
|
| 8 |
+
from test_wikimedia_contract import ROOT, check_released
|
| 9 |
+
|
| 10 |
+
# the v0.2.5 rows (documents, characters, tokens) that the rights review withholds: pages 1219 and 910
|
| 11 |
+
WITHHELD = (2, 7820, 2960)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def test_wikivoyage_contract(tmp_path):
|
| 15 |
+
stats, ev = check_released("wikivoyage", tmp_path, dropped=WITHHELD)
|
| 16 |
+
assert (stats["kept"], stats["tokens"]) == (13643, 17125240)
|
| 17 |
+
assert stats["licenses"] == {"CC-BY-SA-3.0": 9040, "CC-BY-SA-4.0": 4603}
|
| 18 |
+
assert ev["release_scope"]["tokens"] == {"CC-BY-SA-3.0": 4232587, "CC-BY-SA-4.0": 12892653}
|
| 19 |
+
assert ev["cutoff"]["boundary_day"] == {"day": "2023-06-07", "docs_last_edited_that_day": 6}
|
| 20 |
+
assert ev["release_scope"]["last_edited_before_era_end"] == {"date": "2009-06-15", "docs": 0, "tokens": 0}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def test_wikivoyage_withholds_the_two_copied_pages():
|
| 24 |
+
withheld = rights.DROPPED_PAGES["wikivoyage"]
|
| 25 |
+
assert set(withheld) == {1219, 910} and all(withheld.values())
|
| 26 |
+
data = ROOT / "data" / "wikivoyage"
|
| 27 |
+
ids = set(pq.read_table(data / "wikivoyage.parquet", columns=["id"]).column("id").to_pylist())
|
| 28 |
+
assert not {f"wikivoyage_{i}" for i in withheld} & ids
|
| 29 |
+
build = json.loads((data / "wikivoyage.build.json").read_text(encoding="utf-8"))
|
| 30 |
+
listed = {int(p["pageid"]): (p["title"], p["reason"]) for p in build["prepare"]["dropped_pages"]}
|
| 31 |
+
assert listed == {1219: ("Barcelona/Sagrada Família", withheld[1219]), 910: ("Królewiec", withheld[910])}
|