Skip to main content

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

Project description


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:

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).

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.

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathtext-0.0.22.tar.gz (12.0 MB view details)

Uploaded Source

Built Distribution

mathtext-0.0.22-py3-none-any.whl (12.1 MB view details)

Uploaded Python 3

File details

Details for the file mathtext-0.0.22.tar.gz.

File metadata

  • Download URL: mathtext-0.0.22.tar.gz
  • Upload date:
  • Size: 12.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mathtext-0.0.22.tar.gz
Algorithm Hash digest
SHA256 ce1f3fafc802eb04f3fbc22c7b368d20b3b36ca8d1d4e4d8b587cd7f9ebb2238
MD5 eb1d79b3cebbb4932fb94c8fc2c3ede3
BLAKE2b-256 d3f1d9003cc3ed33e43ade00a53475ac3bb8f99a56a41a088c67f66b77ab1f87

See more details on using hashes here.

Provenance

File details

Details for the file mathtext-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: mathtext-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mathtext-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 8639c44afa459f1f55c35f486b7f49833c4e62f9c71737f9923a249b4035690f
MD5 755ff7622ac8445263f46273ad001774
BLAKE2b-256 0b2b165a3338f8137f03e75162eaeb5a4c90f1651155d3852c27882bd3907fe3

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page