8000 feat: add `content` field in TextAnchor (#294) · googleapis/google-cloud-python@9370ecf · GitHub
[go: up one dir, main page]

Skip to content

Commit 9370ecf

Browse files
feat: add content field in TextAnchor (#294)
* feat: add `content` field in TextAnchor PiperOrigin-RevId: 435142243 Source-Link: googleapis/googleapis@721b367 Source-Link: googleapis/googleapis-gen@b627aae Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjYyN2FhZWIzYWZhZmU3ZDk0ZDYwOTlhMmQxOTQ1YWE5YjRkYWRhZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ee88ea4 commit 9370ecf

File tree

1 file changed

+4
-0
lines changed
  • packages/google-cloud-documentai/google/cloud/documentai_v1beta2/types

1 file changed

+4
-0
lines changed

packages/google-cloud-documentai/google/cloud/documentai_v1beta2/types/document.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ class TextAnchor(proto.Message):
673673
text_segments (Sequence[google.cloud.documentai_v1beta2.types.Document.TextAnchor.TextSegment]):
674674
The text segments from the
675675
[Document.text][google.cloud.documentai.v1beta2.Document.text].
676+
content (str):
677+
Contains the content of the text span so that users do not
678+
have to look it up in the text_segments.
676679
"""
677680

678681
class TextSegment(proto.Message):
@@ -699,6 +702,7 @@ class TextSegment(proto.Message):
699702
text_segments = proto.RepeatedField(
700703
proto.MESSAGE, number=1, message="Document.TextAnchor.TextSegment",
701704
)
705+
content = proto.Field(proto.STRING, number=2,)
702706

703707
class PageAnchor(proto.Message):
704708
r"""Referencing elements in

0 commit comments

Comments
 (0)
0