This commit is contained in:
15
docs/snippets/ruby/ocr/ocr_paddleocr.md
Normal file
15
docs/snippets/ruby/ocr/ocr_paddleocr.md
Normal file
@@ -0,0 +1,15 @@
|
||||
```ruby title="Ruby"
|
||||
require 'kreuzberg'
|
||||
|
||||
config = Kreuzberg::ExtractionConfig.new(
|
||||
ocr: Kreuzberg::OcrConfig.new(
|
||||
backend: 'paddleocr',
|
||||
language: 'eng'
|
||||
# model_tier: 'server' # for max accuracy
|
||||
)
|
||||
)
|
||||
|
||||
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