← E2T System V1 portal

17 — SPELL

Nominate suspicious printed spelling/anomaly candidates without altering the capture ledger.

ACTIVE Built and verified

15 tool files copied and hash-verified against the original.

Project-trained Instrument path 3 archived step 17 of 26

Where this output sits

Source evidenceCandidate evidenceHuman decisionAudit acceptanceReleaseProduction

Source evidence, candidate evidence, human decision, audit acceptance, release and production are six separate things. This step produces the highlighted one and nothing further.

Scope

Stage 1 runs a project-trained token classifier over units tagged instrument or instrument_candidate, flagging suspicious spans above a frozen threshold. Stage 2 applies a deterministic exact-glyph verifier that can only suppress a stage-1 candidate. Every surviving flag carries the exact value, its offsets, the page, group, token, bbox and crop linkage, and the model identity that produced it. Nothing is corrected.

This role is allowed to

How it works

fed by 16 CRITICAL
Inputs
Exact CAP tokens and full contextStructural role, semantic tag and source crop linkage
Project-trained Pinned project-trained spelling/anomaly model plus exact-form verifier.
  1. Stage 1 — the project-trained token classifier scores every eligible token
  2. Apply threshold 0.93, frozen on DEV before the test split was opened
  3. Stage 2 — deterministic exact-glyph verifier, 55 typed entries, may only SUPPRESS
  4. Emit candidates carrying exact value, offsets, geometry and model provenance
  5. Zero output on a substantial eligible corpus is NOT_MEASURED, never a pass
Must pass
  • Every flag preserves exact value and offsets
  • Zero-output on a substantial eligible set is NOT_MEASURED until coverage is proven
passes →
Outputs
Suspicious token/spanAnomaly type, score, reason and model/tool provenance
hands off to REV
fails →
HOLD
SPELL_PROVENANCE_MISSINGSPELL_SPAN_UNBOUNDSPELL_NOT_MEASUREDSPELL_OUTPUT_MUTATION

Nothing continues on a failed gate. Uncertainty becomes an explicit HOLD, and no later step may read an unanswered item as an accepted one.

Detection contract

Eligibility routing
Both instrument AND instrument_candidate units enter SPELL. Routing only confidently-tagged instruments would let a single TAG false negative bypass detection entirely, so recall is prioritised at the TAG boundary and both classes are carried through.
What every flag must carry
The exact candidate value byte-for-byte; character offsets within its unit; the full surrounding context; and linkage to page, group, unit, token, bbox and source crop. A flag that cannot bind to its geometry is SPELL_SPAN_UNBOUND and is not emitted as a finding.
Candidate reason and provenance
Anomaly type, model score, the model identity and revision, and the frozen threshold that admitted it. SPELL_PROVENANCE_MISSING if any of these is absent.
Four things kept separate
Detected inventory — everything the model scored. Review nominations — the subset that survived the stage-2 exact-glyph verifier and is worth a human's time. Human truth — what a reviewer actually decided, which lives in step 18 and nowhere else. Corrections — stored in a separate adjudication layer, never written back over CAP-RAW. Collapsing any two of these would let a machine guess be read as a fact.
Suppression is not correction
Stage 2 may only remove a stage-1 candidate from the nomination list. It cannot create a candidate, edit a value, or assert that a spelling is right — only that this project has an exact-glyph rule saying the printed form is admissible.
Zero output is not success
Zero flags on a substantial eligible corpus is NOT_MEASURED or FAILED_COVERAGE until coverage is independently proven. A prior review-material generation produced zero spelling flags and the trial correctly recorded that as invalid rather than clean.
Model licence — resolved 2026-09-05
The sealed package contains no licence file, which was carried as a HOLD. Checked at source: the base model CAMeL-Lab/camelbert-msa-qalb14-ged-13 is published under the MIT licence — permissive, and it permits the use and redistribution this project needs. The authors ask that work using it cite *Alhafni et al. (2023), "Advancements in Arabic Grammatical Error Detection and Correction: An Empirical Investigation"*. Note their own usage caveat: the model was fine-tuned on morphologically preprocessed text, which is worth remembering when applying it to raw gazette text. HOLD lifted; the obligation is citation, not restriction.
Retraining authority
Only the owner may authorise a retrain. Nothing in this repository does so, and the last attempt (v2) was rejected on evidence — its weights are deliberately excluded so it cannot be run by accident. Five of seven priority error families still have zero training positives, so a retrain today would have nothing new to learn from.

Non-scope — what this role does NOT own

Explicitly forbidden

Dependencies and position

Starts
After TAG; for instrument and instrument_candidate units.
Previous step
16 CRITICAL-NOMINATE
Next step
18 REV — HUMAN REVIEW
Hands off to
REV

Exact inputs

Exact outputs

Performer and AI/ML boundary

Performer
Pinned project-trained spelling/anomaly model plus exact-form verifier.
Class
Project-trained
AI boundary
Model detection is allowed; correction authority is not.

Training information

Trained by this project, once. Stage 1 is a `BertForTokenClassification` head warm-started from `CAMeL-Lab/camelbert-msa-qalb14-ged-13` at revision `447179dc63d186e4bff09a993e90e73ad622d571`, fine-tuned for 3 epochs in 50.9 minutes on CPU, seed 20260903, at a external spend of USD 0.00 with zero provider calls. Training data was clean Saudi .gov.sa text with synthetic corruptions as positives: 361 pages, 2,341 paragraphs, 60,500 words, split by complete source so no publisher appears in two splits — TRAIN 1,137 paragraphs / 845 positives, DEV 460 / 412, TEST 744 / 522. The decision threshold 0.93 was selected on DEV against an F0.5 objective and frozen at 2026-09-03T22:24:28Z before the test split was opened. Stage 2 is not learned: it is a registry of 55 typed exact-glyph entries, version v3-registry-1.0.0.

Deterministic validation and acceptance gates

HOLD and failure behaviour

Failure codes this step may emit:

Uncertainty becomes an explicit HOLD. Omission never converts uncertainty into acceptance, and no downstream step may treat an unanswered item as an accepted one.

Downstream handoff

REV

Active tool

Status
Active tool
Run / inspect
python infer_spell_candidates.py --input <passages.jsonl> --threshold 0.93
Input
passages with exact CAP tokens and offsets
Output
bounded candidate spans with offsets, confidence, model identity, status candidate-not-truth

Dependencies

Why this is the active version

This is the only genuinely trained project tool in the system, and it is sealed. Stage 1 is a BertForTokenClassification head warm-started from CAMeL-Lab/camelbert-msa-qalb14-ged-13 revision 447179dc63d186e4bff09a993e90e73ad622d571 and fine-tuned once in-project. Stage 2 is a deterministic exact-glyph verifier with 55 typed registry entries that can only SUPPRESS a stage-1 candidate, never create or edit text. Model v2 was evaluated and REJECTED; its weights are deliberately excluded so it cannot be run.

Copied files — source receipt

FileOriginal SHA-256BytesCopy
infer_spell_candidates.py 6d334db2f988902a… 8,096 verified
PACKAGE_CONTRACT.json b21467513f184573… 7,697 verified
LIMITATIONS.md b63500183f2d2698… 5,908 verified
REPRODUCE.md 6283f23bbb8ebe41… 4,601 verified
OUTER_SEAL.json a582ba17d931c4b0… 1,086 verified
SHA256SUMS.txt e9daa916faa308e8… 3,892 verified
model/THRESHOLD.json 64c0c7bc9f07a777… 369 verified
model/MODEL_SHA256.txt c8fe003fec5e177d… 442 verified
model/config.json a81082dc84003e0c… 923 verified
model/tokenizer_config.json 466526545f52ae5c… 452 verified
environment/ENVIRONMENT.json 1793dc221725d135… 838 verified
environment/requirements.lock 691e40f7e9d93dc8… 727 verified
verifier_v3/VERIFIER_REGISTRY.json fb72b7d6583a2085… 139,200 verified
verifier_v3/SAFETY_TESTS.json 8b84e60e4b75f986… 5,630 verified
verifier_v3/OUTER_SEAL.json 33f8033063c5482f… 1,194 verified

15 file(s), all hash-verified against the original. Full detail in tool/SOURCE_RECEIPT.json. Copy-only: the historical source is never modified.

Archived versions

Archived versionWhy supersededRetained valueBytes
04_rejected_v2_HOLD REJECTED. v2 suppressed 73 of 75 known false positives but lost 29 of 54 real printed errors on the same issue. Root cause HARD_NEGATIVE_OVER_GENERALISATION on final ha. The rejection evidence, verdict and dataset stats. Weights deliberately excluded so the rejected model cannot be executed. referenced
03_evidence_banks Five generations v2 to v5 plus an append-only erratum 104 real printed errors, 92 verified valid forms, 181 extraction defects, 30 uncertain — with forbidden_use flags preventing defects reaching training or scoring referenced
06_corpus_and_eval Current Training and held-out evaluation corpora with issue-disjoint splits referenced

3 archived version(s). Historical packages are never deleted or mutated; large ones are referenced with verified paths rather than copied, because the source archive is 11 GB.

Known limitations

Security and privacy

Operates on frozen local text. No credentials. The 414 MB weight file is carried by Git LFS with its SHA-256 recorded, so the artifact stays verifiable.

Cost behaviour

Zero. Training cost USD 0.00 with no provider calls; inference is local CPU.

Copying a tool into this repository does not authorise running it, retraining it, calling a model, or processing a new issue. No paid call may be made without the owner's explicit authorisation and a hard cost cap.

Provenance

Registry
registry/roles.json (schema marsoom.e2t.roles.v1)
Derivation
28 legacy roles - VER - HUMAN + REV = 27 active steps
Legacy role id
SPELL
Legacy source SHA-256
6f5d5d7ed8869e45307424c2193f95ffab84abc44a6a188f5c7f98c2a48ec64d
Generated
2026-09-04T22:13:12.433Z

Feedback and decisions

Feedback is recorded per source and never merged into an invented consensus. Where sources disagree, both positions stand and the owner decides.

SourceEvents
Naser / owner
Final authority. Overrides every other source.
none recorded
Codex / orchestrator
Architecture and sequencing.
none recorded
Builder / designer
Implementation reality and constraints.
none recorded
Independent reviewer
Adversarial review of claims.
none recorded
Auditor
Evidence verification against artifacts.
none recorded
Human REV reviewer
Page-level truth from the review site.
none recorded

Recorded events

No feedback events recorded yet. The ledger exists and is append-only: feedback/FEEDBACK_LEDGER.jsonl.

Editing feedback is not possible: a change is a new event whose supersedes names the one it replaces, and the original stays exactly as written.


Generated from registry/roles.json by tools/build-reports.mjs. Do not hand-edit — edit the registry and rebuild.
Original page pixels are the visual authority. CAP owns the exact captured text.