This commit is contained in:
14
docs/snippets/ruby/ocr/ocr_easyocr.md
Normal file
14
docs/snippets/ruby/ocr/ocr_easyocr.md
Normal file
@@ -0,0 +1,14 @@
|
||||
```ruby title="Ruby"
|
||||
require 'kreuzberg'
|
||||
|
||||
config = Kreuzberg::ExtractionConfig.new(
|
||||
ocr: Kreuzberg::OcrConfig.new(
|
||||
backend: 'easyocr',
|
||||
language: 'eng'
|
||||
)
|
||||
)
|
||||
|
||||
result = Kreuzberg.extract_file_sync('scanned.pdf', config: config)
|
||||
puts result.content[0..100]
|
||||
puts "Total length: #{result.content.length}"
|
||||
```
|
||||
Reference in New Issue
Block a user