#4591·tesseract

write runtime parameters to HOCR output

Author: milahuCreated Aug 2, 2026Updated Sep 16, 2026

Your Feature Request

this is a more generic feature request than

  • #4455

based on

Good point about compound model names. The current implementation does exact lookup, so deu_latf passes through unmapped instead of resolving to de.

I'll add prefix-based fallback: strip trailing _suffix parts progressively and retry shorter keys. deu_latf -> try deu -> "de". chi_tra_vert -> try chi_tra -> "zh".

reducing languages like German Fraktur script (deu_latf) to German (deu) can be too lossy for consumers of HOCR files

for example, one use case is to re-run tesseract with the exact same parameters (reproducible runs)

to encode the runtime parameters, we could use a custom meta tag like ocr-runtime-parameters with the parameters stored in a JSON object

<meta name="ocr-runtime-parameters" content='{
  "langs": "eng+fra",
  "tessdata-hashes": {
    "eng": "sha256:8280aed0782fe27257a68ea10fe7ef324ca0f8d85bd2fd145d1c2b560bcb66ba",
    "fra": "sha256:907743d98915c91a3906dfbf6e48b97598346698fe53aaa797e1a064ffcac913"
  }
}'/>

the example file hashes are from tessdata_best

optional: also store file hashes of input image files