On-device Mon OCR
Optical character recognition for printed Mon text. Recognition runs on your own device, in the browser or through the SDKs, and works offline once the model is downloaded.
Installation
Install the Python package from PyPI. A virtual environment keeps it separate from your other projects.
$ pip install monocr Implementation
Load the engine and read a scanned page from a local image.
# Initialize engine from monocr import MonOCR ocr = MonOCR() text = ocr.predict('manuscript.jpg') print(text)
Technical Standards
What helps recognition. The model reads printed text. Handwriting is out of scope, except Myanmar digits.
DPI Resolution
Scan at 300 DPI or more. That is advice, not a measured threshold: what the recogniser reacts to is how tall each line of text is in pixels.
Lighting Bias
Scans work best. The model was trained on rendered text only, so camera photographs are outside what it has seen. If you photograph a page, use even light and avoid glare.
Official SDKs
Libraries for JavaScript, Python, Go and Rust. Each one downloads the same pinned model and runs it on your machine.
// Node.js Implementation import { MonOCR } from 'monocr'; const ocr = new MonOCR(); const text = await ocr.predict('page.jpg');
CLI Interface
Extract text from PDFs and images, one file or a whole directory, with monocr-cli.
# Process single file monocr read manuscript_01.jpg # Batch process archive directory monocr batch ./scans/ --output results.txt
Privacy Policy
Recognition runs on your device. Your images and the recognised text stay there unless you choose to share a correction or a contribution, which uploads what you submit. The privacy policy lists what is stored.
MIT License
Released under the MIT License. You may use, modify and redistribute the code, including commercially, as long as the licence notice is kept.