The Sense Layer in Thirteen Days

Ninety steps to a releasable v1.0 — the annotation layer that no published Qurʾānic dataset supplies.

Plan 90 steps · 13 days Target 440 lemmas · 36,575 occurrences Parallel up to 4 windows Output dataset + data paper

A correction before you start. I said this needed a year. A complete sense layer does. What is achievable in thirteen days is a v1.0 covering the words that carry most of the text, released with an explicit and honest scope statement. That is normal practice for language resources and is what LREC and similar venues publish.

Do not claim completeness. Claim exactly what you did: 440 content lemmas, 73% of content-lemma occurrences, with the expansion path documented.

The scope, measured

4,776
lemmas total
1,958
occur once — excluded
440
content lemmas, 20+ occurrences
36,575
occurrences in scope
73%
of content-lemma text covered

Why 440 and not 4,776. Function words — wa, al, min, fī — carry grammatical, not semantic, ambiguity and are out of scope. 1,958 lemmas occur once and cannot be ambiguous in use. What is left that matters is 440 nouns and verbs occurring twenty times or more, and they account for 73% of all content-word occurrences.

Most of the 440 will need no split. On inspection, the majority resolve to a single sense. Expect roughly 25% — about 110 lemmas — to be genuinely polysemous and require real work. That is the thirteen days.

Phase 0 — Decide and freeze

Day 1 · one window
  1. Write a one-page definition of "sense" for this project and commit it. Proposal: a distinct dictionary meaning of one lemma, such that a competent translator would render it with a different English word.
  2. Write the exclusion rule: grammatical function, syntactic role and metaphorical extension are not separate senses. Only lexical meaning is.
  3. Decide the evidence standard: every sense must be supported by at least one of — divergence between Pickthall and Yusuf Ali; explicit discussion in a tafsīr; a distinct grammatical construction.
  4. Freeze the target set: content lemmas (N or V, with a root) having 20 or more occurrences. Write the selection query into the repository so it is reproducible.
  5. Generate targets.json — the 440 lemmas with counts, root, POS, forms and āyah list.
  6. Assign each lemma a stable sense-layer ID (SL-0001 …). IDs never change, even if a lemma is later dropped.
  7. Create the repository: 04-SENSE-LAYER/ with shards/, build/, docs/.
  8. Write SCOPE.md stating what v1.0 covers and, explicitly, what it does not. This becomes a section of the paper.

Phase 1 — Tooling

Days 1–2 · one window
  1. Define the record schema. One JSON object per lemma. Fields: id, lemma, root, pos, total, status, senses[], annotator, date.
  2. Define the sense object: name, gloss, basis, confidence, and either forms[] or refs[].
  3. Allow two assignment modes: by form (fast, when spelling separates the senses) and by reference (slow, when it does not). Record which was used.
  4. Write sense_schema.py validating every field and type.
  5. Write the exhaustiveness gate: the declared senses must account for every occurrence of the lemma. No occurrence unassigned, no form claimed twice.
  6. Make the gate refuse to load on failure rather than warn. This is the mechanism that stops a count being quietly reduced.
  7. Write make_shards.py: split the 440 targets into four shards by frequency rank (rank 1,5,9… to shard A; 2,6,10… to B) so each shard has a comparable mix of hard and easy.
  8. Each shard writes to its own file only: shards/shard-A.json … shard-D.json. No window ever writes another window's file.parallel-safe
  9. Write brief.py <lemma-id>: prints everything needed to judge one lemma — every occurrence with āyah reference, the Arabic, both public-domain translations, and the surface form.
  10. Extend brief.py to flag translation divergence: mark occurrences where Pickthall and Yusuf Ali choose different English head words. This is the strongest cheap signal for polysemy.
  11. Add tafsīr retrieval to brief.py: pull the commentary on the āyah from the 21 editions, so a disputed occurrence can be checked against the tradition.
  12. Write record.py: appends a completed lemma record to the correct shard, validating the schema and running the gate before writing.
  13. Write progress.py: prints how many of the 440 are done, by shard, with a projected completion date.
  14. Write merge.py: combines four shards into one dataset, failing loudly on any duplicate ID.
  15. Test the whole chain end-to-end on three lemmas you already know — barr, ākhir, rajul — whose senses are already declared. The tool must reproduce them exactly.
  16. Commit the tooling. Do not change the schema after this point without re-validating every completed record.

Phase 2 — Triage

Days 3–4 · four windows

The purpose of triage is to separate the 440 into those needing real work and those that do not. Two to three minutes per lemma. Do not annotate here — only decide.

  1. Open one window per shard. Give each the shard brief from the appendix below.parallel
  2. For each lemma, run brief.py and read the divergence flags first.
  3. Mark status: "single" when both translators consistently use one English head word and no tafsīr dispute is visible.
  4. Mark status: "split" when translators diverge systematically, or the lemma clearly names two things.
  5. Mark status: "defer" for anything you cannot decide in three minutes. Deferring is not failure — it is the honest signal that the lemma needs a scholar.
  6. For every single, write the single sense and its gloss immediately. It is a complete record and needs no revisit.
  7. Never mark a lemma single just to move faster. The exhaustiveness gate cannot catch a wrong judgement, only a missing one.
  8. Log the triage decision time per lemma. You will need the rate to project completion honestly.
  9. At the end of each session run progress.py and record the number in a running log.
  10. After the first 40 lemmas, stop and compare the four windows' decisions on a shared sample of five lemmas.sync
  11. Where windows disagree on the same lemma, that lemma is defer by definition. Record the disagreement — it is data about annotation difficulty and belongs in the paper.
  12. Adjust the written definition from step 1 if the disagreements reveal ambiguity in it, then re-triage everything done so far under the revised definition.
  13. Complete triage of all 440.
  14. Publish the triage counts: how many single, split, defer. This is your first real finding.

Phase 3 — Annotate the splits

Days 5–9 · four windows

Expect roughly 110 lemmas here. Twenty to thirty minutes each. This is the work.

  1. Sort the split list by frequency, highest first. If time runs out, it must run out on the rare words, not the common ones.
  2. For each lemma, read every occurrence before naming any sense. Naming senses early biases every assignment after it.
  3. Name each sense with a short English gloss and a one-line basis stating why it is distinct.
  4. Prefer assignment by form where spelling separates the senses — it is faster and independently checkable.
  5. Use assignment by reference where it does not. List every āyah explicitly.
  6. Set confidence per sense: clear, argued, or disputed.
  7. Any occurrence you are unsure of goes into a sense named unresolved. The gate must still pass — unresolved is an assignment, not a gap.
  8. Where a tafsīr explicitly discusses the ambiguity, cite it in basis. That single line raises the record from opinion to evidence.
  9. Where the two translators diverge, quote both renderings in basis. It is the cheapest defensible evidence you have.
  10. Never let a sense have zero occurrences. The gate rejects it, and it means the sense was imagined rather than found.
  11. Run record.py after every lemma. Do not batch — a crash must never cost more than one lemma.
  12. Commit after every session, with the count in the commit message.
  13. Every 20 lemmas, re-run the full gate over your whole shard.
  14. Every 20 lemmas, re-annotate one lemma you did earlier without looking at your previous answer.self-check
  15. Compare the two versions. Disagreement with yourself is the honest measure of how repeatable the annotation is, and it belongs in the paper.
  16. Log every self-disagreement. Do not quietly fix them.
  17. At day 7, run progress.py and project the finish date. If it falls past day 9, cut scope, not care — drop the lowest- frequency splits and say so in SCOPE.md.
  18. Never solve a schedule problem by lowering the evidence standard.
  19. Windows must not discuss individual lemmas mid-phase. Independence is what makes the day-10 agreement check meaningful.discipline
  20. Keep a QUESTIONS.md of anything needing a scholar. It is a deliverable, not an embarrassment.
  21. Finish the top 60 splits by day 7 whatever else slips.
  22. Finish all splits, or formally cut the remainder, by end of day 9.
  23. Freeze annotation. No further edits except to fix validation failures.
  24. Merge the four shards. Resolve any duplicate ID as a tooling bug, not a data decision.

Phase 4 — Validate

Days 10–11 · one window
  1. Run the exhaustiveness gate over the merged dataset. Every occurrence of every annotated lemma must be assigned.
  2. Assert the arithmetic: for each lemma, the sum of sense counts equals the corpus count. Any mismatch is fatal.
  3. Verify every āyah reference resolves to a real verse.
  4. Verify every declared form actually occurs for that lemma.
  5. Check for senses that differ only in wording — the same distinction named twice across different lemmas. Harmonise the vocabulary.
  6. Check no lemma has more than five senses without an explicit note. More than five usually means the definition is being stretched.
  7. Compute and publish self-agreement from the step-52 re-annotations: the proportion where you reproduced your own assignment.
  8. Compute the cross-window agreement from the step-34 sample.
  9. Report both figures whatever they are. A resource with a stated agreement rate is usable; one without is not.
  10. Write a clean-room checker that recomputes the counts from the raw morphology, importing nothing from the annotation tooling.
  11. Run it. Any disagreement is a defect in the layer, not in the checker.
  12. Take a random sample of 30 assignments and check each by hand against the āyah.
  13. Publish the sample error rate. If it exceeds 5%, stop and fix before release.
  14. Add every check above to a single audit_sense.py that must pass before any release.

Phase 5 — Release

Day 12 · one window
  1. Produce the dataset in two formats: JSON for machines, and a tab-separated file for people who will open it in a spreadsheet.
  2. Write README.md: what it is, what it covers, what it does not, how to validate it, how to cite it.
  3. Write SCHEMA.md documenting every field, with an example record.
  4. Write LIMITATIONS.md. Include the deferred lemmas, the disputed senses, and the agreement rates.
  5. State the licence. CC BY 4.0 for the annotation; note that the underlying morphology is the Quranic Arabic Corpus under its own licence.
  6. Credit the Quranic Arabic Corpus and Tanzil explicitly and prominently. You are adding a layer to their work, not replacing it.
  7. Deposit to Zenodo and mint a DOI. Tag it v1.0.0.
  8. Publish the annotation tooling in the same deposit. The layer without the gate is not reproducible.

Phase 6 — The paper

Day 13 · one window
  1. Draft the data descriptor, about 3,000 words: motivation, method, scope, format, validation, limitations, reuse.
  2. Lead with the gap, stated exactly: published Qurʾānic datasets supply morphology, syntax and topic. None supplies sense.
  3. Report the agreement rates and the sample error rate in the abstract. A resource paper that hides them will be asked for them.
  4. Re-run the literature search the morning you submit. Confirm no sense-annotated Qurʾānic resource appeared while you worked.
  5. Submit to LREC or the Journal of Open Humanities Data, with the DOI already live.
  6. Add the deferred lemmas and the open questions to the paper as the stated roadmap for v2.0. The gaps are what invite collaborators.

Running four windows without collisions

The one rule that matters: a window writes only to its own shard file. Never let two windows edit the same file. Merge at the end, never during.

Copy this brief into each window

You are working on shard [A|B|C|D] of the Qur'anic sense layer.

WORKING DIRECTORY
  C:\Users\walee\Downloads\Quran Research\04-SENSE-LAYER\

YOUR FILE - write ONLY this one
  shards/shard-[A|B|C|D].json

DO NOT touch any other shard file, or targets.json, or the tooling.

TASK
  For each lemma in your shard:
    1. python brief.py <id>      - read every occurrence
    2. decide: single / split / defer
    3. python record.py <id>     - writes to YOUR shard only

RULES
  - A sense needs evidence: translator divergence, a tafsir discussion,
    or a distinct construction. Record which.
  - Every occurrence must be assigned. "unresolved" is a valid
    assignment; leaving a gap is not.
  - If undecidable in three minutes, mark defer. Do not guess.
  - Never mark "single" to go faster.
  - Commit after every lemma.

REPORT AT SESSION END
  python progress.py   and paste the output

Day by day

DayStepsOutputWindows
11–14Scope frozen, schema and gate written1
215–24Tooling tested on three known lemmas1
3–425–38All 440 triaged; split list known4
5–739–59Top 60 splits annotated4
8–960–62All splits done or formally cut; merged4
10–1163–76Validated; agreement rates published1
1277–84Released on Zenodo with a DOI1
1385–90Data paper submitted1

Three ways this fails, named in advance.

Scope creep. The temptation on day 6 will be to add lemmas below 20 occurrences. Refuse. A smaller released resource beats a larger unreleased one.

Silent standard-lowering. If you fall behind, cut the number of lemmas and say so in SCOPE.md. Never keep the count by accepting weaker evidence — that produces a resource nobody can trust, including you.

Skipping the agreement checks. Steps 52, 69 and 70 feel like overhead when time is short. They are the only evidence that the annotation is repeatable, and a resource paper without them will be rejected or asked to supply them anyway.

← AL-WAQF