Multilingual OCR
RustO! provides OCR capabilities across dozens of languages. To achieve high accuracy while keeping model sizes small, models are divided into core bilingual models (PP-OCRv6) and specialized regional language packs (PP-OCRv5 & PP-OCRv4).
1. PP-OCRv6 Language Coverage (Chinese + English / Latin)
The default PP-OCRv6 models are trained primarily for Chinese and English, with broad coverage for basic Latin-alphabet languages:
| Tier | Dictionary Size | Script & Character Coverage | Best For |
|---|---|---|---|
| PP-OCRv6 Tiny (Default) | 6,904 characters | Simplified Chinese, English, standard Latin alphabet (Indonesian, Spanish, French, German), numerals (0-9), punctuation, and currency symbols ($, €, ¥, £, Rp). | Mobile apps, receipts, invoices, and standard documents in English, Indonesian, or Chinese. |
| PP-OCRv6 Small & Medium | 18,708 characters | All characters in Tiny plus Traditional Chinese ideographs, rare CJK characters, and Japanese Kana (Hiragana and Katakana). | Scans containing mixed Chinese, Japanese Kana, and Latin text. |
Important: PP-OCRv6 does not recognize Korean Hangul, Arabic, Cyrillic, Devanagari (Hindi), Thai, Greek, or South Indian scripts. For those writing systems, use the dedicated language models below.
2. Dedicated Regional Language Packs (PP-OCRv5 & PP-OCRv4)
Because text detection (det.rten) is language-agnostic (it detects the physical contours of text lines regardless of language), you can recognize any supported writing system by pairing the universal detector with a language-specific recognizer (rec.rten) and dictionary (dict.txt).
Base release URL:
https://github.com/byrizki/rusto-rs/releases/download/models-rten-v0.3.2/
| Language / Script | Model Series | Key | Size | Supported Languages & Scripts | Direct Download |
|---|---|---|---|---|---|
| Latin Extended | PP-OCRv5 | latin | ~28 MB | European languages with extended diacritics: Polish, Czech, Turkish, Romanian, Vietnamese, Hungarian, etc. | Download |
| Japanese | PP-OCRv4 | japan | ~25 MB | Japanese Kanji, Hiragana, Katakana, and Latin alphanumeric characters. | Download |
| Traditional Chinese | PP-OCRv4 | chinese_cht | ~25 MB | Traditional Chinese characters commonly used in Taiwan, Hong Kong, and Macau. | Download |
| Korean | PP-OCRv5 | korean | ~28 MB | Korean Hangul syllables, numbers, and punctuation. | Download |
| Arabic | PP-OCRv5 | arabic | ~28 MB | Arabic, Persian (Farsi), Urdu, and Uyghur nastaliq/naskh scripts. | Download |
| Cyrillic | PP-OCRv5 | cyrillic | ~28 MB | Russian, Ukrainian, Belarusian, Bulgarian, Serbian, Macedonian, and Kazakh. | Download |
| Devanagari | PP-OCRv5 | devanagari | ~28 MB | Hindi, Marathi, Nepali, Sanskrit, and Bhojpuri. | Download |
| Thai | PP-OCRv5 | th | ~28 MB | Thai consonants, vowels, and tone marks. | Download |
| Greek | PP-OCRv5 | el | ~28 MB | Modern Greek alphabet. | Download |
| East Slavic | PP-OCRv5 | eslav | ~28 MB | Regional East Slavic orthography variants. | Download |
| Tamil | PP-OCRv5 | ta | ~28 MB | Tamil script. | Download |
| Telugu | PP-OCRv5 | te | ~28 MB | Telugu script. | Download |
| Kannada | PP-OCRv4 | kannada | ~25 MB | Kannada script. | Download |
3. How to Switch Language Models in Code
To switch languages, keep the universal text detector (det.rten) and point the recognition configuration to your downloaded regional model:
In Rust:
use rusto::{InitializeConfig, RustO};
// Initialize with universal detector + Japanese recognition model
let config = InitializeConfig::ppv4(
"models/det.rten",
"models/japan_rec.rten",
"models/japan_dict.txt",
);
let mut ocr = RustO::initialize(config)?;
let results = ocr.detect_text_file("japanese_receipt.jpg")?;
In Node.js:
import { RustO } from '@rustors/node';
const ocr = new RustO({
detModelPath: 'models/det.rten',
recModelPath: 'models/arabic_rec.rten',
dictPath: 'models/arabic_dict.txt',
});
const lines = await ocr.detectTextFile('arabic_invoice.pdf');
In Python:
import rusto
engine = rusto.RustOEngine.from_config(
'{"detection":{"model_path":"models/det.rten"},"recognition":{"model_path":"models/korean_rec.rten","dict_path":"models/korean_dict.txt"}}'
)
lines = engine.detect_text_file("korean_document.png")
4. Package Manager Identifiers
If using CocoaPods, Android Gradle, or NuGet, pre-packaged language pods/AARs/packages are available without manual downloads:
| Language | CocoaPods (iOS) | Android (JitPack) | NuGet (.NET) |
|---|---|---|---|
| Japanese | pod 'RustO-Models-PPOCRv4-Japanese' | rusto-models-ppocrv4-japan | RustODotnet.Models.PPOCRv4.Japanese |
| Traditional Chinese | pod 'RustO-Models-PPOCRv4-TraditionalChinese' | rusto-models-ppocrv4-chinese-cht | RustODotnet.Models.PPOCRv4.TraditionalChinese |
| Latin Extended | pod 'RustO-Models-PPOCRv5-Latin' | rusto-models-ppocrv5-latin | RustODotnet.Models.PPOCRv5.Latin |
| Arabic | pod 'RustO-Models-PPOCRv5-Arabic' | rusto-models-ppocrv5-arabic | RustODotnet.Models.PPOCRv5.Arabic |
| Korean | pod 'RustO-Models-PPOCRv5-Korean' | rusto-models-ppocrv5-korean | RustODotnet.Models.PPOCRv5.Korean |
| Cyrillic | pod 'RustO-Models-PPOCRv5-Cyrillic' | rusto-models-ppocrv5-cyrillic | RustODotnet.Models.PPOCRv5.Cyrillic |
| Devanagari | pod 'RustO-Models-PPOCRv5-Devanagari' | rusto-models-ppocrv5-devanagari | RustODotnet.Models.PPOCRv5.Devanagari |
| Thai | pod 'RustO-Models-PPOCRv5-Thai' | rusto-models-ppocrv5-th | RustODotnet.Models.PPOCRv5.Thai |
5. Right-to-Left (RTL) Scripts
When processing Arabic, Persian, or Urdu:
- The recognizer reads characters in their natural visual order from left to right across the cropped text slice.
- Bounding polygon vertices in structured output reflect true coordinate space on the document.
- In spatial text mode (
OutputGranularity::Spatial), lines are formatted preserving individual word coordinates and token ordering.
Models & Tiers
Pragmatic guide for choosing, downloading, and configuring pre-trained PaddleOCR models in RustO! with direct zip releases and package manager bundles.
Spatial Layout Reconstruction
How RustO! reconstructs human-readable 2D spatial layouts for multi-column tables, invoices, receipts, and forms.