Class TextSegment (2.29.0)

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

A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset

Attributes

Name Description
start_index int
TextSegment start UTF-8 char index in the Document.text.
end_index int
TextSegment half open end UTF-8 char index in the Document.text.