Sha256: d23bf11c62a952d8b2df25b2c4e7691d74e6654d5be08e184c9989267fc051ce

Contents?: true

Size: 350 Bytes

Versions: 13

Compression:

Stored size: 350 Bytes

Contents

require 'active_support/core_ext/object/blank'

module Chronicle
  module ETL
    module Utils
      # OCR for image files
      # TODO: add other strategies and document `macocr`
      module TextRecognition
        def self.recognize_in_image(filename:)
          `macocr "#{filename}" 2>/dev/null`.presence
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
chronicle-etl-0.5.5 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.5.4 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.5.3 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.5.2 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.5.1 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.5.0 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.4.4 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.4.3 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.4.2 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.4.1 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.4.0 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.3.1 lib/chronicle/etl/utils/text_recognition.rb
chronicle-etl-0.3.0 lib/chronicle/etl/utils/text_recognition.rb