This commit is contained in:
29
docs/snippets/ruby/config/pdf_hierarchy_config.md
Normal file
29
docs/snippets/ruby/config/pdf_hierarchy_config.md
Normal file
@@ -0,0 +1,29 @@
|
||||
```ruby title="Ruby"
|
||||
require 'kreuzberg'
|
||||
|
||||
# Using keyword arguments with defaults
|
||||
config = Kreuzberg::ExtractionConfig.new(
|
||||
pdf_options: Kreuzberg::PdfConfig.new(
|
||||
extract_images: true,
|
||||
hierarchy: Kreuzberg::HierarchyConfig.new(
|
||||
enabled: true,
|
||||
k_clusters: 6,
|
||||
include_bbox: true,
|
||||
ocr_coverage_threshold: 0.8
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# Using hash syntax alternative
|
||||
config = Kreuzberg::ExtractionConfig.new(
|
||||
pdf_options: Kreuzberg::PdfConfig.new(
|
||||
extract_images: true,
|
||||
hierarchy: {
|
||||
enabled: true,
|
||||
k_clusters: 6,
|
||||
include_bbox: true,
|
||||
ocr_coverage_threshold: 0.8
|
||||
}
|
||||
)
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user