Files
ingglish-hyperdope-gematria/hyperdope-gematria-ingglish-provisioning-plan.md

116 lines
16 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Plan: Provisioning an Ingglish Lexicon & Phrase Corpus to `hyperdope-gematria`
## 1. Architectural Alignment with `malonehunter/hyperdope-gematria`
Inspection of the target repository (`v2.6.1`) reveals five structural mechanisms that directly govern how an Ingglish word and phrase corpus should be formatted, filtered, and delivered:
1. **Flat Database Format (`db.txt`) & Bracketed Annotations (`[...]`):**
- `db.txt` begins with the header `CREATE_GEMATRO_DB` followed by one entry per line (currently ~229,943 entries).
- **Critical Engine Feature:** Both the live engine (`calc/gematria.js`, `optAllowPhraseComments = true`) and the pre-computation compiler (`tools/generate_db_json.py`, line 59: `compute_text = re.sub(r"\[.+\]", "", phrase).strip()`) **strip `[...]` bracketed text before computing cipher sums**, while preserving the bracketed text in display row `row[0]`.
- *Implication for Ingglish:* Every Ingglish word or phrase can be provisioned as `Chaildz In Dha Wiskee [Ingglish: Childs In The Whiskey]` or `Ayleean [Ingglish: Alien]`. The calculator will score **only** the Ingglish characters (`Chaildz In Dha Wiskee = 333` in AQ), while displaying the English gloss right beside it in the match results modal and history table!
2. **Pre-Computed Progressive JSON (`db_lite.json` + `db.json`):**
- `tools/generate_db_json.py` compiles `db.txt` into `db.json` (all 69 English-applicable ciphers, including `Alphanumeric Qabbala`, `Synx`, `Alphanumeric Case Sensitive`, `Based Atlanteanism`, `Primes`, `Ordinal`, etc.) and `db_lite.json` (the 16-cipher fast-paint subset, which already includes `Alphanumeric Qabbala` and `Synx`).
3. **Proper-Case Normalization (`tools/normalize_caps.py`):**
- Capitalizes the first letter of each word while preserving all-caps tokens (`>= 2` letters like `AI`, `FBI`, `NASA`), mixed-case (`aiFohn`, `GitHuhb`), digits (`Outpohst 31`), and `[...]` bracketed comments.
- Because `normalize_caps.py` checks `is_roman(letters) and letters.lower() not in DICT`, short Ingglish tokens consisting solely of Roman numeral letters (`mi`, `li`, `di`, `vi`, `iv`) that are not in `/usr/share/dict/words` must be guarded in `normalize_caps.py` so they are not accidentally uppercased into Roman numerals (which would alter the 5 case-sensitive ciphers).
4. **Calibrated Junk Filter (`tools/classify_candidates.py`):**
- In `v2.5`, `classify_candidates.py` rejects long phrases (`nw >= 5`) if their `/usr/share/dict/words` hit rate is `< 40%` (`dict_hits < nw * 0.4`). Because phonetic Ingglish tokens (`dha`, `uhv`, `fyoocher`, `sibernetik`, `spairal`) are intentionally non-standard spellings absent from `/usr/share/dict/words`, unannotated 6-to-8-word Ingglish sentences would be flagged as `long-scraped` unless either:
- The `[Ingglish: <English gloss>]` bracketed suffix is present (or whitelisted by tag), or
- `classify_candidates.py` loads our CMUdict Ingglish lexicon alongside `/usr/share/dict/words`.
---
## 2. Five-Stage Provisioning Process
### Stage 1: Corpus Extraction, Tiering & Deduplication (Local Archive -> Candidate Sets)
Extract and tier our verified Ingglish assets from `/workspace/ingglish-aq-archive/` and CMUdict into three modularity tiers so upstream maintainers (or fork operators) can choose their footprint:
- **Tier 1 — Core Archive Lexicon & Isometric Bridges (~1,500 entries):**
- All atomic lexicon words from `01-ingglish-aq-lexicon.md`, proper-noun locks (`Nik Land`, `Joshooa Raymee`, `Wawlter Padik`, `Jon Karpanter`, `Outpohst 31`), Numogrammatic syzygy tokens (`pleks`, `duhsk`, `in dha`), and high-frequency domain entities across Dossiers `20–35`.
- Exclude **Type I Invariant Isometric single words** (`thing`, `flesh`, `chest`, `portal`, `monster`, `street`, `theft`) from duplicate bare insertion if they are already in `db.txt` with identical spelling, OR append them only when tagged `[Ingglish Isometric: Δ=0]` if distinct pedagogical tagging is desired.
- **Tier 2 — Verified Multi-Scale Phrase & Headline Corpus (~1,200 entries):**
- All verified `333`, `666`, `777`, and Numogrammatic (`111, 216, 222, 444, 495, 555, 888, 999`) equations from Ledgers `10–19`, Dossiers `20–35`, and `top-10-ingglish-aq-lists.md`, plus verbatim translated news headlines (`25-dossier-news-2026-11-01.md`).
- **Tier 3 — CMUdict High-Frequency Phonetic Lexicon Expansion (~10,000–25,000 entries, Optional):**
- Batch-translate the top 20,000 most frequent English words/collocations (via `subtlex-word-frequencies` + `ingglish` npm package) where `ingglish != english`, filtered for non-trivial orthographic drift (`Δ != 0`) and homophone compression hubs (`nait [Ingglish: night/knight]`, `rait [Ingglish: write/right/rite]`, `ai [Ingglish: I/eye/AI]`).
### Stage 2: Formatting & Comment-Bracket Schema Design
Format every provisioned line to leverage `hyperdope-gematria`'s native `[...]` comment-stripping parser:
- **Single Words / Proper Nouns:**
- `Spairal [Ingglish: Spiral]` -> Computed on `Spairal` (`AQ = 139`), displays gloss `[Ingglish: Spiral]`.
- **Homophone Compression Nodes:** `Nait [Ingglish: Night / Knight]` -> Computed on `Nait` (`AQ = 80`), immediately alerting the user to both English homophone branches.
- **Type II/III Compensatory Isometries:** `Aiern [Ingglish: Iron, Δ=0]` or `Spaider Hed [Ingglish: Spider Head, Δ=0]` -> Computed on the Ingglish string (`AQ = 92`, `AQ = 179`). (Note: avoid digits inside `[...]` only if `optAllowPhraseComments` could ever be toggled off by a user; since `optAllowPhraseComments` is `true` by default in `gematria.js` and hardcoded in `generate_db_json.py`, `[Ingglish: Iron]` without digits in brackets is 100% immune even if a user disables phrase comments!).
- **Multi-Word Attractor Equations:**
- `Chaildz In Dha Wiskee [Ingglish: Childs In The Whiskey]` (`AQ = 333`)
- `Dha Laberinth Uhv Dha Fyoocher [Ingglish: The Labyrinth Of The Future]` (`AQ = 495`)
### Stage 3: Pipeline Compatibility & Tooling Patches (`tools/`)
Before merging into `db.txt`, apply two small, clean compatibility updates to `hyperdope-gematria`'s Python build tools:
1. **`tools/normalize_caps.py`:**
- Ensure `xform_word()` only uppercases Roman numerals outside `[...]` brackets and skips known Ingglish short words (`di`, `li`, `mi`, `vi`) so `Alphanumeric Case Sensitive` values remain exact.
- Preserve lowercase `ai` when used as the Ingglish first-person pronoun (`ai` vs. `AI`) if case-sensitive fidelity is desired, or normalize to Proper Case (`Ai`) for standard case-insensitive `Alphanumeric Qabbala`.
2. **`tools/classify_candidates.py`:**
- Add a rule recognizing the `[Ingglish: ...]` annotation (or loading `ingglish_vocab.txt` into `DICT`) so 5+ word Ingglish equations pass step 10 (`long-content` rather than `long-scraped`).
### Stage 4: Pre-Computation & Progressive Load Verification
1. Append the formatted Ingglish corpus to `db.txt` (or build a dedicated `db_ingglish.txt` / merged `db.txt`).
2. Run `python3 tools/normalize_caps.py db.txt db.txt --report` to deduplicate and sort case-insensitively.
3. Run `python3 tools/generate_db_json.py db.txt db.json` to emit the updated `db.json` (all 69 ciphers) and `db_lite.json` (16 lite ciphers including `Alphanumeric Qabbala` and `Synx`).
4. Increment `databaseVersion` in `config.default.js` / `config.js` so browsers bust cache and fetch the new JSON matrices.
5. Configure `customCategories` in `config.default.js` to surface an `"Ingglish / CCRU"` preset (`["Alphanumeric Qabbala", "Synx", "Based Atlanteanism", "Primes", "Ordinal"]`).
### Stage 5: Delivery & Upstream Packaging Options
Offer the upstream maintainer (`malonehunter`) two frictionless integration tracks in the PR/release:
- **Track A (Mainline Merge into `db.txt`):** Merge Tiers 1 & 2 (~2,700 curated esoteric/literary/news Ingglish entries with `[Ingglish: ...]` glosses) directly into `db.txt`, alongside the `7.7k` CCRU/Thelemic terms already in `v2.1+`.
- **Track B (Modular Preset / Whitelabel Pack):** Provide `db_ingglish_pack.txt` + precomputed `db_ingglish.json` + a `config.ingglish.js` profile (or UI toggle) for researchers who want a dedicated dual English+Ingglish instance, plus a drag-and-drop `.txt` history/match import file for zero-install browser use.
---
## 3. Impact on Common Bidirectional AQ Actions, Tasks, and Workflows
Provisioning this corpus into `hyperdope-gematria` transforms how users and our local skills (`bidirectional-aq-evaluation`, `phonetic-and-gematria-ciphers`, `isopsephic-humor-and-exegesis`, `current-events-isopsephic-exegesis`) execute bidirectional AQ workflows. Below is the breakdown of what is **enriched**, what is **changed**, and what **stays the same**.
### A. What Is Enriched (New Capabilities Unlocked)
1. **Instant Cross-Orthographic Match Discovery (`English <-> Ingglish` in ~100ms):**
- *Previously:* In `hyperdope-gematria`, typing an English phrase (`Outpost 31` = `193` in AQ, or `blood test` = `193`) only returned Standard English matches. Meanwhile, in our CLI skills, finding matches for an Ingglish phrase (`outpohst 31` = `210`) required scanning our local ~1,500-word markdown archive.
- *Enriched:* Because `db.json` holds both the 229,943 Standard English entries **and** the Ingglish entries in the same pre-computed lookup table, typing **either** an English phrase or an Ingglish phrase immediately displays **cross-orthographic collisions** (`AQ(Eng_A) == AQ(Ing_B)`) and **same-orthographic collisions** (`AQ(Ing_A) == AQ(Ing_B) == 210: Outpohst 31 [Ingglish: Outpost 31] == Ches Wizerd [Ingglish: Chess Wizard] == Videeoh Lawg [Ingglish: Video Log]`) in a single unified modal.
2. **Multi-Cipher Cross-Pollination Beyond Base-36 AQ (69 Ciphers Simultaneously):**
- *Previously:* Our local Ingglish scripts (`evaluate_aq.mjs`) only computed Base-36 Alphanumeric Qabbala (`0–9, A=10..Z=35`).
- *Enriched:* Every provisioned Ingglish word and phrase is automatically pre-scored across all **69 English-applicable ciphers** in `hyperdope-gematria`—including **Synx** (base-36 divisor/factor cipher), **Based Atlanteanism** (`Standard - AQ`), **Based Atlanteanism Denovated** (`(Standard - AQ) / 9`), **Primes**, **English Qaballa (ALW)**, **Ordinal**, and **Reduction**. Users can suddenly inspect whether an Ingglish isometric lock in AQ (`aiern == iron == 92`) also holds or fractures in `Ordinal`, `Primes`, or `Based Atlanteanism`.
3. **Visual Character & Word Breakdown (`calc/gematria.js` Breakdown Chart):**
- Clicking any provisioned Ingglish phrase in the `hyperdope-gematria` history table renders a visual letter-by-letter and word-by-word bar chart (`d-h-a = 13+17+10 = 40`), while the `[Ingglish: ...]` bracketed gloss stays visible in the header without polluting the character sum.
4. **Immediate Homophone Fork Visibility (`XOR Mode C` in `bidirectional-aq-evaluation`):**
- When a user searches AQ `80` or types `Nait`, the database match row `Nait [Ingglish: Night / Knight]` immediately surfaces the homophone fork in the UI without needing to run `ingglish.reverseTranslate()` in a separate terminal.
### B. What Is Changed (Workflow Transitions)
1. **Lookup vs. Combinatorial Synthesis Split:**
- *Changed:* Searching for existing equivalences (`Dimension 2: Isopsephic Collision Density`) shifts from running bespoke Node scripts over markdown files to an instant `<100ms` query in `hyperdope-gematria`'s precomputed `db.json`.
- However, **generating brand-new multi-word sentences** for unseen news anchors (e.g., tomorrow's breaking headlines in `current-events-isopsephic-exegesis`) still happens via bounded template loops in `phonetic-and-gematria-ciphers` first—and the newly discovered verified equations are then exported as a batch update back into `hyperdope-gematria`'s `db.txt`.
2. **Bidirectional Comparison Workflow in the Browser History Table:**
- *Changed:* Instead of only running `evaluate_aq.mjs --eng "..." --ing "..."` in CLI, a user in `hyperdope-gematria` can enter the English phrase on line 1 (`Childs In The Alien` -> `AQ = 296`) and its Ingglish counterpart on line 2 (`Chaildz In Dha Ayleean [Ingglish: Childs In The Alien]` -> `AQ = 333`). Both rows sit side-by-side in the calculator's **History Table**, where the user can visually highlight shared cipher matches across all active columns and export a screenshot.
3. **Bracketed Gloss Convention (`[Ingglish: ...]` without Digits):**
- *Changed:* In our local Markdown archive (`00-index-and-methodology.md`), we write `` - `ingglish` ("english") — `w1 (v1) + ... = SUM` [tags] ``. To provision into `hyperdope-gematria`, the canonical line transforms into `Ingglish Phrase [Ingglish: English Gloss]` (Proper-Case normalized, no word-weight breakdown inside the line, and avoiding digits inside `[...]` unless part of the English proper noun like `[Ingglish: Outpost 31]` so the live/precomputed comment stripper handles it cleanly).
### C. What Stays the Same (Invariant Core Rules & Complementary Tooling)
1. **Deterministic CMUdict Orthographic Rules & Proper-Noun Locks (`phonetic-and-gematria-ciphers`):**
- `hyperdope-gematria` is a **gematria scoring and matching engine**, not a grapheme-to-phoneme (G2P) translator. It does not bundle the 126,000-word CMU Pronouncing Dictionary in the browser. Therefore, translating arbitrary new English text into Ingglish (`translate()`) and enforcing proper-noun transliteration locks (`Taifan`, `Apawfis`, `Joshooa Raymee`) remains the responsibility of our Node `ingglish` pre-processing pipeline before entries enter `db.txt` or are pasted into the calculator.
2. **Base-36 AQ Arithmetic & Isometric Laws:**
- `hyperdope-gematria`'s `"Alphanumeric Qabbala"` cipher uses the exact same `0–9 = 0–9, A=10..Z=35` mapping (with spaces, hyphens, and punctuation = `0`). Every single word weight, prime flag, repdigit factorization (`333`, `666`, `777`), Numogram syzygy (`81`, `108`, `216`, `495`), and Type I–III Isometric Lock (`Δ = 0`) in our archive produces the exact same integer in `hyperdope-gematria`.
3. **100-Point Rubric & Genealogical Fitness Evaluation (`bidirectional-aq-evaluation`):**
- Computing **Mean Clause Drift (`Mean Abs(Δ)`)**, **Generic Modifier Padding Rate (`seekrat/hidan %`)**, **6-Vector Orthographic Genealogical Fitness (`G1–G6`)**, and **Option 4 Hybrid Numogrammatic Curve scores (`Class S/A/B`)** across multi-equation dossiers remains an analytical workflow performed by `evaluate_aq.mjs` and our evaluation skills. `hyperdope-gematria` acts as the interactive discovery and match-verification frontend, while our skills remain the generative G2P compiler and rubric-auditing backend.
---
## 4. Summary Matrix of Workflow Evolution
| Workflow / Task | Current State (CLI Skills Only) | Post-Provisioning State (`hyperdope-gematria` + Skills) | Status |
| :--- | :--- | :--- | :--- |
| **Base-36 AQ Scoring (`0-9, A=10..Z=35`)** | Node script (`evaluate_aq.mjs`) | Identical math in browser (`Alphanumeric Qabbala` cipher) + CLI | **Stays the Same** |
| **G2P Translation (`Eng -> Ing`)** | `ingglish` npm package (CMUdict) | Pre-compiled via `ingglish` npm package into `db.txt` `[Ingglish: ...]` | **Stays the Same** |
| **100-Pt Rubric & `G1-G6` Vectors** | `evaluate_aq.mjs` + `3X-eval-*.md` | Remains in CLI evaluation skill (`Mean Abs(Δ)`, anti-padding rate) | **Stays the Same** |
| **Archive Match Formatting** | `` - `ing` ("eng") — `w (v) = N` `` | `Ing Phrase [Ingglish: Eng Gloss]` (brackets stripped during scoring) | **Changed** |
| **Collision Lookup (`Word A == Word B`)** | Scan ~1.5k local markdown entries | Instant `<100ms` match across 230k+ English + Ingglish `db.json` entries | **Enriched** |
| **Cross-Cipher Audit (`Synx`, `Primes`, `ALW`)** | AQ-only in local scripts | Simultaneous scoring across all 69 English ciphers in `db.json` | **Enriched** |
| **Homophone Fork Inspection (`nait`)** | Run `reverseTranslate()` in CLI | Instant visual disambiguation via `[Ingglish: Night / Knight]` match row | **Enriched** |