@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
classify_technocapital_singularity.py
Deterministic CLI tool for `technocapital-singularity-zoology` (v1.1 .0).
Deterministic CLI tool for `technocapital-singularity-zoology` (v1.2 .0).
Responsibilities:
1. Batch-translates candidate theoretical, organizational, financial, and hardware entities into Ingglish
@@ -15,6 +15,13 @@ Responsibilities:
- Double-Articulation Bridges (linking Machinic Phylum classes S1– S5 with Capital Organizational Capacity class S6)
4. Classifies entities and locks into the 6-Class Landian-Deleuzean Technocapital Singularity
Taxonomy (`S1` through `S6`).
5. Quantitative Economic Anchor Revision & Alternative-Surfacing Engine (`--revise-anchor`):
- Evaluates revisions to quantitative economic anchors across both `Q_digit` and `Q_spoken`.
- Detects pure-AQ Epistemic Regime Transitions (Iso-Digital Conservation `Δ_Q = 0`,
Equivalence-Ring Migration `Ring(Q_old) -> Ring(Q_new)`, and Prime/Square/Repdigit Phase Transitions).
- Runs a 3-Path Counter-Substitution Solver (Path A: Verb/Adjective Counter-Swap `δ_slot = -Δ_Q`;
Path B: Tail/Head Entity Equivalence Migration `AQ(New_Entity) = AQ(Old_Entity) - Δ_Q`;
Path C: Dual-Mode `Q_digit` vs. `Q_spoken` Fork Comparison) to surface verified `333 / 666 / 777` alternatives.
"""
from __future__ import annotations
@@ -129,6 +136,30 @@ TAXONOMY_CLASSES = {
}
# Counter-substitution pools for Stage 3 of the Quantitative Revision Engine
VERB_POOL = [
( " hawlts " , " halts " , 137 ) , ( " ohpanz " , " opens " , 134 ) , ( " draivz " , " drives " , 134 ) ,
( " brayks " , " breaks " , 130 ) , ( " hohldz " , " holds " , 127 ) , ( " fohldz " , " folds " , 125 ) ,
( " kuhts " , " cuts " , 124 ) , ( " leevz " , " leaves " , 115 ) , ( " melts " , " melts " , 114 ) ,
( " raits " , " writes " , 112 ) , ( " marks " , " marks " , 107 ) , ( " sits " , " sits " , 103 ) ,
( " gardz " , " guards " , 101 ) , ( " loks " , " locks " , 93 ) , ( " hits " , " hits " , 92 ) , ( " sit " , " sit " , 75 ) ,
]
ADJ_POOL = [
( " dijatal " , " digital " , 120 ) , ( " pyur " , " pure " , 116 ) , ( " ferst " , " first " , 113 ) ,
( " sharp " , " sharp " , 107 ) , ( " ohpan " , " open " , 99 ) , ( " vast " , " vast " , 98 ) ,
( " kleer " , " clear " , 96 ) , ( " kohld " , " cold " , 95 ) , ( " klir " , " clear " , 86 ) ,
( " hart " , " heart " , 83 ) , ( " noo " , " new " , 71 ) , ( " dark " , " dark " , 70 ) , ( " deep " , " deep " , 66 ) ,
( " blak " , " black " , 62 ) , ( " red " , " red " , 54 ) , ( " ro " , " raw " , 51 ) , ( " hai " , " high " , 45 ) ,
]
PREP_POOL = [
( " throo " , " through " , 121 ) , ( " intoo " , " into " , 118 ) , ( " fruhm " , " from " , 111 ) ,
( " uhv " , " of " , 78 ) , ( " for " , " for " , 66 ) , ( " amid " , " amid " , 63 ) ,
( " on " , " on " , 47 ) , ( " in " , " in " , 41 ) , ( " at " , " at " , 39 ) ,
]
def batch_translate ( terms : list [ str ] , workdir : str = " /workspace/ingglish-hyperdope-gematria " ) - > dict [ str , str ] :
if not terms :
return { }
@@ -198,7 +229,7 @@ def analyze_terms(terms: list[str], workdir: str = "/workspace/ingglish-hyperdop
var_e = round ( sum ( ( x - mean_e ) * * 2 for x in eng_vals ) / len ( eng_vals ) , 2 )
has_s6 = any ( g [ " eng " ] . lower ( ) in TAXONOMY_CLASSES [ " S6 " ] [ " keywords " ] for g in group )
has_machinic = any (
any ( g [ " eng " ] . lower ( ) in TAXONOMY_CLASSES [ c ] [ " keywords " ] for c in ( " S1 " , " S2 " , " S3 " , " S4 " , " S5 " ) )
any ( g [ " eng " ] . lower ( ) in TAXONOMY_CLASSES [ c ] [ " keywords " ] for c in ( " S1 " , " S2 " , " S3 " , " S4 " , " S5 " ) )
for g in group
)
g1_singularities [ str ( aq_val ) ] = {
@@ -230,7 +261,7 @@ def analyze_terms(terms: list[str], workdir: str = "/workspace/ingglish-hyperdop
)
return {
" version " : " 1.1.0 " ,
" version " : " 1.2.0 " ,
" taxonomy_classes " : { k : v [ " name " ] for k , v in TAXONOMY_CLASSES . items ( ) } ,
" counts " : {
" total_terms " : len ( records ) ,
@@ -247,6 +278,323 @@ def analyze_terms(terms: list[str], workdir: str = "/workspace/ingglish-hyperdop
}
def number_properties ( n : int ) - > dict [ str , Any ] :
root = int ( math . isqrt ( n ) ) if n > = 0 else - 1
is_sq = ( root * root == n ) and n > 0
repdigit = n in { 111 , 222 , 333 , 444 , 555 , 666 , 777 , 888 , 999 } or ( n > 0 and n % 37 == 0 )
return {
" aq " : n ,
" prime_rank " : PRIME_RANKS . get ( n ) ,
" is_prime " : n in PRIME_RANKS ,
" is_square " : is_sq ,
" square_root " : root if is_sq else None ,
" repdigit_or_37_multiple " : repdigit ,
}
def revise_economic_anchor (
anchor_id : str ,
new_digit : str ,
new_spoken_eng : str ,
anchors_path : str ,
base_report : dict [ str , Any ] ,
workdir : str = " /workspace/ingglish-hyperdope-gematria " ,
) - > dict [ str , Any ] :
"""
Evaluate a quantitative economic anchor revision (Q_old -> Q_new) across Q_digit and Q_spoken:
1. Computes Δ_digit and Δ_spoken.
2. Identifies pure-AQ Epistemic Regime Transitions (Iso-Digital Conservation, Equivalence-Ring Migration,
and Prime/Square/Repdigit Phase-Transitions).
3. Runs the 3-Path Counter-Substitution Solver across baseline equations to surface verified alternatives.
"""
anchors_data = json . loads ( Path ( anchors_path ) . read_text ( encoding = " utf-8 " ) )
target_anchor = None
for a in anchors_data . get ( " anchors " , [ ] ) :
if a [ " anchor_id " ] == anchor_id :
target_anchor = a
break
if not target_anchor :
valid_ids = [ a [ " anchor_id " ] for a in anchors_data . get ( " anchors " , [ ] ) ]
raise ValueError ( f " Unknown anchor_id ' { anchor_id } ' . Valid IDs: { valid_ids } " )
trans = batch_translate ( [ new_spoken_eng ] , workdir = workdir )
new_spoken_ing = trans . get ( new_spoken_eng , new_spoken_eng . lower ( ) )
old_digit = target_anchor [ " q_digit " ]
old_spoken_eng = target_anchor [ " q_spoken_eng " ]
old_spoken_ing = target_anchor [ " q_spoken_ing " ]
old_digit_aq = compute_aq ( old_digit )
new_digit_aq = compute_aq ( new_digit )
delta_digit = new_digit_aq - old_digit_aq
old_spoken_aq = compute_aq ( old_spoken_ing )
new_spoken_aq = compute_aq ( new_spoken_ing )
delta_spoken = new_spoken_aq - old_spoken_aq
# Build lookup of entities by Ingglish AQ from base_report + extra barstool/archive nouns
extra_entities = [
( " ai " , " AI " , 28 ) , ( " fbi " , " FBI " , 44 ) , ( " bar " , " bar " , 48 ) , ( " tab " , " tab " , 50 ) , ( " bil " , " bill " , 50 ) ,
( " dim " , " dim " , 53 ) , ( " god " , " god " , 53 ) , ( " ayd " , " aid " , 57 ) , ( " lap " , " lap " , 56 ) , ( " jar " , " jar " , 56 ) ,
( " bom " , " bomb " , 57 ) , ( " us " , " US " , 58 ) , ( " kayn " , " Cane " , 59 ) , ( " nik " , " Nick " , 61 ) , ( " buk " , " book " , 61 ) ,
( " pen " , " pen " , 62 ) , ( " jet " , " jet " , 62 ) , ( " hand " , " hand " , 63 ) , ( " oil " , " oil " , 63 ) , ( " chek " , " check " , 63 ) ,
( " tap " , " tap " , 64 ) , ( " lip " , " lip " , 64 ) , ( " ayl " , " ale " , 65 ) , ( " bred " , " bred " , 65 ) , ( " beer " , " beer " , 66 ) ,
( " heel " , " heel " , 66 ) , ( " hiv " , " HIV " , 66 ) , ( " land " , " Land " , 67 ) , ( " abis " , " abyss " , 67 ) , ( " rim " , " rim " , 67 ) ,
( " fiz " , " fizz " , 68 ) , ( " beet " , " beat " , 68 ) , ( " neam " , " Naeem " , 69 ) , ( " gpu " , " GPU " , 71 ) , ( " sip " , " sip " , 71 ) ,
( " atam " , " atom " , 71 ) , ( " feet " , " feet " , 72 ) , ( " tip " , " tip " , 72 ) , ( " grid " , " grid " , 74 ) , ( " peel " , " peel " , 74 ) ,
( " glas " , " glass " , 75 ) , ( " bord " , " board " , 75 ) , ( " kash " , " cash " , 75 ) , ( " bern " , " burn " , 75 ) , ( " food " , " food " , 76 ) ,
( " ferm " , " firm " , 78 ) , ( " lait " , " light " , 78 ) , ( " gloh " , " glow " , 78 ) , ( " fohm " , " foam " , 78 ) , ( " taim " , " time " , 79 ) ,
( " nait " , " night " , 80 ) , ( " bangk " , " bank " , 80 ) , ( " asml " , " ASML " , 81 ) , ( " aset " , " asset " , 81 ) , ( " milk " , " milk " , 81 ) ,
( " skan " , " scan " , 81 ) , ( " dohs " , " dose " , 82 ) , ( " hart " , " heart " , 83 ) , ( " verb " , " verb " , 83 ) , ( " wor " , " war " , 83 ) ,
( " amber " , " amber " , 84 ) , ( " ring " , " ring " , 84 ) , ( " bwoh " , " BwO " , 84 ) , ( " ipoh " , " IPO " , 84 ) , ( " muhg " , " mug " , 85 ) ,
( " maind " , " mind " , 86 ) , ( " void " , " void " , 86 ) , ( " guhn " , " gun " , 86 ) , ( " huhm " , " hum " , 86 ) , ( " erth " , " earth " , 87 ) ,
( " ship " , " ship " , 88 ) , ( " skin " , " skin " , 89 ) , ( " blayd " , " blade " , 89 ) , ( " sohl " , " soul " , 90 ) , ( " tsmc " , " TSMC " , 91 ) ,
( " laws " , " loss " , 91 ) , ( " taps " , " taps " , 92 ) , ( " payn " , " pain " , 92 ) , ( " bluhd " , " blood " , 92 ) , ( " aiern " , " iron " , 92 ) ,
( " moon " , " moon " , 93 ) , ( " chanal " , " channel " , 93 ) , ( " draft " , " draft " , 94 ) , ( " shop " , " shop " , 94 ) , ( " lejer " , " ledger " , 95 ) ,
( " faiber " , " fiber " , 95 ) , ( " flesh " , " flesh " , 95 ) , ( " klawd " , " Claude " , 96 ) , ( " failam " , " phylum " , 96 ) , ( " dayta " , " data " , 96 ) ,
( " amodai " , " Amodei " , 97 ) , ( " ataks " , " attacks " , 97 ) , ( " fuhnd " , " fund " , 98 ) , ( " shot " , " shot " , 98 ) , ( " draiv " , " drive " , 99 ) ,
( " noiz " , " noise " , 100 ) , ( " chest " , " chest " , 100 ) , ( " buhbal " , " bubble " , 100 ) , ( " feest " , " feast " , 100 ) ,
( " voht " , " vote " , 101 ) , ( " stok " , " stock " , 101 ) , ( " krash " , " crash " , 102 ) , ( " thing " , " thing " , 103 ) ,
( " druhg " , " drug " , 103 ) , ( " awfis " , " office " , 103 ) , ( " drohn " , " drone " , 104 ) , ( " theft " , " theft " , 104 ) ,
( " senat " , " senate " , 104 ) , ( " pint " , " pint " , 105 ) , ( " gloom " , " gloom " , 107 ) , ( " spred " , " spread " , 107 ) ,
( " swich " , " switch " , 107 ) , ( " werld " , " world " , 107 ) , ( " prais " , " price " , 108 ) , ( " harlan " , " Harlan " , 108 ) ,
( " asets " , " assets " , 109 ) , ( " kohdz " , " codes " , 109 ) , ( " balats " , " ballots " , 109 ) , ( " reeman " , " Riemann " , 110 ) ,
( " alfabet " , " alphabet " , 110 ) , ( " bodeez " , " bodies " , 111 ) , ( " saifer " , " cipher " , 112 ) , ( " binans " , " Binance " , 113 ) ,
( " smawl " , " small " , 113 ) , ( " skayl " , " scale " , 113 ) , ( " gohst " , " ghost " , 114 ) , ( " proof " , " proof " , 115 ) ,
( " ivent " , " event " , 115 ) , ( " taybal " , " table " , 115 ) , ( " signal " , " signal " , 116 ) , ( " kayos " , " chaos " , 116 ) ,
( " spoil " , " spoil " , 116 ) , ( " puhdal " , " puddle " , 116 ) , ( " sairan " , " siren " , 116 ) , ( " markat " , " market " , 118 ) ,
( " meerer " , " mirror " , 118 ) , ( " klingk " , " clink " , 118 ) , ( " napkin " , " napkin " , 119 ) , ( " pouer " , " power " , 120 ) ,
( " kartel " , " cartel " , 121 ) , ( " serfas " , " surface " , 122 ) , ( " mouth " , " mouth " , 122 ) , ( " tohkan " , " token " , 123 ) ,
( " merjer " , " merger " , 123 ) , ( " vawlt " , " vault " , 123 ) , ( " touer " , " tower " , 124 ) , ( " kapatal " , " capital " , 125 ) ,
( " kapcher " , " capture " , 125 ) , ( " fohldz " , " folds " , 125 ) , ( " saires " , " Serres " , 125 ) , ( " stool " , " stool " , 126 ) ,
( " wiskee " , " whiskey " , 126 ) , ( " skreen " , " screen " , 126 ) , ( " ayleean " , " alien " , 126 ) , ( " minamam " , " minimum " , 127 ) ,
( " dokter " , " doctor " , 127 ) , ( " windoh " , " window " , 127 ) , ( " strip " , " strip " , 127 ) , ( " masheen " , " machine " , 128 ) ,
( " serkat " , " circuit " , 128 ) , ( " infanat " , " infinite " , 128 ) , ( " blakwel " , " Blackwell " , 129 ) , ( " stoks " , " stocks " , 129 ) ,
( " silakan " , " silicon " , 130 ) , ( " storm " , " storm " , 130 ) , ( " fikshan " , " fiction " , 131 ) , ( " wayfer " , " wafer " , 132 ) ,
( " straik " , " strike " , 132 ) , ( " wayts " , " weights " , 133 ) , ( " sworm " , " swarm " , 133 ) , ( " ekwatee " , " equity " , 133 ) ,
( " fiziks " , " physics " , 134 ) , ( " tenser " , " tensor " , 135 ) , ( " dilooz " , " Deleuze " , 135 ) , ( " asemblaj " , " assemblage " , 135 ) ,
( " charter " , " charter " , 136 ) , ( " portal " , " portal " , 136 ) , ( " envideea " , " Nvidia " , 137 ) , ( " daireeoh " , " Dario " , 137 ) ,
( " jaiants " , " giants " , 137 ) , ( " vencher " , " venture " , 138 ) , ( " tangker " , " tanker " , 139 ) , ( " stout " , " stout " , 140 ) ,
( " layzer " , " laser " , 141 ) , ( " street " , " street " , 141 ) , ( " kraisas " , " crisis " , 141 ) , ( " hermeez " , " Hermes " , 143 ) ,
( " valyoo " , " value " , 144 ) , ( " nuhmber " , " number " , 144 ) , ( " lazeras " , " Lazarus " , 145 ) , ( " sentor " , " centaur " , 145 ) ,
( " demakrat " , " Democrat " , 145 ) , ( " hohlding " , " holding " , 149 ) , ( " ilekshan " , " election " , 151 ) ,
( " krimanal " , " criminal " , 151 ) , ( " vaialans " , " violence " , 151 ) , ( " ekanomik " , " economic " , 151 ) ,
( " aperatas " , " apparatus " , 153 ) , ( " serplas " , " surplus " , 153 ) , ( " raizohm " , " rhizome " , 153 ) , ( " reealatee " , " reality " , 153 ) ,
( " atenshan " , " attention " , 154 ) , ( " hyooman " , " human " , 154 ) , ( " sindikat " , " syndicate " , 159 ) , ( " kapasatee " , " capacity " , 160 ) ,
( " truhst " , " trust " , 160 ) , ( " rohbots " , " robots " , 160 ) , ( " kriptoh " , " crypto " , 160 ) , ( " straiks " , " strikes " , 160 ) ,
( " manopalee " , " monopoly " , 163 ) , ( " masheenz " , " machines " , 163 ) , ( " fyooalz " , " fuels " , 163 ) , ( " order buk " , " order book " , 166 ) ,
( " noo flesh " , " New Flesh " , 166 ) , ( " puhblish " , " publish " , 167 ) , ( " fasilitee " , " facility " , 167 ) , ( " siberatak " , " cyberattack " , 167 ) ,
( " bartender " , " bartender " , 168 ) , ( " werkerz " , " workers " , 169 ) , ( " vorteks " , " vortex " , 173 ) , ( " prizanz " , " prisons " , 173 ) ,
( " outijiz " , " outages " , 173 ) , ( " kuhmpanee " , " company " , 175 ) , ( " pairasait " , " parasite " , 175 ) , ( " faktereez " , " factories " , 178 ) ,
( " nuhmberz " , " numbers " , 179 ) , ( " daytabays " , " database " , 179 ) , ( " freezerz " , " freezers " , 181 ) , ( " klinayman " , " clinamen " , 181 ) ,
( " nookleeer " , " nuclear " , 181 ) , ( " alakayshan " , " allocation " , 183 ) , ( " tempaleks " , " templex " , 183 ) , ( " ruhnaway " , " runaway " , 183 ) ,
( " laytansee " , " latency " , 183 ) , ( " awtonamas " , " autonomous " , 188 ) , ( " teknolajee " , " technology " , 188 ) , ( " airports " , " airports " , 188 ) ,
( " likwidatee " , " liquidity " , 189 ) , ( " hangkerchif " , " handkerchief " , 189 ) , ( " imerjansee " , " emergency " , 189 ) ,
( " lajistiks " , " logistics " , 191 ) , ( " derivativ " , " derivative " , 191 ) , ( " leedership " , " leadership " , 191 ) ,
( " anthropik " , " Anthropic " , 193 ) , ( " flash krash " , " flash crash " , 193 ) , ( " lathografee " , " lithography " , 197 ) ,
( " arbitrozh " , " arbitrage " , 198 ) , ( " ikwayzhan " , " equation " , 199 ) , ( " inflayshan " , " inflation " , 199 ) ,
( " akwazishan " , " acquisition " , 203 ) , ( " pairasitik " , " parasitic " , 203 ) , ( " algeridhamik " , " algorithmic " , 206 ) ,
( " saplai chayn " , " supply chain " , 208 ) , ( " wor masheen " , " war machine " , 211 ) , ( " koper waier " , " copper wire " , 211 ) ,
( " siks bilyan " , " six billion " , 211 ) , ( " jensan hwang " , " Jensen Huang " , 215 ) , ( " hohlee grayl " , " Holy Grail " , 215 ) ,
( " haipothasas " , " hypothesis " , 216 ) , ( " guhvernans " , " governance " , 219 ) , ( " enterpraiz " , " enterprise " , 222 ) ,
( " maynstreem " , " mainstream " , 223 ) , ( " hud shooter " , " Hood shooter " , 223 ) , ( " muhnshiganj " , " Munshiganj " , 223 ) ,
( " daireeoh amodai " , " Dario Amodei " , 234 ) , ( " zheel dilooz " , " Gilles Deleuze " , 236 ) , ( " machinik failam " , " machinic phylum " , 236 ) ,
( " kansorsheeam " , " consortium " , 237 ) , ( " levant alpohj " , " Levent Alpoge " , 244 ) , ( " zeptohvers " , " zeptoverse " , 244 ) ,
( " transformer " , " transformer " , 246 ) , ( " gravatee draiv " , " Gravity Drive " , 250 ) , ( " maikrohzekand " , " microsecond " , 253 ) ,
( " slawterbots " , " slaughterbots " , 253 ) , ( " sovran welth " , " sovereign wealth " , 256 ) , ( " akselerayshan " , " acceleration " , 256 ) ,
( " hai-freekwansee " , " high-frequency " , 256 ) , ( " korperayshan " , " corporation " , 259 ) , ( " teknohkapital " , " technocapital " , 260 ) ,
( " kiler rohbots " , " killer robots " , 260 ) , ( " vencher kapatal " , " venture capital " , 263 ) , ( " organazayshan " , " organization " , 267 ) ,
( " awtoregresiv " , " autoregressive " , 270 ) , ( " shizohnalizis " , " schizoanalysis " , 292 ) , ( " abstrakt masheen " , " abstract machine " , 292 ) ,
( " sinthetik dayta " , " synthetic data " , 292 ) , ( " ingkorperayshan " , " incorporation " , 316 ) , ( " nacheral kontrakt " , " natural contract " , 316 ) ,
]
by_aq_pool : dict [ int , list [ dict [ str , Any ] ] ] = { }
seen_ing = set ( )
for ent in base_report . get ( " entities " , [ ] ) :
by_aq_pool . setdefault ( ent [ " ing_aq " ] , [ ] ) . append (
{ " ing " : ent [ " ing " ] , " eng " : ent [ " eng " ] , " aq " : ent [ " ing_aq " ] , " classes " : ent [ " taxonomy_classes " ] }
)
seen_ing . add ( ent [ " ing " ] )
for ing_w , eng_w , v_aq in extra_entities :
if ing_w not in seen_ing :
by_aq_pool . setdefault ( v_aq , [ ] ) . append (
{ " ing " : ing_w , " eng " : eng_w , " aq " : v_aq , " classes " : classify_term ( eng_w , ing_w , compute_aq ( eng_w ) , v_aq ) }
)
old_spoken_ring = [ x for x in by_aq_pool . get ( old_spoken_aq , [ ] ) if x [ " ing " ] != old_spoken_ing ]
new_spoken_ring = [ x for x in by_aq_pool . get ( new_spoken_aq , [ ] ) if x [ " ing " ] != new_spoken_ing ]
transitions = [ ]
if delta_digit == 0 :
transitions . append (
{
" type " : " Type 1: Iso-Digital Conservation (Δ_digit = 0) " ,
" detail " : f " Literal figure revised from { old_digit } ( { old_digit_aq } ) to { new_digit } ( { new_digit_aq } ) with zero Base-36 digit-sum shift (Δ_digit = 0); all digit-mode equations remain 100% invariant. " ,
}
)
if delta_spoken == 0 :
transitions . append (
{
" type " : " Type 1: Iso-Phonemic Conservation (Δ_spoken = 0) " ,
" detail " : f " Spoken figure revised from ' { old_spoken_ing } ' ( { old_spoken_aq } ) to ' { new_spoken_ing } ' ( { new_spoken_aq } ) with Δ_spoken = 0. " ,
}
)
if old_spoken_ring or new_spoken_ring :
transitions . append (
{
" type " : " Type 2: Equivalence-Ring Migration (Ring(Q_old) -> Ring(Q_new)) " ,
" old_ring_coordinate " : old_spoken_aq ,
" old_ring_partners " : [ f " { x [ ' ing ' ] } ( { x [ ' eng ' ] } , { x [ ' classes ' ] } ) " for x in old_spoken_ring ] ,
" new_ring_coordinate " : new_spoken_aq ,
" new_ring_partners " : [ f " { x [ ' ing ' ] } ( { x [ ' eng ' ] } , { x [ ' classes ' ] } ) " for x in new_spoken_ring ] ,
}
)
p_old_s = number_properties ( old_spoken_aq )
p_new_s = number_properties ( new_spoken_aq )
if ( p_old_s [ " is_prime " ] != p_new_s [ " is_prime " ] ) or ( p_old_s [ " is_square " ] != p_new_s [ " is_square " ] ) or ( p_old_s [ " repdigit_or_37_multiple " ] != p_new_s [ " repdigit_or_37_multiple " ] ) :
transitions . append (
{
" type " : " Type 3: Prime / Square / Repdigit Phase-Transition " ,
" old_properties " : p_old_s ,
" new_properties " : p_new_s ,
}
)
# Stage 3: 3-Path Counter-Substitution Solver across baseline_equations
equation_revisions = [ ]
for eq in target_anchor . get ( " baseline_equations " , [ ] ) :
mode = eq . get ( " mode " , " spoken " )
delta_q = delta_digit if mode == " digit " else delta_spoken
new_anchor_ing = new_digit . lower ( ) if mode == " digit " else new_spoken_ing
new_anchor_eng = new_digit if mode == " digit " else new_spoken_eng
new_anchor_aq = new_digit_aq if mode == " digit " else new_spoken_aq
slots = eq [ " slots " ]
target_sum = eq [ " target " ]
uncompensated_sum = target_sum + delta_q
required_offset = - delta_q
path_a_swaps = [ ] # Verb / Adj / Prep swaps
path_b_swaps = [ ] # Entity / Tail / Head swaps
if delta_q == 0 :
new_ing_parts = [ new_anchor_ing if s [ " role " ] == " anchor " else s [ " ing " ] for s in slots ]
new_eng_parts = [ new_anchor_eng if s [ " role " ] == " anchor " else s [ " eng " ] for s in slots ]
path_a_swaps . append (
{
" slot_role " : " anchor (iso-digital / zero-delta conservation) " ,
" old_token " : f " { old_digit if mode == ' digit ' else old_spoken_ing } ( { old_digit_aq if mode == ' digit ' else old_spoken_aq } ) " ,
" new_token " : f " { new_anchor_ing } ( { new_anchor_aq } ) " ,
" reclosed_ing " : " " . join ( new_ing_parts ) ,
" reclosed_eng " : " " . join ( new_eng_parts ) ,
" verified_aq " : compute_aq ( " " . join ( new_ing_parts ) ) ,
}
)
else :
for idx , s in enumerate ( slots ) :
if s [ " role " ] in ( " anchor " , " article " ) :
continue
needed_aq = s [ " aq " ] + required_offset
if needed_aq < = 0 :
continue
if s [ " role " ] in ( " verb " , " adj " , " prep " , " prep2 " ) :
pool = VERB_POOL if s [ " role " ] == " verb " else ( ADJ_POOL if s [ " role " ] == " adj " else PREP_POOL )
for cand_ing , cand_eng , cand_aq in pool :
if cand_aq == needed_aq and cand_ing != s [ " ing " ] :
ing_tokens = [
new_anchor_ing if j == idx_a else ( cand_ing if j == idx else sl [ " ing " ] )
for j , sl in enumerate ( slots )
for idx_a in [ next ( k for k , x in enumerate ( slots ) if x [ " role " ] == " anchor " ) ]
]
eng_tokens = [
new_anchor_eng if j == idx_a else ( cand_eng if j == idx else sl [ " eng " ] )
for j , sl in enumerate ( slots )
for idx_a in [ next ( k for k , x in enumerate ( slots ) if x [ " role " ] == " anchor " ) ]
]
re_ing = " " . join ( ing_tokens )
re_eng = " " . join ( eng_tokens )
if compute_aq ( re_ing ) == target_sum :
path_a_swaps . append (
{
" slot_role " : s [ " role " ] ,
" old_token " : f " { s [ ' ing ' ] } ( { s [ ' aq ' ] } ) " ,
" new_token " : f " { cand_ing } ( { cand_aq } ) " ,
" reclosed_ing " : re_ing ,
" reclosed_eng " : re_eng ,
" verified_aq " : compute_aq ( re_ing ) ,
}
)
elif s [ " role " ] in ( " tail " , " head " , " noun1 " ) :
for cand in by_aq_pool . get ( needed_aq , [ ] ) :
if cand [ " ing " ] != s [ " ing " ] :
idx_a = next ( k for k , x in enumerate ( slots ) if x [ " role " ] == " anchor " )
ing_tokens = [
new_anchor_ing if j == idx_a else ( cand [ " ing " ] if j == idx else sl [ " ing " ] )
for j , sl in enumerate ( slots )
]
eng_tokens = [
new_anchor_eng if j == idx_a else ( cand [ " eng " ] if j == idx else sl [ " eng " ] )
for j , sl in enumerate ( slots )
]
re_ing = " " . join ( ing_tokens )
re_eng = " " . join ( eng_tokens )
if compute_aq ( re_ing ) == target_sum :
path_b_swaps . append (
{
" slot_role " : s [ " role " ] ,
" old_token " : f " { s [ ' ing ' ] } ( { s [ ' aq ' ] } ) " ,
" new_token " : f " { cand [ ' ing ' ] } [ ' { cand [ ' eng ' ] } ' , { cand [ ' aq ' ] } , classes= { cand [ ' classes ' ] } ] " ,
" reclosed_ing " : re_ing ,
" reclosed_eng " : re_eng ,
" verified_aq " : compute_aq ( re_ing ) ,
}
)
equation_revisions . append (
{
" target " : target_sum ,
" mode " : mode ,
" baseline_ing " : eq [ " ing " ] ,
" baseline_eng " : eq [ " eng " ] ,
" uncompensated_new_sum " : uncompensated_sum ,
" shock_delta_q " : delta_q ,
" required_compensatory_offset " : required_offset ,
" path_a_predicate_adjective_swaps " : path_a_swaps [ : 5 ] ,
" path_b_entity_chokepoint_migrations " : path_b_swaps [ : 8 ] ,
}
)
return {
" anchor_id " : anchor_id ,
" entity " : target_anchor [ " entity " ] ,
" metric " : target_anchor [ " metric " ] ,
" source_dossier " : target_anchor [ " source_dossier " ] ,
" quant_free_lexical_equations " : target_anchor . get ( " quant_free_lexical_equations " , [ ] ) ,
" path_c_dual_mode_comparison " : {
" digit_mode " : {
" q_old " : old_digit ,
" q_old_aq " : old_digit_aq ,
" q_new " : new_digit ,
" q_new_aq " : new_digit_aq ,
" delta_digit " : delta_digit ,
" new_properties " : number_properties ( new_digit_aq ) ,
} ,
" spoken_mode " : {
" q_old_eng " : old_spoken_eng ,
" q_old_ing " : old_spoken_ing ,
" q_old_aq " : old_spoken_aq ,
" q_new_eng " : new_spoken_eng ,
" q_new_ing " : new_spoken_ing ,
" q_new_aq " : new_spoken_aq ,
" delta_spoken " : delta_spoken ,
" new_properties " : number_properties ( new_spoken_aq ) ,
} ,
} ,
" epistemic_regime_transitions " : transitions ,
" equation_counter_substitutions " : equation_revisions ,
}
DEFAULT_CORPUS = [
" schizoanalysis " , " abstract machine " , " synthetic data " , " Gilles Deleuze " , " machinic phylum " ,
" Deleuze " , " assemblage " , " tensor " , " Claude " , " phylum " , " Dario Amodei " , " Daniela Amodei " ,
@@ -268,16 +616,258 @@ DEFAULT_CORPUS = [
]
_ONES = [
" zero " , " one " , " two " , " three " , " four " , " five " , " six " , " seven " , " eight " , " nine " ,
" ten " , " eleven " , " twelve " , " thirteen " , " fourteen " , " fifteen " , " sixteen " ,
" seventeen " , " eighteen " , " nineteen " ,
]
_TENS = [ " " , " " , " twenty " , " thirty " , " forty " , " fifty " , " sixty " , " seventy " , " eighty " , " ninety " ]
_UNIT_WORDS = {
" tn " : " trillion " , " trillion " : " trillion " ,
" bn " : " billion " , " b " : " billion " , " billion " : " billion " ,
" m " : " million " , " mn " : " million " , " million " : " million " ,
" k " : " thousand " , " thousand " : " thousand " ,
" % " : " percent " ,
}
def _int_to_words ( n : int ) - > str :
if n < 0 :
return " minus " + _int_to_words ( - n )
if n < 20 :
return _ONES [ n ]
if n < 100 :
t , r = divmod ( n , 10 )
return _TENS [ t ] + ( " " if r == 0 else " " + _ONES [ r ] )
if n < 1000 :
h , r = divmod ( n , 100 )
return _ONES [ h ] + " hundred " + ( " " if r == 0 else " " + _int_to_words ( r ) )
for scale_val , scale_name in ( ( 1_000_000_000_000 , " trillion " ) , ( 1_000_000_000 , " billion " ) , ( 1_000_000 , " million " ) , ( 1000 , " thousand " ) ) :
if n > = scale_val :
q , r = divmod ( n , scale_val )
return _int_to_words ( q ) + " " + scale_name + ( " " if r == 0 else " " + _int_to_words ( r ) )
return str ( n )
def token_to_spoken_english ( raw_tok : str ) - > str :
import re
s = raw_tok . strip ( )
m = re . match ( r " ^([$€£])?( \ d[ \ d,]*)(?: \ .( \ d+))?([a-zA-Z % ]+)?$ " , s )
if not m :
return s . lower ( )
_curr , int_part , dec_part , unit_part = m . groups ( )
int_val = int ( int_part . replace ( " , " , " " ) )
words = [ _int_to_words ( int_val ) ]
if dec_part :
words . append ( " point " )
for ch in dec_part :
words . append ( _ONES [ int ( ch ) ] )
if unit_part :
u_low = unit_part . lower ( )
if u_low in _UNIT_WORDS :
words . append ( _UNIT_WORDS [ u_low ] )
else :
words . append ( u_low )
return " " . join ( words )
def scan_harvest_for_revisions (
harvest_path : str ,
anchors_path : str ,
base_report : dict [ str , Any ] ,
quant_mode : str = " dual " ,
workdir : str = " /workspace/ingglish-hyperdope-gematria " ,
) - > dict [ str , Any ] :
"""
Non-destructively scan a `news-aq-harvest-*.json` file:
- If `quant_mode == ' off ' `, returns only the pure lexical classification of the harvest ' s `entities`.
- Otherwise, extracts quantitative figures from `quantitative_anchors` (or directly from `headlines`
if `quantitative_anchors` is absent in older harvest files), compares them against tracked
entities in `quantitative-economic-anchors.json`, and automatically fires `revise_economic_anchor()`
whenever a figure has mutated.
"""
import re
harvest = json . loads ( Path ( harvest_path ) . read_text ( encoding = " utf-8 " ) )
anchors_data = json . loads ( Path ( anchors_path ) . read_text ( encoding = " utf-8 " ) )
tracked_anchors = anchors_data . get ( " anchors " , [ ] )
if quant_mode == " off " :
return {
" quant_mode " : " off " ,
" note " : " Quantitative stream disabled (--quant-mode off); returning pure lexical entity classification only. " ,
" lexical_entity_count " : len ( harvest . get ( " entities " , [ ] ) ) ,
}
quant_items = harvest . get ( " quantitative_anchors " )
if quant_items is None :
quant_items = [ ]
quant_re = re . compile ( r " (?<![a-zA-Z0-9])([$€£]? \ d[ \ d,]*(?: \ . \ d+)?(?:tn|bn|mn|b|m|k| % )?) \ b " , re . I )
for idx , h in enumerate ( harvest . get ( " headlines " , [ ] ) ) :
hl = h . get ( " headline_eng " , " " )
for qm in quant_re . finditer ( hl ) :
q_tok = qm . group ( 1 )
if q_tok in { " 2025 " , " 2026 " , " 2027 " } :
continue
sp_eng = token_to_spoken_english ( q_tok )
quant_items . append (
{
" story " : f " H { idx + 1 : 02d } : { h . get ( ' source ' , ' ' ) } " ,
" entity_context " : hl [ : 40 ] ,
" q_digit " : q_tok ,
" q_spoken_eng " : sp_eng ,
" headline " : hl ,
}
)
unchanged_matches = [ ]
detected_revisions = [ ]
new_candidate_anchors = [ ]
for qi in quant_items :
hl_low = qi . get ( " headline " , " " ) . lower ( )
q_dig = qi [ " q_digit " ]
q_sp_eng = qi [ " q_spoken_eng " ]
matched_tracked = None
for ta in tracked_anchors :
kws = ta . get ( " entity_match_keywords " , [ ta [ " entity " ] . lower ( ) ] )
if any ( kw in hl_low for kw in kws ) :
matched_tracked = ta
break
if matched_tracked :
if q_dig . lower ( ) == matched_tracked [ " q_digit " ] . lower ( ) :
unchanged_matches . append (
{
" anchor_id " : matched_tracked [ " anchor_id " ] ,
" entity " : matched_tracked [ " entity " ] ,
" q_digit " : q_dig ,
" status " : " unchanged " ,
" headline " : qi . get ( " headline " ) ,
}
)
else :
rev = revise_economic_anchor (
anchor_id = matched_tracked [ " anchor_id " ] ,
new_digit = q_dig ,
new_spoken_eng = q_sp_eng ,
anchors_path = anchors_path ,
base_report = base_report ,
workdir = workdir ,
)
rev [ " trigger_headline " ] = qi . get ( " headline " )
detected_revisions . append ( rev )
else :
# Check if headline touches any S1-S6 technocapital keyword
matched_classes = [ ]
for cid , cinfo in TAXONOMY_CLASSES . items ( ) :
if any ( kw in hl_low for kw in cinfo [ " keywords " ] ) :
matched_classes . append ( cid )
if matched_classes :
new_candidate_anchors . append (
{
" story " : qi . get ( " story " ) ,
" q_digit " : q_dig ,
" q_digit_aq " : compute_aq ( q_dig ) ,
" q_spoken_eng " : q_sp_eng ,
" taxonomy_classes " : matched_classes ,
" headline " : qi . get ( " headline " ) ,
}
)
return {
" quant_mode " : quant_mode ,
" harvest_file " : harvest_path ,
" target_date_utc " : harvest . get ( " temporal_metadata " , { } ) . get ( " target_date_utc " ) ,
" counts " : {
" quantitative_tokens_scanned " : len ( quant_items ) ,
" tracked_anchors_unchanged " : len ( unchanged_matches ) ,
" tracked_anchors_revised " : len ( detected_revisions ) ,
" new_technocapital_quant_candidates " : len ( new_candidate_anchors ) ,
} ,
" unchanged_tracked_anchors " : unchanged_matches ,
" detected_revisions " : detected_revisions ,
" new_technocapital_quant_candidates " : new_candidate_anchors [ : 15 ] ,
}
def main ( ) - > int :
ap = argparse . ArgumentParser ( description = " Identify and taxonomize Landian-Deleuzean technocapital singularities (S1-S6). " )
import re
ap = argparse . ArgumentParser ( description = " Identify, taxonomize, and revise Landian-Deleuzean technocapital singularities (S1-S6). " )
ap . add_argument ( " --terms " , nargs = " * " , help = " Custom list of terms to analyze (defaults to canonical S1-S6 corpus). " )
ap . add_argument (
" --quant-mode " ,
choices = [ " off " , " spoken " , " digit " , " dual " ] ,
default = " off " ,
help = " Tri-modal quantitative handling: ' off ' (default pure lexical), ' spoken ' (numbers translated to Ingglish words), ' digit ' (literal 0-9), ' dual ' (both). " ,
)
ap . add_argument ( " --workdir " , default = " /workspace/ingglish-hyperdope-gematria " , help = " Path to repo containing node_modules/ingglish. " )
ap . add_argument (
" --anchors-file " ,
default = " /workspace/technocapital-singularity-zoology/taxonomy/quantitative-economic-anchors.json " ,
help = " Path to quantitative-economic-anchors.json registry. " ,
)
ap . add_argument (
" --revise-anchor " ,
nargs = 3 ,
metavar = ( " ANCHOR_ID " , " NEW_DIGIT " , " NEW_SPOKEN_ENG " ) ,
help = " Evaluate a quantitative economic anchor revision and surface alternative 333/666/777 equations. " ,
)
ap . add_argument (
" --scan-harvest " ,
default = None ,
help = " Optional path to news-aq-harvest-latest.json to scan for quantitative revisions and new S1-S6 anchors. " ,
)
ap . add_argument ( " --out " , default = None , help = " Optional JSON output file path. " )
args = ap . parse_args ( )
terms = args . terms if args . terms else DEFAULT_CORPUS
report = analyze_terms ( terms , workdir = args . workdir )
raw_terms = args . terms if args . terms else DEFAULT_CORPUS
processed_terms = [ ]
for t in raw_terms :
if args . quant_mode == " off " :
# Strip full quantitative tokens (including attached units like $6B, $1.5tn, 481) in pure lexical mode
clean_t = re . sub ( r " (?<![a-zA-Z0-9])[$€£]? \ d[ \ d,]*(?: \ . \ d+)?(?:tn|bn|mn|b|m|k| % )? \ b " , " " , t , flags = re . I )
clean_t = re . sub ( r " \ s+ " , " " , clean_t ) . strip ( )
if clean_t :
processed_terms . append ( clean_t )
elif args . quant_mode == " spoken " :
# Convert any numeric tokens to spoken English words before Ingglish translation
converted = re . sub (
r " (?<![a-zA-Z0-9])([$€£]? \ d[ \ d,]*(?: \ . \ d+)?(?:tn|bn|mn|b|m|k| % )?) \ b " ,
lambda m : token_to_spoken_english ( m . group ( 1 ) ) ,
t ,
flags = re . I ,
)
processed_terms . append ( converted )
else :
processed_terms . append ( t )
report = analyze_terms ( processed_terms , workdir = args . workdir )
report [ " quant_mode " ] = args . quant_mode
if args . revise_anchor :
anchor_id , new_digit , new_spoken_eng = args . revise_anchor
rev_report = revise_economic_anchor (
anchor_id = anchor_id ,
new_digit = new_digit ,
new_spoken_eng = new_spoken_eng ,
anchors_path = args . anchors_file ,
base_report = report ,
workdir = args . workdir ,
)
out_str = json . dumps ( rev_report , indent = 2 , ensure_ascii = False )
elif args . scan_harvest :
eff_mode = " dual " if args . quant_mode == " off " else args . quant_mode
scan_res = scan_harvest_for_revisions (
harvest_path = args . scan_harvest ,
anchors_path = args . anchors_file ,
base_report = report ,
quant_mode = eff_mode ,
workdir = args . workdir ,
)
out_str = json . dumps ( scan_res , indent = 2 , ensure_ascii = False )
else :
out_str = json . dumps ( report , indent = 2 , ensure_ascii = False )
if args . out :
Path ( args . out ) . parent . mkdir ( parents = True , exist_ok = True )
Path ( args . out ) . write_text ( out_str , encoding = " utf-8 " )