Skip to content

janakhpon/monocr

Repository files navigation

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.2.3
git push origin main --tags

License

MIT - do whatever you want with it.

About

Optical Character Recognition for Mon (mnw) text.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages