Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

feat: add content field in TextAnchor #294

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions google/cloud/documentai_v1beta2/types/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@ class TextAnchor(proto.Message):
text_segments (Sequence[google.cloud.documentai_v1beta2.types.Document.TextAnchor.TextSegment]):
The text segments from the
[Document.text][google.cloud.documentai.v1beta2.Document.text].
content (str):
Contains the content of the text span so that users do not
have to look it up in the text_segments.
"""

class TextSegment(proto.Message):
Expand All @@ -699,6 +702,7 @@ class TextSegment(proto.Message):
text_segments = proto.RepeatedField(
proto.MESSAGE, number=1, message="Document.TextAnchor.TextSegment",
)
content = proto.Field(proto.STRING, number=2,)

class PageAnchor(proto.Message):
r"""Referencing elements in
Expand Down