You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OCR language switch was env-only (DOCLING_RS_OCR_LANG); plumb it
through the full option pattern like pages/video_frames:
- docling-pdf: OcrLang is now a public enum (parse / from_env);
Pipeline::ocr_lang(Option<OcrLang>) + set_ocr_lang for the warm serve
instance — a model switch, not pure configuration, so any worker whose
cached recognition model was loaded for the other language drops it
and lazily reloads (~10 MB model; verified live: ch request then
default request on one warm pipeline produce ch-glued and en-spaced
output respectively). Worker carries its lang; the one-shot
convert_with_options/convert_image_with_options grow an
ocr_lang: Option<OcrLang> arg.
- docling: DocumentConverter::ocr_lang(str) (unknown value warns and
uses the default at convert time, same degradation as the env
selector), threaded through StreamSettings into the streaming path;
OcrLang re-exported.
- CLI: --ocr-lang en|ch (invalid value = usage error, exit 2).
- serve: ocr_lang option (multipart field + JSON key + query param),
applied per request to the warm pipeline next to set_pages; invalid
value → 422.
- Python: ocr_lang= kwarg on the native converter (typo → ValueError)
and on the docling-shaped wrapper, which also maps
ocr_options.lang lists (["english"]→en, ["chinese"]→ch, anything
else warns and is ignored).
- Node: ocrLang option on ConvertOptions and Pipeline options
(invalid → typed Error). Verified against the scanned tiff fixture
from JS: ch glues, en spaces, xx throws.
- RAG keeps RAG_OCR_LANG (already mapped onto the engine env).
Docs: README OCR paragraph (per-surface list), serve API list (also adds
the previously undocumented pages line), node/py READMEs, MIGRATION.md
PDF row, CLI usage strings.
Signed-off-by: artiz <artem.kustikov@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT
0 commit comments