Skip to main content

agrag.common.data_models.provenance.TextProvenance

Bases: BaseModel

The location of a chunk inside flattened document text.

The offsets index the normalized text in Document.text, not the raw source. See Normalization.

Attributes:

  • kind (Literal['text']) – The literal tag "text". Marks this as text provenance.
  • char_start (int) – The start character offset in the document text.
  • char_end (int) – The end character offset in the document text.
  • line_start (int | None) – The start line number. Empty when the loader does not track lines.
  • line_end (int | None) – The end line number. Empty when the loader does not track lines.

char_end​

char_end: int

char_start​

char_start: int

kind​

kind: Literal['text'] = 'text'

line_end​

line_end: int | None = None

line_start​

line_start: int | None = None