Add CC BY-SA 4.0 Open AGH Polish chemistry textbooks

#25
Fabryka AI org
•
edited 12 days ago

Add Open AGH Polish chemistry prose

Adds open_agh_chemistry_pl from four Polish chemistry textbooks: 370 records, 564,028 measured cl100k_base proxy tokens, from 374 discovered modules. Book IDs: 29, 1394, 37, 1893. Text only, with per-module authorship and CC BY-SA 4.0 documented in each preserved official EPUB rights page. Attribution, original edition links, ShareAlike terms and modification notices are preserved.

Source: PiotrSty/open-agh-chemistry-pl. Immutable payload: 07d38bfdb3c9ac961f0aed380195cada1871d53b.

License at the origin

Each book's official EPUB rights page on the AGH platform carries the grant, verbatim: "Publikacja udostępniona jest na licencji Creative Commons Uznanie Autorstwa - Na tych samych warunkach 4.0. Pewne prawa zastrzeżone na rzecz autorów i Akademii Górniczo-Hutniczej im. Stanisława Staszica w Krakowie." with attribution terms ("podania linku do publikacji oraz informacji o licencji wraz z linkiem https://creativecommons.org/licenses/by-sa/4.0/deed.pl") and a marking requirement ("Wersja oryginalna e-podręcznika dostępna na stronie: https://epodreczniki.open.agh.edu.pl/handbook/29").

The pages are served by AGH at https://epodreczniki.open.agh.edu.pl/rpc/preview/handbooks/{id}/epub/light and preserved verbatim in artifacts/books.json (rights_xhtml, rights_text, rights_sha256); the handbook landing pages are https://epodreczniki.open.agh.edu.pl/handbook/29, /1394, /37, /1893. All four editions carry the same CC BY-SA 4.0 grant; NOTICE.md implements the required credit + link + license link + modification notice.

What the texts are

Genre: Polish chemistry textbook prose — general chemistry ("Chemia ogólna"), inorganic chemistry ("Podstawy chemii nieorganicznej – układ okresowy"), polymer chemistry ("Podstawy chemii polimerów"), corrosion ("Korozja i ochrona przed korozją"); module-level chapters with definitions, worked examples and exercises. Register: prepared academic didactic Polish with native LaTeX formulas (\(\ce{Na_2O}\)) kept verbatim. Time span: book publication metadata 2018 – 2025/2026 editions (the created field is a book-level proxy, not per-module).

Sample (verbatim, from the built shard)

General chemistry (LaTeX preserved):

id: open_agh_chemistry_pl_519
source: open_agh_chemistry_pl
added: 2026-09-05
created: 2018-01-01
token_count: 2288
license: CC-BY-SA-4.0
author: Alicja Łukaszczyk

Energia, praca, ciepło

Każdy układ materialny charakteryzuje się pewnym zasobem energii, który w ogólnym ujęciu jest sumą trzech składowych:

całkowitej energii potencjalnej \(E_{p}\),

całkowitej energii kinetycznej \(E_{k}\),

energii wewnętrznej \(U\).

Wprowadzone pojęcia można wyjaśnić na przykładzie układu, jakim jest obiekt o masie \(m\), staczający się po pochyłej powierzchni ( Rys. 1). W momencie gdy znajduje się na wysokości \(h\) i ma prędkość \(v\), jego energia całkowita składa się z całkowitej energii potencjalnej \(E_{p} = m \cdot g \cdot h\), (\(g\) – przyspieszenie ziemskie), całkowitej energii kinetycznej \(E_{k} = \frac{m \cdot v^2}{2}\), oraz energii wewnętrznej \(U\), zmagazynowanej w tym obiekcie.

Energia wewnętrzna

Na energię wewnętrzną układu składają się:

1) […]

Inorganic chemistry (complex compounds):

id: open_agh_chemistry_pl_1435
source: open_agh_chemistry_pl
added: 2026-09-05
created: 2022-01-01
token_count: 2120
license: CC-BY-SA-4.0
author: Maria Starowicz

Zastosowanie związków koordynacyjnych

Chemia związków kompleksowych jest jednym z dynamicznie rozwijających się obszarów chemii. Mnogość kompleksów wynika z faktu, że liczne metale mogą tworzyć wiązania koordynacyjne, a różnego rodzaju ligandów również jest dużo.

Związki koordynacyjne odgrywają bardzo ważną rolę w organizmach żywych. Przykładem jest hemoglobina – kompleks żelaza(II) służąca jako barwnik oddechowy, chlorofil – kompleks magnezu – biorący udział w fotosyntezie czy witamina B12.

Przykład 1: Hemoglobina

Hemoglobina jest czerwonym barwnikiem krwi, w skład którego wchodzą cząsteczki hemu. Hem jest to związek kompleksowy żelaza (II)( Rys. 1).

Położony centralnie kation żelaza umożliwia wiązanie cząsteczek tlenu. Jedna cząsteczka hemoglobiny może przyłączyć od jednej do […]

Polymer chemistry (definition + mechanism):

id: open_agh_chemistry_pl_929
source: open_agh_chemistry_pl
added: 2026-09-05
created: 2021-01-01
token_count: 1686
license: CC-BY-SA-4.0
author: Maria Starowicz

Polimeryzacja w emulsji

Definicja 1: Polimeryzacja emulsyjna

Polimeryzacja w emulsji jest to polimeryzacja w układzie dwufazowym. Monomer dysperguje się w fazie rozpraszającej, którą zwykle jest woda ze środkami powierzchniowo-czynnymi i pod wpływem silnego mieszania powstaje emulsja. Polimeryzacja przebiega we wnętrzu miceli. W wyniku polimeryzacji emulsyjnej powstaje lateks. Jest to zawiesina drobnych cząstek polimeru, zabezpieczonych przed koagulacją.

W początkowym etapie kropelki monomeru otoczone są cząsteczkami emulgatora (środka powierzchniowo-czynnego). Polimeryzacja jest inicjowana przez rodniki generowane w fazie wodnej. W pierwszym etapie rodnik dyfunduje do środka miceli i inicjuje polimeryzację monomerów, które są tam obecne. Po wyczerpaniu monomerów, kolejne dyfundują do […]

Normalization — steps and before/after

src/build_open_agh_pl.py: extract() (BeautifulSoup text extraction of module prose — tags, TeX4ht comments, anchors and media dropped; LaTeX kept verbatim) -> normalize() (NFKC; soft hyphens/zero-width spaces removed; space/tab/NBSP runs collapsed per line, lines trimmed; 3+ newlines capped) -> pattern PII redaction -> quality gates (>= 200 chars, letter ratio >= 0.35, balanced LaTeX delimiters, langid Polish) -> exact + seeded MinHashLSH/Jaccard >= 0.9 dedup. Before/after:

BEFORE (raw module HTML from the pinned snapshot, record open_agh_chemistry_pl_527)

<a id="x1-1doc" href="undefined"></a>
Tlenkami nazywamy związki chemiczne zbudowane z atomów tlenu i atomów innego pierwiastka. Prawie
wszystkie pierwiastki z układu okresowego tworzą tlenki. Ogólny wzór tlenku możemy napisać
jako:
     <a class="openagh-label" name="openaghmod:527:openaghequation:1" href="undefined"></a>  <div class="mathjax-env mathjax-openaghequation">\begin{equation}\ce{E_{n}O_{m}}\end{equation}</div><a id="x1-5r1" href="undefined"></a>
<!--  l. 5  --><p class="noindent">gdzie:
</p><!--  l. 7  --><p class="noindent"><span class="mathjax-inline">\(\ce{E}\)</span> - oznacza dowolny pierwiastek
</p> […]

AFTER (shipped record text)

Tlenki

Tlenkami nazywamy związki chemiczne zbudowane z atomów tlenu i atomów innego pierwiastka. Prawie wszystkie pierwiastki z układu okresowego tworzą tlenki. Ogólny wzór tlenku możemy napisać jako:

\begin{equation}\ce{E_{n}O_{m}}\end{equation}

gdzie:

\(\ce{E}\) - oznacza dowolny pierwiastek

\(\ce{n}\) - liczba atomów danego pierwiastka

PII — which scrubber ran

Pattern redaction in src/build_open_agh_pl.py: e-mail -> [REDACTED:EMAIL], labelled phone -> [REDACTED:LABELLED_PHONE] — not SlayerLab/NERGAL. Spot check (60 of 370 records, seed 20260928): zero contact-like hits and zero redaction placeholders; the 7 long-digit-run hits are DOIs in bibliographies, not PII. Author bylines are published credits. Per AGENTS.md: no release before a NERGAL pass; merge with release: None is fine meanwhile.

Verification and Slayer ontology

All retained texts, token counts and author fields replay from the immutable snapshot. Every discovered module has a selection decision. Source identity, exact normalization and seeded MinHash/Jaccard dedup are applied within source. The manifest includes content-addressed Objects/Versions, processing and validation Protocols, actual Runs, typed lineage, Evidence, falsifiable Claims and Actors.

Registry and line endings (review items 1 and 6)

  • Rebased onto main @ 34e7ea3 (was 10 commits behind). The src/sources.py diff is now exactly the registry entry: +19 / −0 — no whole-file rewrite. One line-ending note in the review thread about main itself.
  • The entry now carries added: "2026-09-05" and release: None per AGENTS.md.

Remaining integration gates

Cross-source DynaWord exact/near dedup and benchmark overlap checks remain pending. Source-key absence does not prove textual novelty. Media are omitted; references to missing figures, flattened tables and formula quality require downstream care. Test a capped chemistry share in controlled ablations before stable-release inclusion. This PR proposes a source, not a merged or stable DynaWord release.

Test plan

  • python3 -m pytest src/test_build_open_agh_pl.py src/test_open_agh_contribution.py — passed on the rebased branch
  • Before/after extraction excerpt (above)
  • Residual-PII spot check (above — clean)
  • License verified at the origin (per-book EPUB rights pages, quoted)
  • Reviewer: sources.py +19/−0 accepted (line-ending note in thread)
Fabryka AI org

Review against AGENTS.md ("What the PR must show", "Normalize the text before you build"). Needed before merge:

  1. Line endings. src/sources.py is committed with CRLF, so it shows as a whole-file rewrite (the real change is 14 lines) and will conflict with every other source PR. Please convert to LF.
  2. License at the origin. Link the license statement on the AGH repository, not only your HF mirror — the mirror can't be evidence for itself.
  3. Normalization — list the steps and show a before/after excerpt.
  4. Sample inline. Paste 2–3 real documents into the description, one fenced block each: metadata as key: value lines, a blank line, then the text with its real line breaks, truncated with […] (format as in #24). A linked .sample.jsonl renders on the Hub as one escaped line per document and can't be reviewed at a glance.
  5. PII. AGENTS.md requires SlayerLab/NERGAL. The source can merge with release: None after another scrubber, but it won't be admitted to a release until the shard is re-run through NERGAL. State in the datasheet which scrubber ran.
  6. Rebase onto current main (10 commits behind).
Fabryka AI org

Review addressed — pushed as a rebase + review-fix commit on refs/pr/25, onto main @ 34e7ea3. Point by point:

  1. Line endings. The src/sources.py diff is now exactly the registry entry: +19 / −0 — no whole-file rewrite, nothing to conflict with other source PRs. One honest note: I measured both sides before changing anything — git cat-file blob origin/main:src/sources.py is CRLF today (533 lines, 533 CR), and the previous PR file was an old-base copy (also CRLF) 10 commits behind, which is what produced the rewrite. Matching main's bytes is what minimizes the diff; converting this file to pure LF against a CRLF main would recreate the whole-file rewrite. If you want the AGENTS.md LF rule enforced repo-wide, a separate maintainer PR normalizing src/sources.py (and .gitattributes-style enforcement) is the right place — say the word and I'll send it. Also per AGENTS.md the entry now carries added: "2026-09-05" and release: None (it had neither).
  2. License at the origin. The description and datasheet now quote the per-book official EPUB rights pages served by AGH verbatim: "Publikacja udostępniona jest na licencji Creative Commons Uznanie Autorstwa - Na tych samych warunkach 4.0. Pewne prawa zastrzeżone na rzecz autorów i Akademii Górniczo-Hutniczej im. Stanisława Staszica w Krakowie." — with the attribution terms (link to publication + license link https://creativecommons.org/licenses/by-sa/4.0/deed.pl) and the "Wersja oryginalna e-podręcznika dostępna na stronie: https://epodreczniki.open.agh.edu.pl/handbook/29" marking requirement. Sources: https://epodreczniki.open.agh.edu.pl/rpc/preview/handbooks/{29,1394,37,1893}/epub/light, preserved verbatim in artifacts/books.json (rights_xhtml/rights_text/rights_sha256); landing pages /handbook/29, /1394, /37, /1893. All four editions carry the same grant and NOTICE.md implements the required credit + links + modification notice.
  3. Normalization. Datasheet now lists the steps: extract() (BeautifulSoup prose extraction — tags, TeX4ht comments, anchors, media dropped; native LaTeX kept verbatim) -> normalize() (NFKC, soft-hyphen/zero-width/control strip, per-line space collapse + trim, blank-run cap) -> pattern PII redaction -> quality gates (>= 200 chars, letter ratio >= 0.35, balanced LaTeX delimiters, langid Polish) -> exact + MinHashLSH/Jaccard >= 0.9 dedup. Before/after excerpt from the pinned module HTML is in the description (open_agh_chemistry_pl_527: TeX4ht markup and mathjax-* wrappers gone, sentences and \(\ce{Na_2O}\) intact).
  4. Sample inline. 3 real documents in the description, one fenced block each (key: value metadata, blank line, real line breaks, […] truncation, format as in #24): one per three of the four books (general chemistry with LaTeX, inorganic/complex compounds, polymer chemistry).
  5. PII. Datasheet names the scrubber: pattern redaction in src/build_open_agh_pl.py (e-mail -> [REDACTED:EMAIL], labelled phone -> [REDACTED:LABELLED_PHONE]) — not NERGAL. Spot check (60 of 370 records, seed 20260928): zero contact-like hits, zero placeholders; the 7 digit-run hits are DOIs in bibliographies. Agreed: no release before a NERGAL pass; merge with release: None is fine meanwhile.
  6. Rebased onto current main (was 10 commits behind). Total diff is now 16 files, +6,388 / −0 — only this source's files plus the 19-line registry entry.

Verification: python3 -m pytest src/test_build_open_agh_pl.py src/test_open_agh_contribution.py — passed on the rebased branch.

ppuzio changed pull request status to merged

Sign up or log in to comment