eltec_pol: author metadata, attribution sidecar and restored chapter titles (v2#109)
eltec_pol: author metadata, attribution sidecar and restored chapter titles (v2#109)
Fills author and adds data/eltec_pol/eltec_pol.attribution.jsonl, one line per row (100), in row order, joined by id. It also puts back some text the original extractor left out: 82 rows change, 18 are byte-identical. Builds on Hub PR 184 (merged; shared src/attribution_common.py).
author: all 100 rows, from ELTeC's metadata table, turned to "Given Family". Two corrected: "Tadeusz Dołęga-Mostowicz" (ELTeC's field puts the hyphen in the given name) and "Deotyma" for Jadwiga Łuszczewska, as Wolne Lektury credits the same three novels.- Sidecar: title, ELTeC id, file, commit and SHA-256 of the TEI file, CC BY 4.0 with its URL, the credit line, print edition, first edition (2 rows), digital source, people the header names, the Wolne Lektury overlap (63 WL rows dropped for 50 novels, 3 partial rows kept for 2) and a processing note.
Text restored (decided 2026-10-20)
The v0.2.5 text kept only the <p> elements of <body>. Now also:
| Added | Rows | Paragraphs | Chars |
|---|---|---|---|
every <head> of <body>, as a paragraph in its place (chapter titles) |
81 | 1,805 | 16,187 |
the author's address to the reader, <front> of "Po mlecznej drodze" |
1 | 2 | 7,498 |
the appendix "Dodatek", <back> of "Dzieje grzechu" |
1 | 60 | 11,937 |
Characters 54,369,249 to 54,408,605 (+39,356), tokens 21,486,720 to 21,504,056 (+17,336). Tokens are recounted with cl100k_base for the 82 changed rows; chars and tokens in the stats are updated.
Left out, and recorded in the evidence file: title pages (99 files, 4,055 chars), 13 characters of quotation fragments inside <quote> in two novels, and the 150 note markers whose note text is not in the files (1 in "Wilk, psy i ludzie", 61 in "Gehenna", 88 in "Trędowata"). Soft hyphens and the space before punctuation are unchanged.
What to look at
- "Dodatek": the 60 paragraphs are the author's draft passages (versions A, B, C). The same paragraphs end the Wolne Lektury text of the novel, so they come with the digital source the header names. Wolne Lektury's book XML gives its base as S. Pigoń's edition (Glob, 1985), not the 1908 print in the ELTeC header, so the short labels ("Brulionowe rzuty rozdziału mającego objąć testament Jaśniacha", "(A)" to "(C)", "[Rękopis nieczytelny]") are the editor's. Kept whole with the drafts (maintainer decision 2026-10-20); the evidence and card say so.
- The address in "Po mlecznej drodze" is first person and the header names no editor.
- A chapter title is now a short paragraph, so paragraph counts per row change.
- Sidecar
modification_noteis one note for all 100 rows, describing the extractor rule. TABLE_SHA256of the TEI table (artifacts/rights_audit_2026-10/literary/eltec_tei.jsonl) changed on purpose: each row now also holds the positions of the restored paragraphs and the SHA-1 of the text without them.
Checks
- With the restored paragraphs taken out, the text of every one of the 100 novels equals the v0.2.5 text (per-row SHA-1 and the whole-table text digest
3ac2ccd1...). Tested from the committed files. The 18 unchanged rows are byte-identical. python3 -I src/eltec_tei.py check <directory>matches the 100 TEI files (ELTeC-pol commit95fe196e) with the committed table; the Parquet, sidecar and stats are rebuilt byte for byte bysrc/build_eltec_pol_attribution.py --tei <directory>.- Wolne Lektury duplicates scored again against the new text: the same 66 pairs, 63 drops and 3 partial overlaps. No score is lower (largest rise 0.0121); the pairs file keeps the v0.2.5 scores.
src/clean_wolne_lektury.pychanges in its docstring only; no WL data file changes. - Full test suite from the repository root: 1879 passed, 9 skipped, 138 subtests passed in 449.68s (0:07:29), on this commit rebased onto main 10713a7
Files
data/eltec_pol/eltec_pol.{parquet,attribution.jsonl,license-evidence.json,md,stats.json}src/fetch_eltec.py(the one TEI-to-text function),src/eltec_tei.py,src/build_eltec_pol_attribution.py,src/attribution_common.py,src/clean_wolne_lektury.py(docstring),src/sources.py- Tests:
src/test_eltec_tei.py,src/test_build_eltec_pol_attribution.py,src/test_attribution_release.py,src/test_attribution_common.py,src/test_wolne_lektury_contract.py artifacts/rights_audit_2026-10/literary/eltec_tei.jsonl,artifacts/source_findings.md
Not in this PR: the README row (v2#80); the eltec_pol token count in artifacts/training_mix_v0_3.* (21,486,720) is not updated.
🤖 Generated with Claude Code
refs/pr/187 ref