Metadata-Version: 2.1
Name: mathtext
Version: 0.0.24
Summary: Natural Language Understanding (text processing) for math symbols, digits, and words with a Gradio user interface and REST API.
Home-page: https://gitlab.com/tangibleai/community/mathtext
License: AGPL-3.0-or-later
Author: Sebastian Larson
Author-email: sebastianlarson22@gmail.com
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: boto3 (>=1.26.100)
Requires-Dist: editdistance (==0.6.2)
Requires-Dist: google-auth (>=2.20.0)
Requires-Dist: google-cloud-storage (>=2.10.0)
Requires-Dist: jupyter (>=1.0.0,<2.0)
Requires-Dist: matplotlib (>=3.7.1,<4.0)
Requires-Dist: pandas-gbq (>=0.19.2)
Requires-Dist: python-dotenv (>=0.21)
Requires-Dist: scikit-image (>=0.20.0)
Requires-Dist: scikit-learn (>=1.2.2)
Requires-Dist: seaborn (>=0.12.2)
Requires-Dist: sentence-transformers (>=2.2.2)
Requires-Dist: spacy (>=3.4.4)
Requires-Dist: torch (>=2.0.0,!=2.0.1)
Requires-Dist: transformers (>=4.29.2)
Requires-Dist: typing-extensions (==4.5.0)
Requires-Dist: unidecode (>=1.3.6)
Project-URL: Repository, https://gitlab.com/tangibleai/community/mathtext
Description-Content-Type: text/markdown

---
title: MathText
app_file: app.py
sdk: gradio
sdk_version: 3.15.0
license: agpl-3.0
---

## MathText NLU

Natural Language Understanding for math symbols, digits, and words with a Gradio user interface and REST API.

## Setup your Python environment

Launch a `terminal` on linux (or the `git-bash` application on Windows).
Then create a virtualenv with whatever python version you have available on your system.

Any python version greater than `3.7` should work.
Most of us on Linux systems use Python `3.9`: 

```bash
git clone git@gitlab.com:tangibleai/community/mathtext
cd mathtext
pip install --upgrade virtualenv poetry
python -m virtualenv .venv
ls -hal
```

You should see a new `.venv/` directory.
It will contain your python interpreter and a few `site-packages` like `pip` and `distutils`.

Now activate your new virtual environment by sourcing `.venv/bin/activate` (on Linux) or `.venv/scripts/activate` (on Windows).

```bash
source .venv/bin/activate || source .venv/scripts/activate
```

## Developer installation

Once you have a shiny new virtual environment activated you can install the `mathtext` in `--editable` mode.
This way, when you edit the files and have the package change immediately.

Make sure you are already within your cloned `mathtext` project directory.
And makes sure your virtual environment is activated.
You should see the name of your virtual environment in parentheses within your command line prompt, like `(.venv) $`.
Then when you install MathText it will be available to any other application within that environment.

```bash
pip install --editable .
```

## User installation

If you don't want to contribute to the MathText source code and you just want to import and run the MathText modules, you can install it from a binary wheel on PyPi.

```bash
pip install mathtext
```



## File notes
    mathtext
        mathtext: mathtext code
            data: training and test sets for various tasks
            api_gradio.py: gradio api
            api_scaling.py: makes async http requests to the local api
            nlutils_vish.py: various NLP utils
            nlutils.py: various NLP utils
            plot_calls.py: Functions for plotting data
            readme.md: other readme?
            sentiment.py: sets up huggingface sentiment analysis pipeline for the api (gradio or FastAPI?)
            tag_numbers.py: Number and word POS tagger
            text2int.py: text2int function
        scripts: setup scripts
            build.sh
            pyproject.template
        tests: various tests
            __init.py
            test_text2int.py
        .git*: various git files
        api_scaling.sh: makes calls to local api
        app.py: ties all of the api components together for huggingface
        LICENSE.md: license
        pyproject.toml: pyproject file
        README.md: this
        requirements.txt: project dependencies
            
