Graphrt

OCR (Tesseract)

Teks, hOCR atau TSV dari gambar atau halaman PDF (lewat pdftoppm dari poppler) di folder yang diizinkan, pilihan bahasa terpasang dan page segmentation, input dicek dari isinya, argumen berupa array, timeout

Stabil v0.1.0 Node.js 2 aksi
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt untuk OCR dengan Tesseract sistem. Workflow dan agent bisa membaca teks dari gambar hasil scan, foto dokumen dan halaman PDF di folder yang kamu izinkan, sebagai teks biasa, hOCR atau TSV.

Yang bisa dilakukan

  • list_languages: the installed language packs (e.g. eng, ind, chi_sim) and the tessdata directory.
  • ocr: an image (png, jpeg, tiff, bmp, gif, webp) or one page of a PDF (rendered at dpi with poppler's pdftoppm), with languages (1–5 installed codes), psm (page segmentation mode 0–13) and output_format: text, hocr (HTML with word boxes) or tsv (one row per word with box and confidence). max_chars caps the returned text (truncated says so), save_output: true also writes it to a new file in OCR_TESSERACT_OUTPUT_DIR.

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • List OCR languages ocr-tesseract.list_languages
  • Recognise text ocr-tesseract.ocr

Pengaturan

Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.

  • OCR_TESSERACT_INPUT_DIRS (required)
    Comma-separated directories (absolute or ~/...) that images and PDFs may be read from, subdirectories included
  • OCR_TESSERACT_OUTPUT_DIR (none)
    Existing directory for save_output, reading text needs no output directory
  • OCR_TESSERACT_MAX_INPUT_BYTES 50 MiB
    Largest input file
  • OCR_TESSERACT_MAX_OUTPUT_BYTES 50 MiB
    Largest saved result
  • OCR_TESSERACT_TIMEOUT_MS 120000
    Per tesseract/pdftoppm run (1000 to 280000), the process is killed when it passes
  • OCR_TESSERACT_MAX_INPUT_PIXELS 40000000
    Most pixels (width × height) of an image, or of a PDF page rendered at dpi
  • TESSERACT_BINARY On PATH
    Absolute paths to the programs
  • PDFTOPPM_BINARY

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari OCR (Tesseract).
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan CLI

terminal
$ graphrt plugin install ocr-tesseract
workflow.yaml
- id: ocr_tesseract
  type: ocr-tesseract.list_languages
Plugin di docs