Blogs / Why Reading All the Text Is Not the Same as Extracting Fields

Why Reading All the Text Is Not the Same as Extracting Fields

What the Hugging Face post says OCR returns, when that is what you want and what it leaves undone when you need specific fields.

  • Learning
  • 1 min read

For: Learners new to document processing.

What OCR returns

OCR gives you the text on a page, faithful to the original formatting.[1]

A pageOCR outputeverything printed on it,line by lineMapping codesomeone writes it to assigneach value to a field
What does OCR give, and what still has to be done?

When that is enough

That's exactly what you want when the job is the whole document, like a contract you'll read end to end or a manuscript you're digitizing.[1]

What it leaves undone

However, there's a different use case: you don't want the page, you want specific fields out of it, in a shape a system downstream can consume.[1]

Run that document through OCR and you get back everything printed on it, line by line, with no indication of which string is the exam type, which is the date or which number is the total.[1]

Someone still has to write the code that maps each value to the right field before it reaches the database.[1]

Sources

  1. Dharma Field Extractor (huggingface.co · checked )

More articles