Current section
Files
Jump to
Current section
Files
lib/xberg/layout_detection_config.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:ba94fe4cec719c31f8ac484fcc2aba1d30db0f87dea8b1b6d0257417a4a260e2
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.LayoutDetectionConfig do
@moduledoc """
Layout detection configuration.
Controls layout detection behavior in the extraction pipeline.
When set on [`ExtractionConfig`](super::ExtractionConfig), layout detection
is enabled for PDF extraction.
"""
@typedoc "Layout detection configuration."
@type t :: %__MODULE__{
strategy: String.t() | nil,
confidence_threshold: float() | nil,
apply_heuristics: boolean(),
table_model: String.t() | nil,
table_overlap_preference: String.t() | nil,
acceleration: Xberg.AccelerationConfig.t() | nil,
enable_chart_understanding: boolean()
}
defstruct strategy: :always,
confidence_threshold: nil,
apply_heuristics: true,
table_model: :tatr,
table_overlap_preference: :content,
acceleration: nil,
enable_chart_understanding: false
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end