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.15.tar.gz (11.9 MB view details)

Uploaded Source

Built Distribution

mathtext-0.0.15-py3-none-any.whl (11.9 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mathtext-0.0.15.tar.gz
Algorithm Hash digest
SHA256 79969f86263ca9d530f918e9d0fc3888595bfbbd15636ca953bb5226b11ac6cb
MD5 2b37fd082923b5c5e54363f41cb67b40
BLAKE2b-256 bb8e4de2a4731e3418fab29882de169905a3b9035085e43b2ce3d3a52d09ecd4

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for mathtext-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 62b16caa26c354b9ffb8b334c9c849015fa2b58b855b154ef7cedf7e89831868
MD5 5e508b66261f569a1746fc5883d8fa60
BLAKE2b-256 6c60a67ca97743f01c7d580a942951ba6372ddbb3c9efe76cd379b609084862f

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