๐Ÿ“„

OCR Vietnamese

Extract text from images or scanned documents with Vietnamese language support.

Document โญโญ Intermediate โฑ๏ธ 5 minutes

๐Ÿ˜ซ The Pain Point

You have scanned contracts or photos of documents in Vietnamese. You need the text searchable and editable. Retyping manually is slow and error-prone.

๐Ÿš€ Agentic Solution

An OCR Tool optimized for Vietnamese text with high accuracy.

Key Features:

  • Vietnamese Language Pack: Trained for VN characters (ฤƒ, รข, ฤ‘, ฦก, ฦฐ).
  • Image Preprocessing: Enhance contrast for better recognition.
  • Batch Processing: Extract text from multiple images.

โš”๏ธ Phase 1: Commander (Quick Fix)

For quick OCR.

Prompt:

โ€œI have a folder scans with images of Vietnamese documents. Write a Python script using pytesseract to:

  1. Preprocess: Convert to grayscale, increase contrast.
  2. OCR: Extract text using Vietnamese language pack (vie).
  3. Output: Save text to {filename}.txt for each image.

Print progress. Handle unreadable images (skip with warning).โ€

Result: Editable text from all scanned documents.

๐Ÿ—๏ธ Phase 2: Architect (Permanent Tool)

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create a "Vietnamese OCR Tool".

**Requirements:**
1.  **GUI:**
    *   Select image or folder.
    *   Language dropdown (vie, eng, vie+eng).
    *   Preprocessing options (contrast, rotate).
    *   Preview extracted text.
    *   Export as TXT or DOCX.

2.  **Logic:**
    *   Use pytesseract with tessdata.
    *   Image preprocessing with Pillow.
    *   Confidence scoring.

3.  **Deliverables:**
    *   `ocr_vietnamese.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

๐Ÿง  Prompt Decoding

  • Tesseract vie: Must download Vietnamese language data separately.

๐Ÿ› ๏ธ Instructions

  1. Install Tesseract OCR engine.
  2. Download Vietnamese language pack.
  3. Install: pip install pytesseract pillow
  4. Copy Prompt โ†’ Run.

Related Workflows

Explore other categories

๐Ÿ“ฌ

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

๐Ÿ“– Free eBook Guide ๐Ÿ“ฆ 7 Ready-to-use Scripts ๐Ÿ”” Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.