Optical Character Recognition for Mon text
Project description
Mon OCR
Optical Character Recognition for Mon (mnw) text.
Installation
pip install monocr | uv add monocr
Quick Start
Python Usage
from monocr import MonOCR
# Initialize
model = MonOCR()
# 1. Read an Image
text = model.read_text("image.png")
print(text)
# 2. Read with Confidence
result = model.predict_with_confidence("image.png")
print(f"Text: {result['text']}")
print(f"Confidence: {result['confidence']:.2%}")
Examples
See the examples/ folder to learn more.
examples/run_ocr.py: A complete script that can process a folder of images or read a full PDF book.- Or a demo notebook to play around with the package
notebooks/demo.ipynb
CLI Usage
You can also use the command line interface:
# Process a single image
monocr read image.png
# Process a folder of images
monocr batch folder/path
# Manually download the model
monocr download
Resources
Development
Release Workflow
uv version --bump patch
uv build
git add .
git commit -m "bump version"
git tag v2.1.1
git push origin main --tags
License
MIT - do whatever you want with it.
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
monocr-2.1.1.tar.gz
(105.9 kB
view details)
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
monocr-2.1.1-py3-none-any.whl
(12.9 kB
view details)
File details
Details for the file monocr-2.1.1.tar.gz.
File metadata
- Download URL: monocr-2.1.1.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
851987c388872a3795d52946284e33e5a59b48581e1b181d56e5e1e853166359
|
|
| MD5 |
62617786d411e257f93b66db01eaa542
|
|
| BLAKE2b-256 |
2ccaa9fd79b2a178bb673ecc3b3f455b726dade0abacc17e9cac5d2c479a05da
|
File details
Details for the file monocr-2.1.1-py3-none-any.whl.
File metadata
- Download URL: monocr-2.1.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15651ed0866e2075a797ff6129666e5a5bfb72e8e209d68f0a28218faba3c491
|
|
| MD5 |
5c8d27590840a538d6234377a7ad55c6
|
|
| BLAKE2b-256 |
a42e86bd2d0c97ffdf3d6746c0a257331afdd07ac7e33f93399edc09494f6cc8
|