run_geometric_expansion_link_030.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 1 run_geometric_expansion_link_030.py Source: /Voynich/Voynich_ANONYMOUS_RECORD_DECOMPRESSION_032_reproducibility.zip!/run_geometric_expansion _link_030.py SHA-256: 07f59a506782cd97770e6404e495edc66d3d4461029660a09d284dd87e7a24d9 !/usr/bin/env python3 """GEOMETRIC-EXPANSION-LINK-030: true page-coordinate retrieval of expansion blocks.""" from pathlib import Path from collections import defaultdict from difflib import SequenceMatcher import hashlib,json,math,re import numpy as np,pandas as pd from scipy.special import comb ROOT=Path(__file__).resolve().parent;OUT=ROOT/'geometric_expansion_link_030';OUT.mkdir(exist_ok=True) BOXDIR=ROOT/'external_voynich_units/data/voynich-units/morphometry_voynichese/voynichese_boxes' EVA=ROOT/'external_voynich_units/data/voynich-units/ZL3b.txt';EVENTS=ROOT/'external_anchor_attack_018/la bel_prose_events.csv' KEYS=set(pd.read_csv(ROOT/'dreibilderserie_schema_028/voynich_role_projection.csv').payload) SEED=20260830;REPS=1000 def fold(f):return int(hashlib.sha256(('geometric-expansion-030|'+f).encode()).hexdigest()[:8],16)%5 def collapse(s): for a,b in (('ckh','K'),('cth','T'),('cph','P'),('cfh','F'),('ch','C'),('sh','S'),('iin','N'),('ii','M' )):s=s.replace(a,b) return s def box_lines(path): data=json.loads(path.read_text());vocab=[x[0] for x in data[0]];lines=[];cur=[];px=None for e in data[1]: q={'word':vocab[e[0]],'x':e[1],'y':e[2],'w':e[3],'h':e[4]} if px is not None and q['x']]*L[^>]*>');out=defaultdict(list);bad=set('?*<>{}[]()|') for raw in EVA.read_text(errors='replace').splitlines(): m=pat.match(raw) if not m:continue body=re.sub(r'<[^>]*>','',raw[raw.find('>')+1:]);body=re.sub(r'\{[^}]*\}','',body).rstrip('-=').strip( );t=[] for q in re.split(r'[.,]',body): q=q.strip() if q and not(set(q)&bad):t.append(q) if t:out[m.group(1)].append((int(m.group(2)),t)) return out def eva_prose_lines(): pat=re.compile(r'^<(f\d+[rv]\d?)\.(\d+),[^>]*P[^>]*>');out=defaultdict(list);bad=set('?*<>{}[]()|') for raw in EVA.read_text(errors='replace').splitlines(): m=pat.match(raw) if not m:continue body=re.sub(r'<[^>]*>','',raw[raw.find('>')+1:]);body=re.sub(r'\{[^}]*\}','',body).rstrip('-=').strip( );t=[] for q in re.split(r'[.,]',body): q=q.strip() if q and not(set(q)&bad):t.append(q) if t:out[m.group(1)].append((int(m.group(2)),t)) return out def aligned_prose_lines(): txt=eva_prose_lines();out={} for p in BOXDIR.glob('*.js'): fol=p.stem if fol not in txt:continue