Current section

Files

Jump to
xberg lib xberg multidoc_thresholds.ex
Raw

lib/xberg/multidoc_thresholds.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e21c71a5751b345136e5ca51dea30bbd3862f7fdc63aa50e6b36be84c454e0e
# 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