A macOS app for OCR scanning of Hebrew text documents. Load an image or PDF, and Ayin extracts the text using Tesseract OCR with DictaBERT language model post-processing for improved accuracy.
- Hebrew & English OCR — Powered by embedded Tesseract with Hebrew and English language data
- Language model correction — DictaBERT (Core ML) fixes OCR errors: Latin garbage replacement, Hebrew near-miss correction, and character confusion resolution (ר↔ד, ב↔כ, etc.)
- PDF support — Multi-page PDF navigation with arrow keys and swipe gestures
- Text selection — Click and drag to select recognized words directly on the image
- Auto-copy — Selected text is automatically copied to the clipboard
- DOCX export — Export scanned documents to Word format with margin note separation and watermark detection
- Zoom — Pinch, Cmd+/-, or double-click to zoom
- Drag & drop — Drop images or PDFs directly into the window
- Localized — Hebrew and English UI
Images: PNG, JPEG, TIFF, BMP, GIF Documents: PDF
- macOS 26.0 or later
Open HebrewScanner.xcodeproj in Xcode and build. All dependencies are bundled in the project — no Homebrew or external installs needed:
- Tesseract & Leptonica — Pre-built dylibs in
Frameworks/ - tessdata — Hebrew and English trained data in
Resources/tessdata/ - DictaBERT — Pre-converted Core ML model in
Resources/DictaBERT.mlpackage/ - ZIPFoundation — Resolved automatically via Swift Package Manager
The DictaBERT model is already included. To regenerate it from the HuggingFace source:
pip install torch transformers coremltools
python scripts/convert_dictabert_coreml.pyAfter archiving and notarizing in Xcode:
# Install dependencies
brew install fileicon
# Build the DMG (requires Pillow: pip3 install Pillow)
./scripts/build_dmg.sh /path/to/exported/Ayin.app| Shortcut | Action |
|---|---|
| Cmd+O | Open file |
| Cmd+E | Export to DOCX |
| Cmd++ | Zoom in |
| Cmd+- | Zoom out |
| Cmd+0 | Reset zoom |
| Cmd+C | Copy selected text |
| Arrow keys | Navigate PDF pages |
Ayin bundles Tesseract OCR and a DictaBERT language model for fully offline Hebrew text recognition. When you load an image or PDF page:
- PDF pages are rendered at 2x resolution (~288 DPI) for optimal OCR accuracy
- Tesseract returns word-level bounding boxes in TSV format
- DictaBERT post-processes the results: replaces Latin garbage with Hebrew predictions, corrects character confusions, and fixes near-miss OCR errors
- Invisible text views are overlaid on each word for native text selection
- Margin annotations are detected and separated from main content
Multi-page DOCX export processes pages concurrently for faster throughput.
All processing happens locally — no data is sent to any server.
- Tesseract OCR — Apache License 2.0
- DictaBERT by DICTA: The Israel Center for Text Analysis — CC BY 4.0
- Leptonica — BSD 2-Clause License
- ZIPFoundation — MIT License
See the app's About window for full third-party credits.
Copyright (c) 2026 Aviah Morag. All rights reserved.
See LICENSE for details.