Skip to content

FormuLearn/Symantex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symantex

Symantex (pronounced “semantics”) is a modular LaTeX→SymPy converter built on top of Mirascope’s structured-JSON API. It transforms arbitrary LaTeX snippets into executable SymPy Expr and Eq objects, with hooks for domain-specific operators, custom prompt engineering, and dynamic parser configuration.

Documentation: Available at FormuLearn Docs


🚀 Features

  • Reliable JSON mode via Mirascope LLM calls
  • Automatic parsing into SymPy ASTs (Eq, Sum, Matrix, derivatives, transforms…)
  • Dynamic locals map lets you register new functions/symbols (e.g. argmin, softmax, attention)
  • Pluggable prompt that enforces valid Sympy code (Eq(...), Sum(...), no ellipses)
  • Graceful degradation: partial parse success, intelligent failure logging for diagnostics
  • Customizable parser via regular-expression token discovery

📦 Installation

pip install symantex

Contributing

To contribute, start by creating and entering a virtual environment (Python 3.10 reccomended)

python3.10 -m venv .symnatex && source .symantex/bin/activate

After that, clone the repository and enter the Symantex folder

git clone git@github.com:FormuLearn/Symantex.git && cd Symantex

You can then install requirements with:

pip install -r requirements.txt

Finally, locally install the library locally with:

pip install -e .

Now any changes you make to the library locally will be reflected in your installation.

About

Symantex (pronounced semantics) is a modular LaTeX-to-SymPy parser with support for custom grammars and semantic notation. Built for flexibility and extensibility, it lets you define how LaTeX expressions should be interpreted, making it easy to adapt to different domains or styles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages