# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
defmodule Kreuzberg.ChunkerType do
  @moduledoc """
  Type of text chunker to use.

  # Variants

  * `Text` - Generic text splitter, splits on whitespace and punctuation
  * `Markdown` - Markdown-aware splitter, preserves formatting and structure
  * `Yaml` - YAML-aware splitter, creates one chunk per top-level key
  * `Semantic` - Topic-aware chunker. With an `EmbeddingConfig`, splits at
    embedding-based topic shifts tuned by `topic_threshold` (default 0.75,
    lower = more splits). Without an embedding, falls back to a
    structural-boundary heuristic (ALL-CAPS headers, numbered sections,
    blank-line paragraphs) and merges groups into chunks capped at
    `max_characters` (default 1000). `topic_threshold` has no effect in the
    fallback path. For best results, pair with an embedding model.
  """

  @typedoc "Type of text chunker to use."
  @type t :: :text | :markdown | :yaml | :semantic

  @text :text
  @markdown :markdown
  @yaml :yaml
  @semantic :semantic

  @spec text() :: t()
  def text, do: @text
  @spec markdown() :: t()
  def markdown, do: @markdown
  @spec yaml() :: t()
  def yaml, do: @yaml
  @spec semantic() :: t()
  def semantic, do: @semantic
end
