Encode · text → script
Renders as you type. No server, no round trip — the layout engine runs client-side.
Compact layout needs SVG hit-testing (isPointInStroke), which browsers have and Node does not —
the repo ships a geometric shim so the same code path works headlessly.
Decode · script image → text
The reverse direction is the part no other tool does — and the reason this page can't run it. It needs ~15 MB of cached glyph templates and five TensorFlow CNNs, so it stays on the Node side. Here is what it produces.
| Benchmark | What it measures | Result |
|---|---|---|
| Real-lexicon round trip | 4,387 real roots, sampled by length and weighted by frequency | 92.6% |
| …the same, on template matching alone | a fresh clone, before the optional CNNs are trained | 42.6% |
| Alphabetic register | phonetically spelt words, character level | 100% |
| Printed & re-scanned | paper sheets recaptured on a flatbed and two phones | 78.1% |
Numbers are reproducible from the repo: npm run lexicon-test, npm run alphabetic,
npm run scan-test.
How it works
Forward is a solved problem and is reused from @zsnout/ithkuil (MIT). Reverse — segmentation, character typing, per-slot classification and reassembly into a valid word — is original work in this repository.