paultal 0651c7533e Use the whole alphabet and Greek alphabet for variables
The variable pool was 14 Latin letters plus 10 Greek ones, so w, v, q, g,
epsilon, rho, tau, ... were unknown to the model and got spelled out letter
by letter. Variables are now x/y (45%), any lowercase letter except e and d
(35%), any lowercase Greek letter except pi and omicron (15%), or a common
uppercase letter like N, F, A (5%).

e stays a constant and d is kept free for dx and future derivatives.

Fixes #4
2026-11-27 01:23:33 +02:00
2026-11-27 00:24:05 +02:00
2026-11-27 00:24:05 +02:00

isotope-typst

isotope-typst turns math written in plain English into Typst markup. For example, the integral from 0 to infinity of e to the minus x squared dx becomes $integral_0^infinity e^(-x^2) dif x$. It is a small encoder–decoder Transformer, built and trained from scratch in PyTorch on synthetic data.

Running it

You need uv and the Typst CLI (brew install typst).

./run.sh                           # generate data, train, and evaluate (~20 min on an M-series Mac)
uv run isotope "x squared plus 1"  # translate a sentence
uv run isotope                     # interactive prompt
S
Description
No description provided
Readme
30 MiB
0 Stars 1 Watchers 0 Forks
2026-11-27 03:08:10 +02:00
Languages
Python 98.3%
Shell 1.7%