Views
No views yet
Input Text
│
├──► SBERT (all-MiniLM-L6-v2) ──► 384-dim
│ │
├──► Char TF-IDF (3-5 grams) ──► 30k-dim
│ │
▼ ▼
┌─────────────────────────────────────────────┐
│ KSimplex Similarity Assessor │
├─────────────────────────────────────────────┤
│ SBERT Projection ──► 256-dim │
│ TF-IDF Projection ──► 256-dim │
│ │ │
│ ▼ │
│ Fusion Layer ──► 256-dim │
│ │ │
│ ▼ │
│ SimplexSimilarityLayer × 3 (k=4) │
│ ┌─────────────────────────────┐ │
│ │ Route Projection (→4 edges)│ │
│ │ Edge Transforms (4×Linear) │ │
│ │ Weighted Sum + LayerNorm │ │
│ └─────────────────────────────┘ │
│ │ │
│ ▼ │
│ Similarity Head ──► 128-dim │
│ (L2 normalized) │
└─────────────────────────────────────────────┘
│
▼
128-dim Similarity Embedding| Section | Folios | Character | Style Group |
|---|---|---|---|
| Herbal A | f1-f57 | Dense prose, plant descriptions | A |
| Herbal B | f58-f66 | Variant herbal style | A |
| Astronomical | f67-f73 | Zodiac, celestial diagrams | A |
| Biological | f75-f84 | Nymph figures, labels | B |
| Cosmological | f85-f86 | Rosette foldouts | C |
| Pharmaceutical | f87-f102 | Recipe format (p...am) | C |
| Recipes | f103-f116 | Cross-references, star labels | B |
p = Recipe/paragraph start (π)m, g = Line-end markers (μ, γ)s, l, o = Label markers (σ, λ, ο)-am, -dam, -ram = Recipe terminators (measurement)(PREFIX) + STEM + (SUFFIX) + (n)
Prefixes: qok- (the-), ok- (this-), ot- (other-), da- (of-)
Suffixes: -dy (matter), -ey (type), -in (of), -ol (liquid), -ar (part)
Bound 'n': Attaches to -ai- stems (daiin, qokaiin, okaiin) Herbal_A Astro Bio Cosmo Pharma Recipe
Herbal A 1.00 0.99 0.93 0.77 0.77 0.88
Astronomical 0.99 1.00 0.96 0.83 0.82 0.92
Biological 0.93 0.96 1.00 0.94 0.94 0.99
Cosmological 0.77 0.83 0.94 1.00 0.98 0.97
Pharmaceutical 0.77 0.82 0.94 0.98 1.00 0.95
Recipes 0.88 0.92 0.99 0.97 0.95 1.00pip install torch sentence-transformers scikit-learn datasets1from voynich_translator import VoynichTranslator
2
3translator = VoynichTranslator()
4
5# Translate text
6result = translator.translate("daiin chedy qokeey shedy chol daiin")
7print(result['english']) # "the herb bloom leaf stem the"
8print(result['section']) # "Herbal A"
9print(result['confidence']) # 1.0
10
11# Translate with verbose analysis
12result = translator.translate("p ol shy am", verbose=True)
13# Returns word-by-word analysis and similar Latin passages
14
15# Translate entire folio
16folio = translator.translate_folio('f75r')
17print(folio['full_english'])
18
19# Find similar passages
20similar = translator.find_similar_voynich("chedy qokeey")
21latin = translator.find_similar_latin("chedy qokeey")1# Requires: Latin Wikipedia reload for TF-IDF vocabulary
2# See standalone cell in repository for complete setup
3
4from datasets import load_dataset
5
6# 1. Load Latin corpus (same as training)
7ds = load_dataset("wikimedia/wikipedia", "20231101.la", split="train", streaming=True)
8# ... build windows, fit TF-IDF
9
10# 2. Transform Voynich using Latin vectorizer
11X_voy_tfidf = vec_lat.transform(voynich_texts)
12
13# 3. Encode through KSimplex model
14emb, _ = model(sbert_emb, tfidf_emb)| Voynich | English | Category |
|---|---|---|
| daiin | the | Determiner |
| aiin | this | Determiner |
| qokaiin | the-said | Determiner |
| chedy | herb | Plant |
| shedy | leaf | Plant |
| qokeedy | blossom | Plant |
| chol | stem | Plant |
| ol | oil | Preparation |
| ar | root | Plant part |
| or | seed | Plant part |
| p | ¶ (recipe start) | Marker |
| am | ⚗ (measure end) | Marker |
voynich-ksimplex-translator/
├── README.md # This file
├── voynich_translator.py # Complete standalone translator
├── ksimplex_model.py # Model architecture
├── ksimplex_similarity_model.pt # Trained weights
├── similarity_embeddings.npz # Pre-computed embeddings
│ ├── voynich_emb # (N_voy, 128) Voynich embeddings
│ ├── voynich_labels # Cluster assignments
│ ├── latin_emb # (N_lat, 128) Latin embeddings
│ └── latin_labels # Latin bucket assignments
└── voynich_analysis_results.json # Statistical analysis1@software{voynich_ksimplex_2026,
2 title={Voynich KSimplex Translator: Geometric Deep Learning for Manuscript Analysis},
3 author={AbstractPhil},
4 year={2026},
5 url={https://huggingface.co/AbstractPhil/sbert-voynich-translation}
6}