ppuzio commited on
Commit
f38dfeb
·
1 Parent(s): 0220122

wolne_lektury: author metadata and attribution sidecar (v2#109) (#184)

Browse files

- wolne_lektury: author metadata and attribution sidecar (v2#109) (6b7886e8fc3058055a4aef01879dfbbb322bf786)

artifacts/source_findings.md CHANGED
@@ -3599,3 +3599,74 @@ still marks the 9 as selected; the 2 review drops are in the review table.
3599
 
3600
  **Not established** — the scope of the catalogue's licence statement; whether the individual authors of the 7 kept
3601
  titles are staff or commissioned (the foundation's rights from them are not published); the NERGAL pass (unchanged).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3599
 
3600
  **Not established** — the scope of the catalogue's licence statement; whether the individual authors of the 7 kept
3601
  titles are staff or commissioned (the foundation's rights from them are not published); the NERGAL pass (unchanged).
3602
+
3603
+ ## wolne_lektury — author and title filled, attribution sidecar, edition checks (v2#109)
3604
+
3605
+ **Investigated** — whether every `wolne_lektury` row carries the author, translator and title Wolne Lektury (WL)
3606
+ gives, whether the full licence URL, the credits and the "Książka pochodzi z serwisu Wolne Lektury" line are
3607
+ recorded per document, and what the text and the edition behind it are. Results are in
3608
+ `data/wolne_lektury/wolne_lektury.attribution.jsonl` (6,076 lines, one per row, in Parquet order) and
3609
+ `data/wolne_lektury/wolne_lektury.license-evidence.json`; `src/build_wolne_lektury_attribution.py` writes both.
3610
+
3611
+ **Verdict** — metadata filled and recorded, text unchanged: every row's SHA-1 and a whole-table digest are checked
3612
+ by the builder and by `src/test_attribution_release.py`. Nothing is excluded. The items under "Flagged" need a
3613
+ maintainer decision.
3614
+
3615
+ **Method** — the RDF header of each book was read from the top of its WL XML
3616
+ (`https://wolnelektury.pl/media/book/xml/<slug>.xml`, Range requests) for the 6,065 distinct first slugs of
3617
+ `wolne_lektury.licences.tsv`, plus 4 `/api/` calls (the book list, 5.1 MB, and 3 book records, one for the renamed
3618
+ book). 6,117 requests in all, one at a time at least 1.2 s apart, 41.2 MB, no 403, 429 or bot check; robots.txt
3619
+ (read first) does not disallow these paths. Headers are parsed as XML with DOCTYPE and entities refused. The
3620
+ corrected `author` column is the only change to the Parquet.
3621
+
3622
+ - **Fields** — `author` is 6,039 of 6,076 rows: WL's `dc:creator` names, "Autorzy oryginału: A; Tłumaczenie: T"
3623
+ for a translation (the global_voices form), "Tłumaczenie: T" where WL names a translator and no author (6 rows).
3624
+ The 37 empty rows are WL placeholders ("Autor nieznany" 36, "Praca zbiorowa" 1) with no named translator.
3625
+ Translator 841 rows, original author 835, title 6,076. Original title 0: WL's header has no such field.
3626
+ Pseudonyms and cryptonyms stay as WL writes them; that this is the first-edition form is not established.
3627
+ - **Licences** — public domain 4,559 (no URL), LAL 1.3 1,467, CC BY-SA 3.0 PL 34, 3.0 Unported 5, 4.0 11, each with
3628
+ its full URL and version in `license_url`. WL's own link for all 34 "3.0 PL" documents names the Unported text
3629
+ (`/by-sa/3.0/`); the sidecar keeps WL's link in `wl_license_url` next to ours (the 3.0 PL URL, as the label says).
3630
+ The sidecar covers all 6,076 rows, not only the 1,517 under a licence; the credit line and processing note are on
3631
+ every line.
3632
+ - **Credits** — WL's editor, technical editor, funding and thanks lines and its credit notes are copied per row.
3633
+ WL's "editor" is the person who prepared the digital edition (239 distinct names), not the print edition's editor.
3634
+ - **Normalisation** — in this repository the only step that changes a text is trimming leading and trailing
3635
+ whitespace (`build_dynaword.py`); the length, language, OCR and duplicate gates dropped 0 rows; `clean_wolne_lektury.py`
3636
+ dropped 63 whole documents (ELTeC novels) and 2 (no usable licence), and relabelled the rest. No paragraph is
3637
+ removed anywhere (`paragraphs_removed_without_a_mark` 0). What SpeakLeash did before is not documented. WL's footer
3638
+ is not in any text (`strip_wl_footer` finds none, no text names WL); who removed it is not established.
3639
+ - **Notes and prefaces** — every row was scanned: no WL credit text, no `[przypis` marker. Section headings inside
3640
+ texts: Wstęp 73, Przedmowa 50, Od tłumacza 43, Komentarz 10, Posłowie 10, Słowo wstępne 3, Przypisy 2, Od redakcji,
3641
+ Od wydawców and Uwagi wydawcy 1 each. A hand read of the first and last 450 characters of 40 random rows
3642
+ (`random.Random(109)`) found no WL credit or note and 3 rows with print-edition matter (a publisher's address, a
3643
+ list of editions, an introduction). WL's txt header lines open the text: ISBN in 1,120 rows, "tłum." in 839.
3644
+ - **Edition basis** — WL's print-edition field is `source_edition` (named for 6,032 of 6,076 rows). We take the texts
3645
+ to be WL's modernised versions of those editions; 238 rows keep period spelling by a heuristic (at least 5 old-
3646
+ spelling words per 1,000), so the modernisation is not uniform.
3647
+
3648
+ **Flagged, nothing excluded**
3649
+ - Public-domain rows only (a licensed row has its rightsholder's licence): 2,421 have at least one flag.
3650
+ 1,311 name a print edition published after 1955, 58 a critical or scholarly edition, 229 an introduction, notes or
3651
+ commentary, 802 name an editor or selector, 802 a translator, 1 a National Library edition. Row ids for the first
3652
+ two are in the evidence file. The editors' and translators' death years are in neither WL nor this repository, so
3653
+ editors who died after 1955 cannot be listed.
3654
+ - Precision, from 15 rows drawn by hand for each of the four flags: two patterns were too loose and are removed. "naukow"
3655
+ matched the printing house "Drukarnia Naukowa" (9 rows; critical 67 to 58) and "wyd." matched publishers (editor
3656
+ credit 1,850 to 802). "wybór" still matches a title word, so the editor flag stays broad. The fixed patterns were
3657
+ not sampled again.
3658
+ - 10 rows with a "Komentarz" heading (all LAL 1.3, none names a print edition) hold what we read as WL's own commentary.
3659
+ - 43 rows carry a translator's preface ("Od tłumacza"), 1 an editor's note ("Uwagi wydawcy"); whose they are is not
3660
+ established.
3661
+ - 6 documents (3 under CC BY-SA 3.0 PL) have a translator and no named author; the translator credit is in `author`.
3662
+ - 18 rows contain soft hyphens (U+00AD, 9,296 in all), invisible line-break hints from the digitisation; they are in the
3663
+ released text.
3664
+
3665
+ **Footnote check — not run.** It compares each text with the footnote elements of its WL XML (`<pa>`, `<pe>`, `<pr>`,
3666
+ `<pt>`), so it needs every book's XML: `https://wolnelektury.pl/media/book/xml/<slug>.xml`, 6,065 files, about 350
3667
+ MB (320 to 410, from 30 one-byte range requests), about 2 hours at 1.2 s per request. Only the headers were approved.
3668
+ The texts themselves give no sign either way: none holds a footnote marker of WL's kind (`[przypis`).
3669
+
3670
+ **Not established** — the editors of the print editions and their death years; the first-edition form of any author
3671
+ name; what SpeakLeash changed and who removed the footer; whether WL's export drops author's footnotes in any book;
3672
+ whether `source_edition` is the edition the modernised text actually follows.
data/wolne_lektury/wolne_lektury.attribution.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d415b913c167594451444715e9c92b67003a461ae5df66edb4c63d3e19f8826d
3
+ size 10559895
data/wolne_lektury/wolne_lektury.license-evidence.json ADDED
@@ -0,0 +1,2092 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "built_from_parquet_sha256": "ab0690efa4db1e0c8ea0980f35239d78f52c5fbc0d357c906056eeb4f81d829c",
3
+ "edition_review": {
4
+ "flags": {
5
+ "apparatus": 229,
6
+ "critical": 58,
7
+ "editor_credit": 802,
8
+ "national_library": 1,
9
+ "print_after_1955": 1311,
10
+ "translation": 587,
11
+ "translator_credited": 802
12
+ },
13
+ "ids": {
14
+ "critical": [
15
+ "wolne_lektury_2371630",
16
+ "wolne_lektury_2371662",
17
+ "wolne_lektury_2371769",
18
+ "wolne_lektury_2371774",
19
+ "wolne_lektury_2371777",
20
+ "wolne_lektury_2371947",
21
+ "wolne_lektury_2371962",
22
+ "wolne_lektury_2371972",
23
+ "wolne_lektury_2372018",
24
+ "wolne_lektury_2372100",
25
+ "wolne_lektury_2372614",
26
+ "wolne_lektury_2372615",
27
+ "wolne_lektury_2373199",
28
+ "wolne_lektury_2373209",
29
+ "wolne_lektury_2373214",
30
+ "wolne_lektury_2373261",
31
+ "wolne_lektury_2373265",
32
+ "wolne_lektury_2373869",
33
+ "wolne_lektury_2374187",
34
+ "wolne_lektury_2374244",
35
+ "wolne_lektury_2374367",
36
+ "wolne_lektury_2374517",
37
+ "wolne_lektury_2374621",
38
+ "wolne_lektury_2374624",
39
+ "wolne_lektury_2374625",
40
+ "wolne_lektury_2374631",
41
+ "wolne_lektury_2374633",
42
+ "wolne_lektury_2374636",
43
+ "wolne_lektury_2374639",
44
+ "wolne_lektury_2374646",
45
+ "wolne_lektury_2374660",
46
+ "wolne_lektury_2374661",
47
+ "wolne_lektury_2375198",
48
+ "wolne_lektury_2375478",
49
+ "wolne_lektury_2375565",
50
+ "wolne_lektury_2375694",
51
+ "wolne_lektury_2375699",
52
+ "wolne_lektury_2375741",
53
+ "wolne_lektury_2375742",
54
+ "wolne_lektury_2375857",
55
+ "wolne_lektury_2375866",
56
+ "wolne_lektury_2375894",
57
+ "wolne_lektury_2375896",
58
+ "wolne_lektury_2375957",
59
+ "wolne_lektury_2375968",
60
+ "wolne_lektury_2376037",
61
+ "wolne_lektury_2376439",
62
+ "wolne_lektury_2376521",
63
+ "wolne_lektury_2376526",
64
+ "wolne_lektury_2376560",
65
+ "wolne_lektury_2376918",
66
+ "wolne_lektury_2376921",
67
+ "wolne_lektury_2376945",
68
+ "wolne_lektury_2377230",
69
+ "wolne_lektury_2377239",
70
+ "wolne_lektury_2377240",
71
+ "wolne_lektury_2377601",
72
+ "wolne_lektury_2377613"
73
+ ],
74
+ "print_after_1955": [
75
+ "wolne_lektury_2371603",
76
+ "wolne_lektury_2371606",
77
+ "wolne_lektury_2371609",
78
+ "wolne_lektury_2371610",
79
+ "wolne_lektury_2371611",
80
+ "wolne_lektury_2371612",
81
+ "wolne_lektury_2371613",
82
+ "wolne_lektury_2371614",
83
+ "wolne_lektury_2371615",
84
+ "wolne_lektury_2371621",
85
+ "wolne_lektury_2371623",
86
+ "wolne_lektury_2371624",
87
+ "wolne_lektury_2371625",
88
+ "wolne_lektury_2371627",
89
+ "wolne_lektury_2371631",
90
+ "wolne_lektury_2371632",
91
+ "wolne_lektury_2371642",
92
+ "wolne_lektury_2371643",
93
+ "wolne_lektury_2371647",
94
+ "wolne_lektury_2371648",
95
+ "wolne_lektury_2371661",
96
+ "wolne_lektury_2371692",
97
+ "wolne_lektury_2371698",
98
+ "wolne_lektury_2371699",
99
+ "wolne_lektury_2371700",
100
+ "wolne_lektury_2371701",
101
+ "wolne_lektury_2371702",
102
+ "wolne_lektury_2371703",
103
+ "wolne_lektury_2371704",
104
+ "wolne_lektury_2371705",
105
+ "wolne_lektury_2371707",
106
+ "wolne_lektury_2371708",
107
+ "wolne_lektury_2371773",
108
+ "wolne_lektury_2371780",
109
+ "wolne_lektury_2371781",
110
+ "wolne_lektury_2371783",
111
+ "wolne_lektury_2371786",
112
+ "wolne_lektury_2371787",
113
+ "wolne_lektury_2371788",
114
+ "wolne_lektury_2371790",
115
+ "wolne_lektury_2371795",
116
+ "wolne_lektury_2371796",
117
+ "wolne_lektury_2371798",
118
+ "wolne_lektury_2371799",
119
+ "wolne_lektury_2371800",
120
+ "wolne_lektury_2371801",
121
+ "wolne_lektury_2371821",
122
+ "wolne_lektury_2371892",
123
+ "wolne_lektury_2371893",
124
+ "wolne_lektury_2371944",
125
+ "wolne_lektury_2371946",
126
+ "wolne_lektury_2371948",
127
+ "wolne_lektury_2371949",
128
+ "wolne_lektury_2371955",
129
+ "wolne_lektury_2371957",
130
+ "wolne_lektury_2371966",
131
+ "wolne_lektury_2371977",
132
+ "wolne_lektury_2371982",
133
+ "wolne_lektury_2371984",
134
+ "wolne_lektury_2372005",
135
+ "wolne_lektury_2372006",
136
+ "wolne_lektury_2372007",
137
+ "wolne_lektury_2372016",
138
+ "wolne_lektury_2372025",
139
+ "wolne_lektury_2372029",
140
+ "wolne_lektury_2372033",
141
+ "wolne_lektury_2372081",
142
+ "wolne_lektury_2372085",
143
+ "wolne_lektury_2372092",
144
+ "wolne_lektury_2372099",
145
+ "wolne_lektury_2372103",
146
+ "wolne_lektury_2372106",
147
+ "wolne_lektury_2372111",
148
+ "wolne_lektury_2372119",
149
+ "wolne_lektury_2372134",
150
+ "wolne_lektury_2372135",
151
+ "wolne_lektury_2372154",
152
+ "wolne_lektury_2372156",
153
+ "wolne_lektury_2372164",
154
+ "wolne_lektury_2372174",
155
+ "wolne_lektury_2372181",
156
+ "wolne_lektury_2372186",
157
+ "wolne_lektury_2372195",
158
+ "wolne_lektury_2372197",
159
+ "wolne_lektury_2372199",
160
+ "wolne_lektury_2372227",
161
+ "wolne_lektury_2372228",
162
+ "wolne_lektury_2372312",
163
+ "wolne_lektury_2372319",
164
+ "wolne_lektury_2372322",
165
+ "wolne_lektury_2372323",
166
+ "wolne_lektury_2372324",
167
+ "wolne_lektury_2372325",
168
+ "wolne_lektury_2372326",
169
+ "wolne_lektury_2372327",
170
+ "wolne_lektury_2372328",
171
+ "wolne_lektury_2372329",
172
+ "wolne_lektury_2372330",
173
+ "wolne_lektury_2372331",
174
+ "wolne_lektury_2372332",
175
+ "wolne_lektury_2372333",
176
+ "wolne_lektury_2372334",
177
+ "wolne_lektury_2372335",
178
+ "wolne_lektury_2372336",
179
+ "wolne_lektury_2372337",
180
+ "wolne_lektury_2372338",
181
+ "wolne_lektury_2372339",
182
+ "wolne_lektury_2372340",
183
+ "wolne_lektury_2372341",
184
+ "wolne_lektury_2372342",
185
+ "wolne_lektury_2372343",
186
+ "wolne_lektury_2372344",
187
+ "wolne_lektury_2372346",
188
+ "wolne_lektury_2372347",
189
+ "wolne_lektury_2372348",
190
+ "wolne_lektury_2372349",
191
+ "wolne_lektury_2372350",
192
+ "wolne_lektury_2372351",
193
+ "wolne_lektury_2372352",
194
+ "wolne_lektury_2372353",
195
+ "wolne_lektury_2372354",
196
+ "wolne_lektury_2372355",
197
+ "wolne_lektury_2372356",
198
+ "wolne_lektury_2372357",
199
+ "wolne_lektury_2372358",
200
+ "wolne_lektury_2372359",
201
+ "wolne_lektury_2372360",
202
+ "wolne_lektury_2372361",
203
+ "wolne_lektury_2372362",
204
+ "wolne_lektury_2372363",
205
+ "wolne_lektury_2372364",
206
+ "wolne_lektury_2372365",
207
+ "wolne_lektury_2372366",
208
+ "wolne_lektury_2372367",
209
+ "wolne_lektury_2372368",
210
+ "wolne_lektury_2372369",
211
+ "wolne_lektury_2372370",
212
+ "wolne_lektury_2372371",
213
+ "wolne_lektury_2372372",
214
+ "wolne_lektury_2372373",
215
+ "wolne_lektury_2372374",
216
+ "wolne_lektury_2372375",
217
+ "wolne_lektury_2372376",
218
+ "wolne_lektury_2372377",
219
+ "wolne_lektury_2372378",
220
+ "wolne_lektury_2372379",
221
+ "wolne_lektury_2372380",
222
+ "wolne_lektury_2372381",
223
+ "wolne_lektury_2372382",
224
+ "wolne_lektury_2372383",
225
+ "wolne_lektury_2372384",
226
+ "wolne_lektury_2372385",
227
+ "wolne_lektury_2372386",
228
+ "wolne_lektury_2372387",
229
+ "wolne_lektury_2372388",
230
+ "wolne_lektury_2372389",
231
+ "wolne_lektury_2372390",
232
+ "wolne_lektury_2372391",
233
+ "wolne_lektury_2372393",
234
+ "wolne_lektury_2372394",
235
+ "wolne_lektury_2372395",
236
+ "wolne_lektury_2372396",
237
+ "wolne_lektury_2372397",
238
+ "wolne_lektury_2372398",
239
+ "wolne_lektury_2372399",
240
+ "wolne_lektury_2372400",
241
+ "wolne_lektury_2372401",
242
+ "wolne_lektury_2372402",
243
+ "wolne_lektury_2372403",
244
+ "wolne_lektury_2372404",
245
+ "wolne_lektury_2372405",
246
+ "wolne_lektury_2372406",
247
+ "wolne_lektury_2372407",
248
+ "wolne_lektury_2372408",
249
+ "wolne_lektury_2372409",
250
+ "wolne_lektury_2372410",
251
+ "wolne_lektury_2372411",
252
+ "wolne_lektury_2372412",
253
+ "wolne_lektury_2372413",
254
+ "wolne_lektury_2372414",
255
+ "wolne_lektury_2372415",
256
+ "wolne_lektury_2372416",
257
+ "wolne_lektury_2372417",
258
+ "wolne_lektury_2372418",
259
+ "wolne_lektury_2372419",
260
+ "wolne_lektury_2372420",
261
+ "wolne_lektury_2372421",
262
+ "wolne_lektury_2372422",
263
+ "wolne_lektury_2372423",
264
+ "wolne_lektury_2372424",
265
+ "wolne_lektury_2372425",
266
+ "wolne_lektury_2372426",
267
+ "wolne_lektury_2372427",
268
+ "wolne_lektury_2372428",
269
+ "wolne_lektury_2372431",
270
+ "wolne_lektury_2372432",
271
+ "wolne_lektury_2372433",
272
+ "wolne_lektury_2372434",
273
+ "wolne_lektury_2372435",
274
+ "wolne_lektury_2372436",
275
+ "wolne_lektury_2372437",
276
+ "wolne_lektury_2372438",
277
+ "wolne_lektury_2372439",
278
+ "wolne_lektury_2372440",
279
+ "wolne_lektury_2372441",
280
+ "wolne_lektury_2372442",
281
+ "wolne_lektury_2372443",
282
+ "wolne_lektury_2372444",
283
+ "wolne_lektury_2372445",
284
+ "wolne_lektury_2372446",
285
+ "wolne_lektury_2372447",
286
+ "wolne_lektury_2372448",
287
+ "wolne_lektury_2372449",
288
+ "wolne_lektury_2372450",
289
+ "wolne_lektury_2372451",
290
+ "wolne_lektury_2372452",
291
+ "wolne_lektury_2372453",
292
+ "wolne_lektury_2372454",
293
+ "wolne_lektury_2372455",
294
+ "wolne_lektury_2372456",
295
+ "wolne_lektury_2372457",
296
+ "wolne_lektury_2372458",
297
+ "wolne_lektury_2372459",
298
+ "wolne_lektury_2372461",
299
+ "wolne_lektury_2372463",
300
+ "wolne_lektury_2372464",
301
+ "wolne_lektury_2372465",
302
+ "wolne_lektury_2372466",
303
+ "wolne_lektury_2372467",
304
+ "wolne_lektury_2372468",
305
+ "wolne_lektury_2372469",
306
+ "wolne_lektury_2372470",
307
+ "wolne_lektury_2372471",
308
+ "wolne_lektury_2372474",
309
+ "wolne_lektury_2372475",
310
+ "wolne_lektury_2372476",
311
+ "wolne_lektury_2372477",
312
+ "wolne_lektury_2372478",
313
+ "wolne_lektury_2372479",
314
+ "wolne_lektury_2372480",
315
+ "wolne_lektury_2372481",
316
+ "wolne_lektury_2372482",
317
+ "wolne_lektury_2372483",
318
+ "wolne_lektury_2372484",
319
+ "wolne_lektury_2372485",
320
+ "wolne_lektury_2372486",
321
+ "wolne_lektury_2372487",
322
+ "wolne_lektury_2372488",
323
+ "wolne_lektury_2372489",
324
+ "wolne_lektury_2372490",
325
+ "wolne_lektury_2372491",
326
+ "wolne_lektury_2372492",
327
+ "wolne_lektury_2372493",
328
+ "wolne_lektury_2372494",
329
+ "wolne_lektury_2372495",
330
+ "wolne_lektury_2372496",
331
+ "wolne_lektury_2372497",
332
+ "wolne_lektury_2372498",
333
+ "wolne_lektury_2372499",
334
+ "wolne_lektury_2372501",
335
+ "wolne_lektury_2372502",
336
+ "wolne_lektury_2372503",
337
+ "wolne_lektury_2372504",
338
+ "wolne_lektury_2372505",
339
+ "wolne_lektury_2372507",
340
+ "wolne_lektury_2372508",
341
+ "wolne_lektury_2372509",
342
+ "wolne_lektury_2372510",
343
+ "wolne_lektury_2372513",
344
+ "wolne_lektury_2372514",
345
+ "wolne_lektury_2372515",
346
+ "wolne_lektury_2372549",
347
+ "wolne_lektury_2372564",
348
+ "wolne_lektury_2372566",
349
+ "wolne_lektury_2372570",
350
+ "wolne_lektury_2372571",
351
+ "wolne_lektury_2372608",
352
+ "wolne_lektury_2372612",
353
+ "wolne_lektury_2372616",
354
+ "wolne_lektury_2372733",
355
+ "wolne_lektury_2372734",
356
+ "wolne_lektury_2372735",
357
+ "wolne_lektury_2372736",
358
+ "wolne_lektury_2372738",
359
+ "wolne_lektury_2372739",
360
+ "wolne_lektury_2372740",
361
+ "wolne_lektury_2372741",
362
+ "wolne_lektury_2372742",
363
+ "wolne_lektury_2372744",
364
+ "wolne_lektury_2372746",
365
+ "wolne_lektury_2372747",
366
+ "wolne_lektury_2372770",
367
+ "wolne_lektury_2372771",
368
+ "wolne_lektury_2372772",
369
+ "wolne_lektury_2372777",
370
+ "wolne_lektury_2372779",
371
+ "wolne_lektury_2372781",
372
+ "wolne_lektury_2372786",
373
+ "wolne_lektury_2372799",
374
+ "wolne_lektury_2372800",
375
+ "wolne_lektury_2372847",
376
+ "wolne_lektury_2372849",
377
+ "wolne_lektury_2372885",
378
+ "wolne_lektury_2372931",
379
+ "wolne_lektury_2372934",
380
+ "wolne_lektury_2372940",
381
+ "wolne_lektury_2372944",
382
+ "wolne_lektury_2372950",
383
+ "wolne_lektury_2372953",
384
+ "wolne_lektury_2372957",
385
+ "wolne_lektury_2372958",
386
+ "wolne_lektury_2372963",
387
+ "wolne_lektury_2372988",
388
+ "wolne_lektury_2372989",
389
+ "wolne_lektury_2372990",
390
+ "wolne_lektury_2372995",
391
+ "wolne_lektury_2372998",
392
+ "wolne_lektury_2373005",
393
+ "wolne_lektury_2373006",
394
+ "wolne_lektury_2373008",
395
+ "wolne_lektury_2373044",
396
+ "wolne_lektury_2373046",
397
+ "wolne_lektury_2373052",
398
+ "wolne_lektury_2373055",
399
+ "wolne_lektury_2373056",
400
+ "wolne_lektury_2373057",
401
+ "wolne_lektury_2373058",
402
+ "wolne_lektury_2373064",
403
+ "wolne_lektury_2373065",
404
+ "wolne_lektury_2373071",
405
+ "wolne_lektury_2373110",
406
+ "wolne_lektury_2373119",
407
+ "wolne_lektury_2373120",
408
+ "wolne_lektury_2373121",
409
+ "wolne_lektury_2373122",
410
+ "wolne_lektury_2373123",
411
+ "wolne_lektury_2373124",
412
+ "wolne_lektury_2373125",
413
+ "wolne_lektury_2373126",
414
+ "wolne_lektury_2373127",
415
+ "wolne_lektury_2373128",
416
+ "wolne_lektury_2373129",
417
+ "wolne_lektury_2373130",
418
+ "wolne_lektury_2373132",
419
+ "wolne_lektury_2373138",
420
+ "wolne_lektury_2373142",
421
+ "wolne_lektury_2373143",
422
+ "wolne_lektury_2373144",
423
+ "wolne_lektury_2373145",
424
+ "wolne_lektury_2373146",
425
+ "wolne_lektury_2373147",
426
+ "wolne_lektury_2373159",
427
+ "wolne_lektury_2373166",
428
+ "wolne_lektury_2373167",
429
+ "wolne_lektury_2373171",
430
+ "wolne_lektury_2373178",
431
+ "wolne_lektury_2373179",
432
+ "wolne_lektury_2373180",
433
+ "wolne_lektury_2373181",
434
+ "wolne_lektury_2373185",
435
+ "wolne_lektury_2373189",
436
+ "wolne_lektury_2373191",
437
+ "wolne_lektury_2373195",
438
+ "wolne_lektury_2373198",
439
+ "wolne_lektury_2373206",
440
+ "wolne_lektury_2373207",
441
+ "wolne_lektury_2373210",
442
+ "wolne_lektury_2373260",
443
+ "wolne_lektury_2373270",
444
+ "wolne_lektury_2373275",
445
+ "wolne_lektury_2373294",
446
+ "wolne_lektury_2373295",
447
+ "wolne_lektury_2373296",
448
+ "wolne_lektury_2373297",
449
+ "wolne_lektury_2373298",
450
+ "wolne_lektury_2373299",
451
+ "wolne_lektury_2373300",
452
+ "wolne_lektury_2373301",
453
+ "wolne_lektury_2373302",
454
+ "wolne_lektury_2373303",
455
+ "wolne_lektury_2373304",
456
+ "wolne_lektury_2373305",
457
+ "wolne_lektury_2373309",
458
+ "wolne_lektury_2373314",
459
+ "wolne_lektury_2373385",
460
+ "wolne_lektury_2373392",
461
+ "wolne_lektury_2373394",
462
+ "wolne_lektury_2373431",
463
+ "wolne_lektury_2373433",
464
+ "wolne_lektury_2373444",
465
+ "wolne_lektury_2373448",
466
+ "wolne_lektury_2373449",
467
+ "wolne_lektury_2373479",
468
+ "wolne_lektury_2373480",
469
+ "wolne_lektury_2373482",
470
+ "wolne_lektury_2373483",
471
+ "wolne_lektury_2373564",
472
+ "wolne_lektury_2373565",
473
+ "wolne_lektury_2373566",
474
+ "wolne_lektury_2373567",
475
+ "wolne_lektury_2373568",
476
+ "wolne_lektury_2373569",
477
+ "wolne_lektury_2373570",
478
+ "wolne_lektury_2373571",
479
+ "wolne_lektury_2373572",
480
+ "wolne_lektury_2373573",
481
+ "wolne_lektury_2373574",
482
+ "wolne_lektury_2373575",
483
+ "wolne_lektury_2373576",
484
+ "wolne_lektury_2373577",
485
+ "wolne_lektury_2373578",
486
+ "wolne_lektury_2373579",
487
+ "wolne_lektury_2373580",
488
+ "wolne_lektury_2373581",
489
+ "wolne_lektury_2373582",
490
+ "wolne_lektury_2373583",
491
+ "wolne_lektury_2373584",
492
+ "wolne_lektury_2373585",
493
+ "wolne_lektury_2373586",
494
+ "wolne_lektury_2373587",
495
+ "wolne_lektury_2373588",
496
+ "wolne_lektury_2373589",
497
+ "wolne_lektury_2373590",
498
+ "wolne_lektury_2373591",
499
+ "wolne_lektury_2373592",
500
+ "wolne_lektury_2373593",
501
+ "wolne_lektury_2373594",
502
+ "wolne_lektury_2373595",
503
+ "wolne_lektury_2373596",
504
+ "wolne_lektury_2373597",
505
+ "wolne_lektury_2373598",
506
+ "wolne_lektury_2373599",
507
+ "wolne_lektury_2373600",
508
+ "wolne_lektury_2373601",
509
+ "wolne_lektury_2373602",
510
+ "wolne_lektury_2373603",
511
+ "wolne_lektury_2373604",
512
+ "wolne_lektury_2373605",
513
+ "wolne_lektury_2373606",
514
+ "wolne_lektury_2373607",
515
+ "wolne_lektury_2373608",
516
+ "wolne_lektury_2373609",
517
+ "wolne_lektury_2373610",
518
+ "wolne_lektury_2373611",
519
+ "wolne_lektury_2373612",
520
+ "wolne_lektury_2373613",
521
+ "wolne_lektury_2373614",
522
+ "wolne_lektury_2373615",
523
+ "wolne_lektury_2373616",
524
+ "wolne_lektury_2373617",
525
+ "wolne_lektury_2373618",
526
+ "wolne_lektury_2373619",
527
+ "wolne_lektury_2373620",
528
+ "wolne_lektury_2373621",
529
+ "wolne_lektury_2373622",
530
+ "wolne_lektury_2373623",
531
+ "wolne_lektury_2373624",
532
+ "wolne_lektury_2373625",
533
+ "wolne_lektury_2373626",
534
+ "wolne_lektury_2373627",
535
+ "wolne_lektury_2373628",
536
+ "wolne_lektury_2373629",
537
+ "wolne_lektury_2373630",
538
+ "wolne_lektury_2373631",
539
+ "wolne_lektury_2373632",
540
+ "wolne_lektury_2373633",
541
+ "wolne_lektury_2373634",
542
+ "wolne_lektury_2373635",
543
+ "wolne_lektury_2373636",
544
+ "wolne_lektury_2373637",
545
+ "wolne_lektury_2373638",
546
+ "wolne_lektury_2373639",
547
+ "wolne_lektury_2373640",
548
+ "wolne_lektury_2373641",
549
+ "wolne_lektury_2373642",
550
+ "wolne_lektury_2373643",
551
+ "wolne_lektury_2373644",
552
+ "wolne_lektury_2373645",
553
+ "wolne_lektury_2373646",
554
+ "wolne_lektury_2373647",
555
+ "wolne_lektury_2373648",
556
+ "wolne_lektury_2373649",
557
+ "wolne_lektury_2373650",
558
+ "wolne_lektury_2373651",
559
+ "wolne_lektury_2373652",
560
+ "wolne_lektury_2373653",
561
+ "wolne_lektury_2373654",
562
+ "wolne_lektury_2373655",
563
+ "wolne_lektury_2373656",
564
+ "wolne_lektury_2373657",
565
+ "wolne_lektury_2373658",
566
+ "wolne_lektury_2373659",
567
+ "wolne_lektury_2373660",
568
+ "wolne_lektury_2373661",
569
+ "wolne_lektury_2373662",
570
+ "wolne_lektury_2373663",
571
+ "wolne_lektury_2373664",
572
+ "wolne_lektury_2373665",
573
+ "wolne_lektury_2373666",
574
+ "wolne_lektury_2373667",
575
+ "wolne_lektury_2373668",
576
+ "wolne_lektury_2373669",
577
+ "wolne_lektury_2373670",
578
+ "wolne_lektury_2373671",
579
+ "wolne_lektury_2373672",
580
+ "wolne_lektury_2373673",
581
+ "wolne_lektury_2373674",
582
+ "wolne_lektury_2373675",
583
+ "wolne_lektury_2373676",
584
+ "wolne_lektury_2373677",
585
+ "wolne_lektury_2373678",
586
+ "wolne_lektury_2373679",
587
+ "wolne_lektury_2373680",
588
+ "wolne_lektury_2373681",
589
+ "wolne_lektury_2373682",
590
+ "wolne_lektury_2373683",
591
+ "wolne_lektury_2373684",
592
+ "wolne_lektury_2373685",
593
+ "wolne_lektury_2373686",
594
+ "wolne_lektury_2373687",
595
+ "wolne_lektury_2373688",
596
+ "wolne_lektury_2373689",
597
+ "wolne_lektury_2373690",
598
+ "wolne_lektury_2373691",
599
+ "wolne_lektury_2373692",
600
+ "wolne_lektury_2373693",
601
+ "wolne_lektury_2373694",
602
+ "wolne_lektury_2373695",
603
+ "wolne_lektury_2373696",
604
+ "wolne_lektury_2373697",
605
+ "wolne_lektury_2373698",
606
+ "wolne_lektury_2373699",
607
+ "wolne_lektury_2373700",
608
+ "wolne_lektury_2373701",
609
+ "wolne_lektury_2373702",
610
+ "wolne_lektury_2373703",
611
+ "wolne_lektury_2373704",
612
+ "wolne_lektury_2373705",
613
+ "wolne_lektury_2373706",
614
+ "wolne_lektury_2373707",
615
+ "wolne_lektury_2373708",
616
+ "wolne_lektury_2373709",
617
+ "wolne_lektury_2373710",
618
+ "wolne_lektury_2373711",
619
+ "wolne_lektury_2373712",
620
+ "wolne_lektury_2373713",
621
+ "wolne_lektury_2373714",
622
+ "wolne_lektury_2373715",
623
+ "wolne_lektury_2373716",
624
+ "wolne_lektury_2373717",
625
+ "wolne_lektury_2373718",
626
+ "wolne_lektury_2373719",
627
+ "wolne_lektury_2373720",
628
+ "wolne_lektury_2373721",
629
+ "wolne_lektury_2373722",
630
+ "wolne_lektury_2373723",
631
+ "wolne_lektury_2373724",
632
+ "wolne_lektury_2373725",
633
+ "wolne_lektury_2373726",
634
+ "wolne_lektury_2373727",
635
+ "wolne_lektury_2373728",
636
+ "wolne_lektury_2373729",
637
+ "wolne_lektury_2373730",
638
+ "wolne_lektury_2373731",
639
+ "wolne_lektury_2373732",
640
+ "wolne_lektury_2373733",
641
+ "wolne_lektury_2373734",
642
+ "wolne_lektury_2373735",
643
+ "wolne_lektury_2373736",
644
+ "wolne_lektury_2373737",
645
+ "wolne_lektury_2373738",
646
+ "wolne_lektury_2373739",
647
+ "wolne_lektury_2373740",
648
+ "wolne_lektury_2373741",
649
+ "wolne_lektury_2373742",
650
+ "wolne_lektury_2373743",
651
+ "wolne_lektury_2373744",
652
+ "wolne_lektury_2373745",
653
+ "wolne_lektury_2373746",
654
+ "wolne_lektury_2373747",
655
+ "wolne_lektury_2373748",
656
+ "wolne_lektury_2373749",
657
+ "wolne_lektury_2373750",
658
+ "wolne_lektury_2373751",
659
+ "wolne_lektury_2373752",
660
+ "wolne_lektury_2373753",
661
+ "wolne_lektury_2373754",
662
+ "wolne_lektury_2373755",
663
+ "wolne_lektury_2373756",
664
+ "wolne_lektury_2373757",
665
+ "wolne_lektury_2373758",
666
+ "wolne_lektury_2373759",
667
+ "wolne_lektury_2373760",
668
+ "wolne_lektury_2373761",
669
+ "wolne_lektury_2373762",
670
+ "wolne_lektury_2373763",
671
+ "wolne_lektury_2373764",
672
+ "wolne_lektury_2373765",
673
+ "wolne_lektury_2373766",
674
+ "wolne_lektury_2373767",
675
+ "wolne_lektury_2373768",
676
+ "wolne_lektury_2373769",
677
+ "wolne_lektury_2373770",
678
+ "wolne_lektury_2373771",
679
+ "wolne_lektury_2373772",
680
+ "wolne_lektury_2373773",
681
+ "wolne_lektury_2373774",
682
+ "wolne_lektury_2373775",
683
+ "wolne_lektury_2373776",
684
+ "wolne_lektury_2373777",
685
+ "wolne_lektury_2373778",
686
+ "wolne_lektury_2373779",
687
+ "wolne_lektury_2373780",
688
+ "wolne_lektury_2373781",
689
+ "wolne_lektury_2373782",
690
+ "wolne_lektury_2373783",
691
+ "wolne_lektury_2373784",
692
+ "wolne_lektury_2373785",
693
+ "wolne_lektury_2373786",
694
+ "wolne_lektury_2373787",
695
+ "wolne_lektury_2373788",
696
+ "wolne_lektury_2373789",
697
+ "wolne_lektury_2373790",
698
+ "wolne_lektury_2373791",
699
+ "wolne_lektury_2373792",
700
+ "wolne_lektury_2373793",
701
+ "wolne_lektury_2373794",
702
+ "wolne_lektury_2373795",
703
+ "wolne_lektury_2373796",
704
+ "wolne_lektury_2373797",
705
+ "wolne_lektury_2373798",
706
+ "wolne_lektury_2373799",
707
+ "wolne_lektury_2373800",
708
+ "wolne_lektury_2373801",
709
+ "wolne_lektury_2373802",
710
+ "wolne_lektury_2373803",
711
+ "wolne_lektury_2373804",
712
+ "wolne_lektury_2373805",
713
+ "wolne_lektury_2373806",
714
+ "wolne_lektury_2373807",
715
+ "wolne_lektury_2373808",
716
+ "wolne_lektury_2373809",
717
+ "wolne_lektury_2373810",
718
+ "wolne_lektury_2373811",
719
+ "wolne_lektury_2373820",
720
+ "wolne_lektury_2373821",
721
+ "wolne_lektury_2373822",
722
+ "wolne_lektury_2373823",
723
+ "wolne_lektury_2373824",
724
+ "wolne_lektury_2373825",
725
+ "wolne_lektury_2373826",
726
+ "wolne_lektury_2373827",
727
+ "wolne_lektury_2373828",
728
+ "wolne_lektury_2373829",
729
+ "wolne_lektury_2373830",
730
+ "wolne_lektury_2373831",
731
+ "wolne_lektury_2373832",
732
+ "wolne_lektury_2373833",
733
+ "wolne_lektury_2373834",
734
+ "wolne_lektury_2373835",
735
+ "wolne_lektury_2373836",
736
+ "wolne_lektury_2373837",
737
+ "wolne_lektury_2373838",
738
+ "wolne_lektury_2373839",
739
+ "wolne_lektury_2373840",
740
+ "wolne_lektury_2373841",
741
+ "wolne_lektury_2373842",
742
+ "wolne_lektury_2373843",
743
+ "wolne_lektury_2373844",
744
+ "wolne_lektury_2373845",
745
+ "wolne_lektury_2373846",
746
+ "wolne_lektury_2373847",
747
+ "wolne_lektury_2373848",
748
+ "wolne_lektury_2373849",
749
+ "wolne_lektury_2373850",
750
+ "wolne_lektury_2373851",
751
+ "wolne_lektury_2373852",
752
+ "wolne_lektury_2373853",
753
+ "wolne_lektury_2373854",
754
+ "wolne_lektury_2373855",
755
+ "wolne_lektury_2373856",
756
+ "wolne_lektury_2373857",
757
+ "wolne_lektury_2373858",
758
+ "wolne_lektury_2373859",
759
+ "wolne_lektury_2373860",
760
+ "wolne_lektury_2373861",
761
+ "wolne_lektury_2373877",
762
+ "wolne_lektury_2373879",
763
+ "wolne_lektury_2373885",
764
+ "wolne_lektury_2373886",
765
+ "wolne_lektury_2373887",
766
+ "wolne_lektury_2373891",
767
+ "wolne_lektury_2373897",
768
+ "wolne_lektury_2373899",
769
+ "wolne_lektury_2373900",
770
+ "wolne_lektury_2373910",
771
+ "wolne_lektury_2373913",
772
+ "wolne_lektury_2373914",
773
+ "wolne_lektury_2373915",
774
+ "wolne_lektury_2373916",
775
+ "wolne_lektury_2373917",
776
+ "wolne_lektury_2373918",
777
+ "wolne_lektury_2373919",
778
+ "wolne_lektury_2373920",
779
+ "wolne_lektury_2373923",
780
+ "wolne_lektury_2373929",
781
+ "wolne_lektury_2373932",
782
+ "wolne_lektury_2373935",
783
+ "wolne_lektury_2373937",
784
+ "wolne_lektury_2373939",
785
+ "wolne_lektury_2373940",
786
+ "wolne_lektury_2373941",
787
+ "wolne_lektury_2373942",
788
+ "wolne_lektury_2373943",
789
+ "wolne_lektury_2373944",
790
+ "wolne_lektury_2373945",
791
+ "wolne_lektury_2373946",
792
+ "wolne_lektury_2373947",
793
+ "wolne_lektury_2373949",
794
+ "wolne_lektury_2373950",
795
+ "wolne_lektury_2373951",
796
+ "wolne_lektury_2373952",
797
+ "wolne_lektury_2373954",
798
+ "wolne_lektury_2373955",
799
+ "wolne_lektury_2373958",
800
+ "wolne_lektury_2373960",
801
+ "wolne_lektury_2373961",
802
+ "wolne_lektury_2373962",
803
+ "wolne_lektury_2373963",
804
+ "wolne_lektury_2373964",
805
+ "wolne_lektury_2373965",
806
+ "wolne_lektury_2373966",
807
+ "wolne_lektury_2373967",
808
+ "wolne_lektury_2373968",
809
+ "wolne_lektury_2373969",
810
+ "wolne_lektury_2373970",
811
+ "wolne_lektury_2373971",
812
+ "wolne_lektury_2373972",
813
+ "wolne_lektury_2373973",
814
+ "wolne_lektury_2373974",
815
+ "wolne_lektury_2373975",
816
+ "wolne_lektury_2373976",
817
+ "wolne_lektury_2373977",
818
+ "wolne_lektury_2373978",
819
+ "wolne_lektury_2373986",
820
+ "wolne_lektury_2373994",
821
+ "wolne_lektury_2374120",
822
+ "wolne_lektury_2374133",
823
+ "wolne_lektury_2374134",
824
+ "wolne_lektury_2374135",
825
+ "wolne_lektury_2374136",
826
+ "wolne_lektury_2374137",
827
+ "wolne_lektury_2374139",
828
+ "wolne_lektury_2374140",
829
+ "wolne_lektury_2374141",
830
+ "wolne_lektury_2374142",
831
+ "wolne_lektury_2374143",
832
+ "wolne_lektury_2374150",
833
+ "wolne_lektury_2374151",
834
+ "wolne_lektury_2374153",
835
+ "wolne_lektury_2374154",
836
+ "wolne_lektury_2374155",
837
+ "wolne_lektury_2374156",
838
+ "wolne_lektury_2374158",
839
+ "wolne_lektury_2374159",
840
+ "wolne_lektury_2374182",
841
+ "wolne_lektury_2374189",
842
+ "wolne_lektury_2374243",
843
+ "wolne_lektury_2374265",
844
+ "wolne_lektury_2374279",
845
+ "wolne_lektury_2374305",
846
+ "wolne_lektury_2374345",
847
+ "wolne_lektury_2374354",
848
+ "wolne_lektury_2374370",
849
+ "wolne_lektury_2374371",
850
+ "wolne_lektury_2374402",
851
+ "wolne_lektury_2374417",
852
+ "wolne_lektury_2374429",
853
+ "wolne_lektury_2374430",
854
+ "wolne_lektury_2374436",
855
+ "wolne_lektury_2374444",
856
+ "wolne_lektury_2374525",
857
+ "wolne_lektury_2374526",
858
+ "wolne_lektury_2374527",
859
+ "wolne_lektury_2374528",
860
+ "wolne_lektury_2374530",
861
+ "wolne_lektury_2374532",
862
+ "wolne_lektury_2374533",
863
+ "wolne_lektury_2374534",
864
+ "wolne_lektury_2374535",
865
+ "wolne_lektury_2374536",
866
+ "wolne_lektury_2374543",
867
+ "wolne_lektury_2374544",
868
+ "wolne_lektury_2374579",
869
+ "wolne_lektury_2374610",
870
+ "wolne_lektury_2374611",
871
+ "wolne_lektury_2374613",
872
+ "wolne_lektury_2374615",
873
+ "wolne_lektury_2374616",
874
+ "wolne_lektury_2374617",
875
+ "wolne_lektury_2374619",
876
+ "wolne_lektury_2374620",
877
+ "wolne_lektury_2374634",
878
+ "wolne_lektury_2374641",
879
+ "wolne_lektury_2374645",
880
+ "wolne_lektury_2374657",
881
+ "wolne_lektury_2374666",
882
+ "wolne_lektury_2374671",
883
+ "wolne_lektury_2374672",
884
+ "wolne_lektury_2374701",
885
+ "wolne_lektury_2374705",
886
+ "wolne_lektury_2374707",
887
+ "wolne_lektury_2374708",
888
+ "wolne_lektury_2374709",
889
+ "wolne_lektury_2374711",
890
+ "wolne_lektury_2374719",
891
+ "wolne_lektury_2374723",
892
+ "wolne_lektury_2374802",
893
+ "wolne_lektury_2374809",
894
+ "wolne_lektury_2374844",
895
+ "wolne_lektury_2374845",
896
+ "wolne_lektury_2374846",
897
+ "wolne_lektury_2374847",
898
+ "wolne_lektury_2374849",
899
+ "wolne_lektury_2374850",
900
+ "wolne_lektury_2374877",
901
+ "wolne_lektury_2374880",
902
+ "wolne_lektury_2374892",
903
+ "wolne_lektury_2374896",
904
+ "wolne_lektury_2374904",
905
+ "wolne_lektury_2374905",
906
+ "wolne_lektury_2374906",
907
+ "wolne_lektury_2374911",
908
+ "wolne_lektury_2374913",
909
+ "wolne_lektury_2374923",
910
+ "wolne_lektury_2374926",
911
+ "wolne_lektury_2375025",
912
+ "wolne_lektury_2375028",
913
+ "wolne_lektury_2375029",
914
+ "wolne_lektury_2375034",
915
+ "wolne_lektury_2375035",
916
+ "wolne_lektury_2375036",
917
+ "wolne_lektury_2375037",
918
+ "wolne_lektury_2375038",
919
+ "wolne_lektury_2375039",
920
+ "wolne_lektury_2375040",
921
+ "wolne_lektury_2375058",
922
+ "wolne_lektury_2375065",
923
+ "wolne_lektury_2375080",
924
+ "wolne_lektury_2375091",
925
+ "wolne_lektury_2375092",
926
+ "wolne_lektury_2375093",
927
+ "wolne_lektury_2375095",
928
+ "wolne_lektury_2375097",
929
+ "wolne_lektury_2375098",
930
+ "wolne_lektury_2375099",
931
+ "wolne_lektury_2375176",
932
+ "wolne_lektury_2375177",
933
+ "wolne_lektury_2375178",
934
+ "wolne_lektury_2375188",
935
+ "wolne_lektury_2375191",
936
+ "wolne_lektury_2375196",
937
+ "wolne_lektury_2375197",
938
+ "wolne_lektury_2375207",
939
+ "wolne_lektury_2375208",
940
+ "wolne_lektury_2375213",
941
+ "wolne_lektury_2375220",
942
+ "wolne_lektury_2375221",
943
+ "wolne_lektury_2375229",
944
+ "wolne_lektury_2375230",
945
+ "wolne_lektury_2375311",
946
+ "wolne_lektury_2375312",
947
+ "wolne_lektury_2375313",
948
+ "wolne_lektury_2375325",
949
+ "wolne_lektury_2375327",
950
+ "wolne_lektury_2375342",
951
+ "wolne_lektury_2375343",
952
+ "wolne_lektury_2375344",
953
+ "wolne_lektury_2375345",
954
+ "wolne_lektury_2375346",
955
+ "wolne_lektury_2375347",
956
+ "wolne_lektury_2375348",
957
+ "wolne_lektury_2375349",
958
+ "wolne_lektury_2375350",
959
+ "wolne_lektury_2375351",
960
+ "wolne_lektury_2375352",
961
+ "wolne_lektury_2375353",
962
+ "wolne_lektury_2375358",
963
+ "wolne_lektury_2375359",
964
+ "wolne_lektury_2375366",
965
+ "wolne_lektury_2375380",
966
+ "wolne_lektury_2375447",
967
+ "wolne_lektury_2375471",
968
+ "wolne_lektury_2375472",
969
+ "wolne_lektury_2375473",
970
+ "wolne_lektury_2375475",
971
+ "wolne_lektury_2375476",
972
+ "wolne_lektury_2375479",
973
+ "wolne_lektury_2375506",
974
+ "wolne_lektury_2375533",
975
+ "wolne_lektury_2375536",
976
+ "wolne_lektury_2375538",
977
+ "wolne_lektury_2375539",
978
+ "wolne_lektury_2375540",
979
+ "wolne_lektury_2375541",
980
+ "wolne_lektury_2375542",
981
+ "wolne_lektury_2375543",
982
+ "wolne_lektury_2375544",
983
+ "wolne_lektury_2375545",
984
+ "wolne_lektury_2375546",
985
+ "wolne_lektury_2375547",
986
+ "wolne_lektury_2375548",
987
+ "wolne_lektury_2375549",
988
+ "wolne_lektury_2375550",
989
+ "wolne_lektury_2375551",
990
+ "wolne_lektury_2375552",
991
+ "wolne_lektury_2375553",
992
+ "wolne_lektury_2375556",
993
+ "wolne_lektury_2375566",
994
+ "wolne_lektury_2375567",
995
+ "wolne_lektury_2375570",
996
+ "wolne_lektury_2375715",
997
+ "wolne_lektury_2375717",
998
+ "wolne_lektury_2375740",
999
+ "wolne_lektury_2375744",
1000
+ "wolne_lektury_2375750",
1001
+ "wolne_lektury_2375751",
1002
+ "wolne_lektury_2375766",
1003
+ "wolne_lektury_2375768",
1004
+ "wolne_lektury_2375770",
1005
+ "wolne_lektury_2375771",
1006
+ "wolne_lektury_2375772",
1007
+ "wolne_lektury_2375773",
1008
+ "wolne_lektury_2375774",
1009
+ "wolne_lektury_2375775",
1010
+ "wolne_lektury_2375776",
1011
+ "wolne_lektury_2375777",
1012
+ "wolne_lektury_2375778",
1013
+ "wolne_lektury_2375779",
1014
+ "wolne_lektury_2375780",
1015
+ "wolne_lektury_2375781",
1016
+ "wolne_lektury_2375782",
1017
+ "wolne_lektury_2375783",
1018
+ "wolne_lektury_2375784",
1019
+ "wolne_lektury_2375785",
1020
+ "wolne_lektury_2375786",
1021
+ "wolne_lektury_2375787",
1022
+ "wolne_lektury_2375788",
1023
+ "wolne_lektury_2375789",
1024
+ "wolne_lektury_2375790",
1025
+ "wolne_lektury_2375791",
1026
+ "wolne_lektury_2375792",
1027
+ "wolne_lektury_2375793",
1028
+ "wolne_lektury_2375794",
1029
+ "wolne_lektury_2375848",
1030
+ "wolne_lektury_2375854",
1031
+ "wolne_lektury_2375867",
1032
+ "wolne_lektury_2375885",
1033
+ "wolne_lektury_2375911",
1034
+ "wolne_lektury_2375923",
1035
+ "wolne_lektury_2375924",
1036
+ "wolne_lektury_2375947",
1037
+ "wolne_lektury_2375948",
1038
+ "wolne_lektury_2375952",
1039
+ "wolne_lektury_2375959",
1040
+ "wolne_lektury_2375970",
1041
+ "wolne_lektury_2376009",
1042
+ "wolne_lektury_2376010",
1043
+ "wolne_lektury_2376017",
1044
+ "wolne_lektury_2376019",
1045
+ "wolne_lektury_2376097",
1046
+ "wolne_lektury_2376098",
1047
+ "wolne_lektury_2376103",
1048
+ "wolne_lektury_2376104",
1049
+ "wolne_lektury_2376105",
1050
+ "wolne_lektury_2376106",
1051
+ "wolne_lektury_2376107",
1052
+ "wolne_lektury_2376108",
1053
+ "wolne_lektury_2376109",
1054
+ "wolne_lektury_2376110",
1055
+ "wolne_lektury_2376111",
1056
+ "wolne_lektury_2376112",
1057
+ "wolne_lektury_2376113",
1058
+ "wolne_lektury_2376114",
1059
+ "wolne_lektury_2376115",
1060
+ "wolne_lektury_2376117",
1061
+ "wolne_lektury_2376118",
1062
+ "wolne_lektury_2376119",
1063
+ "wolne_lektury_2376120",
1064
+ "wolne_lektury_2376121",
1065
+ "wolne_lektury_2376122",
1066
+ "wolne_lektury_2376123",
1067
+ "wolne_lektury_2376125",
1068
+ "wolne_lektury_2376126",
1069
+ "wolne_lektury_2376127",
1070
+ "wolne_lektury_2376128",
1071
+ "wolne_lektury_2376129",
1072
+ "wolne_lektury_2376130",
1073
+ "wolne_lektury_2376131",
1074
+ "wolne_lektury_2376132",
1075
+ "wolne_lektury_2376133",
1076
+ "wolne_lektury_2376134",
1077
+ "wolne_lektury_2376135",
1078
+ "wolne_lektury_2376136",
1079
+ "wolne_lektury_2376137",
1080
+ "wolne_lektury_2376138",
1081
+ "wolne_lektury_2376139",
1082
+ "wolne_lektury_2376141",
1083
+ "wolne_lektury_2376142",
1084
+ "wolne_lektury_2376143",
1085
+ "wolne_lektury_2376144",
1086
+ "wolne_lektury_2376145",
1087
+ "wolne_lektury_2376146",
1088
+ "wolne_lektury_2376147",
1089
+ "wolne_lektury_2376148",
1090
+ "wolne_lektury_2376149",
1091
+ "wolne_lektury_2376150",
1092
+ "wolne_lektury_2376151",
1093
+ "wolne_lektury_2376152",
1094
+ "wolne_lektury_2376153",
1095
+ "wolne_lektury_2376154",
1096
+ "wolne_lektury_2376155",
1097
+ "wolne_lektury_2376156",
1098
+ "wolne_lektury_2376157",
1099
+ "wolne_lektury_2376158",
1100
+ "wolne_lektury_2376159",
1101
+ "wolne_lektury_2376160",
1102
+ "wolne_lektury_2376161",
1103
+ "wolne_lektury_2376162",
1104
+ "wolne_lektury_2376163",
1105
+ "wolne_lektury_2376164",
1106
+ "wolne_lektury_2376165",
1107
+ "wolne_lektury_2376166",
1108
+ "wolne_lektury_2376167",
1109
+ "wolne_lektury_2376168",
1110
+ "wolne_lektury_2376170",
1111
+ "wolne_lektury_2376171",
1112
+ "wolne_lektury_2376173",
1113
+ "wolne_lektury_2376174",
1114
+ "wolne_lektury_2376176",
1115
+ "wolne_lektury_2376194",
1116
+ "wolne_lektury_2376196",
1117
+ "wolne_lektury_2376284",
1118
+ "wolne_lektury_2376285",
1119
+ "wolne_lektury_2376307",
1120
+ "wolne_lektury_2376308",
1121
+ "wolne_lektury_2376309",
1122
+ "wolne_lektury_2376310",
1123
+ "wolne_lektury_2376311",
1124
+ "wolne_lektury_2376312",
1125
+ "wolne_lektury_2376313",
1126
+ "wolne_lektury_2376314",
1127
+ "wolne_lektury_2376315",
1128
+ "wolne_lektury_2376316",
1129
+ "wolne_lektury_2376317",
1130
+ "wolne_lektury_2376318",
1131
+ "wolne_lektury_2376319",
1132
+ "wolne_lektury_2376320",
1133
+ "wolne_lektury_2376321",
1134
+ "wolne_lektury_2376322",
1135
+ "wolne_lektury_2376328",
1136
+ "wolne_lektury_2376372",
1137
+ "wolne_lektury_2376373",
1138
+ "wolne_lektury_2376374",
1139
+ "wolne_lektury_2376432",
1140
+ "wolne_lektury_2376437",
1141
+ "wolne_lektury_2376457",
1142
+ "wolne_lektury_2376461",
1143
+ "wolne_lektury_2376481",
1144
+ "wolne_lektury_2376482",
1145
+ "wolne_lektury_2376483",
1146
+ "wolne_lektury_2376484",
1147
+ "wolne_lektury_2376485",
1148
+ "wolne_lektury_2376499",
1149
+ "wolne_lektury_2376510",
1150
+ "wolne_lektury_2376511",
1151
+ "wolne_lektury_2376512",
1152
+ "wolne_lektury_2376514",
1153
+ "wolne_lektury_2376515",
1154
+ "wolne_lektury_2376516",
1155
+ "wolne_lektury_2376518",
1156
+ "wolne_lektury_2376524",
1157
+ "wolne_lektury_2376532",
1158
+ "wolne_lektury_2376536",
1159
+ "wolne_lektury_2376537",
1160
+ "wolne_lektury_2376539",
1161
+ "wolne_lektury_2376541",
1162
+ "wolne_lektury_2376546",
1163
+ "wolne_lektury_2376549",
1164
+ "wolne_lektury_2376550",
1165
+ "wolne_lektury_2376551",
1166
+ "wolne_lektury_2376552",
1167
+ "wolne_lektury_2376553",
1168
+ "wolne_lektury_2376555",
1169
+ "wolne_lektury_2376607",
1170
+ "wolne_lektury_2376613",
1171
+ "wolne_lektury_2376625",
1172
+ "wolne_lektury_2376627",
1173
+ "wolne_lektury_2376628",
1174
+ "wolne_lektury_2376672",
1175
+ "wolne_lektury_2376673",
1176
+ "wolne_lektury_2376675",
1177
+ "wolne_lektury_2376679",
1178
+ "wolne_lektury_2376680",
1179
+ "wolne_lektury_2376681",
1180
+ "wolne_lektury_2376682",
1181
+ "wolne_lektury_2376684",
1182
+ "wolne_lektury_2376742",
1183
+ "wolne_lektury_2376754",
1184
+ "wolne_lektury_2376765",
1185
+ "wolne_lektury_2376904",
1186
+ "wolne_lektury_2376906",
1187
+ "wolne_lektury_2376913",
1188
+ "wolne_lektury_2376920",
1189
+ "wolne_lektury_2376930",
1190
+ "wolne_lektury_2376933",
1191
+ "wolne_lektury_2376943",
1192
+ "wolne_lektury_2376981",
1193
+ "wolne_lektury_2376982",
1194
+ "wolne_lektury_2376983",
1195
+ "wolne_lektury_2376984",
1196
+ "wolne_lektury_2376985",
1197
+ "wolne_lektury_2376986",
1198
+ "wolne_lektury_2376987",
1199
+ "wolne_lektury_2376988",
1200
+ "wolne_lektury_2376989",
1201
+ "wolne_lektury_2376990",
1202
+ "wolne_lektury_2376991",
1203
+ "wolne_lektury_2376992",
1204
+ "wolne_lektury_2376993",
1205
+ "wolne_lektury_2376994",
1206
+ "wolne_lektury_2376995",
1207
+ "wolne_lektury_2376996",
1208
+ "wolne_lektury_2376997",
1209
+ "wolne_lektury_2376998",
1210
+ "wolne_lektury_2376999",
1211
+ "wolne_lektury_2377000",
1212
+ "wolne_lektury_2377001",
1213
+ "wolne_lektury_2377002",
1214
+ "wolne_lektury_2377003",
1215
+ "wolne_lektury_2377021",
1216
+ "wolne_lektury_2377022",
1217
+ "wolne_lektury_2377023",
1218
+ "wolne_lektury_2377024",
1219
+ "wolne_lektury_2377025",
1220
+ "wolne_lektury_2377026",
1221
+ "wolne_lektury_2377027",
1222
+ "wolne_lektury_2377028",
1223
+ "wolne_lektury_2377029",
1224
+ "wolne_lektury_2377030",
1225
+ "wolne_lektury_2377031",
1226
+ "wolne_lektury_2377032",
1227
+ "wolne_lektury_2377033",
1228
+ "wolne_lektury_2377034",
1229
+ "wolne_lektury_2377035",
1230
+ "wolne_lektury_2377036",
1231
+ "wolne_lektury_2377037",
1232
+ "wolne_lektury_2377057",
1233
+ "wolne_lektury_2377059",
1234
+ "wolne_lektury_2377060",
1235
+ "wolne_lektury_2377061",
1236
+ "wolne_lektury_2377068",
1237
+ "wolne_lektury_2377069",
1238
+ "wolne_lektury_2377070",
1239
+ "wolne_lektury_2377071",
1240
+ "wolne_lektury_2377072",
1241
+ "wolne_lektury_2377073",
1242
+ "wolne_lektury_2377074",
1243
+ "wolne_lektury_2377075",
1244
+ "wolne_lektury_2377076",
1245
+ "wolne_lektury_2377079",
1246
+ "wolne_lektury_2377080",
1247
+ "wolne_lektury_2377081",
1248
+ "wolne_lektury_2377082",
1249
+ "wolne_lektury_2377083",
1250
+ "wolne_lektury_2377084",
1251
+ "wolne_lektury_2377085",
1252
+ "wolne_lektury_2377086",
1253
+ "wolne_lektury_2377087",
1254
+ "wolne_lektury_2377088",
1255
+ "wolne_lektury_2377089",
1256
+ "wolne_lektury_2377090",
1257
+ "wolne_lektury_2377091",
1258
+ "wolne_lektury_2377092",
1259
+ "wolne_lektury_2377093",
1260
+ "wolne_lektury_2377094",
1261
+ "wolne_lektury_2377095",
1262
+ "wolne_lektury_2377096",
1263
+ "wolne_lektury_2377099",
1264
+ "wolne_lektury_2377106",
1265
+ "wolne_lektury_2377107",
1266
+ "wolne_lektury_2377111",
1267
+ "wolne_lektury_2377112",
1268
+ "wolne_lektury_2377113",
1269
+ "wolne_lektury_2377114",
1270
+ "wolne_lektury_2377115",
1271
+ "wolne_lektury_2377116",
1272
+ "wolne_lektury_2377117",
1273
+ "wolne_lektury_2377118",
1274
+ "wolne_lektury_2377119",
1275
+ "wolne_lektury_2377120",
1276
+ "wolne_lektury_2377121",
1277
+ "wolne_lektury_2377122",
1278
+ "wolne_lektury_2377123",
1279
+ "wolne_lektury_2377124",
1280
+ "wolne_lektury_2377125",
1281
+ "wolne_lektury_2377129",
1282
+ "wolne_lektury_2377137",
1283
+ "wolne_lektury_2377139",
1284
+ "wolne_lektury_2377140",
1285
+ "wolne_lektury_2377141",
1286
+ "wolne_lektury_2377143",
1287
+ "wolne_lektury_2377144",
1288
+ "wolne_lektury_2377166",
1289
+ "wolne_lektury_2377167",
1290
+ "wolne_lektury_2377241",
1291
+ "wolne_lektury_2377242",
1292
+ "wolne_lektury_2377246",
1293
+ "wolne_lektury_2377355",
1294
+ "wolne_lektury_2377374",
1295
+ "wolne_lektury_2377379",
1296
+ "wolne_lektury_2377380",
1297
+ "wolne_lektury_2377381",
1298
+ "wolne_lektury_2377382",
1299
+ "wolne_lektury_2377390",
1300
+ "wolne_lektury_2377391",
1301
+ "wolne_lektury_2377392",
1302
+ "wolne_lektury_2377393",
1303
+ "wolne_lektury_2377394",
1304
+ "wolne_lektury_2377395",
1305
+ "wolne_lektury_2377400",
1306
+ "wolne_lektury_2377402",
1307
+ "wolne_lektury_2377405",
1308
+ "wolne_lektury_2377406",
1309
+ "wolne_lektury_2377413",
1310
+ "wolne_lektury_2377417",
1311
+ "wolne_lektury_2377478",
1312
+ "wolne_lektury_2377479",
1313
+ "wolne_lektury_2377480",
1314
+ "wolne_lektury_2377481",
1315
+ "wolne_lektury_2377482",
1316
+ "wolne_lektury_2377487",
1317
+ "wolne_lektury_2377489",
1318
+ "wolne_lektury_2377490",
1319
+ "wolne_lektury_2377494",
1320
+ "wolne_lektury_2377510",
1321
+ "wolne_lektury_2377511",
1322
+ "wolne_lektury_2377512",
1323
+ "wolne_lektury_2377513",
1324
+ "wolne_lektury_2377514",
1325
+ "wolne_lektury_2377515",
1326
+ "wolne_lektury_2377516",
1327
+ "wolne_lektury_2377517",
1328
+ "wolne_lektury_2377518",
1329
+ "wolne_lektury_2377519",
1330
+ "wolne_lektury_2377520",
1331
+ "wolne_lektury_2377521",
1332
+ "wolne_lektury_2377522",
1333
+ "wolne_lektury_2377523",
1334
+ "wolne_lektury_2377524",
1335
+ "wolne_lektury_2377525",
1336
+ "wolne_lektury_2377526",
1337
+ "wolne_lektury_2377528",
1338
+ "wolne_lektury_2377530",
1339
+ "wolne_lektury_2377531",
1340
+ "wolne_lektury_2377532",
1341
+ "wolne_lektury_2377533",
1342
+ "wolne_lektury_2377534",
1343
+ "wolne_lektury_2377535",
1344
+ "wolne_lektury_2377536",
1345
+ "wolne_lektury_2377537",
1346
+ "wolne_lektury_2377538",
1347
+ "wolne_lektury_2377539",
1348
+ "wolne_lektury_2377540",
1349
+ "wolne_lektury_2377541",
1350
+ "wolne_lektury_2377542",
1351
+ "wolne_lektury_2377543",
1352
+ "wolne_lektury_2377544",
1353
+ "wolne_lektury_2377545",
1354
+ "wolne_lektury_2377546",
1355
+ "wolne_lektury_2377547",
1356
+ "wolne_lektury_2377548",
1357
+ "wolne_lektury_2377549",
1358
+ "wolne_lektury_2377550",
1359
+ "wolne_lektury_2377551",
1360
+ "wolne_lektury_2377552",
1361
+ "wolne_lektury_2377553",
1362
+ "wolne_lektury_2377554",
1363
+ "wolne_lektury_2377580",
1364
+ "wolne_lektury_2377581",
1365
+ "wolne_lektury_2377582",
1366
+ "wolne_lektury_2377583",
1367
+ "wolne_lektury_2377584",
1368
+ "wolne_lektury_2377585",
1369
+ "wolne_lektury_2377586",
1370
+ "wolne_lektury_2377587",
1371
+ "wolne_lektury_2377588",
1372
+ "wolne_lektury_2377589",
1373
+ "wolne_lektury_2377590",
1374
+ "wolne_lektury_2377591",
1375
+ "wolne_lektury_2377592",
1376
+ "wolne_lektury_2377593",
1377
+ "wolne_lektury_2377594",
1378
+ "wolne_lektury_2377595",
1379
+ "wolne_lektury_2377596",
1380
+ "wolne_lektury_2377597",
1381
+ "wolne_lektury_2377598",
1382
+ "wolne_lektury_2377599",
1383
+ "wolne_lektury_2377605",
1384
+ "wolne_lektury_2377618",
1385
+ "wolne_lektury_2377722"
1386
+ ]
1387
+ },
1388
+ "not_established": "whether any editor of a flagged edition died after 1955: neither Wolne Lektury nor this dataset gives their death years",
1389
+ "rows_flagged": 2421,
1390
+ "scope": "public-domain rows; a licensed row has its rightsholder's licence",
1391
+ "wl_editor_credits": {
1392
+ "distinct_names": 239,
1393
+ "meaning": "people who prepared the digital edition; the print edition's own editors are named, if at all, only in `source_edition`",
1394
+ "most_common": [
1395
+ [
1396
+ "Aleksandra Sekuła",
1397
+ 2211
1398
+ ],
1399
+ [
1400
+ "Paweł Kozioł",
1401
+ 1791
1402
+ ],
1403
+ [
1404
+ "Wojciech Kotwica",
1405
+ 669
1406
+ ],
1407
+ [
1408
+ "Dorota Kowalska",
1409
+ 574
1410
+ ],
1411
+ [
1412
+ "Weronika Trzeciak",
1413
+ 278
1414
+ ]
1415
+ ]
1416
+ }
1417
+ },
1418
+ "footnote_check": {
1419
+ "needs": {
1420
+ "estimate_from": "the size in Content-Range of 30 one-byte range requests, one from each 30th of the books by text length, and a line fitted to them on the text lengths",
1421
+ "estimated_total_mb": "350 (between 320 and 410)",
1422
+ "files": 6065,
1423
+ "time_at_one_request_per_1.2_s": "about 2 hours",
1424
+ "url_pattern": "https://wolnelektury.pl/media/book/xml/<slug>.xml"
1425
+ },
1426
+ "reason": "the check compares each text with the footnote elements of its Wolne Lektury source XML (<pa> author's footnotes, <pe> editor's, <pr> redaction's, <pt> translator's), and that needs every book's XML. Only the headers were approved for download.",
1427
+ "status": "not run"
1428
+ },
1429
+ "normalisation_steps": [
1430
+ {
1431
+ "changes_text": "not known",
1432
+ "stage": "SpeakLeash export (before this repository)",
1433
+ "step": "wolne_lektury_corpus is SpeakLeash's copy of Wolne Lektury's txt export; what SpeakLeash did to the text is not documented. The export's footer is not in the text, and who removed it is not established."
1434
+ },
1435
+ {
1436
+ "changes_text": "leading and trailing whitespace only",
1437
+ "stage": "src/build_dynaword.py",
1438
+ "step": "strip each text"
1439
+ },
1440
+ {
1441
+ "changes_text": "no",
1442
+ "rows_dropped": 0,
1443
+ "stage": "src/build_dynaword.py",
1444
+ "step": "drop a text shorter than 200 characters"
1445
+ },
1446
+ {
1447
+ "changes_text": "no",
1448
+ "rows_dropped": 0,
1449
+ "stage": "src/build_dynaword.py",
1450
+ "step": "drop a text the language gate does not take for Polish (src/language_gate.py)"
1451
+ },
1452
+ {
1453
+ "changes_text": "no",
1454
+ "rows_dropped": 0,
1455
+ "stage": "src/build_dynaword.py",
1456
+ "step": "drop a text whose alphabetic share is too low (the OCR gate; it applies to OCR sources only and this is not one)"
1457
+ },
1458
+ {
1459
+ "changes_text": "no",
1460
+ "rows_dropped": 0,
1461
+ "stage": "src/build_dynaword.py",
1462
+ "step": "drop a text identical to one already kept, across sources"
1463
+ },
1464
+ {
1465
+ "changes_text": "no",
1466
+ "stage": "src/build_dynaword.py",
1467
+ "step": "count tokens (tiktoken cl100k_base) and SHA-1 the text"
1468
+ },
1469
+ {
1470
+ "changes_text": "no",
1471
+ "stage": "src/takedown.py",
1472
+ "step": "drop a blocklisted record (none of this source's records was on the blocklist when this was built)"
1473
+ },
1474
+ {
1475
+ "changes_text": "no",
1476
+ "rows_dropped": 63,
1477
+ "stage": "src/clean_wolne_lektury.py",
1478
+ "step": "drop a whole document that is an eltec_pol novel (5-word-shingle containment of at least 0.9)"
1479
+ },
1480
+ {
1481
+ "changes_text": "no",
1482
+ "rows_dropped": 2,
1483
+ "stage": "src/clean_wolne_lektury.py",
1484
+ "step": "drop a whole document for which Wolne Lektury gives no usable licence"
1485
+ },
1486
+ {
1487
+ "changes_text": "no",
1488
+ "stage": "src/clean_wolne_lektury.py",
1489
+ "step": "set `license` from the document's own Wolne Lektury book"
1490
+ },
1491
+ {
1492
+ "changes_text": "no",
1493
+ "stage": "src/build_wolne_lektury_attribution.py",
1494
+ "step": "set `author`; each row's text is checked against the SHA-1 in the sidecar and the table against `text_digest`"
1495
+ }
1496
+ ],
1497
+ "notes_and_prefaces": {
1498
+ "hand_sample": {
1499
+ "draw": "random.Random(109).sample(ids, 40)",
1500
+ "read": "the first and last 450 characters of each text",
1501
+ "result": {
1502
+ "from_the_print_edition": {
1503
+ "wolne_lektury_2374138": "the publisher's address to readers, at the end of the text",
1504
+ "wolne_lektury_2375317": "a list of editions, at the end of the text",
1505
+ "wolne_lektury_2375743": "an introduction (Wstęp) before the text"
1506
+ },
1507
+ "wl_credit_or_note_text": 0,
1508
+ "wl_header_lines": "the title, author, translator and ISBN lines of WL's txt export open the text of the rows that have them (text_checks.header_isbn_line, header_translator_line)"
1509
+ },
1510
+ "rows": 40
1511
+ },
1512
+ "scan_of_every_row": "text_checks above",
1513
+ "wl_commentary": {
1514
+ "heading": "Komentarz",
1515
+ "licences": {
1516
+ "LAL-1.3": 10
1517
+ },
1518
+ "meaning": "a commentary written for Wolne Lektury, which is part of the text; not removed",
1519
+ "rows": 10,
1520
+ "rows_with_no_print_edition": 10
1521
+ }
1522
+ },
1523
+ "paragraphs_removed_without_a_mark": 0,
1524
+ "source": "wolne_lektury",
1525
+ "summary": {
1526
+ "author_empty": 37,
1527
+ "author_filled": 6039,
1528
+ "author_missing_in_wl": 0,
1529
+ "author_placeholder": 37,
1530
+ "edition_flag_rows": 2421,
1531
+ "edition_flags": {
1532
+ "apparatus": 229,
1533
+ "critical": 58,
1534
+ "editor_credit": 802,
1535
+ "national_library": 1,
1536
+ "print_after_1955": 1311,
1537
+ "translation": 587,
1538
+ "translator_credited": 802
1539
+ },
1540
+ "license_url_given_by_wl": {
1541
+ "": 4577,
1542
+ "Domena publiczna": 4,
1543
+ "Licencja Wolnej Sztuki 1.3.": 1,
1544
+ "http://artlibre.org/licence/lal/pl": 10,
1545
+ "http://artlibre.org/licence/lal/pl/": 1434,
1546
+ "http://creativecommons.org/licenses/by-sa/3.0/": 30,
1547
+ "http://creativecommons.org/licenses/by-sa/3.0/deed.pl": 5,
1548
+ "https://creativecommons.org/licenses/by-sa/3.0/deed.pl": 4,
1549
+ "https://creativecommons.org/licenses/by-sa/4.0/": 1,
1550
+ "https://creativecommons.org/licenses/by-sa/4.0/deed.pl": 10
1551
+ },
1552
+ "licenses": {
1553
+ "CC-BY-SA-3.0": 5,
1554
+ "CC-BY-SA-3.0-PL": 34,
1555
+ "CC-BY-SA-4.0": 11,
1556
+ "LAL-1.3": 1467,
1557
+ "public-domain": 4559
1558
+ },
1559
+ "original_author_filled": 835,
1560
+ "original_title_filled": 0,
1561
+ "print_after_1955_and_public_domain": 1311,
1562
+ "rows": 6076,
1563
+ "source_edition_filled": 6032,
1564
+ "title_filled": 6076,
1565
+ "translator_filled": 841,
1566
+ "wl_url_names_another_version": 34
1567
+ },
1568
+ "text_checks": {
1569
+ "footer_found_by_strip_wl_footer": 0,
1570
+ "header_isbn_line": 1120,
1571
+ "header_translator_line": 839,
1572
+ "leading_or_trailing_whitespace": 0,
1573
+ "period_spelling": {
1574
+ "ids": [
1575
+ "wolne_lektury_2371616",
1576
+ "wolne_lektury_2371658",
1577
+ "wolne_lektury_2371680",
1578
+ "wolne_lektury_2371776",
1579
+ "wolne_lektury_2371825",
1580
+ "wolne_lektury_2371830",
1581
+ "wolne_lektury_2371836",
1582
+ "wolne_lektury_2371876",
1583
+ "wolne_lektury_2371960",
1584
+ "wolne_lektury_2372021",
1585
+ "wolne_lektury_2372030",
1586
+ "wolne_lektury_2372102",
1587
+ "wolne_lektury_2372112",
1588
+ "wolne_lektury_2372116",
1589
+ "wolne_lektury_2372121",
1590
+ "wolne_lektury_2372122",
1591
+ "wolne_lektury_2372200",
1592
+ "wolne_lektury_2372201",
1593
+ "wolne_lektury_2372202",
1594
+ "wolne_lektury_2372203",
1595
+ "wolne_lektury_2372204",
1596
+ "wolne_lektury_2372205",
1597
+ "wolne_lektury_2372206",
1598
+ "wolne_lektury_2372207",
1599
+ "wolne_lektury_2372208",
1600
+ "wolne_lektury_2372209",
1601
+ "wolne_lektury_2372210",
1602
+ "wolne_lektury_2372211",
1603
+ "wolne_lektury_2372212",
1604
+ "wolne_lektury_2372215",
1605
+ "wolne_lektury_2372216",
1606
+ "wolne_lektury_2372217",
1607
+ "wolne_lektury_2372218",
1608
+ "wolne_lektury_2372219",
1609
+ "wolne_lektury_2372220",
1610
+ "wolne_lektury_2372221",
1611
+ "wolne_lektury_2372363",
1612
+ "wolne_lektury_2372373",
1613
+ "wolne_lektury_2372388",
1614
+ "wolne_lektury_2372437",
1615
+ "wolne_lektury_2372541",
1616
+ "wolne_lektury_2372557",
1617
+ "wolne_lektury_2372567",
1618
+ "wolne_lektury_2372569",
1619
+ "wolne_lektury_2372646",
1620
+ "wolne_lektury_2372684",
1621
+ "wolne_lektury_2372789",
1622
+ "wolne_lektury_2372845",
1623
+ "wolne_lektury_2372846",
1624
+ "wolne_lektury_2372847",
1625
+ "wolne_lektury_2372887",
1626
+ "wolne_lektury_2372888",
1627
+ "wolne_lektury_2372889",
1628
+ "wolne_lektury_2372903",
1629
+ "wolne_lektury_2372919",
1630
+ "wolne_lektury_2372927",
1631
+ "wolne_lektury_2372928",
1632
+ "wolne_lektury_2372937",
1633
+ "wolne_lektury_2372938",
1634
+ "wolne_lektury_2372947",
1635
+ "wolne_lektury_2372964",
1636
+ "wolne_lektury_2372965",
1637
+ "wolne_lektury_2372968",
1638
+ "wolne_lektury_2372975",
1639
+ "wolne_lektury_2372998",
1640
+ "wolne_lektury_2373004",
1641
+ "wolne_lektury_2373293",
1642
+ "wolne_lektury_2373391",
1643
+ "wolne_lektury_2373395",
1644
+ "wolne_lektury_2373396",
1645
+ "wolne_lektury_2373398",
1646
+ "wolne_lektury_2373399",
1647
+ "wolne_lektury_2373400",
1648
+ "wolne_lektury_2373401",
1649
+ "wolne_lektury_2373402",
1650
+ "wolne_lektury_2373403",
1651
+ "wolne_lektury_2373404",
1652
+ "wolne_lektury_2373405",
1653
+ "wolne_lektury_2373406",
1654
+ "wolne_lektury_2373407",
1655
+ "wolne_lektury_2373408",
1656
+ "wolne_lektury_2373409",
1657
+ "wolne_lektury_2373410",
1658
+ "wolne_lektury_2373411",
1659
+ "wolne_lektury_2373413",
1660
+ "wolne_lektury_2373414",
1661
+ "wolne_lektury_2373415",
1662
+ "wolne_lektury_2373417",
1663
+ "wolne_lektury_2373418",
1664
+ "wolne_lektury_2373419",
1665
+ "wolne_lektury_2373420",
1666
+ "wolne_lektury_2373421",
1667
+ "wolne_lektury_2373422",
1668
+ "wolne_lektury_2373423",
1669
+ "wolne_lektury_2373425",
1670
+ "wolne_lektury_2373426",
1671
+ "wolne_lektury_2373520",
1672
+ "wolne_lektury_2373817",
1673
+ "wolne_lektury_2374148",
1674
+ "wolne_lektury_2374150",
1675
+ "wolne_lektury_2374183",
1676
+ "wolne_lektury_2374320",
1677
+ "wolne_lektury_2374373",
1678
+ "wolne_lektury_2374455",
1679
+ "wolne_lektury_2374784",
1680
+ "wolne_lektury_2374785",
1681
+ "wolne_lektury_2374794",
1682
+ "wolne_lektury_2374795",
1683
+ "wolne_lektury_2374800",
1684
+ "wolne_lektury_2374801",
1685
+ "wolne_lektury_2374863",
1686
+ "wolne_lektury_2374864",
1687
+ "wolne_lektury_2374865",
1688
+ "wolne_lektury_2374891",
1689
+ "wolne_lektury_2374914",
1690
+ "wolne_lektury_2375056",
1691
+ "wolne_lektury_2375167",
1692
+ "wolne_lektury_2375303",
1693
+ "wolne_lektury_2375304",
1694
+ "wolne_lektury_2375305",
1695
+ "wolne_lektury_2375306",
1696
+ "wolne_lektury_2375307",
1697
+ "wolne_lektury_2375308",
1698
+ "wolne_lektury_2375309",
1699
+ "wolne_lektury_2375310",
1700
+ "wolne_lektury_2375331",
1701
+ "wolne_lektury_2375478",
1702
+ "wolne_lektury_2375479",
1703
+ "wolne_lektury_2375492",
1704
+ "wolne_lektury_2375493",
1705
+ "wolne_lektury_2375494",
1706
+ "wolne_lektury_2375495",
1707
+ "wolne_lektury_2375496",
1708
+ "wolne_lektury_2375497",
1709
+ "wolne_lektury_2375498",
1710
+ "wolne_lektury_2375499",
1711
+ "wolne_lektury_2375500",
1712
+ "wolne_lektury_2375501",
1713
+ "wolne_lektury_2375502",
1714
+ "wolne_lektury_2375569",
1715
+ "wolne_lektury_2375759",
1716
+ "wolne_lektury_2375793",
1717
+ "wolne_lektury_2375794",
1718
+ "wolne_lektury_2375931",
1719
+ "wolne_lektury_2375934",
1720
+ "wolne_lektury_2375936",
1721
+ "wolne_lektury_2375937",
1722
+ "wolne_lektury_2376050",
1723
+ "wolne_lektury_2376085",
1724
+ "wolne_lektury_2376102",
1725
+ "wolne_lektury_2376242",
1726
+ "wolne_lektury_2376328",
1727
+ "wolne_lektury_2376330",
1728
+ "wolne_lektury_2376442",
1729
+ "wolne_lektury_2376445",
1730
+ "wolne_lektury_2376450",
1731
+ "wolne_lektury_2376577",
1732
+ "wolne_lektury_2376579",
1733
+ "wolne_lektury_2376734",
1734
+ "wolne_lektury_2376748",
1735
+ "wolne_lektury_2376749",
1736
+ "wolne_lektury_2376924",
1737
+ "wolne_lektury_2377041",
1738
+ "wolne_lektury_2377066",
1739
+ "wolne_lektury_2377100",
1740
+ "wolne_lektury_2377150",
1741
+ "wolne_lektury_2377233",
1742
+ "wolne_lektury_2377287",
1743
+ "wolne_lektury_2377288",
1744
+ "wolne_lektury_2377289",
1745
+ "wolne_lektury_2377290",
1746
+ "wolne_lektury_2377292",
1747
+ "wolne_lektury_2377293",
1748
+ "wolne_lektury_2377294",
1749
+ "wolne_lektury_2377295",
1750
+ "wolne_lektury_2377296",
1751
+ "wolne_lektury_2377297",
1752
+ "wolne_lektury_2377298",
1753
+ "wolne_lektury_2377300",
1754
+ "wolne_lektury_2377301",
1755
+ "wolne_lektury_2377302",
1756
+ "wolne_lektury_2377303",
1757
+ "wolne_lektury_2377304",
1758
+ "wolne_lektury_2377312",
1759
+ "wolne_lektury_2377332",
1760
+ "wolne_lektury_2377368",
1761
+ "wolne_lektury_2377385",
1762
+ "wolne_lektury_2377419",
1763
+ "wolne_lektury_2377422",
1764
+ "wolne_lektury_2377423",
1765
+ "wolne_lektury_2377424",
1766
+ "wolne_lektury_2377425",
1767
+ "wolne_lektury_2377426",
1768
+ "wolne_lektury_2377427",
1769
+ "wolne_lektury_2377428",
1770
+ "wolne_lektury_2377429",
1771
+ "wolne_lektury_2377430",
1772
+ "wolne_lektury_2377431",
1773
+ "wolne_lektury_2377432",
1774
+ "wolne_lektury_2377433",
1775
+ "wolne_lektury_2377434",
1776
+ "wolne_lektury_2377435",
1777
+ "wolne_lektury_2377436",
1778
+ "wolne_lektury_2377437",
1779
+ "wolne_lektury_2377438",
1780
+ "wolne_lektury_2377439",
1781
+ "wolne_lektury_2377440",
1782
+ "wolne_lektury_2377442",
1783
+ "wolne_lektury_2377443",
1784
+ "wolne_lektury_2377444",
1785
+ "wolne_lektury_2377445",
1786
+ "wolne_lektury_2377446",
1787
+ "wolne_lektury_2377447",
1788
+ "wolne_lektury_2377448",
1789
+ "wolne_lektury_2377449",
1790
+ "wolne_lektury_2377450",
1791
+ "wolne_lektury_2377451",
1792
+ "wolne_lektury_2377452",
1793
+ "wolne_lektury_2377453",
1794
+ "wolne_lektury_2377454",
1795
+ "wolne_lektury_2377455",
1796
+ "wolne_lektury_2377456",
1797
+ "wolne_lektury_2377458",
1798
+ "wolne_lektury_2377460",
1799
+ "wolne_lektury_2377461",
1800
+ "wolne_lektury_2377462",
1801
+ "wolne_lektury_2377463",
1802
+ "wolne_lektury_2377464",
1803
+ "wolne_lektury_2377466",
1804
+ "wolne_lektury_2377467",
1805
+ "wolne_lektury_2377468",
1806
+ "wolne_lektury_2377469",
1807
+ "wolne_lektury_2377470",
1808
+ "wolne_lektury_2377471",
1809
+ "wolne_lektury_2377472",
1810
+ "wolne_lektury_2377474",
1811
+ "wolne_lektury_2377544",
1812
+ "wolne_lektury_2377573"
1813
+ ],
1814
+ "rows": 238,
1815
+ "words_per_1000_at_least": 5.0
1816
+ },
1817
+ "rows": 6076,
1818
+ "section_headings": {
1819
+ "komentarz": {
1820
+ "ids": [
1821
+ "wolne_lektury_2371976",
1822
+ "wolne_lektury_2372887",
1823
+ "wolne_lektury_2372888",
1824
+ "wolne_lektury_2372889",
1825
+ "wolne_lektury_2372968",
1826
+ "wolne_lektury_2372975",
1827
+ "wolne_lektury_2374919",
1828
+ "wolne_lektury_2374920",
1829
+ "wolne_lektury_2375331",
1830
+ "wolne_lektury_2377367"
1831
+ ],
1832
+ "rows": 10
1833
+ },
1834
+ "od redakcji": {
1835
+ "ids": [
1836
+ "wolne_lektury_2371979"
1837
+ ],
1838
+ "rows": 1
1839
+ },
1840
+ "od tłumacza": {
1841
+ "ids": [
1842
+ "wolne_lektury_2371635",
1843
+ "wolne_lektury_2371770",
1844
+ "wolne_lektury_2371968",
1845
+ "wolne_lektury_2372228",
1846
+ "wolne_lektury_2372311",
1847
+ "wolne_lektury_2372552",
1848
+ "wolne_lektury_2372553",
1849
+ "wolne_lektury_2372556",
1850
+ "wolne_lektury_2372557",
1851
+ "wolne_lektury_2372558",
1852
+ "wolne_lektury_2372559",
1853
+ "wolne_lektury_2372560",
1854
+ "wolne_lektury_2372562",
1855
+ "wolne_lektury_2372563",
1856
+ "wolne_lektury_2372564",
1857
+ "wolne_lektury_2372565",
1858
+ "wolne_lektury_2372566",
1859
+ "wolne_lektury_2372568",
1860
+ "wolne_lektury_2372943",
1861
+ "wolne_lektury_2373262",
1862
+ "wolne_lektury_2373357",
1863
+ "wolne_lektury_2373443",
1864
+ "wolne_lektury_2373864",
1865
+ "wolne_lektury_2374125",
1866
+ "wolne_lektury_2374418",
1867
+ "wolne_lektury_2374582",
1868
+ "wolne_lektury_2374878",
1869
+ "wolne_lektury_2374918",
1870
+ "wolne_lektury_2374997",
1871
+ "wolne_lektury_2375190",
1872
+ "wolne_lektury_2375191",
1873
+ "wolne_lektury_2375745",
1874
+ "wolne_lektury_2376038",
1875
+ "wolne_lektury_2376274",
1876
+ "wolne_lektury_2376515",
1877
+ "wolne_lektury_2376527",
1878
+ "wolne_lektury_2376916",
1879
+ "wolne_lektury_2376923",
1880
+ "wolne_lektury_2377039",
1881
+ "wolne_lektury_2377055",
1882
+ "wolne_lektury_2377364",
1883
+ "wolne_lektury_2377378",
1884
+ "wolne_lektury_2377381"
1885
+ ],
1886
+ "rows": 43
1887
+ },
1888
+ "od wydawców": {
1889
+ "ids": [
1890
+ "wolne_lektury_2375927"
1891
+ ],
1892
+ "rows": 1
1893
+ },
1894
+ "posłowie": {
1895
+ "ids": [
1896
+ "wolne_lektury_2371712",
1897
+ "wolne_lektury_2372884",
1898
+ "wolne_lektury_2373122",
1899
+ "wolne_lektury_2374374",
1900
+ "wolne_lektury_2374894",
1901
+ "wolne_lektury_2376188",
1902
+ "wolne_lektury_2376625",
1903
+ "wolne_lektury_2377353",
1904
+ "wolne_lektury_2377542",
1905
+ "wolne_lektury_2377572"
1906
+ ],
1907
+ "rows": 10
1908
+ },
1909
+ "przedmowa": {
1910
+ "ids": [
1911
+ "wolne_lektury_2371603",
1912
+ "wolne_lektury_2371629",
1913
+ "wolne_lektury_2371667",
1914
+ "wolne_lektury_2371782",
1915
+ "wolne_lektury_2371801",
1916
+ "wolne_lektury_2371805",
1917
+ "wolne_lektury_2371979",
1918
+ "wolne_lektury_2372073",
1919
+ "wolne_lektury_2372074",
1920
+ "wolne_lektury_2372075",
1921
+ "wolne_lektury_2372182",
1922
+ "wolne_lektury_2372231",
1923
+ "wolne_lektury_2372316",
1924
+ "wolne_lektury_2372794",
1925
+ "wolne_lektury_2372904",
1926
+ "wolne_lektury_2372991",
1927
+ "wolne_lektury_2372996",
1928
+ "wolne_lektury_2373197",
1929
+ "wolne_lektury_2373284",
1930
+ "wolne_lektury_2373912",
1931
+ "wolne_lektury_2373987",
1932
+ "wolne_lektury_2374186",
1933
+ "wolne_lektury_2374851",
1934
+ "wolne_lektury_2374912",
1935
+ "wolne_lektury_2375055",
1936
+ "wolne_lektury_2375080",
1937
+ "wolne_lektury_2375319",
1938
+ "wolne_lektury_2375391",
1939
+ "wolne_lektury_2375484",
1940
+ "wolne_lektury_2375693",
1941
+ "wolne_lektury_2375752",
1942
+ "wolne_lektury_2375753",
1943
+ "wolne_lektury_2375754",
1944
+ "wolne_lektury_2375755",
1945
+ "wolne_lektury_2375868",
1946
+ "wolne_lektury_2375870",
1947
+ "wolne_lektury_2375897",
1948
+ "wolne_lektury_2375955",
1949
+ "wolne_lektury_2375969",
1950
+ "wolne_lektury_2376492",
1951
+ "wolne_lektury_2376687",
1952
+ "wolne_lektury_2376732",
1953
+ "wolne_lektury_2376769",
1954
+ "wolne_lektury_2377017",
1955
+ "wolne_lektury_2377228",
1956
+ "wolne_lektury_2377360",
1957
+ "wolne_lektury_2377361",
1958
+ "wolne_lektury_2377369",
1959
+ "wolne_lektury_2377379",
1960
+ "wolne_lektury_2377381"
1961
+ ],
1962
+ "rows": 50
1963
+ },
1964
+ "przypisy": {
1965
+ "ids": [
1966
+ "wolne_lektury_2372842",
1967
+ "wolne_lektury_2375392"
1968
+ ],
1969
+ "rows": 2
1970
+ },
1971
+ "słowo wstępne": {
1972
+ "ids": [
1973
+ "wolne_lektury_2371665",
1974
+ "wolne_lektury_2373928",
1975
+ "wolne_lektury_2375716"
1976
+ ],
1977
+ "rows": 3
1978
+ },
1979
+ "uwagi wydawcy": {
1980
+ "ids": [
1981
+ "wolne_lektury_2375898"
1982
+ ],
1983
+ "rows": 1
1984
+ },
1985
+ "wstęp": {
1986
+ "ids": [
1987
+ "wolne_lektury_2371603",
1988
+ "wolne_lektury_2371708",
1989
+ "wolne_lektury_2371776",
1990
+ "wolne_lektury_2371797",
1991
+ "wolne_lektury_2371801",
1992
+ "wolne_lektury_2371805",
1993
+ "wolne_lektury_2371813",
1994
+ "wolne_lektury_2371980",
1995
+ "wolne_lektury_2372024",
1996
+ "wolne_lektury_2372182",
1997
+ "wolne_lektury_2372220",
1998
+ "wolne_lektury_2372315",
1999
+ "wolne_lektury_2372785",
2000
+ "wolne_lektury_2372794",
2001
+ "wolne_lektury_2372939",
2002
+ "wolne_lektury_2372942",
2003
+ "wolne_lektury_2373112",
2004
+ "wolne_lektury_2373131",
2005
+ "wolne_lektury_2373134",
2006
+ "wolne_lektury_2373272",
2007
+ "wolne_lektury_2373285",
2008
+ "wolne_lektury_2373387",
2009
+ "wolne_lektury_2373391",
2010
+ "wolne_lektury_2373909",
2011
+ "wolne_lektury_2373911",
2012
+ "wolne_lektury_2373939",
2013
+ "wolne_lektury_2374122",
2014
+ "wolne_lektury_2374276",
2015
+ "wolne_lektury_2374346",
2016
+ "wolne_lektury_2374519",
2017
+ "wolne_lektury_2374523",
2018
+ "wolne_lektury_2374529",
2019
+ "wolne_lektury_2374646",
2020
+ "wolne_lektury_2374670",
2021
+ "wolne_lektury_2374707",
2022
+ "wolne_lektury_2374716",
2023
+ "wolne_lektury_2374719",
2024
+ "wolne_lektury_2374863",
2025
+ "wolne_lektury_2374884",
2026
+ "wolne_lektury_2374887",
2027
+ "wolne_lektury_2374890",
2028
+ "wolne_lektury_2374901",
2029
+ "wolne_lektury_2375071",
2030
+ "wolne_lektury_2375191",
2031
+ "wolne_lektury_2375468",
2032
+ "wolne_lektury_2375481",
2033
+ "wolne_lektury_2375483",
2034
+ "wolne_lektury_2375484",
2035
+ "wolne_lektury_2375485",
2036
+ "wolne_lektury_2375503",
2037
+ "wolne_lektury_2375743",
2038
+ "wolne_lektury_2375843",
2039
+ "wolne_lektury_2375919",
2040
+ "wolne_lektury_2375967",
2041
+ "wolne_lektury_2375969",
2042
+ "wolne_lektury_2376017",
2043
+ "wolne_lektury_2376197",
2044
+ "wolne_lektury_2376323",
2045
+ "wolne_lektury_2376480",
2046
+ "wolne_lektury_2376484",
2047
+ "wolne_lektury_2376512",
2048
+ "wolne_lektury_2376520",
2049
+ "wolne_lektury_2376625",
2050
+ "wolne_lektury_2376913",
2051
+ "wolne_lektury_2376914",
2052
+ "wolne_lektury_2376941",
2053
+ "wolne_lektury_2377019",
2054
+ "wolne_lektury_2377078",
2055
+ "wolne_lektury_2377126",
2056
+ "wolne_lektury_2377161",
2057
+ "wolne_lektury_2377366",
2058
+ "wolne_lektury_2377491",
2059
+ "wolne_lektury_2377721"
2060
+ ],
2061
+ "rows": 73
2062
+ }
2063
+ },
2064
+ "soft_hyphen": {
2065
+ "occurrences": 9296,
2066
+ "per_row": {
2067
+ "wolne_lektury_2371652": 3,
2068
+ "wolne_lektury_2371706": 4,
2069
+ "wolne_lektury_2372189": 37,
2070
+ "wolne_lektury_2372191": 4671,
2071
+ "wolne_lektury_2372194": 176,
2072
+ "wolne_lektury_2372938": 1,
2073
+ "wolne_lektury_2372942": 1,
2074
+ "wolne_lektury_2373266": 3,
2075
+ "wolne_lektury_2373909": 5,
2076
+ "wolne_lektury_2374134": 1706,
2077
+ "wolne_lektury_2374521": 976,
2078
+ "wolne_lektury_2374522": 1607,
2079
+ "wolne_lektury_2374860": 1,
2080
+ "wolne_lektury_2375059": 26,
2081
+ "wolne_lektury_2375814": 43,
2082
+ "wolne_lektury_2376320": 1,
2083
+ "wolne_lektury_2376504": 34,
2084
+ "wolne_lektury_2377479": 1
2085
+ },
2086
+ "rows": 18
2087
+ },
2088
+ "wolne_lektury_credit_text": 0,
2089
+ "wolne_lektury_footnote_markers": 0
2090
+ },
2091
+ "text_digest": "f4973619094cd415a9a49f44b381ed6c45d5c390f4c58d999819957cf2f25f88"
2092
+ }
data/wolne_lektury/wolne_lektury.md CHANGED
@@ -11,10 +11,10 @@ Wolne Lektury (school readings)
11
  - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
- Each document's `license` is the one its own Wolne Lektury book states in dc:rights / dc:rights.license, never its parent collection's (src/wolne_lektury_licences.py, polish-dynaword-v2#57). Documents are matched to books by text: the same head and tail, or, where Wolne Lektury has edited a text since the scrape, a 5-word-shingle share of at least 0.6 at both ends; 17 were matched by hand. A label is set only when the rights text is unambiguous: a public-domain statement with no year after 1955, or one licence with its version. wolne_lektury.licences.tsv lists each document's book (its slug on wolnelektury.pl), the Wolne Lektury rights text and the label. The released text is Wolne Lektury's plain-text export without its footer, so it carries no attribution line, footnotes or motifs; the slug is the attribution link.
15
 
16
  ## Provenance
17
- Pulled from SpeakLeash's public redistribution (`speakleash-ds-pub`, key `wolne_lektury_corpus`) of the upstream source above. SpeakLeash credited as intermediate aggregator; upstream license/attribution preserved.
18
 
19
  ## Statistics
20
  | documents | characters | tokens (tiktoken proxy) |
@@ -31,10 +31,10 @@ Pulled from SpeakLeash's public redistribution (`speakleash-ds-pub`, key `wolne_
31
  | `CC-BY-SA-4.0` | 11 |
32
  | `CC-BY-SA-3.0` | 5 |
33
 
34
- Author metadata present for **0** documents. Empty values mean the upstream record did not expose a machine-readable author field.
35
 
36
  ## Legal scope note
37
- For v0.2.6, 63 documents whose text is an eltec_pol novel are dropped (share of a document's 5-word shingles found in one ELTeC novel >= 0.9; src/clean_wolne_lektury.py, polish-dynaword-v2#72). eltec_pol keeps those 50 novels whole under CC BY 4.0. Three documents only partly in an ELTeC novel are kept: both tomes of Mniszek's Trędowata (the ELTeC text is shorter) and Kochanowski's Pieśń IX, quoted in Łoziński's Oko proroka. Every pair is listed in wolne_lektury.eltec_pairs.tsv. 2 documents are also dropped because Wolne Lektury gives them no usable licence: two Horace odes translated by Paweł Kozioł, one marked only "CC BY-SA" with no version, the other public domain for Marceli Motty's translation and "CC BY-SA" for Kozioł's (polish-dynaword-v2#57).
38
 
39
  Statistics were recomputed directly from the released parquet file.
40
 
 
11
  - **Added:** 2026-06-15
12
 
13
  ## Licensing — traceable basis
14
+ Each document's `license` is the one its own Wolne Lektury book states in dc:rights / dc:rights.license, never its parent collection's (src/wolne_lektury_licences.py, polish-dynaword-v2#57). Documents are matched to books by text: the same head and tail, or, where Wolne Lektury has edited a text since the scrape, a 5-word-shingle share of at least 0.6 at both ends; 17 were matched by hand. A label is set only when the rights text is unambiguous: a public-domain statement with no year after 1955, or one licence with its version. wolne_lektury.licences.tsv lists each document's book (its slug on wolnelektury.pl), the Wolne Lektury rights text and the label. wolne_lektury.attribution.jsonl has one line per document, in the order of the Parquet: title, author, translator, the link to the work on wolnelektury.pl, the full licence URL with its version (CC BY-SA 3.0 PL, 3.0 Unported and 4.0 are kept apart; Wolne Lektury's own link for each of the 34 "3.0 PL" documents names the Unported text and is kept next to ours), every person and note Wolne Lektury credits, the print edition and publisher it names, the line "Książka pochodzi z serwisu Wolne Lektury" and a note on how the text was processed. The released text is Wolne Lektury's plain-text export without its footer; the footer's content is restored in the sidecar. Our assessment is that these are Wolne Lektury's modernised versions of the print editions, not the editions as first printed. The edition a text follows is the one in Wolne Lektury's print-edition field, kept in the sidecar as `source_edition` (named for 6,032 of the 6,076 documents). Wolne Lektury's own commentary is not taken over (see the scope note).
15
 
16
  ## Provenance
17
+ Pulled from SpeakLeash's public redistribution (`speakleash-ds-pub`, key `wolne_lektury_corpus`) of Wolne Lektury's plain-text export. What SpeakLeash did to the text is not documented, and who removed the export's footer is not established. In this repository the only change to a text is trimming leading and trailing whitespace; no paragraph is removed, and 63 whole documents were dropped as eltec_pol novels and 2 for want of a usable licence (src/clean_wolne_lektury.py). Wolne Lektury's metadata, fetched from its public API and book XML, fills `author` ("Autorzy oryginału: A; Tłumaczenie: T" for a translation) and the sidecar; src/build_wolne_lektury_attribution.py writes both and wolne_lektury.license-evidence.json, and checks every text against its SHA-1.
18
 
19
  ## Statistics
20
  | documents | characters | tokens (tiktoken proxy) |
 
31
  | `CC-BY-SA-4.0` | 11 |
32
  | `CC-BY-SA-3.0` | 5 |
33
 
34
+ Author metadata present for **6,039** documents. Empty values mean the upstream record did not expose a machine-readable author field.
35
 
36
  ## Legal scope note
37
+ For v0.2.6, 63 documents whose text is an eltec_pol novel are dropped (share of a document's 5-word shingles found in one ELTeC novel >= 0.9; src/clean_wolne_lektury.py, polish-dynaword-v2#72). eltec_pol keeps those 50 novels whole under CC BY 4.0. Three documents only partly in an ELTeC novel are kept: both tomes of Mniszek's Trędowata (the ELTeC text is shorter) and Kochanowski's Pieśń IX, quoted in Łoziński's Oko proroka. Every pair is listed in wolne_lektury.eltec_pairs.tsv. 2 documents are also dropped because Wolne Lektury gives them no usable licence: two Horace odes translated by Paweł Kozioł, one marked only "CC BY-SA" with no version, the other public domain for Marceli Motty's translation and "CC BY-SA" for Kozioł's (polish-dynaword-v2#57). Flagged, nothing excluded (polish-dynaword-v2#109). `author` is Wolne Lektury's name form (pseudonyms and cryptonyms as Wolne Lektury gives them); the first-edition form of a name is not established. 37 documents have no author because Wolne Lektury gives only "Autor nieznany" or "Praca zbiorowa"; Wolne Lektury has no field for the original title of a translation. Of the public-domain documents, 1,311 name a print edition published after 1955, 58 a critical edition and 229 an introduction, notes or commentary; the editors of those editions and their death years are not established. 238 documents keep period spelling by our heuristic count, so the modernisation is not uniform. The text of 10 documents (all under LAL 1.3, no print edition named) has a "Komentarz" heading, which we read as Wolne Lektury's own commentary. In a hand check of 40 random documents, 3 carried matter from the print edition (a publisher's address, a list of editions, an introduction) and none carried Wolne Lektury's credits or notes. Whether footnotes of the print editions were dropped could not be checked: it needs Wolne Lektury's book XML (about 6,065 files, roughly 350 MB), which has not been downloaded.
38
 
39
  Statistics were recomputed directly from the released parquet file.
40
 
data/wolne_lektury/wolne_lektury.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ab0690efa4db1e0c8ea0980f35239d78f52c5fbc0d357c906056eeb4f81d829c
3
- size 113055020
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:976337d558ce0d898c438a19540181b7585013806a8c850687e890b0ab25c40c
3
+ size 113067029
data/wolne_lektury/wolne_lektury.stats.json CHANGED
@@ -14,7 +14,7 @@
14
  "LAL-1.3": 1467,
15
  "public-domain": 4559
16
  },
17
- "authors_with_value": 0,
18
  "license": "per-record Wolne Lektury licence (public domain, LAL 1.3, CC BY-SA 3.0 PL/3.0/4.0)",
19
  "stats_recomputed_from_parquet": true,
20
  "drop_eltec_dup": 63,
 
14
  "LAL-1.3": 1467,
15
  "public-domain": 4559
16
  },
17
+ "authors_with_value": 6039,
18
  "license": "per-record Wolne Lektury licence (public domain, LAL 1.3, CC BY-SA 3.0 PL/3.0/4.0)",
19
  "stats_recomputed_from_parquet": true,
20
  "drop_eltec_dup": 63,
src/attribution_common.py ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Helpers shared by the literary attribution builders (wolne_lektury, eltec_pol; polish-dynaword-v2#109).
2
+
3
+ A builder writes a sidecar (one JSON line per Parquet row, same order, sorted keys) and a Parquet whose
4
+ `author` column is filled from it. The text must not change, so every sidecar line carries `text_sha1`
5
+ and `with_authors` refuses a table whose text does not hash to it.
6
+ """
7
+ from __future__ import annotations
8
+
9
+ import hashlib
10
+ import json
11
+ import re
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ import pyarrow as pa
16
+ import pyarrow.parquet as pq
17
+
18
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
19
+ from sejm_api_common import replace_all, write_json # noqa: E402
20
+
21
+ # Words per 1,000 with a period letter inside (the "é" of "téj", "ſ"). Loanwords ("café") give a few per text;
22
+ # a text in period spelling gives dozens.
23
+ PERIOD_SPELLING_AT = 5.0
24
+ _PERIOD_LETTER = re.compile(r"(?<=[a-ząćęłńóśźż])[éáſ]|ſ")
25
+ # Headings of a preface, commentary or note section on a line of its own. They are counted, not judged: a
26
+ # "Wstęp" may be the author's own, or the source edition's editor's.
27
+ APPARATUS_HEADING = re.compile(
28
+ r"^\s*(wstęp|przedmowa|słowo wstępne|od wydawc\w*|od redakcji|od tłumacza|posłowie|komentarz"
29
+ r"|uwagi? (?:wydawc|redakcyjn)\w*|nota (?:wydawnicza|edytorska|redakcyjna)|o wydaniu|przypisy)\s*$", re.I | re.M)
30
+ # What src/build_dynaword.py and src/takedown.py do to every source's text, in order. A step with `stat` has
31
+ # its drop count in the source's stats.json. Only the strip can change a text.
32
+ BUILD_DYNAWORD_STEPS = [
33
+ {"stage": "src/build_dynaword.py", "changes_text": "leading and trailing whitespace only",
34
+ "step": "strip each text"},
35
+ {"stage": "src/build_dynaword.py", "changes_text": "no", "step": "drop a text shorter than 200 characters",
36
+ "stat": "drop_short"},
37
+ {"stage": "src/build_dynaword.py", "changes_text": "no", "step": "drop a text the language gate does not take "
38
+ "for Polish (src/language_gate.py)", "stat": "drop_lang"},
39
+ {"stage": "src/build_dynaword.py", "changes_text": "no", "step": "drop a text whose alphabetic share is too low "
40
+ "(the OCR gate; it applies to OCR sources only and this is not one)", "stat": "drop_ocr"},
41
+ {"stage": "src/build_dynaword.py", "changes_text": "no", "step": "drop a text identical to one already kept, "
42
+ "across sources", "stat": "drop_dup"},
43
+ {"stage": "src/build_dynaword.py", "changes_text": "no", "step": "count tokens (tiktoken cl100k_base) and "
44
+ "SHA-1 the text"},
45
+ {"stage": "src/takedown.py", "changes_text": "no", "step": "drop a blocklisted record (none of this "
46
+ "source's records was on the blocklist when this was built)"},
47
+ ]
48
+
49
+
50
+ def text_sha1(text: str) -> str:
51
+ return hashlib.sha1(text.encode("utf-8")).hexdigest()
52
+
53
+
54
+ def text_digest(table: pa.Table) -> str:
55
+ """One digest of every row's id and text, to show that two Parquets carry the same text."""
56
+ lines = (f"{i}\t{text_sha1(t)}\n" for i, t in zip(table.column("id").to_pylist(),
57
+ table.column("text").to_pylist(), strict=True))
58
+ return hashlib.sha256("".join(lines).encode("utf-8")).hexdigest()
59
+
60
+
61
+ def period_spelling_rate(text: str) -> float:
62
+ """Words with a period letter per 1,000 words (a heuristic for text that was not modernised)."""
63
+ words = text.split()
64
+ return 1000 * sum(bool(_PERIOD_LETTER.search(w)) for w in words) / len(words) if words else 0.0
65
+
66
+
67
+ def steps_with_counts(steps: list[dict], stats: dict) -> list[dict]:
68
+ """`steps` for the evidence file: a step's `stat` key becomes `rows_dropped`, read from `stats`."""
69
+ return [{**{k: v for k, v in step.items() if k != "stat"},
70
+ **({"rows_dropped": stats[step["stat"]]} if "stat" in step else {})} for step in steps]
71
+
72
+
73
+ SOFT_HYPHEN = "\u00ad" # invisible; a typesetter's line-break hint that survived the digitisation
74
+
75
+
76
+ def text_checks(table: pa.Table) -> dict:
77
+ """What the released text contains, counted over every row (no sampling): the checks both literary sources
78
+ share. A section heading or a period spelling is listed with the ids of its rows."""
79
+ ids, texts = table.column("id").to_pylist(), table.column("text").to_pylist()
80
+ headings: dict[str, list[str]] = {}
81
+ for row_id, text in zip(ids, texts, strict=True):
82
+ for name in sorted({m.group(1).lower() for m in APPARATUS_HEADING.finditer(text)}):
83
+ headings.setdefault(name, []).append(row_id)
84
+ period = [i for i, t in zip(ids, texts, strict=True) if period_spelling_rate(t) >= PERIOD_SPELLING_AT]
85
+ hyphenated = {i: t.count(SOFT_HYPHEN) for i, t in zip(ids, texts, strict=True) if SOFT_HYPHEN in t}
86
+ return {
87
+ "rows": len(ids),
88
+ "leading_or_trailing_whitespace": sum(t != t.strip() for t in texts),
89
+ "section_headings": {name: {"rows": len(rows), "ids": rows} for name, rows in sorted(headings.items())},
90
+ "period_spelling": {"words_per_1000_at_least": PERIOD_SPELLING_AT, "rows": len(period), "ids": period},
91
+ "soft_hyphen": {"rows": len(hyphenated), "occurrences": sum(hyphenated.values()), "per_row": hyphenated},
92
+ }
93
+
94
+
95
+ def natural_order(name: str) -> str:
96
+ """'Sienkiewicz, Henryk' -> 'Henryk Sienkiewicz'. A name without exactly one comma, or with a
97
+ parenthesis (a qualifier such as '(ojciec)'), stays as the source gives it."""
98
+ family, comma, given = (part.strip() for part in name.partition(","))
99
+ if not comma or not family or not given or "," in given or "(" in name:
100
+ return " ".join(name.split())
101
+ return f"{given} {family}"
102
+
103
+
104
+ def write_sidecar(path: Path, records: list[dict]) -> None:
105
+ with path.open("w", encoding="utf-8", newline="\n") as handle:
106
+ for record in records:
107
+ handle.write(json.dumps(record, ensure_ascii=False, sort_keys=True) + "\n")
108
+
109
+
110
+ def read_sidecar(path: Path) -> list[dict]:
111
+ with path.open(encoding="utf-8") as handle:
112
+ return [json.loads(line) for line in handle]
113
+
114
+
115
+ def with_authors(table: pa.Table, records: list[dict]) -> pa.Table:
116
+ """`table` with `author` set from `records` (one per row, same order, each with `id`, `author` and
117
+ `text_sha1`). Fails if the rows or their text differ from the records: only `author` may change."""
118
+ ids, texts = table.column("id").to_pylist(), table.column("text").to_pylist()
119
+ if ids != [r["id"] for r in records]:
120
+ raise SystemExit("the sidecar does not list the Parquet rows in order")
121
+ changed = [i for i, text, r in zip(ids, texts, records, strict=True) if text_sha1(text) != r["text_sha1"]]
122
+ if changed:
123
+ raise SystemExit(f"{len(changed)} rows have text that differs from the sidecar's text_sha1, "
124
+ f"first {changed[0]}; the text must not change")
125
+ index = table.column_names.index("author")
126
+ return table.set_column(index, table.schema.field("author"),
127
+ pa.array([r["author"] for r in records], pa.string()))
128
+
129
+
130
+ def write_release(out_dir: Path, source: str, table: pa.Table, records: list[dict], evidence: dict) -> dict:
131
+ """Write the sidecar, the Parquet with `author` filled, the stats with `authors_with_value` and the
132
+ evidence file for `source`, all or none. Returns the new stats."""
133
+ stats_path = out_dir / f"{source}.stats.json"
134
+ stats = json.loads(stats_path.read_text(encoding="utf-8"))
135
+ stats["authors_with_value"] = sum(bool(r["author"]) for r in records)
136
+ released = with_authors(table, records)
137
+ replace_all({
138
+ out_dir / f"{source}.attribution.jsonl": lambda p: write_sidecar(p, records),
139
+ out_dir / f"{source}.parquet": lambda p: pq.write_table(released, p, compression="zstd"),
140
+ stats_path: lambda p: p.write_text(json.dumps(stats, indent=2, ensure_ascii=False) + "\n", encoding="utf-8"),
141
+ out_dir / f"{source}.license-evidence.json": lambda p: write_json(p, evidence),
142
+ })
143
+ return stats
src/build_wolne_lektury_attribution.py ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Author, translator and title for every wolne_lektury row, and its attribution sidecar (polish-dynaword-v2#109).
3
+
4
+ Each row is matched to its Wolne Lektury (WL) book by src/wolne_lektury_licences.py (`wolne_lektury.licences.tsv`).
5
+ This script reads that book's RDF header (the `<rdf:RDF>` element at the top of its XML, cached by
6
+ src/wolne_lektury_licences.py as <cache>/hdr/<slug>.rdf) and writes
7
+
8
+ data/wolne_lektury/wolne_lektury.attribution.jsonl one line per Parquet row, same order, sorted keys:
9
+ id, slug, work_url, title, author, authors, translators, credits, source_edition, source_url,
10
+ publisher, credit_notes, credit_line, license, license_url, wl_rights, wl_license_url, wl_match,
11
+ wl_date_pd, modification_note, modified, text_sha1
12
+ data/wolne_lektury/wolne_lektury.parquet `author` filled from the sidecar; nothing else changes
13
+ data/wolne_lektury/wolne_lektury.stats.json `authors_with_value`
14
+ data/wolne_lektury/wolne_lektury.license-evidence.json counts, normalisation steps and check results
15
+
16
+ Names are WL's own credits turned from "Family, Given" into "Given Family"; WL's pseudonyms and cryptonyms
17
+ stay as WL gives them. WL does not say which edition a name or title follows, so the first-edition form
18
+ that the maintainer asked for is NOT established here. `author` is the authors, and "Autorzy oryginału: A;
19
+ Tłumaczenie: T" for a translation, the form the global_voices sidecar uses. The placeholders WL puts in
20
+ dc:creator for an unknown or collective author ("Autor nieznany", "Praca zbiorowa") are not credited in
21
+ `author`, so a row with a named translator and no named author reads "Tłumaczenie: T" and a row with neither
22
+ has an empty `author`; the sidecar keeps WL's own values in `authors` and `translators`.
23
+
24
+ `license_url` is the full URL of the licence version named in WL's rights text; `wl_license_url` is the URL
25
+ WL gives. They differ for CC BY-SA 3.0 PL, where WL's text says 3.0 PL and its URL is that of 3.0 Unported.
26
+
27
+ Run after src/clean_wolne_lektury.py. The Parquet is pinned by SHA-256 before and after:
28
+ git checkout 5c29f27 -- data/wolne_lektury/wolne_lektury.parquet
29
+ python3 src/build_wolne_lektury_attribution.py --cache ~/speakleash/wolne_lektury_meta
30
+ """
31
+ from __future__ import annotations
32
+
33
+ import argparse
34
+ import csv
35
+ import json
36
+ import random
37
+ import re
38
+ import sys
39
+ import xml.etree.ElementTree as ET
40
+ from collections import Counter
41
+ from pathlib import Path
42
+
43
+ import pyarrow.parquet as pq
44
+
45
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
46
+ from attribution_common import (BUILD_DYNAWORD_STEPS, natural_order, steps_with_counts, text_checks as common_checks, # noqa: E402
47
+ text_digest, text_sha1, write_release)
48
+ from sejm_api_common import check_pin, sha256_file # noqa: E402
49
+ from shingle_containment import strip_wl_footer # noqa: E402
50
+ from wolne_lektury_licences import (CC_BY_SA_3, CC_BY_SA_3_PL, CC_BY_SA_4, DATA, LABELS, LAL, # noqa: E402
51
+ LICENCES, PUBLIC_DOMAIN, SOURCE, classify)
52
+
53
+ SIDECAR = f"{SOURCE}.attribution.jsonl"
54
+ EVIDENCE = f"{SOURCE}.license-evidence.json"
55
+ INPUT_SHA256 = "ab0690efa4db1e0c8ea0980f35239d78f52c5fbc0d357c906056eeb4f81d829c" # main at 5c29f27
56
+ TEXT_DIGEST = "f4973619094cd415a9a49f44b381ed6c45d5c390f4c58d999819957cf2f25f88" # text_digest of both Parquets
57
+ OUTPUT_SHA256 = "976337d558ce0d898c438a19540181b7585013806a8c850687e890b0ab25c40c" # the Parquet this script writes; test_attribution_release.py checks it
58
+ DC = "{http://purl.org/dc/elements/1.1/}"
59
+ CREDIT_LINE = "Książka pochodzi z serwisu Wolne Lektury"
60
+ # The full URL of each licence version, as named in WL's rights text. LAL is WL's own link (http).
61
+ LICENCE_URLS = {
62
+ PUBLIC_DOMAIN: None,
63
+ LAL: "http://artlibre.org/licence/lal/pl/",
64
+ CC_BY_SA_3_PL: "https://creativecommons.org/licenses/by-sa/3.0/pl/",
65
+ CC_BY_SA_3: "https://creativecommons.org/licenses/by-sa/3.0/",
66
+ CC_BY_SA_4: "https://creativecommons.org/licenses/by-sa/4.0/",
67
+ }
68
+ # Books whose header names a different slug from the one in wolne_lektury.licences.tsv: WL's API still lists the
69
+ # old slug (its `url` is the old one) while the XML is served under the new one.
70
+ HEADER_SLUG = {"korczak-jak-kochac-dziecko-dziecko-w-rodzinie": "dziecko-w-rodzinie"}
71
+ # What WL puts in dc:creator when no person is credited.
72
+ NO_PERSON = {"Autor nieznany", "Praca zbiorowa"}
73
+ # What WL puts in a translator field when the translator is not known.
74
+ NO_TRANSLATOR = {"anonimowy", "nieznany"}
75
+ MODIFICATION_NOTE = (
76
+ "Plain text of Wolne Lektury's txt export, taken from SpeakLeash's redistribution of Wolne Lektury "
77
+ "(wolne_lektury_corpus). The export footer (credits and licence statement) is not in the released text; "
78
+ "this record restores its content. Wolne Lektury publishes its texts as modernised editions. Our processing "
79
+ "trimmed leading and trailing whitespace and removed no paragraph from the file we received; we kept or "
80
+ "dropped whole documents only (see the datasheet). What SpeakLeash changed before that is not documented."
81
+ )
82
+ # Words in WL's print-edition field (dc:source) that point at editorial work on the text.
83
+ EDITION_MARKERS = {
84
+ # not bare "naukow" or "wyd.": 9 and about 1,000 rows name a printing house ("Drukarnia Naukowa") or a publisher
85
+ "critical": r"krytyczn|wydanie naukowe|naukowe wydanie",
86
+ "editor_credit": r"\boprac\.|opracowa|\bred\.|pod red|wybór|wyboru",
87
+ "apparatus": r"wstęp|komentarz|przypis|objaśnie|posłowie|przedmow",
88
+ "translation": r"\btłum\.|\bprzeł\.|przekład|\bprzel\.",
89
+ "national_library": r"Biblioteka Narodowa|\bBN\b",
90
+ }
91
+ LAST_PD_DEATH = 1955 # Polish copyright runs 70 years from the end of the death year
92
+ WL_CREDIT_TEXT = re.compile(r"wolne\s+lektury|wolnelektury|nowoczesna polska", re.I)
93
+ WL_FOOTNOTE_MARK = re.compile(r"\[\s*przypis", re.I)
94
+ ISBN_LINE = re.compile(r"^ISBN [\d-]+$", re.M)
95
+ TRANSLATOR_LINE = re.compile(r"^tłum\. ", re.M)
96
+ HEADER_CHARS = 300 # the header lines (author, title, translator, ISBN) of a txt export sit in the first lines
97
+ NOTES_SAMPLE_SEED, NOTES_SAMPLE_SIZE, NOTES_SAMPLE_CHARS = 109, 40, 450
98
+ # What reading the first and last NOTES_SAMPLE_CHARS characters of the sampled rows showed (read 2026-10-20).
99
+ NOTES_SAMPLE_RESULT = {
100
+ "wl_credit_or_note_text": 0,
101
+ "from_the_print_edition": {
102
+ "wolne_lektury_2374138": "the publisher's address to readers, at the end of the text",
103
+ "wolne_lektury_2375317": "a list of editions, at the end of the text",
104
+ "wolne_lektury_2375743": "an introduction (Wstęp) before the text",
105
+ },
106
+ "wl_header_lines": "the title, author, translator and ISBN lines of WL's txt export open the text of the "
107
+ "rows that have them (text_checks.header_isbn_line, header_translator_line)",
108
+ }
109
+ IDS_LISTED_FOR = ("critical", "print_after_1955") # edition flags whose row ids go in the evidence file
110
+ # The steps between SpeakLeash's file and the released text, from the build code. Only the first two can
111
+ # change a text; every later step keeps or drops whole documents.
112
+ NORMALISATION_STEPS = [
113
+ {"stage": "SpeakLeash export (before this repository)", "changes_text": "not known",
114
+ "step": "wolne_lektury_corpus is SpeakLeash's copy of Wolne Lektury's txt export; what SpeakLeash did to "
115
+ "the text is not documented. The export's footer is not in the text, and who removed it is not "
116
+ "established."},
117
+ *BUILD_DYNAWORD_STEPS,
118
+ {"stage": "src/clean_wolne_lektury.py", "changes_text": "no", "step": "drop a whole document that is an "
119
+ "eltec_pol novel (5-word-shingle containment of at least 0.9)", "stat": "drop_eltec_dup"},
120
+ {"stage": "src/clean_wolne_lektury.py", "changes_text": "no", "step": "drop a whole document for which Wolne "
121
+ "Lektury gives no usable licence", "stat": "drop_rights"},
122
+ {"stage": "src/clean_wolne_lektury.py", "changes_text": "no", "step": "set `license` from the document's own "
123
+ "Wolne Lektury book"},
124
+ {"stage": "src/build_wolne_lektury_attribution.py", "changes_text": "no",
125
+ "step": "set `author`; each row's text is checked against the SHA-1 in the sidecar and the table against "
126
+ "`text_digest`"},
127
+ ]
128
+ FOOTNOTE_CHECK = {
129
+ "status": "not run",
130
+ "reason": "the check compares each text with the footnote elements of its Wolne Lektury source XML "
131
+ "(<pa> author's footnotes, <pe> editor's, <pr> redaction's, <pt> translator's), and that needs "
132
+ "every book's XML. Only the headers were approved for download.",
133
+ "needs": {
134
+ "url_pattern": "https://wolnelektury.pl/media/book/xml/<slug>.xml",
135
+ "files": 6065,
136
+ "estimated_total_mb": "350 (between 320 and 410)",
137
+ "estimate_from": "the size in Content-Range of 30 one-byte range requests, one from each 30th of the "
138
+ "books by text length, and a line fitted to them on the text lengths",
139
+ "time_at_one_request_per_1.2_s": "about 2 hours",
140
+ },
141
+ }
142
+
143
+
144
+ def parse_header(rdf: str) -> dict:
145
+ """The fields of one WL RDF header. Fails on a DTD or entity declaration (the file is downloaded)."""
146
+ if "<!DOCTYPE" in rdf or "<!ENTITY" in rdf:
147
+ raise SystemExit("a header declares a DTD or entity")
148
+ root = ET.fromstring(rdf[rdf.index("<rdf:RDF"):])
149
+
150
+ def values(name: str) -> list[str]:
151
+ return [" ".join(el.text.split()) for el in root.iter(DC + name) if el.text and el.text.strip()]
152
+
153
+ roles = {el.tag[len(DC + "contributor."):]: None for el in root.iter() if el.tag.startswith(DC + "contributor.")}
154
+ return {
155
+ "creators": values("creator"),
156
+ "title": next(iter(values("title")), ""),
157
+ "contributors": {role: values(f"contributor.{role}") for role in sorted(roles)},
158
+ "source": next(iter(values("source")), ""),
159
+ "source_url": next(iter(values("source.URL")), ""),
160
+ "publisher": next(iter(values("publisher")), ""),
161
+ "description": values("description"),
162
+ "work_url": next(iter(values("identifier.url")), ""),
163
+ "rights": values("rights"),
164
+ "license_urls": values("rights.license"),
165
+ "date_pd": next(iter(values("date.pd")), ""),
166
+ "parts": values("relation.hasPart"),
167
+ }
168
+
169
+
170
+ def author_string(authors: list[str], translators: list[str]) -> str:
171
+ """The Parquet `author`: the authors, and the translation credit in the global_voices form."""
172
+ people = [a for a in authors if a not in NO_PERSON]
173
+ translation = f"Tłumaczenie: {'; '.join(translators)}"
174
+ if not people:
175
+ return translation if any(t not in NO_TRANSLATOR for t in translators) else ""
176
+ names = "; ".join(people)
177
+ return f"Autorzy oryginału: {names}; {translation}" if translators else names
178
+
179
+
180
+ def make_record(row_id: str, text: str, licence: dict, header: dict) -> dict:
181
+ """The sidecar line of one row. `licence` is its licences.tsv record, `header` its parsed RDF header."""
182
+ label = licence["license"]
183
+ if label not in LABELS:
184
+ raise SystemExit(f"{row_id}: licence {label!r} is not one of {LABELS}")
185
+ if classify(" | ".join(header["rights"]), header["license_urls"]) != label:
186
+ raise SystemExit(f"{row_id}: the header's rights do not give {label}; rerun src/wolne_lektury_licences.py")
187
+ slugs = licence["slug"].split()
188
+ if header["work_url"].rstrip("/").rsplit("/", 1)[-1] != HEADER_SLUG.get(slugs[0], slugs[0]):
189
+ raise SystemExit(f"{row_id}: the header's work URL {header['work_url']!r} is not book {slugs[0]}")
190
+ authors = [natural_order(a) for a in header["creators"]]
191
+ translators = [natural_order(t) for t in header["contributors"].get("translator", [])]
192
+ credits = {role: [natural_order(n) for n in names] for role, names in header["contributors"].items()
193
+ if role != "translator" and names}
194
+ return {
195
+ "author": author_string(authors, translators),
196
+ "authors": authors,
197
+ "credit_line": CREDIT_LINE,
198
+ "credit_notes": header["description"],
199
+ "credits": credits,
200
+ "id": row_id,
201
+ "license": label,
202
+ "license_url": LICENCE_URLS[label],
203
+ "modification_note": MODIFICATION_NOTE,
204
+ "modified": True,
205
+ "publisher": header["publisher"],
206
+ "slug": slugs[0],
207
+ **({"slugs": slugs} if len(slugs) > 1 else {}),
208
+ "source_edition": header["source"],
209
+ "source_url": header["source_url"],
210
+ "text_sha1": text_sha1(text),
211
+ "title": header["title"],
212
+ "translators": translators,
213
+ "wl_date_pd": header["date_pd"],
214
+ "wl_license_url": " ".join(header["license_urls"]),
215
+ "wl_match": licence["match"],
216
+ "wl_rights": " | ".join(header["rights"]),
217
+ "work_url": f"https://wolnelektury.pl/katalog/lektura/{slugs[0]}/",
218
+ }
219
+
220
+
221
+ def source_years(source_edition: str) -> list[int]:
222
+ return [int(y) for y in re.findall(r"\b(1[5-9]\d\d|20[0-3]\d)\b", source_edition)]
223
+
224
+
225
+ def edition_flags(record: dict) -> list[str]:
226
+ """Reasons to look at the edition behind a public-domain row: the print edition WL transcribed was
227
+ published after the last year in which an author could have died and still be public domain (so an
228
+ editor or translator of it may be in copyright), or it names editorial work. A licensed row has a
229
+ licence from its rightsholder and gets no flags. Flags only; nothing is excluded."""
230
+ if record["license"] != PUBLIC_DOMAIN:
231
+ return []
232
+ flags = [name for name, pattern in EDITION_MARKERS.items() if re.search(pattern, record["source_edition"], re.I)]
233
+ years = source_years(record["source_edition"])
234
+ if years and max(years) > LAST_PD_DEATH:
235
+ flags.append("print_after_1955")
236
+ if record["translators"]:
237
+ flags.append("translator_credited")
238
+ return flags
239
+
240
+
241
+ def build_records(table, licences: list[dict], headers: dict[str, str]) -> list[dict]:
242
+ by_id = {r["id"]: r for r in licences}
243
+ ids = table.column("id").to_pylist()
244
+ if by_id.keys() != set(ids) or len(by_id) != len(licences):
245
+ raise SystemExit(f"{LICENCES} does not list exactly the Parquet rows")
246
+ missing = sorted({by_id[i]["slug"].split()[0] for i in ids} - headers.keys())
247
+ if missing:
248
+ raise SystemExit(f"{len(missing)} headers are not cached, first {missing[0]}")
249
+ return [make_record(i, text, by_id[i], parse_header(headers[by_id[i]["slug"].split()[0]]))
250
+ for i, text in zip(ids, table.column("text").to_pylist(), strict=True)]
251
+
252
+
253
+ def summary(records: list[dict]) -> dict:
254
+ """The counts in the evidence file, all computed from the sidecar."""
255
+ flagged = [(r, edition_flags(r)) for r in records]
256
+ return {
257
+ "rows": len(records),
258
+ "author_filled": sum(bool(r["author"]) for r in records),
259
+ "author_empty": sum(not r["author"] for r in records),
260
+ "author_placeholder": sum(bool(r["authors"]) and not r["author"] for r in records),
261
+ "author_missing_in_wl": sum(not r["authors"] for r in records),
262
+ "translator_filled": sum(bool(r["translators"]) for r in records),
263
+ "title_filled": sum(bool(r["title"]) for r in records),
264
+ "original_author_filled": sum(bool(r["translators"]) and any(a not in NO_PERSON for a in r["authors"])
265
+ for r in records),
266
+ "original_title_filled": 0, # WL's header has no original-title field
267
+ "source_edition_filled": sum(bool(r["source_edition"]) for r in records),
268
+ "licenses": dict(sorted(Counter(r["license"] for r in records).items())),
269
+ "license_url_given_by_wl": dict(sorted(Counter(r["wl_license_url"] for r in records).items())),
270
+ "wl_url_names_another_version": sum(
271
+ r["license"] == CC_BY_SA_3_PL and "/3.0/pl" not in r["wl_license_url"] and bool(r["wl_license_url"])
272
+ for r in records),
273
+ "edition_flag_rows": sum(bool(f) for _, f in flagged),
274
+ "edition_flags": dict(sorted(Counter(flag for _, fs in flagged for flag in fs).items())),
275
+ "print_after_1955_and_public_domain": sum(
276
+ "print_after_1955" in f and r["license"] == PUBLIC_DOMAIN for r, f in flagged),
277
+ }
278
+
279
+
280
+ def text_checks(table) -> dict:
281
+ """The shared text checks plus the ones that look for Wolne Lektury's own credits, notes and header lines."""
282
+ texts = table.column("text").to_pylist()
283
+
284
+ def count(found) -> int:
285
+ return sum(bool(found(text)) for text in texts)
286
+
287
+ return {
288
+ **common_checks(table),
289
+ "wolne_lektury_credit_text": count(WL_CREDIT_TEXT.search),
290
+ "wolne_lektury_footnote_markers": count(WL_FOOTNOTE_MARK.search),
291
+ "footer_found_by_strip_wl_footer": count(lambda t: strip_wl_footer(t) != t),
292
+ "header_isbn_line": count(lambda t: ISBN_LINE.search(t[:HEADER_CHARS])),
293
+ "header_translator_line": count(lambda t: TRANSLATOR_LINE.search(t[:HEADER_CHARS])),
294
+ }
295
+
296
+
297
+ def notes_sample(ids: list[str]) -> list[str]:
298
+ """The rows read by hand for notes and prefaces: the same draw every time."""
299
+ return random.Random(NOTES_SAMPLE_SEED).sample(ids, NOTES_SAMPLE_SIZE)
300
+
301
+
302
+ def edition_review(records: list[dict]) -> dict:
303
+ flagged = [(r, edition_flags(r)) for r in records]
304
+ editors = Counter(name for r in records for name in r["credits"].get("editor", []))
305
+ return {
306
+ "scope": "public-domain rows; a licensed row has its rightsholder's licence",
307
+ "wl_editor_credits": {"distinct_names": len(editors), "most_common": editors.most_common(5),
308
+ "meaning": "people who prepared the digital edition; the print edition's own "
309
+ "editors are named, if at all, only in `source_edition`"},
310
+ "rows_flagged": sum(bool(f) for _, f in flagged),
311
+ "flags": dict(sorted(Counter(flag for _, fs in flagged for flag in fs).items())),
312
+ "ids": {flag: [r["id"] for r, fs in flagged if flag in fs] for flag in IDS_LISTED_FOR},
313
+ "not_established": "whether any editor of a flagged edition died after 1955: neither Wolne Lektury "
314
+ "nor this dataset gives their death years",
315
+ }
316
+
317
+
318
+ def wl_commentary(records: list[dict], headings: dict) -> dict:
319
+ """The rows with a `Komentarz` heading: all are WL's own teaching material, with its commentary in the text."""
320
+ ids = set(headings.get("komentarz", {}).get("ids", []))
321
+ rows = [r for r in records if r["id"] in ids]
322
+ return {
323
+ "heading": "Komentarz",
324
+ "rows": len(rows),
325
+ "licences": dict(Counter(r["license"] for r in rows)),
326
+ "rows_with_no_print_edition": sum(not r["source_edition"] for r in rows),
327
+ "meaning": "a commentary written for Wolne Lektury, which is part of the text; not removed",
328
+ }
329
+
330
+
331
+ def build_evidence(table, records: list[dict], stats: dict) -> dict:
332
+ checks = text_checks(table)
333
+ return {
334
+ "source": SOURCE,
335
+ "built_from_parquet_sha256": INPUT_SHA256,
336
+ "text_digest": TEXT_DIGEST,
337
+ "summary": summary(records),
338
+ "normalisation_steps": steps_with_counts(NORMALISATION_STEPS, stats),
339
+ "paragraphs_removed_without_a_mark": 0,
340
+ "text_checks": checks,
341
+ "edition_review": edition_review(records),
342
+ "notes_and_prefaces": {
343
+ "scan_of_every_row": "text_checks above",
344
+ "hand_sample": {"rows": NOTES_SAMPLE_SIZE, "draw": f"random.Random({NOTES_SAMPLE_SEED}).sample(ids, "
345
+ f"{NOTES_SAMPLE_SIZE})", "read": f"the first and last {NOTES_SAMPLE_CHARS} characters "
346
+ "of each text", "result": NOTES_SAMPLE_RESULT},
347
+ "wl_commentary": wl_commentary(records, checks["section_headings"]),
348
+ },
349
+ "footnote_check": FOOTNOTE_CHECK,
350
+ }
351
+
352
+
353
+ def read_cache(cache: Path) -> dict[str, str]:
354
+ return {p.stem: p.read_text(encoding="utf-8") for p in sorted((cache / "hdr").glob("*.rdf"))}
355
+
356
+
357
+ def main() -> None:
358
+ parser = argparse.ArgumentParser(description=__doc__.split("\n")[0])
359
+ parser.add_argument("--cache", type=Path, required=True)
360
+ parser.add_argument("--out", type=Path, default=DATA)
361
+ parser.add_argument("--input", type=Path, default=DATA / f"{SOURCE}.parquet")
362
+ args = parser.parse_args()
363
+ check_pin(args.input, INPUT_SHA256, "restore it with `git checkout 5c29f27 -- data/wolne_lektury/wolne_lektury.parquet`")
364
+ table = pq.read_table(args.input)
365
+ if text_digest(table) != TEXT_DIGEST:
366
+ raise SystemExit("the input's text is not the text this script was written for")
367
+ with (args.out / LICENCES).open(encoding="utf-8", newline="") as handle:
368
+ licences = list(csv.DictReader(handle, delimiter="\t"))
369
+ records = build_records(table, licences, read_cache(args.cache.expanduser()))
370
+ stats = json.loads((args.out / f"{SOURCE}.stats.json").read_text(encoding="utf-8"))
371
+ evidence = build_evidence(table, records, stats)
372
+ write_release(args.out, SOURCE, table, records, evidence)
373
+ print(json.dumps(evidence["summary"], indent=2, ensure_ascii=False))
374
+ print("released parquet sha256", sha256_file(args.out / f"{SOURCE}.parquet"))
375
+
376
+
377
+ if __name__ == "__main__":
378
+ main()
src/clean_wolne_lektury.py CHANGED
@@ -21,9 +21,12 @@ src/wolne_lektury_licences.py writes from Wolne Lektury's metadata; the build st
21
  labels exactly the kept rows. The rows in that module's UNLICENSED, whose metadata gives no usable
22
  licence, are dropped first (stats `drop_rights`).
23
 
24
- Both input Parquets are pinned by SHA-256. Restore the WL Parquet before a rerun:
 
 
25
  git checkout v0.2.5 -- data/wolne_lektury/wolne_lektury.parquet
26
  python3 src/clean_wolne_lektury.py
 
27
  """
28
  from __future__ import annotations
29
 
 
21
  labels exactly the kept rows. The rows in that module's UNLICENSED, whose metadata gives no usable
22
  licence, are dropped first (stats `drop_rights`).
23
 
24
+ Both input Parquets are pinned by SHA-256. Since v2#109 the WL author column is filled by
25
+ src/build_wolne_lektury_attribution.py, which changes the Parquet bytes and not the text. To rerun this
26
+ script restore the v0.2.5 WL Parquet:
27
  git checkout v0.2.5 -- data/wolne_lektury/wolne_lektury.parquet
28
  python3 src/clean_wolne_lektury.py
29
+ and then run the builder again.
30
  """
31
  from __future__ import annotations
32
 
src/sources.py CHANGED
@@ -539,10 +539,33 @@ SOURCES = {
539
  "were matched by hand. A label is set only when the rights text is unambiguous: "
540
  "a public-domain statement with no year after 1955, or one licence with its "
541
  "version. wolne_lektury.licences.tsv lists each document's book (its slug on "
542
- "wolnelektury.pl), the Wolne Lektury rights text and the label. The released "
543
- "text is Wolne Lektury's plain-text export without its footer, so it carries no "
544
- "attribution line, footnotes or motifs; the slug is the attribution link.",
 
 
 
 
 
 
 
 
 
 
 
 
545
  "upstream": "https://wolnelektury.pl/api/books/",
 
 
 
 
 
 
 
 
 
 
 
546
  "domain": "literature",
547
  "created": "1500-01-01, 2024-12-31",
548
  "legal_note": "For v0.2.6, 63 documents whose text is an eltec_pol novel are dropped "
@@ -555,7 +578,24 @@ SOURCES = {
555
  "dropped because Wolne Lektury gives them no usable licence: two Horace odes "
556
  "translated by Paweł Kozioł, one marked only \"CC BY-SA\" with no version, the "
557
  "other public domain for Marceli Motty's translation and \"CC BY-SA\" for "
558
- "Kozioł's (polish-dynaword-v2#57).",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  "is_ocr": False,
560
  },
561
  "wikinews": {
 
539
  "were matched by hand. A label is set only when the rights text is unambiguous: "
540
  "a public-domain statement with no year after 1955, or one licence with its "
541
  "version. wolne_lektury.licences.tsv lists each document's book (its slug on "
542
+ "wolnelektury.pl), the Wolne Lektury rights text and the label. "
543
+ "wolne_lektury.attribution.jsonl has one line per document, in the order of the "
544
+ "Parquet: title, author, translator, the link to the work on wolnelektury.pl, the "
545
+ "full licence URL with its version (CC BY-SA 3.0 PL, 3.0 Unported and 4.0 are "
546
+ "kept apart; Wolne Lektury's own link for each of the 34 \"3.0 PL\" documents "
547
+ "names the Unported text and is kept next to ours), every person and note Wolne "
548
+ "Lektury credits, the print edition and publisher it names, the line "
549
+ "\"Książka pochodzi z serwisu Wolne Lektury\" and a note on how the text was "
550
+ "processed. The released text is Wolne Lektury's plain-text export without its "
551
+ "footer; the footer's content is restored in the sidecar. Our assessment is that "
552
+ "these are Wolne Lektury's modernised versions of the print editions, not the "
553
+ "editions as first printed. The edition a text follows is the one in Wolne "
554
+ "Lektury's print-edition field, kept in the sidecar as `source_edition` (named "
555
+ "for 6,032 of the 6,076 documents). Wolne Lektury's own commentary is not "
556
+ "taken over (see the scope note).",
557
  "upstream": "https://wolnelektury.pl/api/books/",
558
+ "provenance": "Pulled from SpeakLeash's public redistribution (`speakleash-ds-pub`, key "
559
+ "`wolne_lektury_corpus`) of Wolne Lektury's plain-text export. What SpeakLeash "
560
+ "did to the text is not documented, and who removed the export's footer is "
561
+ "not established. In this repository the only change to a text is trimming "
562
+ "leading and trailing whitespace; no paragraph is removed, and 63 whole "
563
+ "documents were dropped as eltec_pol novels and 2 for want of a usable "
564
+ "licence (src/clean_wolne_lektury.py). Wolne Lektury's metadata, fetched from "
565
+ "its public API and book XML, fills `author` (\"Autorzy oryginału: A; "
566
+ "Tłumaczenie: T\" for a translation) and the sidecar; "
567
+ "src/build_wolne_lektury_attribution.py writes both and "
568
+ "wolne_lektury.license-evidence.json, and checks every text against its SHA-1.",
569
  "domain": "literature",
570
  "created": "1500-01-01, 2024-12-31",
571
  "legal_note": "For v0.2.6, 63 documents whose text is an eltec_pol novel are dropped "
 
578
  "dropped because Wolne Lektury gives them no usable licence: two Horace odes "
579
  "translated by Paweł Kozioł, one marked only \"CC BY-SA\" with no version, the "
580
  "other public domain for Marceli Motty's translation and \"CC BY-SA\" for "
581
+ "Kozioł's (polish-dynaword-v2#57). "
582
+ "Flagged, nothing excluded (polish-dynaword-v2#109). `author` is Wolne Lektury's "
583
+ "name form (pseudonyms and cryptonyms as Wolne Lektury gives them); the first-"
584
+ "edition form of a name is not established. 37 documents have no author "
585
+ "because Wolne Lektury gives only \"Autor nieznany\" or \"Praca zbiorowa\"; "
586
+ "Wolne Lektury has no field for the original title of a translation. Of the "
587
+ "public-domain documents, 1,311 name a print edition published after 1955, "
588
+ "58 a critical edition and 229 an introduction, notes or commentary; the "
589
+ "editors of those editions and their death years are not established. 238 "
590
+ "documents keep period spelling by our heuristic count, so the modernisation "
591
+ "is not uniform. The text of 10 documents (all under LAL 1.3, no print edition "
592
+ "named) has a \"Komentarz\" heading, which we read as Wolne Lektury's own "
593
+ "commentary. In a hand check of 40 random documents, 3 carried matter from the "
594
+ "print edition (a publisher's address, a list of editions, an introduction) "
595
+ "and none carried Wolne Lektury's credits or notes. Whether footnotes of "
596
+ "the print editions were dropped could not be checked: it needs Wolne "
597
+ "Lektury's book XML (about 6,065 files, roughly 350 MB), which has not been "
598
+ "downloaded.",
599
  "is_ocr": False,
600
  },
601
  "wikinews": {
src/test_attribution_common.py ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Checks for the helpers shared by the literary attribution builders (src/attribution_common.py, v2#109)."""
2
+
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ import json
7
+
8
+ import pyarrow as pa
9
+ import pyarrow.parquet as pq
10
+ import pytest
11
+
12
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
13
+
14
+ from attribution_common import (BUILD_DYNAWORD_STEPS, PERIOD_SPELLING_AT, natural_order, period_spelling_rate,
15
+ read_sidecar, steps_with_counts, text_checks, text_digest, text_sha1, with_authors,
16
+ write_release, write_sidecar)
17
+
18
+
19
+ @pytest.mark.parametrize("name, expected", [
20
+ ("Sienkiewicz, Henryk", "Henryk Sienkiewicz"),
21
+ (" Prus, Bolesław ", "Bolesław Prus"),
22
+ ("Deotyma", "Deotyma"), # a pseudonym without a comma stays as given
23
+ ("Żmichowska, Narcyza", "Narcyza Żmichowska"),
24
+ ("Dumas, Aleksander (ojciec)", "Dumas, Aleksander (ojciec)"), # a qualifier: unchanged
25
+ ("A, B, C", "A, B, C"), # more than one comma: ambiguous, unchanged
26
+ (", Henryk", ", Henryk"),
27
+ ("Sienkiewicz,", "Sienkiewicz,"),
28
+ ("", ""),
29
+ ])
30
+ def test_natural_order_changes_only_family_comma_given(name, expected):
31
+ assert natural_order(name) == expected
32
+
33
+
34
+ def test_text_sha1_is_the_sha1_of_the_utf8_text():
35
+ assert text_sha1("") == "da39a3ee5e6b4b0d3255bfef95601890afd80709"
36
+ assert text_sha1("zażółć") != text_sha1("zazolc")
37
+
38
+
39
+ def test_sidecar_round_trips_one_sorted_line_per_record_with_lf_endings(tmp_path):
40
+ records = [{"id": "b", "x": "ż", "a": 1}, {"id": "a", "x": None, "a": 2}]
41
+ path = tmp_path / "s.attribution.jsonl"
42
+ write_sidecar(path, records)
43
+ raw = path.read_bytes()
44
+ assert b"\r" not in raw and raw.endswith(b"\n") and raw.count(b"\n") == 2
45
+ assert raw.decode("utf-8").splitlines()[0] == '{"a": 1, "id": "b", "x": "ż"}'
46
+ assert read_sidecar(path) == records
47
+
48
+
49
+ def _table(texts):
50
+ return pa.table({"id": [f"r{i}" for i in range(len(texts))], "text": texts, "author": [""] * len(texts)})
51
+
52
+
53
+ def _records(texts, authors):
54
+ return [{"id": f"r{i}", "text_sha1": text_sha1(t), "author": a} for i, (t, a) in enumerate(zip(texts, authors))]
55
+
56
+
57
+ def test_with_authors_sets_only_the_author_column():
58
+ texts = ["jeden", "dwa"]
59
+ table = _table(texts)
60
+ out = with_authors(table, _records(texts, ["Ala Kot", ""]))
61
+ assert out.column("author").to_pylist() == ["Ala Kot", ""]
62
+ assert out.drop_columns(["author"]).equals(table.drop_columns(["author"]))
63
+ assert out.schema.equals(table.schema)
64
+
65
+
66
+ def test_with_authors_refuses_changed_text_wrong_order_and_wrong_length():
67
+ texts = ["jeden", "dwa"]
68
+ good = _records(texts, ["a", "b"])
69
+ with pytest.raises(SystemExit, match="text must not change"):
70
+ with_authors(_table(["jeden", "dwa!"]), good)
71
+ with pytest.raises(SystemExit, match="in order"):
72
+ with_authors(_table(texts), good[::-1])
73
+ with pytest.raises(SystemExit, match="in order"):
74
+ with_authors(_table(texts), good[:1])
75
+
76
+
77
+ def test_text_digest_depends_on_ids_and_text_but_not_on_the_other_columns():
78
+ table = _table(["jeden", "dwa"])
79
+ assert text_digest(table) == text_digest(table.set_column(2, "author", pa.array(["a", "b"])))
80
+ assert text_digest(table) != text_digest(_table(["jeden", "dwa!"]))
81
+ assert text_digest(table) != text_digest(table.set_column(0, "id", pa.array(["r1", "r0"])))
82
+
83
+
84
+ def test_period_spelling_rate_counts_words_with_a_period_letter():
85
+ assert period_spelling_rate("") == 0.0
86
+ assert period_spelling_rate("Ala ma kota, a kot ma Alę.") == 0.0
87
+ assert period_spelling_rate("w téj chwili") == pytest.approx(1000 / 3)
88
+ assert period_spelling_rate("Poeſya") > PERIOD_SPELLING_AT
89
+ # a few loanwords or a stray letter in a long text stay under the threshold; a text in period spelling does not
90
+ assert period_spelling_rate(("zwykły tekst " * 400) + "Café wiérsz") < PERIOD_SPELLING_AT
91
+ assert period_spelling_rate("téj swéj całéj " * 100 + "zwykły tekst " * 100) > PERIOD_SPELLING_AT
92
+
93
+
94
+ def test_write_release_writes_all_four_files_with_the_author_column_filled(tmp_path):
95
+ texts = ["jeden", "dwa"]
96
+ pq.write_table(_table(texts), tmp_path / "x.parquet")
97
+ (tmp_path / "x.stats.json").write_text(json.dumps({"kept": 2, "authors_with_value": 0}), encoding="utf-8")
98
+ table = pq.read_table(tmp_path / "x.parquet")
99
+ records = _records(texts, ["Ala Kot", ""])
100
+ stats = write_release(tmp_path, "x", table, records, {"summary": 1})
101
+ assert stats == {"kept": 2, "authors_with_value": 1}
102
+ assert json.loads((tmp_path / "x.stats.json").read_text(encoding="utf-8")) == stats
103
+ assert pq.read_table(tmp_path / "x.parquet").column("author").to_pylist() == ["Ala Kot", ""]
104
+ assert read_sidecar(tmp_path / "x.attribution.jsonl") == records
105
+ assert json.loads((tmp_path / "x.license-evidence.json").read_text(encoding="utf-8")) == {"summary": 1}
106
+ assert sorted(p.name for p in tmp_path.iterdir()) == [
107
+ "x.attribution.jsonl", "x.license-evidence.json", "x.parquet", "x.stats.json"]
108
+
109
+
110
+ def test_write_release_changes_nothing_when_the_text_differs(tmp_path):
111
+ pq.write_table(_table(["jeden"]), tmp_path / "x.parquet")
112
+ (tmp_path / "x.stats.json").write_text("{}", encoding="utf-8")
113
+ before = (tmp_path / "x.parquet").read_bytes()
114
+ with pytest.raises(SystemExit, match="text must not change"):
115
+ write_release(tmp_path, "x", pq.read_table(tmp_path / "x.parquet"), _records(["inny"], ["a"]), {})
116
+ assert (tmp_path / "x.parquet").read_bytes() == before
117
+ assert sorted(p.name for p in tmp_path.iterdir()) == ["x.parquet", "x.stats.json"]
118
+
119
+
120
+ def test_steps_with_counts_turns_a_stat_key_into_rows_dropped():
121
+ steps = [{"step": "a", "stat": "drop_x"}, {"step": "b"}]
122
+ assert steps_with_counts(steps, {"drop_x": 7, "other": 1}) == [{"step": "a", "rows_dropped": 7}, {"step": "b"}]
123
+ assert steps[0]["stat"] == "drop_x" # the input is not changed
124
+ with pytest.raises(KeyError):
125
+ steps_with_counts(steps, {})
126
+
127
+
128
+ def test_the_build_dynaword_steps_say_only_the_strip_changes_text_and_name_the_drop_counters():
129
+ assert [s["changes_text"] for s in BUILD_DYNAWORD_STEPS if s["changes_text"] != "no"] == [
130
+ "leading and trailing whitespace only"]
131
+ assert [s["stat"] for s in BUILD_DYNAWORD_STEPS if "stat" in s] == ["drop_short", "drop_lang", "drop_ocr", "drop_dup"]
132
+
133
+
134
+ def test_text_checks_count_whitespace_headings_and_period_spelling_with_row_ids():
135
+ texts = ["Zwykły tekst.", " Z odstępem.", "Wstęp\n\nTreść.", "Przedmowa\nTreść.\nWstęp\nPotem. W Wstęp mid-line nie liczy się.",
136
+ "Wstępniak nie jest nagłówkiem.", ("téj swéj całéj " * 10).strip()]
137
+ checks = text_checks(_table(texts))
138
+ assert checks["rows"] == 6 and checks["leading_or_trailing_whitespace"] == 1
139
+ assert checks["section_headings"] == {"przedmowa": {"rows": 1, "ids": ["r3"]},
140
+ "wstęp": {"rows": 2, "ids": ["r2", "r3"]}}
141
+ assert checks["period_spelling"] == {"words_per_1000_at_least": PERIOD_SPELLING_AT, "rows": 1, "ids": ["r5"]}
142
+
143
+
144
+ def test_text_checks_find_nothing_in_plain_text():
145
+ checks = text_checks(_table(["Ala ma kota.", "Kot ma Alę."]))
146
+ assert checks["section_headings"] == {} and checks["period_spelling"]["ids"] == []
147
+ assert checks["soft_hyphen"] == {"rows": 0, "occurrences": 0, "per_row": {}}
148
+
149
+
150
+ def test_text_checks_count_soft_hyphens_per_row():
151
+ checks = text_checks(_table(["kamie\u00adnica, kamie\u00adnica", "bez", "dwa\u00adtrzy"]))
152
+ assert checks["soft_hyphen"] == {"rows": 2, "occurrences": 3, "per_row": {"r0": 2, "r2": 1}}
src/test_attribution_release.py ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Checks on the released wolne_lektury and eltec_pol files: the attribution sidecar, the `author` column, the
2
+ evidence file and the datasheet (v2#109). The builders' logic is tested in test_build_eltec_pol_attribution.py and
3
+ test_wolne_lektury_attribution.py; these tests read what is committed."""
4
+
5
+ import json
6
+ import re
7
+ import sys
8
+ from collections import Counter, namedtuple
9
+ from pathlib import Path
10
+
11
+ import pyarrow.parquet as pq
12
+ import pytest
13
+
14
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
15
+
16
+ import build_wolne_lektury_attribution as wl
17
+ import make_docs
18
+ from attribution_common import read_sidecar, text_digest, text_sha1
19
+ from sejm_api_common import check_pin
20
+ from sources import SOURCES
21
+
22
+ ROOT = Path(__file__).resolve().parents[1]
23
+ Release = namedtuple("Release", "name build table records evidence stats")
24
+ BUILDS = {"wolne_lektury": wl}
25
+ ROWS = {"wolne_lektury": 6076}
26
+ CREDIT_LINE = "Książka pochodzi z serwisu Wolne Lektury"
27
+ # The full URL of each licence version, written out here and not imported, so that changing the builder's table fails.
28
+ LICENCE_URLS = {
29
+ "public-domain": None,
30
+ "LAL-1.3": "http://artlibre.org/licence/lal/pl/",
31
+ "CC-BY-SA-3.0-PL": "https://creativecommons.org/licenses/by-sa/3.0/pl/",
32
+ "CC-BY-SA-3.0": "https://creativecommons.org/licenses/by-sa/3.0/",
33
+ "CC-BY-SA-4.0": "https://creativecommons.org/licenses/by-sa/4.0/",
34
+ }
35
+ WL_LICENCES = {"public-domain": 4559, "LAL-1.3": 1467, "CC-BY-SA-3.0-PL": 34, "CC-BY-SA-3.0": 5, "CC-BY-SA-4.0": 11}
36
+ FORBIDDEN_WORDS = re.compile(r"lawyer|legal advis|solicitor|counsel", re.I) # we write "our assessment"
37
+
38
+
39
+ def folder(name: str) -> Path:
40
+ return ROOT / "data" / name
41
+
42
+
43
+ def load(name: str) -> Release:
44
+ path = folder(name)
45
+ return Release(
46
+ name, BUILDS[name], pq.read_table(path / f"{name}.parquet"), read_sidecar(path / f"{name}.attribution.jsonl"),
47
+ json.loads((path / f"{name}.license-evidence.json").read_text(encoding="utf-8")),
48
+ json.loads((path / f"{name}.stats.json").read_text(encoding="utf-8")))
49
+
50
+
51
+ @pytest.fixture(scope="module", params=sorted(BUILDS))
52
+ def release(request) -> Release:
53
+ return load(request.param)
54
+
55
+
56
+ @pytest.fixture(scope="module")
57
+ def wl_release() -> Release:
58
+ return load("wolne_lektury")
59
+
60
+
61
+ def test_the_sidecar_has_one_line_per_row_in_order_with_matching_ids(release):
62
+ ids = release.table.column("id").to_pylist()
63
+ assert len(ids) == len(release.records) == ROWS[release.name]
64
+ assert [r["id"] for r in release.records] == ids and len(set(ids)) == len(ids)
65
+
66
+
67
+ def test_the_sidecar_is_sorted_json_with_lf_endings_and_no_extra_lines(release):
68
+ raw = (folder(release.name) / f"{release.name}.attribution.jsonl").read_bytes()
69
+ assert b"\r" not in raw and raw.endswith(b"\n") and not raw.endswith(b"\n\n")
70
+ lines = raw.decode("utf-8").split("\n")[:-1]
71
+ assert lines == [json.dumps(r, ensure_ascii=False, sort_keys=True) for r in release.records]
72
+
73
+
74
+ def test_the_text_is_the_text_the_builder_was_written_for(release):
75
+ assert text_digest(release.table) == release.build.TEXT_DIGEST == release.evidence["text_digest"]
76
+ for record, text in zip(release.records, release.table.column("text").to_pylist(), strict=True):
77
+ assert record["text_sha1"] == text_sha1(text), record["id"]
78
+
79
+
80
+ def test_the_released_parquet_is_the_one_the_builder_wrote(release):
81
+ check_pin(folder(release.name) / f"{release.name}.parquet", release.build.OUTPUT_SHA256,
82
+ f"rerun src/build_{release.name}_attribution.py and pin the new hash")
83
+
84
+
85
+ def test_the_author_column_is_the_sidecars_author_and_the_stats_count_it(release):
86
+ authors = release.table.column("author").to_pylist()
87
+ assert authors == [r["author"] for r in release.records]
88
+ assert release.stats["authors_with_value"] == sum(map(bool, authors)) == release.evidence["summary"]["author_filled"]
89
+ assert release.table.num_rows == release.stats["kept"]
90
+ assert release.evidence["summary"]["rows"] == release.table.num_rows
91
+
92
+
93
+ def test_the_evidence_counts_are_those_of_the_sidecar_and_the_text_checks_those_of_the_text(release):
94
+ assert release.evidence["summary"] == release.build.summary(release.records)
95
+ assert release.evidence["text_checks"] == release.build.text_checks(release.table)
96
+ assert release.evidence["paragraphs_removed_without_a_mark"] == 0
97
+ assert release.evidence["built_from_parquet_sha256"] == release.build.INPUT_SHA256
98
+
99
+
100
+ def test_the_licence_column_and_url_follow_the_sidecar_and_name_the_full_version(release):
101
+ assert release.table.column("license").to_pylist() == [r["license"] for r in release.records]
102
+ for record in release.records:
103
+ assert record["license_url"] == LICENCE_URLS[record["license"]], record["id"]
104
+
105
+
106
+ def test_no_released_file_mentions_a_lawyer(release):
107
+ path = folder(release.name)
108
+ for suffix in ("attribution.jsonl", "license-evidence.json", "md"):
109
+ assert not FORBIDDEN_WORDS.search((path / f"{release.name}.{suffix}").read_text(encoding="utf-8")), suffix
110
+
111
+
112
+ def test_the_datasheet_is_what_make_docs_writes_for_the_stats(release):
113
+ card = (folder(release.name) / f"{release.name}.md").read_text(encoding="utf-8").replace("\r\n", "\n")
114
+ assert card == make_docs.datasheet(release.name, SOURCES[release.name], release.stats).replace("\r\n", "\n")
115
+
116
+
117
+ def test_the_datasheet_says_the_texts_are_modernised_editions_and_names_the_edition_basis(release):
118
+ card = (folder(release.name) / f"{release.name}.md").read_text(encoding="utf-8")
119
+ assert "modernised" in card and "Author metadata present for **" in card
120
+ assert f"**{release.stats['authors_with_value']:,}**" in card
121
+ assert "not assessed" not in card.lower()
122
+
123
+
124
+ # wolne_lektury
125
+
126
+ def test_every_wl_record_carries_the_credit_line_the_work_link_and_the_processing_note(wl_release):
127
+ for record in wl_release.records:
128
+ assert record["credit_line"] == CREDIT_LINE == wl.CREDIT_LINE, record["id"]
129
+ assert record["modification_note"] and record["modified"] is True, record["id"]
130
+ assert record["work_url"] == f"https://wolnelektury.pl/katalog/lektura/{record['slug']}/", record["id"]
131
+ assert record["title"] and record["wl_rights"], record["id"]
132
+ assert record["source_edition"] is not None and record["publisher"], record["id"]
133
+
134
+
135
+ def test_wl_licence_versions_are_counted_and_kept_apart(wl_release):
136
+ counts = Counter(r["license"] for r in wl_release.records)
137
+ assert dict(counts) == WL_LICENCES == wl_release.stats["licenses"] == wl_release.evidence["summary"]["licenses"]
138
+ by_label = {label: {r["license_url"] for r in wl_release.records if r["license"] == label} for label in WL_LICENCES}
139
+ assert by_label == {label: {url} for label, url in LICENCE_URLS.items() if label in WL_LICENCES}
140
+ # WL's own link for a 3.0 PL record can name the Unported text (`/by-sa/3.0/`, `/by-sa/3.0/deed.pl`); the sidecar keeps both
141
+ pl = [r for r in wl_release.records if r["license"] == "CC-BY-SA-3.0-PL"]
142
+ unported = [r for r in pl if "/3.0/pl" not in r["wl_license_url"]]
143
+ assert len(unported) == wl_release.evidence["summary"]["wl_url_names_another_version"] == 34
144
+ assert all("/by-sa/3.0/" in r["wl_license_url"] for r in unported)
145
+
146
+
147
+ def test_wl_metadata_is_filled_wherever_wl_has_it(wl_release):
148
+ for record in wl_release.records:
149
+ people = [a for a in record["authors"] if a not in wl.NO_PERSON]
150
+ named_translators = [t for t in record["translators"] if t not in wl.NO_TRANSLATOR]
151
+ assert bool(record["author"]) == bool(people or named_translators), record["id"]
152
+ if record["author"]:
153
+ assert all(name in record["author"] for name in people + record["translators"]), record["id"]
154
+ assert ("Tłumaczenie: " in record["author"]) == bool(record["translators"]), record["id"]
155
+ assert ("Autorzy oryginału: " in record["author"]) == bool(people and record["translators"]), record["id"]
156
+ summary = wl_release.evidence["summary"]
157
+ assert summary["title_filled"] == summary["rows"] == 6076
158
+ assert summary["translator_filled"] == sum(bool(r["translators"]) for r in wl_release.records)
159
+ assert summary["original_title_filled"] == 0
160
+
161
+
162
+ def test_the_hand_read_of_the_notes_and_prefaces_sample_refers_to_rows_in_the_sample(wl_release):
163
+ ids = [r["id"] for r in wl_release.records]
164
+ sample = set(wl.notes_sample(ids))
165
+ result = wl_release.evidence["notes_and_prefaces"]["hand_sample"]["result"]
166
+ assert len(sample) == wl_release.evidence["notes_and_prefaces"]["hand_sample"]["rows"] == 40
167
+ assert set(result["from_the_print_edition"]) <= sample and result["wl_credit_or_note_text"] == 0
168
+
169
+
170
+ def test_the_rows_under_a_komentarz_heading_are_all_wl_teaching_material(wl_release):
171
+ ids = set(wl_release.evidence["text_checks"]["section_headings"]["komentarz"]["ids"])
172
+ rows = [r for r in wl_release.records if r["id"] in ids]
173
+ assert len(rows) == len(ids) == wl_release.evidence["notes_and_prefaces"]["wl_commentary"]["rows"] == 10
174
+ assert {r["license"] for r in rows} == {"LAL-1.3"} and not any(r["source_edition"] for r in rows)
175
+
176
+
177
+ def test_wl_licensed_records_list_the_people_and_notes_wl_credits(wl_release):
178
+ licensed = [r for r in wl_release.records if r["license"] != "public-domain"]
179
+ assert len(licensed) == 1517
180
+ for record in licensed:
181
+ assert record["credit_notes"] and any(record["credits"].values()), record["id"]
src/test_wolne_lektury_attribution.py ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Checks for the wolne_lektury author metadata and attribution sidecar (src/build_wolne_lektury_attribution.py,
2
+ v2#109). The tests run on made-up headers; the checks on the released files are in test_attribution_release.py."""
3
+
4
+ import csv
5
+ import hashlib
6
+ import json
7
+ import sys
8
+ from collections import Counter
9
+ from pathlib import Path
10
+
11
+ import pyarrow as pa
12
+ import pyarrow.parquet as pq
13
+ import pytest
14
+
15
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
16
+
17
+ import build_wolne_lektury_attribution as build
18
+ from attribution_common import read_sidecar, text_sha1
19
+ from build_wolne_lektury_attribution import (CREDIT_LINE, EVIDENCE, IDS_LISTED_FOR, LICENCE_URLS, MODIFICATION_NOTE,
20
+ NORMALISATION_STEPS, NOTES_SAMPLE_SIZE, SIDECAR, author_string,
21
+ build_evidence, build_records, edition_flags, edition_review,
22
+ make_record, notes_sample, parse_header, summary, text_checks,
23
+ wl_commentary)
24
+ from sejm_api_common import sha256_file
25
+ from sources import SOURCES
26
+ from wolne_lektury_licences import (CC_BY_SA_3, CC_BY_SA_3_PL, CC_BY_SA_4, DATA, LABELS, LAL, LICENCES,
27
+ PUBLIC_DOMAIN)
28
+
29
+ DC = 'xmlns:dc="http://purl.org/dc/elements/1.1/"'
30
+
31
+
32
+ def rdf(slug="lalka", creators=("Prus, Bolesław",), title="Lalka", rights="Domena publiczna - Bolesław Prus zm. 1912",
33
+ urls=(), source="Bolesław Prus, Lalka, Warszawa 1890.", wrapper="utwor", translators=(), extra=""):
34
+ """A header laid out like Wolne Lektury's: a wrapper element, then an rdf:RDF with one dc declaration per field."""
35
+ def el(name, value):
36
+ return f'<dc:{name} xml:lang="pl" {DC}>{value}</dc:{name}>\n'
37
+ body = "".join(el("creator", c) for c in creators) + el("title", title)
38
+ body += "".join(el("contributor.translator", t) for t in translators)
39
+ body += el("contributor.editor", "Kopeć, Aleksandra") + el("publisher", "Fundacja Nowoczesna Polska")
40
+ body += el("description", "Publikacja zrealizowana w ramach projektu Wolne Lektury (http://wolnelektury.pl).")
41
+ body += el("identifier.url", f"http://wolnelektury.pl/katalog/lektura/{slug}")
42
+ body += el("source", source) + f"<dc:source.URL {DC}/>\n"
43
+ body += el("rights", rights) + "".join(el("rights.license", u) for u in urls) + extra
44
+ return (f'<{wrapper}><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n'
45
+ f'<rdf:Description rdf:about="http://redakcja.wolnelektury.pl/documents/book/{slug}/">\n{body}'
46
+ "</rdf:Description>\n</rdf:RDF>")
47
+
48
+
49
+ def licence(label=PUBLIC_DOMAIN, slug="lalka", row_id="wolne_lektury_1", match="exact"):
50
+ return {"id": row_id, "slug": slug, "match": match, "license": label, "wl_rights": "", "wl_license_url": ""}
51
+
52
+
53
+ # One header and its label for each licence version, as Wolne Lektury words them.
54
+ VERSIONS = {
55
+ PUBLIC_DOMAIN: dict(rights="Domena publiczna - Bolesław Prus zm. 1912"),
56
+ LAL: dict(rights="Licencja Wolnej Sztuki 1.3", urls=["http://artlibre.org/licence/lal/pl/"]),
57
+ CC_BY_SA_3_PL: dict(rights="Creative Commons Uznanie autorstwa - Na tych samych warunkach 3.0 PL",
58
+ urls=["http://creativecommons.org/licenses/by-sa/3.0/"]), # WL's URL is Unported's
59
+ CC_BY_SA_3: dict(rights="Creative Commons Uznanie autorstwa - Na tych samych warunkach 3.0",
60
+ urls=["http://creativecommons.org/licenses/by-sa/3.0/deed.pl"]),
61
+ CC_BY_SA_4: dict(rights="Creative Commons Uznanie Autorstwa-Na Tych Samych Warunkach 4.0 Międzynarodowe",
62
+ urls=["https://creativecommons.org/licenses/by-sa/4.0/deed.pl"]),
63
+ }
64
+
65
+
66
+ def test_parse_header_reads_the_fields_the_sidecar_needs():
67
+ header = parse_header(rdf(creators=("Szolem Alejchem", "Kowalski, Jan"), translators=("Friedman, Michał",),
68
+ urls=["http://artlibre.org/licence/lal/pl/"], rights="Licencja Wolnej Sztuki 1.3"))
69
+ assert header["creators"] == ["Szolem Alejchem", "Kowalski, Jan"]
70
+ assert header["title"] == "Lalka"
71
+ assert header["contributors"] == {"editor": ["Kopeć, Aleksandra"], "translator": ["Friedman, Michał"]}
72
+ assert header["publisher"] == "Fundacja Nowoczesna Polska"
73
+ assert header["source"] == "Bolesław Prus, Lalka, Warszawa 1890." and header["source_url"] == ""
74
+ assert header["work_url"].endswith("/katalog/lektura/lalka")
75
+ # `rights` and `rights.license` are two fields: neither takes the other's value.
76
+ assert header["rights"] == ["Licencja Wolnej Sztuki 1.3"]
77
+ assert header["license_urls"] == ["http://artlibre.org/licence/lal/pl/"]
78
+
79
+
80
+ @pytest.mark.parametrize("wrapper", ["utwor", "liryka_l", "powiesc", "dramat_wierszowany_lp"])
81
+ def test_parse_header_ignores_the_wrapper_element(wrapper):
82
+ assert parse_header(rdf(wrapper=wrapper))["title"] == "Lalka"
83
+
84
+
85
+ @pytest.mark.parametrize("declaration", ['<!DOCTYPE x [<!ENTITY a "b">]>', '<!ENTITY a "b">'])
86
+ def test_parse_header_refuses_dtd_and_entities(declaration):
87
+ with pytest.raises(SystemExit, match="DTD or entity"):
88
+ parse_header(declaration + rdf())
89
+
90
+
91
+ def test_author_string_credits_authors_and_the_translator():
92
+ assert author_string(["Bolesław Prus"], []) == "Bolesław Prus"
93
+ assert author_string(["A B", "C D"], []) == "A B; C D"
94
+ assert author_string(["Szolem Alejchem"], ["Michał Friedman"]) == \
95
+ "Autorzy oryginału: Szolem Alejchem; Tłumaczenie: Michał Friedman"
96
+ # a pseudonym stays as Wolne Lektury gives it
97
+ assert author_string(["Bolesław Prus", "Deotyma"], []) == "Bolesław Prus; Deotyma"
98
+ # no person is credited as author: the named translator is, or nothing is
99
+ assert author_string(["Praca zbiorowa"], []) == author_string([], []) == ""
100
+ assert author_string(["Autor nieznany"], ["Jan Kowalski"]) == "Tłumaczenie: Jan Kowalski"
101
+ assert author_string(["Autor nieznany"], ["anonimowy", "Jan Kowalski"]) == "Tłumaczenie: anonimowy; Jan Kowalski"
102
+ assert author_string(["Autor nieznany"], ["nieznany"]) == author_string(["Praca zbiorowa"], ["anonimowy"]) == ""
103
+ # an unknown translator is still said to be unknown when there is an author
104
+ assert author_string(["A B"], ["nieznany"]) == "Autorzy oryginału: A B; Tłumaczenie: nieznany"
105
+
106
+
107
+ @pytest.mark.parametrize("label", LABELS)
108
+ def test_make_record_gives_each_licence_version_its_own_full_url(label):
109
+ record = make_record("wolne_lektury_1", "Tekst.", licence(label), parse_header(rdf(**VERSIONS[label])))
110
+ assert record["license"] == label and record["license_url"] == LICENCE_URLS[label]
111
+ assert record["credit_line"] == CREDIT_LINE == "Książka pochodzi z serwisu Wolne Lektury"
112
+ assert record["modification_note"] == MODIFICATION_NOTE and record["modified"] is True
113
+ assert record["work_url"] == "https://wolnelektury.pl/katalog/lektura/lalka/"
114
+ assert record["text_sha1"] == text_sha1("Tekst.")
115
+ assert record["title"] == "Lalka" and record["author"] == "Bolesław Prus"
116
+ assert record["credits"] == {"editor": ["Aleksandra Kopeć"]} and record["credit_notes"]
117
+
118
+
119
+ def test_the_licence_urls_name_the_version_and_the_label_not_the_url_wl_gives():
120
+ assert LICENCE_URLS == {
121
+ PUBLIC_DOMAIN: None,
122
+ LAL: "http://artlibre.org/licence/lal/pl/",
123
+ CC_BY_SA_3_PL: "https://creativecommons.org/licenses/by-sa/3.0/pl/",
124
+ CC_BY_SA_3: "https://creativecommons.org/licenses/by-sa/3.0/",
125
+ CC_BY_SA_4: "https://creativecommons.org/licenses/by-sa/4.0/",
126
+ }
127
+ pl = make_record("x", "t", licence(CC_BY_SA_3_PL), parse_header(rdf(**VERSIONS[CC_BY_SA_3_PL])))
128
+ assert pl["license_url"].endswith("/3.0/pl/") and pl["wl_license_url"].endswith("/by-sa/3.0/")
129
+
130
+
131
+ def test_make_record_keeps_every_slug_of_identical_texts_and_the_first_is_the_link():
132
+ record = make_record("x", "t", licence(slug="lalka lalka-2"), parse_header(rdf()))
133
+ assert record["slug"] == "lalka" and record["slugs"] == ["lalka", "lalka-2"]
134
+ assert "slugs" not in make_record("x", "t", licence(), parse_header(rdf()))
135
+
136
+
137
+ def test_a_renamed_book_is_accepted_under_its_listed_slug_only():
138
+ old, new = next(iter(build.HEADER_SLUG.items()))
139
+ record = make_record("x", "t", licence(slug=old), parse_header(rdf(slug=new)))
140
+ assert record["slug"] == old and record["work_url"] == f"https://wolnelektury.pl/katalog/lektura/{old}/"
141
+ with pytest.raises(SystemExit, match="not book"): # the alias does not make any other slug pass
142
+ make_record("x", "t", licence(slug=old), parse_header(rdf(slug=old)))
143
+
144
+
145
+ def test_make_record_credits_translators_and_every_contributor_in_natural_order():
146
+ header = parse_header(rdf(creators=("Alejchem, Szolem",), translators=("Friedman, Michał", "Nowak, Anna")))
147
+ record = make_record("x", "t", licence(), header)
148
+ assert record["authors"] == ["Szolem Alejchem"]
149
+ assert record["translators"] == ["Michał Friedman", "Anna Nowak"]
150
+ assert record["author"] == "Autorzy oryginału: Szolem Alejchem; Tłumaczenie: Michał Friedman; Anna Nowak"
151
+ assert "translator" not in record["credits"]
152
+
153
+
154
+ def test_make_record_keeps_the_placeholder_author_in_authors_but_not_in_author():
155
+ record = make_record("x", "t", licence(), parse_header(rdf(creators=("Praca zbiorowa",))))
156
+ assert record["authors"] == ["Praca zbiorowa"] and record["author"] == ""
157
+
158
+
159
+ def test_make_record_fails_closed():
160
+ good = parse_header(rdf())
161
+ with pytest.raises(SystemExit, match="not one of"):
162
+ make_record("x", "t", licence("CC-BY-4.0"), good)
163
+ with pytest.raises(SystemExit, match="rerun"): # the header no longer gives the row's label
164
+ make_record("x", "t", licence(LAL), good)
165
+ with pytest.raises(SystemExit, match="not book"): # the header is another book's
166
+ make_record("x", "t", licence(slug="other"), good)
167
+
168
+
169
+ def test_build_records_needs_every_row_and_header():
170
+ table = pa.table({"id": ["a", "b"], "text": ["x", "y"]})
171
+ rows = [licence(row_id="a"), licence(row_id="b", slug="lalka-2")]
172
+ headers = {"lalka": rdf(), "lalka-2": rdf(slug="lalka-2")}
173
+ out = build_records(table, rows, headers)
174
+ assert [r["id"] for r in out] == ["a", "b"] and [r["slug"] for r in out] == ["lalka", "lalka-2"]
175
+ with pytest.raises(SystemExit, match="not cached"):
176
+ build_records(table, rows, {"lalka": rdf()})
177
+ with pytest.raises(SystemExit, match="exactly the Parquet rows"):
178
+ build_records(table, rows[:1], headers)
179
+ with pytest.raises(SystemExit, match="exactly the Parquet rows"):
180
+ build_records(table, [rows[0], rows[0]], headers)
181
+
182
+
183
+ def record(label=PUBLIC_DOMAIN, source="Bolesław Prus, Lalka, Warszawa 1890.", translators=(), row_id="a"):
184
+ header = parse_header(rdf(source=source, translators=translators, **VERSIONS[label]))
185
+ return make_record(row_id, "Tekst.", licence(label, row_id=row_id), header)
186
+
187
+
188
+ @pytest.mark.parametrize("source, expected", [
189
+ ("Bolesław Prus, Lalka, Warszawa 1890.", []),
190
+ ("Bolesław Prus, Lalka, Warszawa 1955.", []), # 1955 itself is not after 1955
191
+ ("Bolesław Prus, Lalka, PIW, Warszawa 1956.", ["print_after_1955"]),
192
+ ("Ignacy Krasicki, Bajki, oprac. Zbigniew Goliński, Ossolineum, Kraków, 1975", ["editor_credit", "print_after_1955"]),
193
+ ("Adam Mickiewicz, Dzieła, wydanie krytyczne, Wrocław 1950", ["critical"]),
194
+ ("Horacy, Wybór poezji, wyd. Filomata, Drukarnia Naukowa we Lwowie, Lwów 1935.", ["editor_credit"]), # printer, not edition
195
+ ("Jan Kochanowski, Dzieła, wydanie naukowe, Wrocław 1950", ["critical"]),
196
+ ("B. Prus, Lalka, wyd. Gebethner i Wolff, Warszawa 1890.", []), # "wyd." names a publisher, not an editor
197
+ ("A. Malczewski, Maria. Ze wstępem i objaśnieniami, Lwów 1925", ["apparatus"]),
198
+ ("Biblioteka Narodowa, seria I, nr 1, 1930", ["national_library"]),
199
+ ("", []),
200
+ ])
201
+ def test_edition_flags_follow_the_print_edition_field(source, expected):
202
+ assert sorted(edition_flags(record(source=source))) == sorted(expected)
203
+
204
+
205
+ def test_edition_flags_add_the_translator_and_skip_licensed_rows():
206
+ assert edition_flags(record(translators=("Friedman, Michał",))) == ["translator_credited"]
207
+ for label in (LAL, CC_BY_SA_3_PL, CC_BY_SA_3, CC_BY_SA_4):
208
+ assert edition_flags(record(label, source="Oprac. A. B., Kraków 1999", translators=("A, B",))) == []
209
+
210
+
211
+ def test_edition_review_counts_flags_and_lists_ids_only_for_the_ones_to_act_on():
212
+ records = [record(source="Wydanie krytyczne, Wrocław 1960", row_id="a"), record(row_id="b"),
213
+ record(LAL, source="Wydanie krytyczne 1960", row_id="c")]
214
+ review = edition_review(records)
215
+ assert review["rows_flagged"] == 1 and review["flags"] == {"critical": 1, "print_after_1955": 1}
216
+ assert review["ids"] == {"critical": ["a"], "print_after_1955": ["a"]} and set(review["ids"]) == set(IDS_LISTED_FOR)
217
+ assert review["wl_editor_credits"] == {"distinct_names": 1, "most_common": [("Aleksandra Kopeć", 3)],
218
+ "meaning": review["wl_editor_credits"]["meaning"]}
219
+ assert "death years" in review["not_established"]
220
+
221
+
222
+ TEXTS = {
223
+ "clean": "Henryk Sienkiewicz\n\nPotop\n\nISBN 978-83-288-2528-4\n\n\nTekst powieści.",
224
+ "translated": "Szolem Alejchem\n\nTewje\ntłum. Michał Friedman\n\nTekst.",
225
+ "heading": "Autor\n\nTytuł\n\nWstęp\n\nSłowo od autora.\n\nPrzedmowa\n\nDruga.",
226
+ "footer": "Autor\n\nTytuł\n\nTekst.\n\n-----\nTa lektura jest na stronie wolnelektury.pl",
227
+ "mark": "Autor\n\nTytuł\n\nTekst [przypis edytorski] dalej.",
228
+ "padded": " Autor\n\nTytuł\n\nTekst.\n",
229
+ "period": ("w téj chwili swéj całéj " * 20).strip(),
230
+ }
231
+
232
+
233
+ def test_text_checks_count_each_thing_over_every_row():
234
+ table = pa.table({"id": list(TEXTS), "text": list(TEXTS.values())})
235
+ checks = text_checks(table)
236
+ assert checks["rows"] == len(TEXTS)
237
+ assert checks["wolne_lektury_credit_text"] == 1 and checks["footer_found_by_strip_wl_footer"] == 1
238
+ assert checks["wolne_lektury_footnote_markers"] == 1 and checks["leading_or_trailing_whitespace"] == 1
239
+ assert checks["header_isbn_line"] == 1 and checks["header_translator_line"] == 1
240
+ assert checks["section_headings"] == {"przedmowa": {"rows": 1, "ids": ["heading"]},
241
+ "wstęp": {"rows": 1, "ids": ["heading"]}}
242
+ assert checks["period_spelling"]["rows"] == 1 and checks["period_spelling"]["ids"] == ["period"]
243
+
244
+
245
+ def test_text_checks_find_nothing_in_plain_text():
246
+ table = pa.table({"id": ["a"], "text": ["Autor\n\nTytuł\n\nZwykły tekst. Wstępnie zaplanowany."]})
247
+ checks = text_checks(table)
248
+ assert {k: v for k, v in checks.items() if isinstance(v, int)} == {
249
+ "rows": 1, "wolne_lektury_credit_text": 0, "wolne_lektury_footnote_markers": 0,
250
+ "footer_found_by_strip_wl_footer": 0, "leading_or_trailing_whitespace": 0, "header_isbn_line": 0,
251
+ "header_translator_line": 0}
252
+ assert checks["section_headings"] == {} and checks["period_spelling"]["rows"] == 0
253
+
254
+
255
+ def test_notes_sample_is_the_same_draw_every_time():
256
+ ids = [f"r{i}" for i in range(500)]
257
+ sample = notes_sample(ids)
258
+ assert len(sample) == len(set(sample)) == NOTES_SAMPLE_SIZE and set(sample) <= set(ids)
259
+ assert notes_sample(ids) == sample and notes_sample(ids[::-1]) != sample
260
+
261
+
262
+ def test_wl_commentary_counts_the_rows_under_a_komentarz_heading():
263
+ records = [record(LAL, source="", row_id="a"), record(LAL, row_id="b"), record(row_id="c")]
264
+ headings = {"komentarz": {"rows": 2, "ids": ["a", "b"]}, "wstęp": {"rows": 1, "ids": ["c"]}}
265
+ found = wl_commentary(records, headings)
266
+ assert found["rows"] == 2 and found["licences"] == {LAL: 2} and found["rows_with_no_print_edition"] == 1
267
+ assert wl_commentary(records, {})["rows"] == 0
268
+
269
+
270
+ def test_the_hand_sample_result_is_recorded_in_the_evidence():
271
+ table = pa.table({"id": ["a"], "text": ["Autor\n\nTytuł\n\nTekst."]})
272
+ stats = {"drop_short": 0, "drop_lang": 0, "drop_ocr": 0, "drop_dup": 0, "drop_eltec_dup": 63, "drop_rights": 2}
273
+ hand = build_evidence(table, [record()], stats)["notes_and_prefaces"]["hand_sample"]
274
+ assert hand["rows"] == NOTES_SAMPLE_SIZE == 40 and hand["result"] == build.NOTES_SAMPLE_RESULT
275
+ assert "450" in hand["read"] and build.NOTES_SAMPLE_RESULT["wl_credit_or_note_text"] == 0
276
+
277
+
278
+ def test_summary_counts_authors_translators_and_licences():
279
+ records = [record(row_id="a"), record(translators=("Friedman, Michał",), row_id="b"),
280
+ record(LAL, row_id="c"), record(CC_BY_SA_3_PL, row_id="d")]
281
+ records[0]["authors"], records[0]["author"] = ["Praca zbiorowa"], ""
282
+ # an unknown author with a named translator: the translator is the credit, there is no original author
283
+ records.append(record(translators=("Friedman, Michał",), row_id="e"))
284
+ records[4]["authors"], records[4]["author"] = ["Autor nieznany"], author_string(["Autor nieznany"], ["Michał Friedman"])
285
+ counts = summary(records)
286
+ assert counts["rows"] == 5 and counts["author_filled"] == 4 and counts["author_empty"] == 1
287
+ assert counts["author_placeholder"] == 1 and counts["author_missing_in_wl"] == 0
288
+ assert counts["translator_filled"] == 2 and counts["original_author_filled"] == 1
289
+ assert counts["title_filled"] == 5 and counts["original_title_filled"] == 0
290
+ assert counts["licenses"] == {LAL: 1, CC_BY_SA_3_PL: 1, PUBLIC_DOMAIN: 3}
291
+ assert counts["wl_url_names_another_version"] == 1
292
+
293
+
294
+ def test_build_evidence_lists_the_steps_with_their_drop_counts():
295
+ table = pa.table({"id": ["a"], "text": ["Autor\n\nTytuł\n\nTekst."]})
296
+ stats = {"drop_short": 0, "drop_lang": 0, "drop_ocr": 0, "drop_dup": 0, "drop_eltec_dup": 63, "drop_rights": 2}
297
+ evidence = build_evidence(table, [record()], stats)
298
+ steps = evidence["normalisation_steps"]
299
+ assert len(steps) == len(NORMALISATION_STEPS) and all("stat" not in step for step in steps)
300
+ assert sorted(s["rows_dropped"] for s in steps if "rows_dropped" in s) == [0, 0, 0, 0, 2, 63]
301
+ assert [s["changes_text"] for s in steps if s["changes_text"] != "no"] == [
302
+ "not known", "leading and trailing whitespace only"]
303
+ assert evidence["paragraphs_removed_without_a_mark"] == 0
304
+ assert evidence["footnote_check"]["status"] == "not run"
305
+ assert evidence["text_digest"] == build.TEXT_DIGEST and evidence["summary"]["rows"] == 1
306
+ json.dumps(evidence) # serialisable