OCR Reader

Label Template – YAML Configuration Guide

Overview

Label templates are used to extract values based on text labels (e.g. "Invoice No:", "Total:", "Date:").

OCR Reader searches for the label and extracts the value nearby.

Best for semi-structured documents where positions may vary.

Labels Definition

labels:
  - name: invoice_number
    label: "Invoice No"
    type: text

  - name: total
    label: "Total"
    type: currency

Full Example

template:
  type: label
  name: invoice_labels

source:
  type: pdf

labels:
  - name: invoice_number
    label: "Invoice No"
    type: text

  - name: date
    label: "Date"
    type: date

  - name: total
    label: "Total"
    type: currency

Best Practices

Back to Documentation