LangExtract.Pipeline.ChunkResult (LangExtract v0.7.0)

Copy Markdown View Source

A successfully processed chunk: its byte range in the source and the spans extracted from it.

The per-chunk success unit yielded by LangExtract.stream/4, sibling of LangExtract.Pipeline.ChunkError. Span byte offsets are already adjusted to the original document, not the chunk.

Summary

Functions

Builds a result carrying chunk's byte range.

Types

t()

@type t() :: %LangExtract.Pipeline.ChunkResult{
  byte_end: non_neg_integer(),
  byte_start: non_neg_integer(),
  spans: [LangExtract.Alignment.Span.t()]
}

Functions

from_chunk(chunk, spans)

Builds a result carrying chunk's byte range.