Optical Character Recognition

Episode #405 by Teacher's Avatar David Kimura

Summary

Make your Active Storage uploads searchable with Optical Character Recognition (OCR). In this episode, we'll look at uploading documents with Active Storage and then using a gem to perform the optical character recognition on the uploaded files.
rails active storage search 14:20

Chapters

  • Introduction (0:00)
  • Setting up Active Storage (2:17)
  • Creating the background job (2:59)
  • Migration for storing OCR text (4:47)
  • Downloading document (5:22)
  • Performing the OCR (6:02)
  • Updating the document with the OCR text (9:17)
  • Close temp files (9:40)
  • Displaying the results (10:15)
  • Adding turbo stream to easily test (11:16)
  • Demo (11:51)
  • Parallel processing (12:29)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams