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:86e3b491373cb06a224074d5c175e5bf4c341443fbe2e0370128e5b090afde61
# 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__{
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 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