jncraton / languagemodels

Explore large language models in 512MB of RAM
https://jncraton.github.io/languagemodels/
MIT License
1.18k stars 78 forks source link

Mathematical Operations Solver in Natural Language #12

Closed DannyLuna17 closed 1 year ago

DannyLuna17 commented 1 year ago

I've implemented a calculator feature that provides solutions to mathematical operations in natural language. This can be particularly beneficial for educators in the exact sciences.

Support simplifications, derivative, integral, limits, eigenvalues, etc.

Examples:

>>> calculate("2*x=6") # returns "x is 3"
>>> calculate("integrate x**2 x")  # Returns "The integral of x**2 with respect to x is x**3/3"
>>> calculate("limit x**2/x x +"))  # Returns "The limit of x**2/x as x approaches +∞ is ∞"