Overview
Thai addresses on air waybills and shipping documents present unique OCR challenges. Thai script is abugida-based with no spaces between words, uses combining marks above and below the baseline, and has 44 consonants plus numerous vowel forms. Standard Latin-trained OCR engines struggle with these characteristics.
KabyTech uses a dedicated Thai OCR model trained on freight-specific documents — AWBs, house bills, customs declarations, and packing lists. The model handles mixed Thai-English text, which is common because IATA codes, flight numbers, and weight units remain in English even on Thai-language documents.
Beyond raw OCR, the address parsing pipeline understands Thailand's administrative hierarchy: จังหวัด (province), อำเภอ (district), and ตำบล (sub-district). This structure is critical for address matching and delivery routing in Thai logistics operations.
Step 1 — Thai Character Detection
The first stage identifies which regions of the document contain Thai script. The API uses a script-detection classifier that runs before full OCR, flagging bounding boxes as Thai, Latin, numeric, or mixed. This lets the system route each region to the appropriate OCR model.
You can see detection results in the regions array of the API response. Each region includes a script field and a bounding box. For debugging, enable debug_regions=true in your request to receive annotated page images.
curl -X POST https://api.kabytech.com/v1/parse \ -H "Authorization: Bearer $KABY_API_KEY" \ -F "file=@thai-awb.pdf" \ -F "debug_regions=true"