Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
```elixir title="Elixir"
alias Kreuzberg.ExtractionConfig
# Configure post-processing pipeline
# Applies transformations to extracted content after initial processing
config = %ExtractionConfig{
postprocessing: %{
"remove_whitespace" => true,
"normalize_unicode" => true,
"fix_encoding" => true
},
ocr: %{
"enabled" => true,
"backend" => "tesseract"
},
use_cache: true,
force_ocr: false
}
{:ok, result} = Kreuzberg.extract_file("document.pdf", nil, config)
IO.puts("Post-Processing Configuration Applied:")
IO.puts("Remove Whitespace: true")
IO.puts("Normalize Unicode: true")
IO.puts("Fix Encoding: true")
IO.puts("Original content length: #{byte_size(result.content)} bytes")
IO.puts("Processed content: #{String.slice(result.content, 0..100)}...")
IO.puts("Metadata: #{inspect(result.metadata)}")
```