Current section
Files
Jump to
Current section
Files
lib/xberg/multidoc_thresholds.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.MultidocThresholds do
@moduledoc """
Thresholds for multi-document boundary detection.
All fields are public; callers override any subset via struct-update syntax.
"""
@typedoc "Thresholds for multi-document boundary detection."
@type t :: %__MODULE__{
density_shift_threshold: float(),
bigram_overlap_min: float()
}
defstruct density_shift_threshold: 0.3,
bigram_overlap_min: 0.1
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