Reference documentation and code samples for the Cloud AutoML V1 API module Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType.
The type of TextSegment in the context of the original document.
Constants
TEXT_SEGMENT_TYPE_UNSPECIFIED
value: 0 Should not be used.
TOKEN
value: 1 The text segment is a token. e.g. word.
PARAGRAPH
value: 2 The text segment is a paragraph.
FORM_FIELD
value: 3 The text segment is a form field.
FORM_FIELD_NAME
value: 4 The text segment is the name part of a form field. It will be treated
as child of another FORM_FIELD TextSegment if its span is subspan of
another TextSegment with type FORM_FIELD.
FORM_FIELD_CONTENTS
value: 5 The text segment is the text content part of a form field. It will be
treated as child of another FORM_FIELD TextSegment if its span is
subspan of another TextSegment with type FORM_FIELD.
TABLE
value: 6 The text segment is a whole table, including headers, and all rows.
TABLE_HEADER
value: 7 The text segment is a table's headers. It will be treated as child of
another TABLE TextSegment if its span is subspan of another TextSegment
with type TABLE.
TABLE_ROW
value: 8 The text segment is a row in table. It will be treated as child of
another TABLE TextSegment if its span is subspan of another TextSegment
with type TABLE.
TABLE_CELL
value: 9 The text segment is a cell in table. It will be treated as child of
another TABLE_ROW TextSegment if its span is subspan of another
TextSegment with type TABLE_ROW.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud AutoML V1 API - Module Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType (v1.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.1 (latest)](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [1.3.0](/ruby/docs/reference/google-cloud-automl-v1/1.3.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [1.2.1](/ruby/docs/reference/google-cloud-automl-v1/1.2.1/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [1.1.0](/ruby/docs/reference/google-cloud-automl-v1/1.1.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [1.0.1](/ruby/docs/reference/google-cloud-automl-v1/1.0.1/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.10.0](/ruby/docs/reference/google-cloud-automl-v1/0.10.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.9.2](/ruby/docs/reference/google-cloud-automl-v1/0.9.2/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.8.0](/ruby/docs/reference/google-cloud-automl-v1/0.8.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.7.0](/ruby/docs/reference/google-cloud-automl-v1/0.7.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.6.0](/ruby/docs/reference/google-cloud-automl-v1/0.6.0/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.5.1](/ruby/docs/reference/google-cloud-automl-v1/0.5.1/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)\n- [0.4.8](/ruby/docs/reference/google-cloud-automl-v1/0.4.8/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType) \nReference documentation and code samples for the Cloud AutoML V1 API module Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType.\n\nThe type of TextSegment in the context of the original document.\n\nConstants\n---------\n\n### TEXT_SEGMENT_TYPE_UNSPECIFIED\n\n**value:** 0 \nShould not be used.\n\n### TOKEN\n\n**value:** 1 \nThe text segment is a token. e.g. word.\n\n### PARAGRAPH\n\n**value:** 2 \nThe text segment is a paragraph.\n\n### FORM_FIELD\n\n**value:** 3 \nThe text segment is a form field.\n\n### FORM_FIELD_NAME\n\n**value:** 4 \nThe text segment is the name part of a form field. It will be treated\nas child of another FORM_FIELD TextSegment if its span is subspan of\nanother TextSegment with type FORM_FIELD.\n\n### FORM_FIELD_CONTENTS\n\n**value:** 5 \nThe text segment is the text content part of a form field. It will be\ntreated as child of another FORM_FIELD TextSegment if its span is\nsubspan of another TextSegment with type FORM_FIELD.\n\n### TABLE\n\n**value:** 6 \nThe text segment is a whole table, including headers, and all rows.\n\n### TABLE_HEADER\n\n**value:** 7 \nThe text segment is a table's headers. It will be treated as child of\nanother TABLE TextSegment if its span is subspan of another TextSegment\nwith type TABLE.\n\n### TABLE_ROW\n\n**value:** 8 \nThe text segment is a row in table. It will be treated as child of\nanother TABLE TextSegment if its span is subspan of another TextSegment\nwith type TABLE.\n\n### TABLE_CELL\n\n**value:** 9 \nThe text segment is a cell in table. It will be treated as child of\nanother TABLE_ROW TextSegment if its span is subspan of another\nTextSegment with type TABLE_ROW."]]