Chinese OCR 2
This commit is contained in:
@@ -31,6 +31,7 @@ Rationale: De-risk unknowns (Docling OCR quality, Ollama CPU inference speed) be
|
|||||||
- [x] Test OCR on images (PNG) — works with `force_ocr=true`
|
- [x] Test OCR on images (PNG) — works with `force_ocr=true`
|
||||||
|
|
||||||
**Docling API Spec:**
|
**Docling API Spec:**
|
||||||
|
|
||||||
- Image: `ds4sd/docling-serve:latest`
|
- Image: `ds4sd/docling-serve:latest`
|
||||||
- Port: `5001`
|
- Port: `5001`
|
||||||
- Endpoint: `POST /v1/convert/file`
|
- Endpoint: `POST /v1/convert/file`
|
||||||
@@ -39,12 +40,14 @@ Rationale: De-risk unknowns (Docling OCR quality, Ollama CPU inference speed) be
|
|||||||
- OCR engine: `easyocr` (default), supports CJK
|
- OCR engine: `easyocr` (default), supports CJK
|
||||||
|
|
||||||
**OCR Options:**
|
**OCR Options:**
|
||||||
|
|
||||||
- `do_ocr=true` — enabled by default, processes bitmap content
|
- `do_ocr=true` — enabled by default, processes bitmap content
|
||||||
- `force_ocr=true` — use for images/scanned PDFs (replaces existing text with OCR)
|
- `force_ocr=true` — use for images/scanned PDFs (replaces existing text with OCR)
|
||||||
- `ocr_engine` — `easyocr` (default), `tesseract`, `rapidocr`, `tesserocr`, `ocrmac`
|
- `ocr_engine` — `easyocr` (default), `tesseract`, `rapidocr`, `tesserocr`, `ocrmac`
|
||||||
- `ocr_lang` — language codes (engine-specific), e.g. `ch_sim` for Simplified Chinese
|
- `ocr_lang` — language codes (engine-specific), e.g. `ch_sim` for Simplified Chinese
|
||||||
|
|
||||||
**Tested Formats:**
|
**Tested Formats:**
|
||||||
|
|
||||||
- PDF (Filing Receipt) — extracted text, tables, CJK content ✅
|
- PDF (Filing Receipt) — extracted text, tables, CJK content ✅
|
||||||
- PNG (Email screenshot) — extracted subject, dates, recipient ✅ (CJK trademark garbled, may need `ocr_lang`)
|
- PNG (Email screenshot) — extracted subject, dates, recipient ✅ (CJK trademark garbled, may need `ocr_lang`)
|
||||||
|
|
||||||
@@ -56,6 +59,7 @@ Rationale: De-risk unknowns (Docling OCR quality, Ollama CPU inference speed) be
|
|||||||
- [x] Validate extraction accuracy (deadline, doc type, etc.)
|
- [x] Validate extraction accuracy (deadline, doc type, etc.)
|
||||||
|
|
||||||
**Ollama API Spec:**
|
**Ollama API Spec:**
|
||||||
|
|
||||||
- Image: `ollama/ollama:0.9.3`
|
- Image: `ollama/ollama:0.9.3`
|
||||||
- Port: `11434`
|
- Port: `11434`
|
||||||
- Model: `qwen3:1.7b` (~1.4 GB, auto-pulled on startup)
|
- Model: `qwen3:1.7b` (~1.4 GB, auto-pulled on startup)
|
||||||
|
|||||||
Reference in New Issue
Block a user