Stamp each source's registry added date; date the v0.2.0 sources 2026-06-15 (v2#80)

#97
by ppuzio - opened
data/dziennik_ustaw/dziennik_ustaw.md CHANGED
@@ -8,7 +8,7 @@ Dziennik Ustaw + Monitor Polski (Polish primary legislation)
8
  - **Language:** Polish (pl)
9
  - **License:** `public-domain (official documents)`
10
  - **Created (range):** 1918-01-01, 2025-12-31
11
- - **Added:** 2026-07-02
12
 
13
  ## Licensing — traceable basis
14
  Normative acts and their official drafts are not subject to copyright (PL art. 4 ustawy o prawie autorskim). Published by the state; reuse unrestricted.
 
8
  - **Language:** Polish (pl)
9
  - **License:** `public-domain (official documents)`
10
  - **Created (range):** 1918-01-01, 2025-12-31
11
+ - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
  Normative acts and their official drafts are not subject to copyright (PL art. 4 ustawy o prawie autorskim). Published by the state; reuse unrestricted.
data/eltec_pol/eltec_pol.md CHANGED
@@ -8,7 +8,7 @@ ELTeC-pol (European Literary Text Collection, Polish)
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-4.0`
10
  - **Created (range):** 1840-01-01, 1920-12-31
11
- - **Added:** 2026-07-02
12
 
13
  ## Licensing — traceable basis
14
  ELTeC corpora are released under CC-BY 4.0 by the COST Action 'Distant Reading for European Literary History' (CA16204).
 
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-4.0`
10
  - **Created (range):** 1840-01-01, 1920-12-31
11
+ - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
  ELTeC corpora are released under CC-BY 4.0 by the COST Action 'Distant Reading for European Literary History' (CA16204).
data/eurlex/eurlex.md CHANGED
@@ -8,7 +8,7 @@ EUR-Lex (EU legal acts, Polish)
8
  - **Language:** Polish (pl)
9
  - **License:** `LicenseRef-EU-Reuse-Policy`
10
  - **Created (range):** 1952-01-01, 2024-12-31
11
- - **Added:** 2026-07-02
12
 
13
  ## Licensing — traceable basis
14
  The EUR-Lex legal notice (https://eur-lex.europa.eu/content/legal-notice/legal-notice.html, read 2026-10-06) says the Commission's document reuse policy is based on Decision 2011/833/EU and that, unless otherwise specified, the legal documents published in EUR-Lex may be re-used for commercial or non-commercial purposes. Decision 2011/833/EU (https://eur-lex.europa.eu/eli/dec/2011/833/oj/eng) Art. 4 makes documents available for reuse without charge or application; Art. 6(2) allows the conditions of source acknowledgement and no distortion of the original meaning. The notice's Creative Commons BY 4.0 grant covers only EUR-Lex editorial content, summaries of EU legislation and consolidated texts, not the acts as such, so the corpus is not labelled CC BY 4.0. This is a reuse permission, not an exclusion from copyright: Art. 4 of the Polish Copyright Act does not apply to EU acts and is not relied on.
 
8
  - **Language:** Polish (pl)
9
  - **License:** `LicenseRef-EU-Reuse-Policy`
10
  - **Created (range):** 1952-01-01, 2024-12-31
11
+ - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
  The EUR-Lex legal notice (https://eur-lex.europa.eu/content/legal-notice/legal-notice.html, read 2026-10-06) says the Commission's document reuse policy is based on Decision 2011/833/EU and that, unless otherwise specified, the legal documents published in EUR-Lex may be re-used for commercial or non-commercial purposes. Decision 2011/833/EU (https://eur-lex.europa.eu/eli/dec/2011/833/oj/eng) Art. 4 makes documents available for reuse without charge or application; Art. 6(2) allows the conditions of source acknowledgement and no distortion of the original meaning. The notice's Creative Commons BY 4.0 grant covers only EUR-Lex editorial content, summaries of EU legislation and consolidated texts, not the acts as such, so the corpus is not labelled CC BY 4.0. This is a reuse permission, not an exclusion from copyright: Art. 4 of the Polish Copyright Act does not apply to EU acts and is not relied on.
data/parliamentary/parliamentary.md CHANGED
@@ -8,7 +8,7 @@ Polish Parliamentary Corpus (Sejm/Senat)
8
  - **Language:** Polish (pl)
9
  - **License:** `public-domain (official documents)`
10
  - **Created (range):** 1991-01-01, 2019-12-31
11
- - **Added:** 2026-07-02
12
 
13
  ## Licensing — traceable basis
14
  Parliamentary proceedings are official documents outside copyright (PL art. 4 pr. aut.); PPC redistributed by IPI PAN under CC-BY-4.0.
 
8
  - **Language:** Polish (pl)
9
  - **License:** `public-domain (official documents)`
10
  - **Created (range):** 1991-01-01, 2019-12-31
11
+ - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
  Parliamentary proceedings are official documents outside copyright (PL art. 4 pr. aut.); PPC redistributed by IPI PAN under CC-BY-4.0.
data/studia_bas/studia_bas.md CHANGED
@@ -13,9 +13,9 @@ layer of the official issue PDF.
13
  - **Language:** Polish (`pl`)
14
  - **License:** `CC-BY-3.0-PL` — https://creativecommons.org/licenses/by/3.0/pl/
15
  - **Created:** 2021-2025 (per article in the `created` column)
16
- - **Added:** 2026-07-19 (inherited from the global `ADDED` constant in
17
- `src/sources.py`, which is what `build_dynaword.py` stamps; the shard is left
18
- as the committed pipeline produces it rather than hand-restamped)
19
 
20
  ## Statistics
21
 
 
13
  - **Language:** Polish (`pl`)
14
  - **License:** `CC-BY-3.0-PL` — https://creativecommons.org/licenses/by/3.0/pl/
15
  - **Created:** 2021-2025 (per article in the `created` column)
16
+ - **Added:** 2026-07-19 (the registry date in `src/sources.py`, which
17
+ `build_dynaword.py` stamps; it equals the global `ADDED` the shard was built
18
+ with, so the shard is left as the committed pipeline produced it)
19
 
20
  ## Statistics
21
 
data/wikibooks/wikibooks.md CHANGED
@@ -8,7 +8,7 @@ Polish Wikibooks
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):** 2006-03-05, 2026-05-31 (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.wikibooks.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
 
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):** 2006-03-05, 2026-05-31 (date of the page's last revision in the dump)
11
+ - **Added:** 2026-06-15; rebuilt 2026-10-06 (UTC) from the official Wikimedia dump
12
 
13
  ## Licensing — traceable basis
14
  Contributors' text on pl.wikibooks.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
data/wikinews/wikinews.md CHANGED
@@ -8,7 +8,7 @@ Polish Wikinews
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-2.5` or `CC-BY-4.0` per record (by last-revision date)
10
  - **Created (range):** 2011-12-24, 2026-05-25 (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.wikinews.org is licensed CC BY: [pl.wikinews terms of use (CC BY 2.5 until 2024-12-16, CC BY 4.0 since)](https://pl.wikinews.org/w/index.php?title=Wikinews:Warunki_u%C5%BCycia&oldid=342796&action=raw) (read 2026-10-06 UTC). The site licence
 
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-2.5` or `CC-BY-4.0` per record (by last-revision date)
10
  - **Created (range):** 2011-12-24, 2026-05-25 (date of the page's last revision in the dump)
11
+ - **Added:** 2026-06-15; rebuilt 2026-10-06 (UTC) from the official Wikimedia dump
12
 
13
  ## Licensing — traceable basis
14
  Contributors' text on pl.wikinews.org is licensed CC BY: [pl.wikinews terms of use (CC BY 2.5 until 2024-12-16, CC BY 4.0 since)](https://pl.wikinews.org/w/index.php?title=Wikinews:Warunki_u%C5%BCycia&oldid=342796&action=raw) (read 2026-10-06 UTC). The site licence
data/wikipedia/wikipedia.md CHANGED
@@ -8,7 +8,7 @@ Polish Wikipedia
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):** 2010-11-12, 2026-09-01 (date of the page's last revision in the dump)
11
- - **Added:** 2026-07-02; rebuilt 2026-10-05 (UTC) from the official Wikimedia dump
12
 
13
  ## Licensing — traceable basis
14
  Wikipedia contributors license their text under CC BY-SA 4.0 under the Wikimedia
 
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):** 2010-11-12, 2026-09-01 (date of the page's last revision in the dump)
11
+ - **Added:** 2026-06-15; rebuilt 2026-10-05 (UTC) from the official Wikimedia dump
12
 
13
  ## Licensing — traceable basis
14
  Wikipedia contributors license their text under CC BY-SA 4.0 under the Wikimedia
data/wikivoyage/wikivoyage.md CHANGED
@@ -8,7 +8,7 @@ Polish Wikivoyage
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
 
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-06-15; 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
data/wolne_lektury/wolne_lektury.md CHANGED
@@ -8,7 +8,7 @@ Wolne Lektury (school readings)
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-SA-4.0 / Wolna Sztuka 1.3`
10
  - **Created (range):** 1500-01-01, 2024-12-31
11
- - **Added:** 2026-07-02
12
 
13
  ## Licensing — traceable basis
14
  Wolne Lektury publishes under CC-BY-SA 4.0 or Free Art License; texts are public-domain classics + cleared works.
 
8
  - **Language:** Polish (pl)
9
  - **License:** `CC-BY-SA-4.0 / Wolna Sztuka 1.3`
10
  - **Created (range):** 1500-01-01, 2024-12-31
11
+ - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
  Wolne Lektury publishes under CC-BY-SA 4.0 or Free Art License; texts are public-domain classics + cleared works.
src/build_dynaword.py CHANGED
@@ -117,6 +117,7 @@ def build_source(name, cfg, sl_dir, out_root, pool, seen, counter):
117
  "licenses": {}, "authors_with_value": 0}
118
  t0 = time.time()
119
  is_ocr, created = bool(cfg.get("is_ocr")), cfg.get("created", "")
 
120
  lang_gate = not cfg.get("polish_by_origin")
121
  preserve_id = bool(cfg.get("preserve_id"))
122
  preserve_created = bool(cfg.get("preserve_created"))
@@ -130,7 +131,7 @@ def build_source(name, cfg, sl_dir, out_root, pool, seen, counter):
130
  n = len(btext)
131
  writer.write(pa.record_batch([
132
  pa.array(bid), pa.array(btext), pa.array([name] * n),
133
- pa.array([ADDED] * n), pa.array(bcre), pa.array(btok, pa.int64()),
134
  pa.array(blic), pa.array(baut),
135
  ], schema=SCHEMA))
136
  bid.clear(); btext.clear(); bcre.clear(); btok.clear(); blic.clear(); baut.clear()
 
117
  "licenses": {}, "authors_with_value": 0}
118
  t0 = time.time()
119
  is_ocr, created = bool(cfg.get("is_ocr")), cfg.get("created", "")
120
+ added = cfg.get("added", ADDED) # the registry date; ADDED only for a source without one
121
  lang_gate = not cfg.get("polish_by_origin")
122
  preserve_id = bool(cfg.get("preserve_id"))
123
  preserve_created = bool(cfg.get("preserve_created"))
 
131
  n = len(btext)
132
  writer.write(pa.record_batch([
133
  pa.array(bid), pa.array(btext), pa.array([name] * n),
134
+ pa.array([added] * n), pa.array(bcre), pa.array(btok, pa.int64()),
135
  pa.array(blic), pa.array(baut),
136
  ], schema=SCHEMA))
137
  bid.clear(); btext.clear(); bcre.clear(); btok.clear(); blic.clear(); baut.clear()
src/fetch_wikimedia.py CHANGED
@@ -40,6 +40,7 @@ from language_gate import card_line # noqa: E402
40
  from rights import ( # noqa: E402
41
  BY_SA_4_CUTOFF, DROPPED_PAGES, WIKINEWS_BY_4_CUTOFF, check_dropped_reached, license_for_revision,
42
  )
 
43
 
44
  DUMP_DATE = "20260601" # the dump the v0.2.5 text was cut from (checked: same text set)
45
  MIN_CHARS = 200 # same gate as build_dynaword.py
@@ -89,7 +90,7 @@ SITES = {
89
  "author": "Wikinews contributors", "family": "CC BY",
90
  "cutoff": WIKINEWS_BY_4_CUTOFF, "before": "CC-BY-2.5", "after": "CC-BY-4.0",
91
  "site_rights": "creativecommons.org/licenses/by/4.0/", "terms": [WIKINEWS_TERMS], "legal": [LEGAL_BY_2_5],
92
- "clock": WIKINEWS_SWITCH["synced_by_utc"], "era_end": "2005-09-25", "domain": "news", "added": "2026-07-02",
93
  "v025": (24386, 32524646, 12141355),
94
  },
95
  "wikivoyage": {
@@ -97,14 +98,14 @@ SITES = {
97
  "author": "Wikivoyage contributors", "family": "CC BY-SA",
98
  "cutoff": BY_SA_4_CUTOFF, "before": "CC-BY-SA-3.0", "after": "CC-BY-SA-4.0",
99
  "site_rights": "creativecommons.org/licenses/by-sa/4.0/", "terms": [WMF_TOU_NEW, WMF_TOU_OLD], "legal": [LEGAL_BY_SA_3, LEGAL_BY_SA_4],
100
- "era_end": GFDL_ERA_END, "domain": "travel", "added": "2026-07-02", "v025": (13645, 45184300, 17128200),
101
  },
102
  "wikibooks": {
103
  "wiki": "plwikibooks", "host": "pl.wikibooks.org", "pretty": "Polish Wikibooks",
104
  "author": "Wikibooks contributors", "family": "CC BY-SA",
105
  "cutoff": BY_SA_4_CUTOFF, "before": "CC-BY-SA-3.0", "after": "CC-BY-SA-4.0",
106
  "site_rights": "creativecommons.org/licenses/by-sa/4.0/", "terms": [WMF_TOU_NEW, WMF_TOU_OLD], "legal": [LEGAL_BY_SA_3, LEGAL_BY_SA_4],
107
- "era_end": GFDL_ERA_END, "domain": "instructional", "added": "2026-07-02", "v025": (9112, 38892589, 15571295),
108
  },
109
  }
110
 
@@ -386,7 +387,7 @@ def datasheet(out: Path, data_dir: Path, key: str) -> None:
386
  - **Language:** Polish (pl)
387
  - **License:** `{before}` or `{after}` per record (by last-revision date)
388
  - **Created (range):** {created[0]}, {created[1]} (date of the page's last revision in the dump)
389
- - **Added:** {site['added']}; rebuilt {when} (UTC) from the official Wikimedia dump
390
 
391
  ## Licensing — traceable basis
392
  Contributors' text on {site['host']} is licensed {site['family']}: {terms} (read {when} UTC). The site licence
 
40
  from rights import ( # noqa: E402
41
  BY_SA_4_CUTOFF, DROPPED_PAGES, WIKINEWS_BY_4_CUTOFF, check_dropped_reached, license_for_revision,
42
  )
43
+ from sources import SOURCES # noqa: E402
44
 
45
  DUMP_DATE = "20260601" # the dump the v0.2.5 text was cut from (checked: same text set)
46
  MIN_CHARS = 200 # same gate as build_dynaword.py
 
90
  "author": "Wikinews contributors", "family": "CC BY",
91
  "cutoff": WIKINEWS_BY_4_CUTOFF, "before": "CC-BY-2.5", "after": "CC-BY-4.0",
92
  "site_rights": "creativecommons.org/licenses/by/4.0/", "terms": [WIKINEWS_TERMS], "legal": [LEGAL_BY_2_5],
93
+ "clock": WIKINEWS_SWITCH["synced_by_utc"], "era_end": "2005-09-25", "domain": "news",
94
  "v025": (24386, 32524646, 12141355),
95
  },
96
  "wikivoyage": {
 
98
  "author": "Wikivoyage contributors", "family": "CC BY-SA",
99
  "cutoff": BY_SA_4_CUTOFF, "before": "CC-BY-SA-3.0", "after": "CC-BY-SA-4.0",
100
  "site_rights": "creativecommons.org/licenses/by-sa/4.0/", "terms": [WMF_TOU_NEW, WMF_TOU_OLD], "legal": [LEGAL_BY_SA_3, LEGAL_BY_SA_4],
101
+ "era_end": GFDL_ERA_END, "domain": "travel", "v025": (13645, 45184300, 17128200),
102
  },
103
  "wikibooks": {
104
  "wiki": "plwikibooks", "host": "pl.wikibooks.org", "pretty": "Polish Wikibooks",
105
  "author": "Wikibooks contributors", "family": "CC BY-SA",
106
  "cutoff": BY_SA_4_CUTOFF, "before": "CC-BY-SA-3.0", "after": "CC-BY-SA-4.0",
107
  "site_rights": "creativecommons.org/licenses/by-sa/4.0/", "terms": [WMF_TOU_NEW, WMF_TOU_OLD], "legal": [LEGAL_BY_SA_3, LEGAL_BY_SA_4],
108
+ "era_end": GFDL_ERA_END, "domain": "instructional", "v025": (9112, 38892589, 15571295),
109
  },
110
  }
111
 
 
387
  - **Language:** Polish (pl)
388
  - **License:** `{before}` or `{after}` per record (by last-revision date)
389
  - **Created (range):** {created[0]}, {created[1]} (date of the page's last revision in the dump)
390
+ - **Added:** {SOURCES[key]['added']}; rebuilt {when} (UTC) from the official Wikimedia dump
391
 
392
  ## Licensing — traceable basis
393
  Contributors' text on {site['host']} is licensed {site['family']}: {terms} (read {when} UTC). The site licence
src/sources.py CHANGED
@@ -112,7 +112,7 @@ SOURCES = {
112
  "custom_datasheet": True,
113
  },
114
  "wikipedia": {
115
- "added": "2026-07-02",
116
  # Polish by origin: build_dynaword skips the language gate (src/language_gate.py).
117
  "polish_by_origin": True,
118
  "release": "0.2.0",
@@ -150,7 +150,7 @@ SOURCES = {
150
  "custom_datasheet": True,
151
  },
152
  "wikisource": {
153
- "added": "2026-07-02",
154
  "release": "0.2.0",
155
  "speakleash_key": "plwikisource",
156
  "pretty": "Polish Wikisource",
@@ -205,7 +205,7 @@ SOURCES = {
205
  "is_ocr": False,
206
  },
207
  "eurlex": {
208
- "added": "2026-07-02",
209
  "release": "0.2.0",
210
  "speakleash_key": "eurlex_corpus",
211
  "pretty": "EUR-Lex (EU legal acts, Polish)",
@@ -255,7 +255,7 @@ SOURCES = {
255
  "is_ocr": False,
256
  },
257
  "parliamentary": {
258
- "added": "2026-07-02",
259
  "release": "0.2.0",
260
  "speakleash_key": "PPC_corpus",
261
  "pretty": "Polish Parliamentary Corpus (Sejm/Senat)",
@@ -382,7 +382,7 @@ SOURCES = {
382
  "custom_datasheet": True,
383
  },
384
  "wolne_lektury": {
385
- "added": "2026-07-02",
386
  "release": "0.2.0",
387
  "speakleash_key": "wolne_lektury_corpus",
388
  "pretty": "Wolne Lektury (school readings)",
@@ -403,7 +403,7 @@ SOURCES = {
403
  "is_ocr": False,
404
  },
405
  "wikinews": {
406
- "added": "2026-07-02",
407
  "release": "0.2.0",
408
  "file_key": "plwikinews", # fetched from Wikimedia dumps, NOT via SpeakLeash
409
  "preserve_id": True,
@@ -434,7 +434,7 @@ SOURCES = {
434
  "custom_datasheet": True,
435
  },
436
  "wikivoyage": {
437
- "added": "2026-07-02",
438
  # Polish by origin: build_dynaword skips the language gate (src/language_gate.py).
439
  "polish_by_origin": True,
440
  "release": "0.2.0",
@@ -469,7 +469,7 @@ SOURCES = {
469
  "custom_datasheet": True,
470
  },
471
  "wikibooks": {
472
- "added": "2026-07-02",
473
  "release": "0.2.0",
474
  "file_key": "plwikibooks",
475
  "preserve_id": True,
@@ -502,7 +502,7 @@ SOURCES = {
502
  "custom_datasheet": True,
503
  },
504
  "wikiquote": {
505
- "added": "2026-07-02",
506
  "release": "0.2.0",
507
  "file_key": "plwikiquote",
508
  "pretty": "Polish Wikiquote (quotations)",
@@ -544,7 +544,7 @@ SOURCES = {
544
  "custom_datasheet": True,
545
  },
546
  "eltec_pol": {
547
- "added": "2026-07-02",
548
  "release": "0.2.0",
549
  "file_key": "eltec_pol",
550
  "pretty": "ELTeC-pol (European Literary Text Collection, Polish)",
@@ -601,7 +601,7 @@ SOURCES = {
601
  "custom_datasheet": True,
602
  },
603
  "dziennik_ustaw": {
604
- "added": "2026-07-02",
605
  "release": "0.2.0",
606
  "file_key": "dziennik_ustaw", # fetched directly, NOT via SpeakLeash
607
  "pretty": "Dziennik Ustaw + Monitor Polski (Polish primary legislation)",
 
112
  "custom_datasheet": True,
113
  },
114
  "wikipedia": {
115
+ "added": "2026-06-15",
116
  # Polish by origin: build_dynaword skips the language gate (src/language_gate.py).
117
  "polish_by_origin": True,
118
  "release": "0.2.0",
 
150
  "custom_datasheet": True,
151
  },
152
  "wikisource": {
153
+ "added": "2026-06-15",
154
  "release": "0.2.0",
155
  "speakleash_key": "plwikisource",
156
  "pretty": "Polish Wikisource",
 
205
  "is_ocr": False,
206
  },
207
  "eurlex": {
208
+ "added": "2026-06-15",
209
  "release": "0.2.0",
210
  "speakleash_key": "eurlex_corpus",
211
  "pretty": "EUR-Lex (EU legal acts, Polish)",
 
255
  "is_ocr": False,
256
  },
257
  "parliamentary": {
258
+ "added": "2026-06-15",
259
  "release": "0.2.0",
260
  "speakleash_key": "PPC_corpus",
261
  "pretty": "Polish Parliamentary Corpus (Sejm/Senat)",
 
382
  "custom_datasheet": True,
383
  },
384
  "wolne_lektury": {
385
+ "added": "2026-06-15",
386
  "release": "0.2.0",
387
  "speakleash_key": "wolne_lektury_corpus",
388
  "pretty": "Wolne Lektury (school readings)",
 
403
  "is_ocr": False,
404
  },
405
  "wikinews": {
406
+ "added": "2026-06-15",
407
  "release": "0.2.0",
408
  "file_key": "plwikinews", # fetched from Wikimedia dumps, NOT via SpeakLeash
409
  "preserve_id": True,
 
434
  "custom_datasheet": True,
435
  },
436
  "wikivoyage": {
437
+ "added": "2026-06-15",
438
  # Polish by origin: build_dynaword skips the language gate (src/language_gate.py).
439
  "polish_by_origin": True,
440
  "release": "0.2.0",
 
469
  "custom_datasheet": True,
470
  },
471
  "wikibooks": {
472
+ "added": "2026-06-15",
473
  "release": "0.2.0",
474
  "file_key": "plwikibooks",
475
  "preserve_id": True,
 
502
  "custom_datasheet": True,
503
  },
504
  "wikiquote": {
505
+ "added": "2026-06-15",
506
  "release": "0.2.0",
507
  "file_key": "plwikiquote",
508
  "pretty": "Polish Wikiquote (quotations)",
 
544
  "custom_datasheet": True,
545
  },
546
  "eltec_pol": {
547
+ "added": "2026-06-15",
548
  "release": "0.2.0",
549
  "file_key": "eltec_pol",
550
  "pretty": "ELTeC-pol (European Literary Text Collection, Polish)",
 
601
  "custom_datasheet": True,
602
  },
603
  "dziennik_ustaw": {
604
+ "added": "2026-06-15",
605
  "release": "0.2.0",
606
  "file_key": "dziennik_ustaw", # fetched directly, NOT via SpeakLeash
607
  "pretty": "Dziennik Ustaw + Monitor Polski (Polish primary legislation)",
src/test_added_dates.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """`added`: one date per source, the registry's (v0.2.6 release edits, slayerlabs/polish-dynaword-v2#80)."""
2
+ import json
3
+ from pathlib import Path
4
+ import re
5
+ import sys
6
+ from types import SimpleNamespace
7
+
8
+ import pyarrow.compute as pc
9
+ import pyarrow.parquet as pq
10
+ import pytest
11
+
12
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
13
+ import build_dynaword # noqa: E402
14
+ from sources import ADDED, SOURCES # noqa: E402
15
+
16
+ DATA = Path(__file__).resolve().parents[1] / "data"
17
+ CARD_ADDED = re.compile(r"^- (?:\*\*)?Added:(?:\*\*)? (\d{4}-\d{2}-\d{2})", re.MULTILINE)
18
+ # Shards whose `added` column still differs from the registry. Drop an entry when its shard is rebuilt or restamped.
19
+ STALE_SHARDS = {
20
+ # built by build_dynaword.py while it stamped the global ADDED; the next rebuild stamps the registry date
21
+ "wikipedia": "2026-07-19", "wikinews": "2026-07-19", "wikivoyage": "2026-07-19", "wikibooks": "2026-07-19",
22
+ "sejm_interpellations": "2026-07-19",
23
+ # the registry and the shard disagree; which date is right is not decided yet
24
+ "plwiki_user_talk": "2026-09-27", "nkjp1m": "2026-07-17", "global_voices": "2026-07-16", "1000_novels": "2026-06-26",
25
+ }
26
+ SHARDS = sorted(key for key in SOURCES if (DATA / key / f"{key}.parquet").is_file())
27
+ CARDS = sorted(key for key in SOURCES if (DATA / key / f"{key}.md").is_file())
28
+
29
+
30
+ def test_v020_sources_carry_the_v020_date():
31
+ v020 = {key: cfg["added"] for key, cfg in SOURCES.items() if cfg.get("release") == "0.2.0"}
32
+ assert len(v020) == 11 and set(v020.values()) == {"2026-06-15"}, v020
33
+
34
+
35
+ @pytest.mark.parametrize("key", SHARDS)
36
+ def test_shard_carries_the_registry_date(key):
37
+ dates = pc.unique(pq.read_table(DATA / key / f"{key}.parquet", columns=["added"])["added"]).to_pylist()
38
+ assert dates == [STALE_SHARDS.get(key, SOURCES[key]["added"])]
39
+
40
+
41
+ def test_stale_shards_are_registered_shards():
42
+ assert STALE_SHARDS.keys() <= set(SHARDS)
43
+
44
+
45
+ @pytest.mark.parametrize("key", CARDS)
46
+ def test_card_states_the_registry_date(key):
47
+ assert CARD_ADDED.findall((DATA / key / f"{key}.md").read_text(encoding="utf-8")) in ([], [SOURCES[key]["added"]])
48
+
49
+
50
+ @pytest.mark.parametrize("cfg, stamped", [({"added": "2026-01-02"}, "2026-01-02"), ({}, ADDED)])
51
+ def test_build_source_stamps_the_registry_date(tmp_path, cfg, stamped):
52
+ import zstandard
53
+ build_dynaword._init_worker()
54
+ text = "Zażółć gęślą jaźń. Miasto leży nad rzeką, a jego mieszkańcy pracują w porcie. " * 10
55
+ (tmp_path / "src.jsonl.zst").write_bytes(zstandard.ZstdCompressor().compress((json.dumps({"text": text}) + "\n").encode()))
56
+ cfg = {"file_key": "src", "license": "CC0", "created": "2026", "polish_by_origin": True, **cfg}
57
+ pool = SimpleNamespace(imap_unordered=lambda fn, items, chunksize: map(fn, items))
58
+ build_dynaword.build_source("probe", cfg, tmp_path, tmp_path, pool, set(), [0])
59
+ assert pq.read_table(tmp_path / "data" / "probe" / "probe.parquet")["added"].to_pylist() == [stamped]