evaluate_accuracy
Evaluate OCR output by comparing extracted text or an image/PDF (OCR'd automatically) against a ground truth file. Returns CER, WER, and accuracy metrics.
Instructions
Score OCR output against a ground-truth text file (CER/WER).
Provide EITHER ocr_text (already-extracted text) OR ocr_path (an image/PDF
to OCR now with engine). Compares against the UTF-8 text at
ground_truth_path.
Returns JSON: {cer, wer, char_accuracy_pct, word_accuracy_pct, substitutions, deletions, insertions, hits}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ground_truth_path | Yes | ||
| ocr_text | No | ||
| ocr_path | No | ||
| engine | No | auto | |
| lang | No | en |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |