What is TSV (OCR) format?

TSV (OCR) (Tab Separated Values)

TSV (OCR) is the detailed report of a text recognition, as a tab-separated table. Where TXT (OCR) gives you the words, this gives you the words and everything the recogniser knew about them.

Each row is one recognised item. The columns say which block, paragraph, line and word it is, where it sits on the page — left, top, width and height in pixels — how confident the recogniser was, from 0 to 100, and the text itself. Rows with no text mark the structure the recogniser saw: the blocks and lines it split the page into.

The point of it is that you can act on the numbers. Drop everything below a confidence of, say, 60 and check those words by hand. Take only the text inside a region of the page to read one column of a form. Rebuild lines by grouping rows, or find where on the scan a particular word appeared.

It opens in any spreadsheet and is trivial to read from a script — one line per record, tab separated, with a header row. If you want the same information as markup instead of a table, hOCR and ALTO XML carry the boxes and confidences too, in HTML and XML.

What programs can open TSV (OCR) format?

  • Microsoft Excel
  • Google Sheets
  • LibreOffice Calc
  • Python (with Pandas library)
  • R (with readr package)
  • Notepad++
  • TextEdit
  • Sublime Text

Use cases for TSV (OCR) format?

  • Digitizing historical documents for archival purposes
  • Extracting text from scanned books or articles for analysis
  • Creating searchable databases from printed materials
  • Data mining and text analysis in academic research
  • Converting invoices and receipts into structured data for accounting
  • Processing forms and surveys to extract responses into a usable format