Class Segment (0.13.11)

Segment(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Grounding information for a segment of the text.

Attributes

Name Description
start_index int
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
end_index int
End of the segment, exclusive.
reference_indices MutableSequence[int]
References for the segment.
grounding_score float
Score for the segment.
text str
The text segment itself.