Python client for the SnapXam Math OCR API
Project description
SnapXam Math OCR API — Python Client
A lightweight Python client for the SnapXam Math OCR API — convert handwritten or printed math equations into text or LaTeX effortlessly.
Features
- Converts images of math expressions into LaTeX or infix notation
- Simple interface using
PIL.Imageor file paths - Minimal dependencies (
requests,Pillow) - Requires an API key for authentication. An api key can be obtained here.
Setup
Installation
pip install snapxam-math-ocr
Recognize math images
Basic usage
from snapxam_math_ocr import SnapXamMathOCR
ocr = SnapXamMathOCR(api_key="your-api-key")
img = Image.open("image_with_some_math.png")
result = ocr.recognize(img)
print(result) # sample response: {'latex': '\\frac{a}{b}', 'infix': 'a/b'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snapxam_math_ocr-0.2.1.tar.gz.
File metadata
- Download URL: snapxam_math_ocr-0.2.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67d3265946703949943e8768e26cd93d1f32781215365bdbfc321a4e27aad204
|
|
| MD5 |
5f604e504e2fa07db56912c7ae4d9f4a
|
|
| BLAKE2b-256 |
71af45f363d70c9a5f7c751a4da7a381c0373bbc8457dc02953f11b8e2226af4
|
File details
Details for the file snapxam_math_ocr-0.2.1-py3-none-any.whl.
File metadata
- Download URL: snapxam_math_ocr-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eee6ded0f942d6720d722e8c15a437e9738febe461ac3cc7d1b2532dddf8e9a
|
|
| MD5 |
a29f73c9622e2e63fb3c6478cc2243de
|
|
| BLAKE2b-256 |
b8a1298205ab9469c245b4fc270b21937983500d2d28275645c1c9b28b6dc918
|