Skip to content

Commit dad5954

Browse files
committed
Publish a non-consumptive release: measurements over the corpus, not the corpus
"Why not the corpus?" was a fair challenge and the exclusion had been a reflex. Checked the actual position: the volumes carry no licence, only the imprint (project owner wizarat al-thaqafa, publisher al-Dar al-Arabiyya li-l-Kitab 2014-15), and the Tunisian National Library catalogues the set as a physical holding (A-8-314464 1..10) with no open-access edition. The poems themselves are largely 19th-century and out of copyright; what is protected is the edition. So redistributing the text would be republishing somebody else book. But reproducibility does not need the verse, it needs the measurements. scripts/export_release.py emits: * corpus_manifest.jsonl - 1,511 records: ids, pages, poet, form, purpose, line count, strophe sizes, per-line letter and syllable counts, rhyme-key sequences, full form-score breakdowns, metre regularity, attestation flag, and a salted text hash * corpus_stats.json - per-form counts, length histogram, rhyme-key frequencies, score medians * eval_prompts.jsonl - the 174 held-out prompts with fingerprints stripped, so anyone can benchmark any model on the same task Every AUC, distribution and attestation rate in docs/ is re-derivable from these without the text, and the published salt lets anyone who owns the volumes verify their rebuild hash-for-hash. Leak-checked: of corpus lines with >=3 words, 0 appear verbatim in the release. Rhyme keys ARE included; they are the analytical object of the study and withholding them would make the results unauditable. The trade-off is stated in DATA.md rather than buried. DATA.md also documents the path to releasing the text properly: ask the Ministry (the named scientific committee is in the imprint), then gate it on HF or Zenodo with a click-through licence, and never in git history, which is permanent and survives a repo going public.
1 parent d4b93cb commit dad5954

7 files changed

Lines changed: 2131 additions & 5 deletions

File tree

DATA.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,71 @@ This is the same category of derived statistic as the publicly released Google
7373
Books n-gram corpora, which are published from in-copyright works on the basis
7474
that frequency data over short spans is non-expressive.
7575

76+
## Why the corpus is not redistributed
77+
78+
Not a reflex — the position was checked:
79+
80+
* The volumes carry no licence statement, only an imprint:
81+
*«الإشراف العام وصاحب المشروع: وزارة الثقافة — تونس»*, published by
82+
الدار العربية للكتاب, 2014–15.
83+
* The Tunisian National Library catalogues it as a **physical holding**
84+
(call numbers `A-8-314464 1…10`, 25 cm) for loan and consultation. There is
85+
no open-access edition.
86+
* The *poems* are largely 19th-century and anonymous, so the underlying works
87+
are almost certainly out of copyright. What is protected is the **edition**
88+
the selection, transcription, arrangement and editorial apparatus, which is
89+
precisely the labour that took 171 manuscript notebooks and made them
90+
readable. Tunisian law additionally treats expressions of folklore as
91+
national heritage whose exploitation runs through the Ministry.
92+
93+
So redistributing the text would be republishing someone else's book. Shipping
94+
*measurements over* it is a different act, and that is what `release/` is.
95+
96+
## `release/` — the non-consumptive release
97+
98+
Reproducibility does not actually require the verse. Almost every scientific
99+
claim in `docs/` is a claim about *measurements*, and those can be published.
100+
101+
| file | contents |
102+
|---|---|
103+
| `corpus_manifest.jsonl` | one record per poem (1,511): ids, page range, poet, form, purpose, line count, strophe sizes, per-line letter and syllable counts, rhyme-key sequence, full form-score breakdown, metre regularity, attestation flag, salted text hash |
104+
| `corpus_stats.json` | aggregate distributions: per-form counts, length histogram, rhyme-key frequencies, per-form score medians |
105+
| `eval_prompts.jsonl` | the 174 held-out task specifications, stripped of fingerprints — a benchmark anyone can run against any model |
106+
107+
With these you can re-derive the depth sweep, the AUCs, the attestation rates,
108+
the score distributions and the form-validator behaviour, and you can benchmark
109+
your own model on the same held-out prompts — **without the text**.
110+
111+
The salted hash (`sha256(salt || normalised_text)[:32]`, salt published) lets
112+
anyone who *does* own the volumes verify their rebuild matches ours poem by
113+
poem, without us publishing a single line.
114+
115+
**Verified:** of the corpus lines of ≥3 words, **0** appear verbatim anywhere in
116+
the release.
117+
118+
**Rhyme keys are included** — 1–3 terminal graphemes per line. They are the
119+
analytical object of the entire study, and withholding them would make the
120+
results unauditable. That is a deliberate trade-off, stated rather than buried.
121+
122+
## If you want the actual text released
123+
124+
The right path is permission, not a workaround:
125+
126+
1. **Ask the owner.** The project owner is وزارة الشؤون الثقافية; the named
127+
scientific committee is الحفناوي عمايرية، محمد رؤوف بلحسن، الحبيب الحمدوني،
128+
الهادي جلاب، أحمد الخصوصي، أحمد خواجة. This was state-funded heritage
129+
documentation whose stated purpose was to rescue a sleeping archive — a
130+
non-commercial research licence is well within its spirit.
131+
2. **Then gate it.** Hugging Face datasets with gated access, or Zenodo with a
132+
restricted-access record, both support a click-through licence and give a
133+
citable DOI.
134+
3. **Never in git history.** Even in a private repo, a commit is permanent and
135+
survives a later flip to public. Bulk text belongs in object storage with IAM
136+
(here: `gs://nemri-genai-bb-tunifolk/`), referenced by URI.
137+
76138
## Reproducing without the corpus
77139

78-
You cannot — and that is deliberate. `make calibrate`, `make negatives`,
79-
`make tunisianity`, `make dataset` and `make acceptance` all take
80-
`CORPUS=/path/to/classified.json`. Obtain the volumes yourself and run the
81-
upstream digitisation pipeline; this repository ships the method, not the text.
140+
`make calibrate`, `make negatives`, `make tunisianity`, `make dataset` and
141+
`make acceptance` all take `CORPUS=/path/to/classified.json`. Obtain the volumes
142+
and run the upstream digitisation pipeline. This repository ships the method and
143+
the measurements; the text stays with its owner.

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ GCS ?= gs://nemri-genai-bb-tunifolk/rlft/v1
55
PROJECT ?= nemri-genai-bb
66
REGION ?= us-central1
77

8-
.PHONY: help venv test lint calibrate negatives tunisianity acceptance dataset upload deploy validate launch status clean
8+
.PHONY: help venv test lint release calibrate negatives tunisianity acceptance dataset upload deploy validate launch status clean
99

1010
help:
1111
@grep -E '^[a-z-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-12s\033[0m %s\n",$$1,$$2}'
@@ -28,6 +28,9 @@ negatives: ## generate the adversary: base-model attempts at the same prompts
2828
tunisianity: ## fit + hold-out validate the contrastive discriminator
2929
$(PY) scripts/train_tunisianity.py --corpus $(CORPUS)
3030

31+
release: ## export the non-consumptive release (measurements, no verse)
32+
$(PY) scripts/export_release.py --corpus $(CORPUS)
33+
3134
acceptance: ## GATE: reward must separate corpus from base-model output
3235
$(PY) scripts/acceptance.py --corpus $(CORPUS)
3336

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ cannot reconstruct the work: chaining the shipped 4-grams back into running text
171171
gibberish, though 20/26 of a real line's 4-grams are present — so it is a membership
172172
oracle, not an extraction oracle. That distinction is stated rather than glossed.
173173

174+
The corpus is an in-copyright edition (BNT holds it as a physical volume; there is no
175+
open-access edition), so instead of the verse we publish **measurements over it** in
176+
[`release/`](release/): a 1,511-poem manifest with per-line lengths, rhyme-key sequences,
177+
form-score breakdowns and salted text hashes, aggregate statistics, and the 174 held-out
178+
benchmark prompts. Every AUC and distribution in `docs/` is re-derivable from these, and
179+
anyone who owns the volumes can verify their rebuild hash-for-hash — without a line of
180+
verse leaving its owner. `make release`.
181+
174182
## Licence
175183

176184
Apache-2.0 for the code. The corpus is © the Tunisian Ministry of Culture and is neither

0 commit comments

Comments
 (0)