Codariva — Turkish document extraction baseline v1 (15 October 2026)

Scope: 24 SYNTHETIC document images; three headings (invoice/order/quote), four image conditions, two samples each; shared single-column label template. Seven fields. This is OCR + fixed regex extraction, NOT an LLM comparison. No customer data or real tax documents.

Authoring and review: code, synthetic inputs and analysis prepared with OpenAI Codex. Arithmetic, hashes and result completeness checked automatically. No named human expert review or real-world performance validation is claimed.

Reproduction (Node 24, local CPU):
  npm install --ignore-scripts
  mkdir -p models/fast models/best
  curl -L https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/4.1.0/tur.traineddata -o models/fast/tur.traineddata
  curl -L https://raw.githubusercontent.com/tesseract-ocr/tessdata_best/4.1.0/tur.traineddata -o models/best/tur.traineddata
  BENCH_MODELS="$PWD/models" node run.cjs

Use the INCLUDED PNG files and gold.json, not newly generated inputs, for exact reproduction. generate.py is optional (Pillow 12.3.0 + locally licensed Arial); font files are not included. Different fonts change pixels. Generator must not be run after a protocol freeze for the same experiment. Copy results.json before rerunning if you want to retain the published baseline. run.cjs verifies the frozen gold hash and input image hashes; traineddata hashes are logged in results.json.

One unscored warm-up on the first document per model. Both workers initialized before timing. Then each of 24 documents evaluated once per model, sequentially, alternating which model goes first. No timed retries. Timer covers OCR recognition + fixed field extraction; excludes image file reads, model load/download/init/warm-up. CPU sharing, browser/background work and a single run limit latency conclusions. No controlled idle-device benchmark claim.

Field accuracy is exact-match after NFC/whitespace normalization and decimal-comma money normalization; dates/punctuation are NOT repaired. Missing=label/value not found; wrong=nonempty but unequal. Full-document success means all 7 fields correct. p95 uses nearest-rank ceil(0.95*n). Both OCR and parser errors count; this is end-to-end extraction, not OCR character accuracy. All 48 outputs retained, including errors.

Setup incident: bundled Tesseract.js 7.0.0 failed before any document evaluation (missing DotProductSSE symbol). The frozen measured run uses 6.0.1. No paid API was used. External API fee per document is 0 USD as of 2026-10-15, not total cost: hardware, electricity, development and human correction are unpriced. Timing is not converted to an invented cash cost.

License: original code MIT; synthetic PNGs/gold/results CC0-1.0. Model files are not redistributed; official model repositories are Apache-2.0. Tesseract.js is Apache-2.0. No font software redistributed.

A small, same-template synthetic benchmark cannot establish accuracy on real invoices, handwriting, complex tables, scans, arbitrary layouts or Turkish businesses generally. It does not determine the best model for a production project. Use permissioned representative test data and predefined acceptance/error thresholds before automation.
