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

Commit f8b3e05

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: https://github.com/googleapis/googleapis-gen/commit/b627aaeb3afafe7d94d6099a2d1945aa9b4dadad 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 3619d97 commit f8b3e05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)