Voynich Master Archive - Volume 02 - Pages 1001-2000
EVA token text
PDF page 804 of 1000. Catalog page range 1001-2000.
Extracted text
Voynich Complete Reproducibility Compendium - 2026-08-28 Page 1803
archive/local/external_voynich_units/voynich_decipherme
nt_repro_bundle/decipherment_attack_v10/syllabic_test.p
y
SHA-256: d6f96b0d84de8ec39bc42e1bc6837817fc234b019f15ea58e06306b9a1db8f95 | 6,754 bytes | workspace supplement
#!/usr/bin/env python3
"""v10 - The syllabic-transcription hypothesis (Stolfi's Chinese theory),
formally tested.
Hypothesis: each Voynich token is one syllable of a tonal, isolating,
Chinese-type language in an invented phonetic transcription.
Materials: Bencao Beiyao (classical Chinese HERBAL, Gutenberg #26888) and
Romance of the Three Kingdoms (semi-vernacular, #23950), converted to
pinyin syllable streams (tonal and toneless), "lines" split at punctuation.
Tests, all at matched token counts against Voynich Herbal-A/B tokens:
T1 syllable-order information (shuffle-corrected adjacent MI share) -
the statistic on which pooled Voynichese scores 0.79%.
T2 vocabulary structure: type count, hapax share, top-type coverage -
a closed syllabary vs Voynich's open hapax-heavy lexicon.
T3 glyph-level analog: the pinyin LETTER stream's entropy/gap profile
at BPE k=0 and k=64 vs Voynich's (E1 machinery).
T4 the v6 letter-level substitution attack with a pinyin LM added:
Voynichese-as-cipher-of-pinyin, with the glyph-babble differential.
"""
from __future__ import annotations
import json, math, random, re, sys
from collections import Counter
from pathlib import Path
HERE = Path(__file__).resolve().parent
ROOT = HERE.parent
# Genre-matched pinyin controls (Project Gutenberg #26888 Bencao Beiyao and
# #23950 Romance of the Three Kingdoms) are bundled next to this script.
SCRATCH = HERE / "zh_corpora"
sys.path.insert(0, str(ROOT / "decipherment_attack_v5"))
sys.path.insert(0, str(ROOT / "decipherment_attack_v6"))
from unit_probe import order_info, bpe_checkpoints, stream_stats, truncate # type: ignore
from attack_lib import (TrigramLM, voynich_lines_by_language, # type: ignore
pipeline_classes, match_index)
from attack_voynich import ngram_generate # type: ignore
OUT = HERE / "output"
OUT.mkdir(parents=True, exist_ok=True)
from pypinyin import lazy_pinyin, Style
PUNCT = set("\u3002\uFF0C\u3001\uFF1B\uFF1A\uFF01\uFF1F\u300C\u300D\u300E\u300F\uFF08\uFF09\u300A\u300B\u3008\u3009\
uFF0E\u00B7\u2026-")
def chinese_syllable_lines(path, tonal=True):
t = Path(path).read_text(encoding="utf-8", errors="replace")
a = t.find("*** START")
b = t.find("*** END")
if a >= 0:
t = t[t.find("\n", a) + 1: b if b > 0 else len(t)]
lines, cur = [], []
style = Style.TONE3 if tonal else Style.NORMAL
for ch in t:
if "\u4E00" <= ch <= "\u9FFF":
cur.append(ch)
elif ch in PUNCT or ch == "\n":
if len(cur) >= 2:
sylls = lazy_pinyin("".join(cur), style=style)
lines.append([s for s in sylls if s.isascii() and s])
cur = []
if len(cur) >= 2:
lines.append([s for s in lazy_pinyin("".join(cur), style=style)
if s.isascii() and s])
return [ln for ln in lines if len(ln) >= 2]
def match_tokens(lines, n_target):
out, n = [], 0
for ln in lines:
out.append(ln)
n += len(ln)
if n >= n_target:
break
return out
def vocab_stats(lines):
freq = Counter(w for ln in lines for w in ln)
n = sum(freq.values())
types = len(freq)
hapax = sum(1 for c in freq.values() if c == 1)