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}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ground_truth_path": "<ground_truth_path>"
},
"name": "evaluate_accuracy"
}
}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 |