Class TextSegment (2.0.0)

Stay organized with collections Save and categorize content based on your preferences.
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

NameDescription
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.

Inheritance

builtins.object > proto.message.Message > TextSegment