Spoken-English math to Typst math with a small from-scratch Transformer: synthetic data generator, BPE tokenizer, training, constrained/beam decoding, and evaluation against a hand-written test set. The trained model is not tracked; ./run.sh produces it.
168 lines
10 KiB
JSON
168 lines
10 KiB
JSON
{"en": "the integral from 0 to infinity of e to the minus x squared dx", "typ": "integral_0^infinity e^(-x^2) dif x"}
|
|
{"en": "x squared plus y squared equals r squared", "typ": "x^2 + y^2 = r^2"}
|
|
{"en": "a squared plus b squared equals c squared", "typ": "a^2 + b^2 = c^2"}
|
|
{"en": "e to the x", "typ": "e^x"}
|
|
{"en": "e to the negative x", "typ": "e^(-x)"}
|
|
{"en": "one over x", "typ": "frac(1, x)"}
|
|
{"en": "1 over x squared", "typ": "frac(1, x^2)"}
|
|
{"en": "the square root of 2", "typ": "sqrt(2)"}
|
|
{"en": "square root of x plus 1", "typ": "sqrt(x) + 1"}
|
|
{"en": "the square root of the quantity x plus 1", "typ": "sqrt(x + 1)"}
|
|
{"en": "sqrt of x squared plus y squared", "typ": "sqrt(x^2 + y^2)"}
|
|
{"en": "sin of x", "typ": "sin(x)"}
|
|
{"en": "sine x", "typ": "sin(x)"}
|
|
{"en": "cos theta", "typ": "cos(theta)"}
|
|
{"en": "sin squared x plus cos squared x equals one", "typ": "sin(x)^2 + cos(x)^2 = 1"}
|
|
{"en": "the natural log of x", "typ": "ln(x)"}
|
|
{"en": "ln of x plus one", "typ": "ln(x) + 1"}
|
|
{"en": "log of 100 equals 2", "typ": "log(100) = 2"}
|
|
{"en": "the derivative of x squared with respect to x", "typ": "frac(dif, dif x) x^2"}
|
|
{"en": "d/dx of sin x", "typ": "frac(dif, dif x) sin(x)"}
|
|
{"en": "the derivative of e to the x with respect to x equals e to the x", "typ": "frac(dif, dif x) e^x = e^x"}
|
|
{"en": "the limit as x approaches 0 of sin x over x", "typ": "lim_(x -> 0) frac(sin(x), x)"}
|
|
{"en": "limit as n goes to infinity of one over n", "typ": "lim_(n -> infinity) frac(1, n)"}
|
|
{"en": "the limit as x goes to infinity of 1 plus 1 over x", "typ": "lim_(x -> infinity) (1 + frac(1, x))"}
|
|
{"en": "lim h to 0 of f of x plus h minus f of x over h", "typ": "lim_(h -> 0) frac(f(x + h) - f(x), h)"}
|
|
{"en": "the sum from i equals 1 to n of i", "typ": "sum_(i = 1)^n i"}
|
|
{"en": "the sum from k equals 0 to infinity of x to the k", "typ": "sum_(k = 0)^infinity x^k"}
|
|
{"en": "sum of i squared for i from 1 to n", "typ": "sum_(i = 1)^n i^2"}
|
|
{"en": "the sum from n equals 1 to infinity of 1 over n squared equals pi squared over 6", "typ": "sum_(n = 1)^infinity frac(1, n^2) = frac(pi^2, 6)"}
|
|
{"en": "the product from i equals 1 to n of i", "typ": "product_(i = 1)^n i"}
|
|
{"en": "n factorial", "typ": "n!"}
|
|
{"en": "the product from k equals 1 to n of k equals n factorial", "typ": "product_(k = 1)^n k = n!"}
|
|
{"en": "integral of x dx", "typ": "integral x dif x"}
|
|
{"en": "the integral of 1 over x dx equals ln of x plus c", "typ": "integral frac(1, x) dif x = ln(x) + c"}
|
|
{"en": "integral from 0 to 1 of x squared dx", "typ": "integral_0^1 x^2 dif x"}
|
|
{"en": "integral from 0 to 1 of x squared dx equals one third", "typ": "integral_0^1 x^2 dif x = frac(1, 3)"}
|
|
{"en": "the integral from a to b of f of x dx", "typ": "integral_a^b f(x) dif x"}
|
|
{"en": "integrate sin x from 0 to pi", "typ": "integral_0^pi sin(x) dif x"}
|
|
{"en": "integral zero to pi of sine x d x equals 2", "typ": "integral_0^pi sin(x) dif x = 2"}
|
|
{"en": "the integral from minus infinity to infinity of e to the minus x squared dx equals the square root of pi", "typ": "integral_(-infinity)^infinity e^(-x^2) dif x = sqrt(pi)"}
|
|
{"en": "integral of cos t dt", "typ": "integral cos(t) dif t"}
|
|
{"en": "x plus 1", "typ": "x + 1"}
|
|
{"en": "x minus 1", "typ": "x - 1"}
|
|
{"en": "2x plus 3", "typ": "2 x + 3"}
|
|
{"en": "3x squared minus 2x plus 1", "typ": "3 x^2 - 2 x + 1"}
|
|
{"en": "y equals mx plus b", "typ": "y = m x + b"}
|
|
{"en": "y equals 2x minus 5", "typ": "y = 2 x - 5"}
|
|
{"en": "f of x equals x cubed", "typ": "f(x) = x^3"}
|
|
{"en": "x to the n", "typ": "x^n"}
|
|
{"en": "x to the n plus 1", "typ": "x^(n + 1)"}
|
|
{"en": "x to the power of n minus 1", "typ": "x^(n - 1)"}
|
|
{"en": "2 to the 10", "typ": "2^10"}
|
|
{"en": "2 to the tenth equals 1024", "typ": "2^10 = 1024"}
|
|
{"en": "x cubed", "typ": "x^3"}
|
|
{"en": "x to the fourth", "typ": "x^4"}
|
|
{"en": "the cube root of x", "typ": "root(3, x)"}
|
|
{"en": "the cube root of 27 equals 3", "typ": "root(3, 27) = 3"}
|
|
{"en": "the nth root of x", "typ": "root(n, x)"}
|
|
{"en": "the absolute value of x", "typ": "abs(x)"}
|
|
{"en": "absolute value of x minus 3 is less than 1", "typ": "abs(x - 3) < 1"}
|
|
{"en": "x is greater than 0", "typ": "x > 0"}
|
|
{"en": "x is less than or equal to 5", "typ": "x <= 5"}
|
|
{"en": "y is at least 2", "typ": "y >= 2"}
|
|
{"en": "x does not equal 0", "typ": "x != 0"}
|
|
{"en": "a over b", "typ": "frac(a, b)"}
|
|
{"en": "a plus b over c", "typ": "a + frac(b, c)"}
|
|
{"en": "the quantity a plus b over c", "typ": "frac(a + b, c)"}
|
|
{"en": "a plus b all over c", "typ": "frac(a + b, c)"}
|
|
{"en": "x over 2", "typ": "frac(x, 2)"}
|
|
{"en": "half of x", "typ": "frac(x, 2)"}
|
|
{"en": "one half", "typ": "frac(1, 2)"}
|
|
{"en": "two thirds", "typ": "frac(2, 3)"}
|
|
{"en": "pi over 2", "typ": "frac(pi, 2)"}
|
|
{"en": "sin of pi over 2 equals one", "typ": "sin(frac(pi, 2)) = 1"}
|
|
{"en": "cos of 0 equals 1", "typ": "cos(0) = 1"}
|
|
{"en": "tan x equals sin x over cos x", "typ": "tan(x) = frac(sin(x), cos(x))"}
|
|
{"en": "e to the i pi plus 1 equals 0", "typ": "e^(i pi) + 1 = 0"}
|
|
{"en": "alpha plus beta", "typ": "alpha + beta"}
|
|
{"en": "theta squared", "typ": "theta^2"}
|
|
{"en": "2 pi r", "typ": "2 pi r"}
|
|
{"en": "pi r squared", "typ": "pi r^2"}
|
|
{"en": "lambda times x", "typ": "lambda x"}
|
|
{"en": "sigma squared", "typ": "sigma^2"}
|
|
{"en": "mu plus 2 sigma", "typ": "mu + 2 sigma"}
|
|
{"en": "x sub 1 plus x sub 2", "typ": "x_1 + x_2"}
|
|
{"en": "a sub n equals a sub n minus 1 plus 2", "typ": "a_n = a_(n - 1) + 2"}
|
|
{"en": "x sub i squared", "typ": "x_i^2"}
|
|
{"en": "the sum from i equals 1 to n of x sub i", "typ": "sum_(i = 1)^n x_i"}
|
|
{"en": "the quantity x plus 1 squared", "typ": "(x + 1)^2"}
|
|
{"en": "x plus 1 all squared", "typ": "(x + 1)^2"}
|
|
{"en": "open paren x plus 1 close paren squared", "typ": "(x + 1)^2"}
|
|
{"en": "the quantity a plus b times the quantity a minus b", "typ": "(a + b) (a - b)"}
|
|
{"en": "x times y", "typ": "x y"}
|
|
{"en": "3 times 4 equals 12", "typ": "3 dot 4 = 12"}
|
|
{"en": "2 times x", "typ": "2 x"}
|
|
{"en": "minus x", "typ": "-x"}
|
|
{"en": "negative 5", "typ": "-5"}
|
|
{"en": "x minus negative 3", "typ": "x - (-3)"}
|
|
{"en": "e to the minus x", "typ": "e^(-x)"}
|
|
{"en": "e to the 2x", "typ": "e^(2 x)"}
|
|
{"en": "e to the x squared", "typ": "e^(x^2)"}
|
|
{"en": "10 to the minus 3", "typ": "10^(-3)"}
|
|
{"en": "1 over the square root of 2", "typ": "frac(1, sqrt(2))"}
|
|
{"en": "the square root of 2 over 2", "typ": "frac(sqrt(2), 2)"}
|
|
{"en": "x equals negative b over 2a", "typ": "x = frac(-b, 2 a)"}
|
|
{"en": "b squared minus 4ac", "typ": "b^2 - 4 a c"}
|
|
{"en": "the derivative of f with respect to t", "typ": "frac(dif, dif t) f"}
|
|
{"en": "d by dt of t cubed equals 3 t squared", "typ": "frac(dif, dif t) t^3 = 3 t^2"}
|
|
{"en": "the limit as x tends to 0 of the quantity e to the x minus 1 over x equals 1", "typ": "lim_(x -> 0) frac(e^x - 1, x) = 1"}
|
|
{"en": "lim x to infinity of x over e to the x", "typ": "lim_(x -> infinity) frac(x, e^x)"}
|
|
{"en": "the integral from 1 to e of 1 over x dx equals 1", "typ": "integral_1^e frac(1, x) dif x = 1"}
|
|
{"en": "integral 0 to 2 pi of sin squared theta d theta", "typ": "integral_0^(2 pi) sin(theta)^2 dif theta"}
|
|
{"en": "the integral of e to the 2x dx", "typ": "integral e^(2 x) dif x"}
|
|
{"en": "integral of x e to the x dx", "typ": "integral x e^x dif x"}
|
|
{"en": "integral from 0 to 1 of the square root of x dx", "typ": "integral_0^1 sqrt(x) dif x"}
|
|
{"en": "the integral of 1 over 1 plus x squared dx", "typ": "integral frac(1, 1 + x^2) dif x"}
|
|
{"en": "the sum from k equals 1 to n of k equals n times n plus 1 over 2", "typ": "sum_(k = 1)^n k = frac(n (n + 1), 2)"}
|
|
{"en": "sum k equals 0 to n of 2 to the k", "typ": "sum_(k = 0)^n 2^k"}
|
|
{"en": "the sum from n equals 0 to infinity of x to the n over n factorial equals e to the x", "typ": "sum_(n = 0)^infinity frac(x^n, n!) = e^x"}
|
|
{"en": "the product from i equals 1 to n of x sub i", "typ": "product_(i = 1)^n x_i"}
|
|
{"en": "the absolute value of a times b equals the absolute value of a times the absolute value of b", "typ": "abs(a b) = abs(a) abs(b)"}
|
|
{"en": "ln of e equals 1", "typ": "ln(e) = 1"}
|
|
{"en": "the log of x times y equals log x plus log y", "typ": "log(x y) = log(x) + log(y)"}
|
|
{"en": "e to the ln x equals x", "typ": "e^(ln(x)) = x"}
|
|
{"en": "exp of x", "typ": "exp(x)"}
|
|
{"en": "sin of 2x equals 2 sin x cos x", "typ": "sin(2 x) = 2 sin(x) cos(x)"}
|
|
{"en": "cos squared theta", "typ": "cos(theta)^2"}
|
|
{"en": "the square root of a squared plus b squared", "typ": "sqrt(a^2 + b^2)"}
|
|
{"en": "x to the one half", "typ": "x^(frac(1, 2))"}
|
|
{"en": "x to the 1/2", "typ": "x^(frac(1, 2))"}
|
|
{"en": "1/x", "typ": "frac(1, x)"}
|
|
{"en": "x^2 + 1", "typ": "x^2 + 1"}
|
|
{"en": "x^2 - 4 = 0", "typ": "x^2 - 4 = 0"}
|
|
{"en": "integral from 0 to 1 of x^2 dx", "typ": "integral_0^1 x^2 dif x"}
|
|
{"en": "integrate e^(-x^2) from zero to infinity with respect to x", "typ": "integral_0^infinity e^(-x^2) dif x"}
|
|
{"en": "sqrt(x) + 1", "typ": "sqrt(x) + 1"}
|
|
{"en": "what is the integral of x squared", "typ": "integral x^2 dif x"}
|
|
{"en": "write x squared over 2", "typ": "frac(x^2, 2)"}
|
|
{"en": "How do I write the sum from i = 1 to n of i squared", "typ": "sum_(i = 1)^n i^2"}
|
|
{"en": "X SQUARED PLUS ONE", "typ": "x^2 + 1"}
|
|
{"en": "The square root of pi", "typ": "sqrt(pi)"}
|
|
{"en": "the intergal from 0 to 1 of x dx", "typ": "integral_0^1 x dif x"}
|
|
{"en": "the sqaure root of 3", "typ": "sqrt(3)"}
|
|
{"en": "x sqared", "typ": "x^2"}
|
|
{"en": "seven times eight equals fifty six", "typ": "7 dot 8 = 56"}
|
|
{"en": "two x plus three y equals six", "typ": "2 x + 3 y = 6"}
|
|
{"en": "three over four", "typ": "frac(3, 4)"}
|
|
{"en": "ten to the sixth", "typ": "10^6"}
|
|
{"en": "one plus one equals two", "typ": "1 + 1 = 2"}
|
|
{"en": "twenty plus x", "typ": "20 + x"}
|
|
{"en": "the derivative of the quantity x squared plus 3x with respect to x", "typ": "frac(dif, dif x) (x^2 + 3 x)"}
|
|
{"en": "the second power of x", "typ": "x^2"}
|
|
{"en": "x raised to the power of 5", "typ": "x^5"}
|
|
{"en": "x divided by y", "typ": "frac(x, y)"}
|
|
{"en": "x times the quantity y plus z", "typ": "x (y + z)"}
|
|
{"en": "a times b plus c", "typ": "a b + c"}
|
|
{"en": "the fraction a plus b over c plus d", "typ": "frac(a + b, c + d)"}
|
|
{"en": "the integral from 0 to x of f of t dt", "typ": "integral_0^x f(t) dif t"}
|
|
{"en": "the limit as x approaches a of f of x equals L", "typ": "lim_(x -> a) f(x) = L"}
|
|
{"en": "epsilon is greater than 0", "typ": "epsilon > 0"}
|
|
{"en": "delta x", "typ": "delta x"}
|
|
{"en": "the absolute value of x minus a is less than delta", "typ": "abs(x - a) < delta"}
|
|
{"en": "r equals the square root of x squared plus y squared", "typ": "r = sqrt(x^2 + y^2)"}
|
|
{"en": "the cube of x plus 1", "typ": "(x + 1)^3"}
|
|
{"en": "x times x equals x squared", "typ": "x x = x^2"}
|
|
{"en": "omega equals 2 pi f", "typ": "omega = 2 pi f"}
|
|
{"en": "theta equals pi over 4", "typ": "theta = frac(pi, 4)"}
|