Complete v0.2.3 phrase-frequency report + register drifted sources + AGENTS.md

#10
by ppuzio - opened
AGENTS.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md
2
+
3
+ Guidance for agents and contributors adding a source and cutting a release.
4
+ Read this before opening a PR — several recent contributions added data but
5
+ skipped the doc/version bump, forcing a maintainer cleanup release.
6
+
7
+ ## How the docs are actually maintained
8
+
9
+ `src/make_docs.py` is a **scaffolding/assembly helper, not a round-trip source
10
+ of truth.** It regenerates the README source table + release totals, `LICENSE`,
11
+ a `CHANGELOG` stub, and *template* datasheets — but it does **not** reproduce the
12
+ committed docs on its own:
13
+
14
+ - It iterates `SOURCES` in `src/sources.py`; any source in `data/` but missing
15
+ from `SOURCES` is silently dropped from the table and totals.
16
+ - It stamps every regenerated datasheet's "Added" with the single global `ADDED`
17
+ constant, overwriting real per-source add dates.
18
+ - It cannot reproduce hand-written README narrative (audit notes, policy notes,
19
+ the phrase-frequency section).
20
+
21
+ So datasheets and the README narrative are **hand/contributor-maintained**.
22
+ Never run `make_docs.py` and commit the result blind — `git diff` first and
23
+ restore anything it dropped or restamped.
24
+
25
+ ## Add a source
26
+
27
+ 1. Produce the artifact under `data/<key>/`:
28
+ - `<key>.parquet` — built by `src/build_dynaword.py` (LFS-tracked automatically).
29
+ - `<key>.stats.json` — doc/token/char counts (drives all totals).
30
+ - `<key>.md` — datasheet (see below).
31
+ 2. Add the ingestion script: `src/fetch_<key>.py` or `src/clean_<key>.py`, so the
32
+ source is reproducible. `build_source` (build_dynaword.py) expects a
33
+ `<file_key|speakleash_key>.jsonl.zst` intermediate.
34
+ 3. Register the source in `src/sources.py` (`SOURCES`) — required, or make_docs
35
+ never sees it. Copy an existing entry's shape: `pretty`, `license`,
36
+ `license_spdx`, `traceable`, `upstream`, `domain`, `created`, `is_ocr`, and the
37
+ `speakleash_key`/`file_key`. If the datasheet is hand-authored (rich provenance
38
+ or a fixed add date), add `"custom_datasheet": True` so make_docs leaves it
39
+ alone.
40
+ 4. Add a contract test: `src/test_<key>_contract.py` (canonical schema, non-empty
41
+ text, positive token counts, uniform source/license, stats-file consistency).
42
+ Run `python3 -m pytest src/` before committing.
43
+
44
+ ## Cut the release (the part that gets skipped)
45
+
46
+ 1. In `src/make_docs.py`: bump `VERSION` and `RELEASE_DATE`. Add a row for the new
47
+ version to the version table and a row for yourself to the Contributors table
48
+ (both are literal rows in the template).
49
+ 2. Regenerate the phrase-frequency report and charts (registry-independent — it
50
+ globs `data/*/*.parquet`):
51
+ ```bash
52
+ python3 src/pattern_frequency_report.py
53
+ ```
54
+ Writes `artifacts/pattern_frequency_hf_snippet.md` + 10 PNGs. Splice the tables
55
+ and chart embeds into the README "Results" section by hand.
56
+ 3. Update `README.md` by hand: header totals, version table, source table row,
57
+ Contributors row. The document/token totals must equal the sum of the
58
+ per-source `stats.json` files.
59
+ 4. Prepend the release notes to `CHANGELOG.md` under a new `## vX.Y.Z (date)`
60
+ heading. History is append-only — never rewrite earlier releases.
61
+
62
+ ## Do not commit
63
+
64
+ `*.log` (fetch/build logs), `.DS_Store`, `src/__pycache__/`. Only `logs/` is in
65
+ `.gitignore` — root-level logs and OS cruft are not, so check `git status`
66
+ before staging. `*.parquet` is LFS-tracked; commit the pointer, not the blob.
67
+
68
+ ## Known drift / cleanup opportunities
69
+
70
+ - `biblioteka_nauki`, `europeana`, `parlamint_pl` are in `SOURCES` but have no
71
+ `data/` shard (make_docs skips them with `! no stats`). Intentional placeholders
72
+ or stale — confirm before relying on `build_dynaword.py --all`.
73
+ - The global `ADDED` datasheet stamp is a footgun: give datasheets a per-source
74
+ add date (or `custom_datasheet`) before making make_docs regenerate them.
README.md CHANGED
@@ -283,4 +283,181 @@ python3 src/make_docs.py
283
 
284
  ## Results
285
 
286
- The corpus-level phrase-frequency recount for the 16-source v0.2.3 release is pending. The previous 15-source tables were removed to avoid presenting stale analysis as current. Release document/token totals above are summed from the validated per-source parquet statistics.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
 
284
  ## Results
285
 
286
+ ### Corpus phrase frequency (normalized by tokens)
287
+
288
+ Raw counts and token-normalized shares are regenerated from the current parquet files with `src/pattern_frequency_report.py`.
289
+
290
+ - Total token count (tiktoken proxy): **6,881,277,362**
291
+
292
+ | Pattern | Count | Share of all tokens |
293
+ |---|---:|---:|
294
+ | `w roku` | 460,249 | 0.0067% |
295
+ | `klasyfikacji` | 134,093 | 0.0019% |
296
+ | `ustawa` | 598,176 | 0.0087% |
297
+ | `artykuł` | 2,096,271 | 0.0305% |
298
+ | `parlament` | 1,216,808 | 0.0177% |
299
+ | `rozporządzenie` | 1,497,273 | 0.0218% |
300
+ | `w pobliżu` | 89,774 | 0.0013% |
301
+ | `mieszkańców` | 288,911 | 0.0042% |
302
+ | `Dz.U.` | 944,565 | 0.0137% |
303
+
304
+ ### Per-source shares
305
+
306
+ | source | pattern | count | share of source tokens |
307
+ |---|---|---:|---:|
308
+ | `1000_novels` | `w roku` | 659 | 0.00109% |
309
+ | `1000_novels` | `klasyfikacji` | 14 | 0.00002% |
310
+ | `1000_novels` | `ustawa` | 656 | 0.00108% |
311
+ | `1000_novels` | `artykuł` | 729 | 0.00120% |
312
+ | `1000_novels` | `parlament` | 240 | 0.00040% |
313
+ | `1000_novels` | `rozporządzenie` | 65 | 0.00011% |
314
+ | `1000_novels` | `w pobliżu` | 1,262 | 0.00209% |
315
+ | `1000_novels` | `mieszkańców` | 868 | 0.00143% |
316
+ | `1000_novels` | `Dz.U.` | 0 | 0.00000% |
317
+ | `dziennik_ustaw` | `w roku` | 33,096 | 0.00681% |
318
+ | `dziennik_ustaw` | `klasyfikacji` | 10,896 | 0.00224% |
319
+ | `dziennik_ustaw` | `ustawa` | 77,376 | 0.01592% |
320
+ | `dziennik_ustaw` | `artykuł` | 27,773 | 0.00571% |
321
+ | `dziennik_ustaw` | `parlament` | 42,338 | 0.00871% |
322
+ | `dziennik_ustaw` | `rozporządzenie` | 166,383 | 0.03423% |
323
+ | `dziennik_ustaw` | `w pobliżu` | 1,087 | 0.00022% |
324
+ | `dziennik_ustaw` | `mieszkańców` | 8,025 | 0.00165% |
325
+ | `dziennik_ustaw` | `Dz.U.` | 158 | 0.00003% |
326
+ | `eltec_pol` | `w roku` | 108 | 0.00050% |
327
+ | `eltec_pol` | `klasyfikacji` | 1 | 0.00000% |
328
+ | `eltec_pol` | `ustawa` | 153 | 0.00071% |
329
+ | `eltec_pol` | `artykuł` | 173 | 0.00081% |
330
+ | `eltec_pol` | `parlament` | 95 | 0.00044% |
331
+ | `eltec_pol` | `rozporządzenie` | 35 | 0.00016% |
332
+ | `eltec_pol` | `w pobliżu` | 246 | 0.00114% |
333
+ | `eltec_pol` | `mieszkańców` | 214 | 0.00100% |
334
+ | `eltec_pol` | `Dz.U.` | 0 | 0.00000% |
335
+ | `eurlex` | `w roku` | 40,009 | 0.00168% |
336
+ | `eurlex` | `klasyfikacji` | 59,428 | 0.00250% |
337
+ | `eurlex` | `ustawa` | 30,368 | 0.00128% |
338
+ | `eurlex` | `artykuł` | 1,774,958 | 0.07464% |
339
+ | `eurlex` | `parlament` | 780,286 | 0.03281% |
340
+ | `eurlex` | `rozporządzenie` | 1,202,658 | 0.05057% |
341
+ | `eurlex` | `w pobliżu` | 6,088 | 0.00026% |
342
+ | `eurlex` | `mieszkańców` | 9,441 | 0.00040% |
343
+ | `eurlex` | `Dz.U.` | 915,707 | 0.03851% |
344
+ | `european_hplt_v3_pl` | `w roku` | 21,067 | 0.00411% |
345
+ | `european_hplt_v3_pl` | `klasyfikacji` | 3,576 | 0.00070% |
346
+ | `european_hplt_v3_pl` | `ustawa` | 5,754 | 0.00112% |
347
+ | `european_hplt_v3_pl` | `artykuł` | 56,295 | 0.01099% |
348
+ | `european_hplt_v3_pl` | `parlament` | 10,618 | 0.00207% |
349
+ | `european_hplt_v3_pl` | `rozporządzenie` | 2,661 | 0.00052% |
350
+ | `european_hplt_v3_pl` | `w pobliżu` | 9,877 | 0.00193% |
351
+ | `european_hplt_v3_pl` | `mieszkańców` | 33,939 | 0.00662% |
352
+ | `european_hplt_v3_pl` | `Dz.U.` | 1,482 | 0.00029% |
353
+ | `global_voices` | `w roku` | 160 | 0.00431% |
354
+ | `global_voices` | `klasyfikacji` | 5 | 0.00013% |
355
+ | `global_voices` | `ustawa` | 157 | 0.00423% |
356
+ | `global_voices` | `artykuł` | 1,047 | 0.02818% |
357
+ | `global_voices` | `parlament` | 366 | 0.00985% |
358
+ | `global_voices` | `rozporządzenie` | 26 | 0.00070% |
359
+ | `global_voices` | `w pobliżu` | 105 | 0.00283% |
360
+ | `global_voices` | `mieszkańców` | 508 | 0.01367% |
361
+ | `global_voices` | `Dz.U.` | 1 | 0.00003% |
362
+ | `govpl` | `w roku` | 3,372 | 0.00418% |
363
+ | `govpl` | `klasyfikacji` | 526 | 0.00065% |
364
+ | `govpl` | `ustawa` | 4,727 | 0.00586% |
365
+ | `govpl` | `artykuł` | 2,417 | 0.00300% |
366
+ | `govpl` | `parlament` | 3,967 | 0.00492% |
367
+ | `govpl` | `rozporządzenie` | 4,102 | 0.00509% |
368
+ | `govpl` | `w pobliżu` | 892 | 0.00111% |
369
+ | `govpl` | `mieszkańców` | 13,105 | 0.01625% |
370
+ | `govpl` | `Dz.U.` | 3,114 | 0.00386% |
371
+ | `nkjp1m` | `w roku` | 109 | 0.00419% |
372
+ | `nkjp1m` | `klasyfikacji` | 9 | 0.00035% |
373
+ | `nkjp1m` | `ustawa` | 79 | 0.00304% |
374
+ | `nkjp1m` | `artykuł` | 153 | 0.00588% |
375
+ | `nkjp1m` | `parlament` | 216 | 0.00830% |
376
+ | `nkjp1m` | `rozporządzenie` | 20 | 0.00077% |
377
+ | `nkjp1m` | `w pobliżu` | 77 | 0.00296% |
378
+ | `nkjp1m` | `mieszkańców` | 159 | 0.00611% |
379
+ | `nkjp1m` | `Dz.U.` | 2 | 0.00008% |
380
+ | `parliamentary` | `w roku` | 198,192 | 0.01203% |
381
+ | `parliamentary` | `klasyfikacji` | 12,637 | 0.00077% |
382
+ | `parliamentary` | `ustawa` | 459,179 | 0.02788% |
383
+ | `parliamentary` | `artykuł` | 182,038 | 0.01105% |
384
+ | `parliamentary` | `parlament` | 309,695 | 0.01881% |
385
+ | `parliamentary` | `rozporządzenie` | 113,547 | 0.00689% |
386
+ | `parliamentary` | `w pobliżu` | 4,964 | 0.00030% |
387
+ | `parliamentary` | `mieszkańców` | 78,048 | 0.00474% |
388
+ | `parliamentary` | `Dz.U.` | 23,809 | 0.00145% |
389
+ | `wikibooks` | `w roku` | 319 | 0.00205% |
390
+ | `wikibooks` | `klasyfikacji` | 37 | 0.00024% |
391
+ | `wikibooks` | `ustawa` | 165 | 0.00106% |
392
+ | `wikibooks` | `artykuł` | 732 | 0.00470% |
393
+ | `wikibooks` | `parlament` | 283 | 0.00182% |
394
+ | `wikibooks` | `rozporządzenie` | 131 | 0.00084% |
395
+ | `wikibooks` | `w pobliżu` | 125 | 0.00080% |
396
+ | `wikibooks` | `mieszkańców` | 204 | 0.00131% |
397
+ | `wikibooks` | `Dz.U.` | 16 | 0.00010% |
398
+ | `wikinews` | `w roku` | 449 | 0.00370% |
399
+ | `wikinews` | `klasyfikacji` | 639 | 0.00526% |
400
+ | `wikinews` | `ustawa` | 407 | 0.00335% |
401
+ | `wikinews` | `artykuł` | 2,474 | 0.02038% |
402
+ | `wikinews` | `parlament` | 2,530 | 0.02084% |
403
+ | `wikinews` | `rozporządzenie` | 168 | 0.00138% |
404
+ | `wikinews` | `w pobliżu` | 455 | 0.00375% |
405
+ | `wikinews` | `mieszkańców` | 1,014 | 0.00835% |
406
+ | `wikinews` | `Dz.U.` | 27 | 0.00022% |
407
+ | `wikipedia` | `w roku` | 143,023 | 0.02022% |
408
+ | `wikipedia` | `klasyfikacji` | 46,043 | 0.00651% |
409
+ | `wikipedia` | `ustawa` | 9,536 | 0.00135% |
410
+ | `wikipedia` | `artykuł` | 28,165 | 0.00398% |
411
+ | `wikipedia` | `parlament` | 57,863 | 0.00818% |
412
+ | `wikipedia` | `rozporządzenie` | 5,637 | 0.00080% |
413
+ | `wikipedia` | `w pobliżu` | 41,915 | 0.00593% |
414
+ | `wikipedia` | `mieszkańców` | 122,766 | 0.01736% |
415
+ | `wikipedia` | `Dz.U.` | 232 | 0.00003% |
416
+ | `wikiquote` | `w roku` | 608 | 0.00191% |
417
+ | `wikiquote` | `klasyfikacji` | 15 | 0.00005% |
418
+ | `wikiquote` | `ustawa` | 357 | 0.00112% |
419
+ | `wikiquote` | `artykuł` | 606 | 0.00190% |
420
+ | `wikiquote` | `parlament` | 1,271 | 0.00398% |
421
+ | `wikiquote` | `rozporządzenie` | 27 | 0.00008% |
422
+ | `wikiquote` | `w pobliżu` | 207 | 0.00065% |
423
+ | `wikiquote` | `mieszkańców` | 527 | 0.00165% |
424
+ | `wikiquote` | `Dz.U.` | 6 | 0.00002% |
425
+ | `wikisource` | `w roku` | 16,571 | 0.00207% |
426
+ | `wikisource` | `klasyfikacji` | 166 | 0.00002% |
427
+ | `wikisource` | `ustawa` | 8,156 | 0.00102% |
428
+ | `wikisource` | `artykuł` | 16,230 | 0.00202% |
429
+ | `wikisource` | `parlament` | 6,119 | 0.00076% |
430
+ | `wikisource` | `rozporządzenie` | 1,651 | 0.00021% |
431
+ | `wikisource` | `w pobliżu` | 13,921 | 0.00174% |
432
+ | `wikisource` | `mieszkańców` | 14,335 | 0.00179% |
433
+ | `wikisource` | `Dz.U.` | 5 | 0.00000% |
434
+ | `wikivoyage` | `w roku` | 609 | 0.00356% |
435
+ | `wikivoyage` | `klasyfikacji` | 21 | 0.00012% |
436
+ | `wikivoyage` | `ustawa` | 46 | 0.00027% |
437
+ | `wikivoyage` | `artykuł` | 657 | 0.00384% |
438
+ | `wikivoyage` | `parlament` | 249 | 0.00145% |
439
+ | `wikivoyage` | `rozporządzenie` | 34 | 0.00020% |
440
+ | `wikivoyage` | `w pobliżu` | 6,480 | 0.03783% |
441
+ | `wikivoyage` | `mieszkańców` | 4,100 | 0.02394% |
442
+ | `wikivoyage` | `Dz.U.` | 1 | 0.00001% |
443
+ | `wolne_lektury` | `w roku` | 1,898 | 0.00184% |
444
+ | `wolne_lektury` | `klasyfikacji` | 80 | 0.00008% |
445
+ | `wolne_lektury` | `ustawa` | 1,060 | 0.00103% |
446
+ | `wolne_lektury` | `artykuł` | 1,824 | 0.00177% |
447
+ | `wolne_lektury` | `parlament` | 672 | 0.00065% |
448
+ | `wolne_lektury` | `rozporządzenie` | 128 | 0.00012% |
449
+ | `wolne_lektury` | `w pobliżu` | 2,073 | 0.00201% |
450
+ | `wolne_lektury` | `mieszkańców` | 1,658 | 0.00161% |
451
+ | `wolne_lektury` | `Dz.U.` | 5 | 0.00000% |
452
+
453
+ ![Overall pattern counts](artifacts/pattern_frequency_overall.png)
454
+
455
+ ![w roku by source](artifacts/pattern_frequency_w_roku.png)
456
+ ![klasyfikacji by source](artifacts/pattern_frequency_klasyfikacji.png)
457
+ ![ustawa by source](artifacts/pattern_frequency_ustawa.png)
458
+ ![artykuł by source](artifacts/pattern_frequency_artykul.png)
459
+ ![parlament by source](artifacts/pattern_frequency_parlament.png)
460
+ ![rozporządzenie by source](artifacts/pattern_frequency_rozporządzenie.png)
461
+ ![w pobliżu by source](artifacts/pattern_frequency_w_pobliżu.png)
462
+ ![mieszkańców by source](artifacts/pattern_frequency_mieszkańców.png)
463
+ ![Dz.U. by source](artifacts/pattern_frequency_dzu.png)
artifacts/pattern_frequency_artykul.png CHANGED

Git LFS Details

  • SHA256: f980030ed6ceeebcd54a7a5054df5e72ed3221e6080ccf82dc268d6d4fee4149
  • Pointer size: 130 Bytes
  • Size of remote file: 53.5 kB

Git LFS Details

  • SHA256: d989fb8983f829e85d944c902e394d1acec4189270ea3578115b1e084bb44ce8
  • Pointer size: 130 Bytes
  • Size of remote file: 62.2 kB
artifacts/pattern_frequency_dzu.png CHANGED

Git LFS Details

  • SHA256: fb55b01d95a4bff496bb8fa665f2a8866f59aa72584f10f840ad41ee84e25b0c
  • Pointer size: 130 Bytes
  • Size of remote file: 56 kB

Git LFS Details

  • SHA256: a39f680a40193961fdb66f33d959e6ccf440ac65fe9cbd56517f232cea148ef3
  • Pointer size: 130 Bytes
  • Size of remote file: 64.6 kB
artifacts/pattern_frequency_hf_snippet.md CHANGED
@@ -1,18 +1,18 @@
1
  ## Phrase frequency in corpus (token-normalized)
2
 
3
- - Total token count (tiktoken proxy): **6,878,676,161**
4
 
5
  | Pattern | Count | Share of all tokens |
6
  |---|---:|---:|
7
- | `w roku` | 460,140 | 0.0067% |
8
- | `klasyfikacji` | 134,084 | 0.0019% |
9
- | `ustawa` | 598,097 | 0.0087% |
10
- | `artykuł` | 2,096,118 | 0.0305% |
11
- | `parlament` | 1,216,592 | 0.0177% |
12
- | `rozporządzenie` | 1,497,253 | 0.0218% |
13
- | `w pobliżu` | 89,697 | 0.0013% |
14
- | `mieszkańców` | 288,752 | 0.0042% |
15
- | `Dz.U.` | 944,563 | 0.0137% |
16
 
17
  ### Per-source shares
18
 
@@ -81,6 +81,15 @@
81
  | `govpl` | `w pobliżu` | 892 | 0.00111% |
82
  | `govpl` | `mieszkańców` | 13,105 | 0.01625% |
83
  | `govpl` | `Dz.U.` | 3,114 | 0.00386% |
 
 
 
 
 
 
 
 
 
84
  | `parliamentary` | `w roku` | 198,192 | 0.01203% |
85
  | `parliamentary` | `klasyfikacji` | 12,637 | 0.00077% |
86
  | `parliamentary` | `ustawa` | 459,179 | 0.02788% |
 
1
  ## Phrase frequency in corpus (token-normalized)
2
 
3
+ - Total token count (tiktoken proxy): **6,881,277,362**
4
 
5
  | Pattern | Count | Share of all tokens |
6
  |---|---:|---:|
7
+ | `w roku` | 460,249 | 0.0067% |
8
+ | `klasyfikacji` | 134,093 | 0.0019% |
9
+ | `ustawa` | 598,176 | 0.0087% |
10
+ | `artykuł` | 2,096,271 | 0.0305% |
11
+ | `parlament` | 1,216,808 | 0.0177% |
12
+ | `rozporządzenie` | 1,497,273 | 0.0218% |
13
+ | `w pobliżu` | 89,774 | 0.0013% |
14
+ | `mieszkańców` | 288,911 | 0.0042% |
15
+ | `Dz.U.` | 944,565 | 0.0137% |
16
 
17
  ### Per-source shares
18
 
 
81
  | `govpl` | `w pobliżu` | 892 | 0.00111% |
82
  | `govpl` | `mieszkańców` | 13,105 | 0.01625% |
83
  | `govpl` | `Dz.U.` | 3,114 | 0.00386% |
84
+ | `nkjp1m` | `w roku` | 109 | 0.00419% |
85
+ | `nkjp1m` | `klasyfikacji` | 9 | 0.00035% |
86
+ | `nkjp1m` | `ustawa` | 79 | 0.00304% |
87
+ | `nkjp1m` | `artykuł` | 153 | 0.00588% |
88
+ | `nkjp1m` | `parlament` | 216 | 0.00830% |
89
+ | `nkjp1m` | `rozporządzenie` | 20 | 0.00077% |
90
+ | `nkjp1m` | `w pobliżu` | 77 | 0.00296% |
91
+ | `nkjp1m` | `mieszkańców` | 159 | 0.00611% |
92
+ | `nkjp1m` | `Dz.U.` | 2 | 0.00008% |
93
  | `parliamentary` | `w roku` | 198,192 | 0.01203% |
94
  | `parliamentary` | `klasyfikacji` | 12,637 | 0.00077% |
95
  | `parliamentary` | `ustawa` | 459,179 | 0.02788% |
artifacts/pattern_frequency_klasyfikacji.png CHANGED

Git LFS Details

  • SHA256: df83d98e08ef8b6e5a90e953bc6c0d3719925236a2120183b9ea9fa5f8f45261
  • Pointer size: 130 Bytes
  • Size of remote file: 54.7 kB

Git LFS Details

  • SHA256: 1335b851098916c5dea5b50accc1ea3ed7cd65e75dc408d00e48c041d3e3a0e4
  • Pointer size: 130 Bytes
  • Size of remote file: 63.2 kB
artifacts/pattern_frequency_mieszkańców.png CHANGED

Git LFS Details

  • SHA256: 9719b64ff1588c0c7ea3abf74d636939fef2d97ce241e7802d0bdbec22ab6cf1
  • Pointer size: 130 Bytes
  • Size of remote file: 53.3 kB

Git LFS Details

  • SHA256: 862ca15a50925e0c9af34257a2e507b327008216004efa5f4fb8a1fe7d1acf73
  • Pointer size: 130 Bytes
  • Size of remote file: 61.9 kB
artifacts/pattern_frequency_overall.png CHANGED

Git LFS Details

  • SHA256: afeb4d10d132b3656739502dc1ab5cc9a548b38fcd966821d9f7a645b18fdf2e
  • Pointer size: 130 Bytes
  • Size of remote file: 42.2 kB

Git LFS Details

  • SHA256: 861ec86effa9a593df854d5ef675bff5a85262e802c7a6e0dc1a1ffdfed84a96
  • Pointer size: 130 Bytes
  • Size of remote file: 42.2 kB
artifacts/pattern_frequency_parlament.png CHANGED

Git LFS Details

  • SHA256: 7182ca813e5e34540a33ce35cdc7e7150028fd36ad00a75e80058a1cd53619b7
  • Pointer size: 130 Bytes
  • Size of remote file: 54.1 kB

Git LFS Details

  • SHA256: 67f963d281bb0d9a5a449f374886dcd7d50a6b0c0242b0edcfab9adad29dd862
  • Pointer size: 130 Bytes
  • Size of remote file: 62.7 kB
artifacts/pattern_frequency_rozporządzenie.png CHANGED

Git LFS Details

  • SHA256: dfa81f8a1e0f277ea334bd0ccf9cfedd303965f339f01f56c8c1332f7eaccd05
  • Pointer size: 130 Bytes
  • Size of remote file: 52.1 kB

Git LFS Details

  • SHA256: 5eb6042099e15e6aab88516f630351bcbba61f624f9ccc32e87feb771cf66565
  • Pointer size: 130 Bytes
  • Size of remote file: 60.9 kB
artifacts/pattern_frequency_ustawa.png CHANGED

Git LFS Details

  • SHA256: 3847ae1472bf8f57e2158aee907017a8c783cd1aff7009bab074cf5eaef9b6b2
  • Pointer size: 130 Bytes
  • Size of remote file: 52.8 kB

Git LFS Details

  • SHA256: a6c5f61b055525f560111d573c19d00814270ef157e39f548d6abbacf60e09ba
  • Pointer size: 130 Bytes
  • Size of remote file: 61.3 kB
artifacts/pattern_frequency_w_pobliżu.png CHANGED

Git LFS Details

  • SHA256: a3e1daedbd3fc84a33ce8165bcbb4894e01dc5feb227194f05440b4ee1454b1a
  • Pointer size: 130 Bytes
  • Size of remote file: 55.4 kB

Git LFS Details

  • SHA256: df05fd9247ba23d945b08027e4be1fd29ebca866f77e21ff1ff36c92537f6220
  • Pointer size: 130 Bytes
  • Size of remote file: 63.9 kB
artifacts/pattern_frequency_w_roku.png CHANGED

Git LFS Details

  • SHA256: df33a8fc14f059c83f546a295e0a7aa048600cf4844d4791e7dc786039d674f4
  • Pointer size: 130 Bytes
  • Size of remote file: 57.5 kB

Git LFS Details

  • SHA256: d6cad92b1c70a149e79069a50320819ce5cdf2f4c8eb42998955b9ff0902234f
  • Pointer size: 130 Bytes
  • Size of remote file: 66 kB
pattern_frequency_report.md CHANGED
@@ -1,18 +1,18 @@
1
  ## Pattern frequency on corpus
2
 
3
- - total tokens (tiktoken proxy): `6,878,676,161`
4
 
5
  | pattern | count | share of all tokens |
6
  |---|---:|---:|
7
- | `w roku` | 460,140 | 0.0067% |
8
- | `klasyfikacji` | 134,084 | 0.0019% |
9
- | `ustawa` | 598,097 | 0.0087% |
10
- | `artykuł` | 2,096,118 | 0.0305% |
11
- | `parlament` | 1,216,592 | 0.0177% |
12
- | `rozporządzenie` | 1,497,253 | 0.0218% |
13
- | `w pobliżu` | 89,697 | 0.0013% |
14
- | `mieszkańców` | 288,752 | 0.0042% |
15
- | `Dz.U.` | 944,563 | 0.0137% |
16
 
17
  | source | pattern | count | per-token share |
18
  |---|---|---:|---:|
@@ -79,6 +79,15 @@
79
  | govpl | `w pobliżu` | 892 | 0.00111% |
80
  | govpl | `mieszkańców` | 13,105 | 0.01625% |
81
  | govpl | `Dz.U.` | 3,114 | 0.00386% |
 
 
 
 
 
 
 
 
 
82
  | parliamentary | `w roku` | 198,192 | 0.01203% |
83
  | parliamentary | `klasyfikacji` | 12,637 | 0.00077% |
84
  | parliamentary | `ustawa` | 459,179 | 0.02788% |
 
1
  ## Pattern frequency on corpus
2
 
3
+ - total tokens (tiktoken proxy): `6,881,277,362`
4
 
5
  | pattern | count | share of all tokens |
6
  |---|---:|---:|
7
+ | `w roku` | 460,249 | 0.0067% |
8
+ | `klasyfikacji` | 134,093 | 0.0019% |
9
+ | `ustawa` | 598,176 | 0.0087% |
10
+ | `artykuł` | 2,096,271 | 0.0305% |
11
+ | `parlament` | 1,216,808 | 0.0177% |
12
+ | `rozporządzenie` | 1,497,273 | 0.0218% |
13
+ | `w pobliżu` | 89,774 | 0.0013% |
14
+ | `mieszkańców` | 288,911 | 0.0042% |
15
+ | `Dz.U.` | 944,565 | 0.0137% |
16
 
17
  | source | pattern | count | per-token share |
18
  |---|---|---:|---:|
 
79
  | govpl | `w pobliżu` | 892 | 0.00111% |
80
  | govpl | `mieszkańców` | 13,105 | 0.01625% |
81
  | govpl | `Dz.U.` | 3,114 | 0.00386% |
82
+ | nkjp1m | `w roku` | 109 | 0.00419% |
83
+ | nkjp1m | `klasyfikacji` | 9 | 0.00035% |
84
+ | nkjp1m | `ustawa` | 79 | 0.00304% |
85
+ | nkjp1m | `artykuł` | 153 | 0.00588% |
86
+ | nkjp1m | `parlament` | 216 | 0.00830% |
87
+ | nkjp1m | `rozporządzenie` | 20 | 0.00077% |
88
+ | nkjp1m | `w pobliżu` | 77 | 0.00296% |
89
+ | nkjp1m | `mieszkańców` | 159 | 0.00611% |
90
+ | nkjp1m | `Dz.U.` | 2 | 0.00008% |
91
  | parliamentary | `w roku` | 198,192 | 0.01203% |
92
  | parliamentary | `klasyfikacji` | 12,637 | 0.00077% |
93
  | parliamentary | `ustawa` | 459,179 | 0.02788% |
src/make_docs.py CHANGED
@@ -120,7 +120,10 @@ def main():
120
  st = load_stats(name)
121
  if not st:
122
  print(f" ! no stats for {name}"); continue
123
- (ROOT / "data" / name / f"{name}.md").write_text(datasheet(name, cfg, st))
 
 
 
124
  rows.append((name, cfg, st))
125
  tot_doc += st["kept"]; tot_tok += st["tokens"]; tot_chr += st["chars"]
126
  rows.sort(key=lambda r: -r[2]["tokens"])
 
120
  st = load_stats(name)
121
  if not st:
122
  print(f" ! no stats for {name}"); continue
123
+ # Sources with a hand-authored datasheet (rich provenance, per-source add
124
+ # date) opt out of template regeneration to avoid clobbering it.
125
+ if not cfg.get("custom_datasheet"):
126
+ (ROOT / "data" / name / f"{name}.md").write_text(datasheet(name, cfg, st))
127
  rows.append((name, cfg, st))
128
  tot_doc += st["kept"]; tot_tok += st["tokens"]; tot_chr += st["chars"]
129
  rows.sort(key=lambda r: -r[2]["tokens"])
src/sources.py CHANGED
@@ -288,6 +288,41 @@ SOURCES = {
288
  "containment dedup vs existing sources is left to downstream per "
289
  "Dynaword guidelines. Parity with the accepted european-hplt-v1 CC0 basis.",
290
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  }
292
 
293
  ADDED = "2026-07-19"
 
288
  "containment dedup vs existing sources is left to downstream per "
289
  "Dynaword guidelines. Parity with the accepted european-hplt-v1 CC0 basis.",
290
  },
291
+ "1000_novels": {
292
+ "speakleash_key": "1000_novels_corpus_CLARIN-PL",
293
+ "pretty": "1000 Novels Corpus (CLARIN-PL)",
294
+ "license": "CC-BY-4.0",
295
+ "license_spdx": "CC-BY-4.0",
296
+ "traceable": "The 1000 Novels Corpus is released under Creative Commons "
297
+ "Attribution 4.0 International by CLARIN-PL / Wrocław University "
298
+ "of Technology, with attribution to the corpus authors and "
299
+ "maintainers.",
300
+ "upstream": "https://clarin-pl.eu/dspace/handle/11321/312",
301
+ "domain": "literature",
302
+ "created": "unknown",
303
+ "is_ocr": False,
304
+ # Datasheet is contributor-committed (added 2026-07-02); skip regeneration
305
+ # so the global ADDED stamp does not overwrite the real add date.
306
+ "custom_datasheet": True,
307
+ },
308
+ "global_voices": {
309
+ # Data contributed directly (PR #7): no in-repo fetch/build script and a
310
+ # hand-authored datasheet. Registered for the source table + release totals;
311
+ # the datasheet stays contributor-owned via custom_datasheet.
312
+ "file_key": "global_voices",
313
+ "pretty": "Global Voices Polish",
314
+ "license": "CC-BY-3.0",
315
+ "license_spdx": "CC-BY-3.0",
316
+ "traceable": "CC BY 3.0 verified from the article-level license link published "
317
+ "with each retained Global Voices article; each record carries "
318
+ "CC-BY-3.0 metadata and per-document author/translator attribution "
319
+ "in global_voices.attribution.jsonl.",
320
+ "upstream": "https://pl.globalvoices.org/",
321
+ "domain": "civic media, news and public-interest journalism",
322
+ "created": "2008-11-04, 2023-05-24",
323
+ "is_ocr": False,
324
+ "custom_datasheet": True,
325
+ },
326
  }
327
 
328
  ADDED = "2026-07-19"