Skip to main content

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

Usage

Sentiment classification

Directory structure with notes

mathtext
    mathtext: mathtext code
        data: training and test sets for various tasks
        models: scripts to create models and store in/retrieve from object storage
        utils: utility functions
            checkers.py: T/F evaluations
            converters.py: Change the data type from one to another
            extractors.py: Looks for specific values or value types in a message
            formatters.py: Attempts to format text in a standardized way
        api_gradio.py: gradio api
        predict_intent.py: functions to run multilabel recognizer on message
        text_processing.py: evaluations that use sequences of utils
    scripts: setup scripts
        api_scaling.sh: makes calls to local api
        api_scaling.py: makes async http requests to the local api
        build.sh
        plot_calls.py: Functions for plotting data
        pyproject.template
    tests: various tests
        __init.py
        test_cases_all.py
    .git*: various git files
    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

Metadata

Release files for mathtext 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mathtext 2.0.6
File Size Uploaded
mathtext-2.0.6.tar.gz 12.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mathtext 2.0.6
File Interpreter ABI Platform
mathtext-2.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 MB

Release files / mathtext-2.0.6.tar.gz

Download URL mathtext-2.0.6.tar.gz
Size 12.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f84bed8a4af9a01cc4376c3e68ff5e11654036303a1f871e4cda3e968545d0bd
BLAKE2b-256 checksum
How to use checksums
bafbe275164a6bf7fe57b72ba4b3a09ec8f0df5a962a978e43ea268f42aa63a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / mathtext-2.0.6-py3-none-any.whl

Download URL mathtext-2.0.6-py3-none-any.whl
Size 12.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
231c9ff5e09eb357ab6512455595c8caab98a9cecbffdd18ee08d3ac06717028
BLAKE2b-256 checksum
How to use checksums
387176497e2afac25f8d11f784e3aa231ccc31107b56911e26601e7f636ac173
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

2.0.6 This release

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page