open_icm_pl: drop 74 reviewed rows, relabel 3, add per-record licence basis (v2#111)
open_icm_pl: drop 74 reviewed rows, relabel 3, add per-record licence basis (v2#111)
Drops 74 of 85 rows chosen by a pinned review table: 85 → 11 documents, 6,219,019 → 1,203,239 characters (−5,015,780), 2,358,174 → 441,475 tokens (−1,916,699, 81.3%). Every kept row is byte-identical to main except the license column of 3 rows. The sidecar gains licence_basis, licence_basis_url and licence_basis_date for each record, and its license follows the parquet.
How the rows are chosen
data/open_icm_pl/open_icm_pl.review.csv(id,decision,reason) has one row per document and is pinned by SHA-256, as isopen_icm_pl.publisher-check.json(the evidence it was derived from).src/licence_basis_open_icm_pl.pyrefuses an input that is not main's, and a review that differs from what the rules give.- Rules: a printed CC note that agrees with the label keeps the row (
file_note); a printed NC/ND note drops it; for the other 80 rows (no note) the publisher's own page was read on 2026-10-20 and classedpublisher_cc(keep),publisher_other(the page states a non-CC licence or a restriction),not_found(no statement could be found) orblocked(the page could not be read). The repository's licence field alone is no longer enough to keep a row. - Year rule, applied last: a row the rules above keep is dropped when the start year of its
createdis earlier than the first year of the licence version of the label it would carry (created_before_licence_version). The table (2.0: 2004; 3.0 and 3.0-PL: 2007; 4.0: 2013) isRELEASEinsrc/licence_basis.py, shared with biblioteka_nauki. - Relabel: for a
publisher_ccrow the newlicenseis the publisher's elements and version, if the result is on the existing allowlist; if the publisher names no version, the label stays. No hand list. The sidecar and parquet are rewritten; the text is untouched. - One command rebuilds the parquet, sidecar, sample, stats, evidence, checksums and manifest pins from main's files. It was run twice from restored inputs and gave the same bytes (apart from the run timestamps in the manifest).
| decision: reason | documents | characters | tokens |
|---|---|---|---|
| drop: depositor_only_publisher_not_found | 56 | 3,833,763 | 1,484,031 |
| drop: printed_licence_nc_or_nd | 3 | 483,652 | 178,111 |
| drop: depositor_only_publisher_not_cc | 6 | 328,077 | 118,365 |
| drop: depositor_only_publisher_blocked | 8 | 322,300 | 118,695 |
| drop: created_before_licence_version | 1 | 47,988 | 17,497 |
| drop, total | 74 | 5,015,780 | 1,916,699 |
| keep: file_note | 2 | 664,843 | 244,596 |
| keep: publisher_cc | 6 | 388,504 | 142,652 |
| keep: publisher_cc_relabelled | 3 | 149,892 | 54,227 |
Please look at
- The year rule drops
0078ca93;6fe4e956is kept at the rule's limit. The publisher statements were read on 2026-10-20, and for older articles a publisher may have applied a statement to its back issues later.0078ca93(created 2011; the page gives "Submission date: 2011-07-01") would carry CC BY-SA 4.0, which did not exist then, so it is dropped and gets no relabel.6fe4e956(created 2013, CC BY 4.0) is kept: the rule works by year, and its page is dated 2013-06-24, before CC 4.0 was released in November 2013. That is the year granularity limit of the rule, the same as for biblioteka_nauki, and the table is a lower bound (a Polish port or a journal may have adopted a version later). - Three statements are journal-level, not article-level:
5a22a282,635e0996,8c8e1344.8c8e1344states CC BY without a version, so it keeps the repository's CC-BY-3.0-PL. - Relabelled (the
licensecolumn only):168531fb,5a22a282,6fe4e956CC-BY-SA-3.0-PL → CC-BY-4.0. The 3 PDFs and the 7 licence files listed in the sidecar were not downloaded. - 64 rows are dropped because no statement could be read: 56
not_foundand 8blocked. That is a failed lookup, not evidence of a restriction; a row can return when a statement is found. The 6publisher_otherrows are different: the page states CC BY-NC-ND (3), "wider use requires the rightsholder's consent" (1) or "Licencja: Żadna" (2). - Page copies are not committed. The check file keeps the quote, the page's SHA-256, its byte count and the read date for each page.
- The kept slice is small: 11 documents, 2 of them monographs.
- Residual contact data: a publisher's office phone number remains in
5fc6e6dd(the imprint of Wydawnictwo Księgarnia Akademicka). It is a business number, not personal data. The pattern-based scan missed it and the row is not changed, because the rows must differ only inlicense. NERGAL remains the gate.
Files
src/licence_basis_open_icm_pl.py,src/test_licence_basis_open_icm_pl.py: the stage, fixture tests (including refusal cases and the year rule at its boundaries) and release tests that recount the shipped files, including that the 3 relabelled rows differ from main only inlicense, every other kept row is byte-identical, and every shipped row satisfies the year rule.src/licence_basis.py,src/test_licence_basis.py: three serialisation helpers (jsonl_text,json_text,crlf_bytes) and their tests. The year table (RELEASE,release_year,created_year) came with the biblioteka_nauki PR (186, merged); this one is on main 10713a7.data/open_icm_pl/:review.csv,publisher-check.json(new),licence-basis.json, parquet, attribution, sample, stats, checksums, card,NOTICE.md.src/sources.pyentry,artifacts/open_icm_pl_ontology_manifest.json,artifacts/source_findings.md(new section).
Not in this PR: README.md and CHANGELOG.md row counts (v2#80). The NERGAL pass is unchanged. The overlap audit of the 10 exact title/DOI overlaps already excluded is unchanged; other sources' audits are not rerun. src/clean_kultura_bez_barier_pl.py keeps its own copies of the three serialisation helpers (a follow-up).
Checks: full suite from the repo root passes on this commit on main 4b14158 (2085 passed, 9 skipped, 138 subtests passed). Line endings are kept: sources.py, the card, NOTICE.md, sidecar, sample, stats, checksums and manifest CRLF, the rest LF.
🤖 Generated with Claude Code
refs/pr/189 ref