Skip to content

farscry install-lang

farscry ships with English built in. Additional languages are downloaded on demand and stored in ~/.farscry/models/lang/.

Usage

Terminal window
farscry install-lang <code>

Examples

Terminal window
farscry install-lang por # Portuguese
farscry install-lang rus # Russian
farscry install-lang chi_sim # Chinese Simplified
farscry install-lang jpn # Japanese

Priority languages for v0.1.0

CodeLanguageModel size
engEnglish (built in)~12MB
porPortuguese~10-20MB
rusRussian~10-20MB
chi_simChinese Simplified~10-20MB

How it works

farscry uses PP-OCRv5 language-specific ONNX recognition models - not Tesseract .traineddata files.

Each language pack is:

  1. Downloaded from GitHub Releases via HTTPS
  2. Verified with SHA256 before use
  3. Stored in ~/.farscry/models/lang/<code>.onnx

Language auto-detection

When --lang is not specified, farscry uses whatlang-rs or lingua-rs for language detection. Tesseract’s built-in language detection is not used (it is inaccurate for UI screenshots).

Using a language

Terminal window
Explicit language
farscry extract screenshot.png --lang por
Multi-language (mixed content)
farscry extract screenshot.png --lang eng+por

Storage location

~/.farscry/
models/
det.onnx <- detection model (shared)
rec_eng.onnx <- English recognition (default)
lang/
por.onnx
rus.onnx
chi_sim.onnx