SegmentSettings
public struct SegmentSettings : Codable, Equatable
A list of Document Segmentation settings.
-
Enables/disables the Document Segmentation feature.
Declaration
Swift
public var enabled: Bool? -
Defines the heading level that splits into document segments. Valid values are h1, h2, h3, h4, h5, h6. The content of the header field that the segmentation splits at is used as the title field for that segmented result. Only valid if used with a collection that has enabled set to
falsein the smart_document_understanding object.Declaration
Swift
public var selectorTags: [String]? -
Defines the annotated smart document understanding fields that the document is split on. The content of the annotated field that the segmentation splits at is used as the title field for that segmented result. For example, if the field
sub-titleis specified, when a document is uploaded each time the smart documement understanding conversion encounters a field of typesub-titlethe document is split at that point and the content of the field used as the title of the remaining content. Thnis split is performed for all instances of the listed fields in the uploaded document. Only valid if used with a collection that has enabled set totruein the smart_document_understanding object.Declaration
Swift
public var annotatedFields: [String]? -
Initialize a
SegmentSettingswith member variables.Declaration
Swift
public init( enabled: Bool? = nil, selectorTags: [String]? = nil, annotatedFields: [String]? = nil )Parameters
enabledEnables/disables the Document Segmentation feature.
selectorTagsDefines the heading level that splits into document segments. Valid values are h1, h2, h3, h4, h5, h6. The content of the header field that the segmentation splits at is used as the title field for that segmented result. Only valid if used with a collection that has enabled set to
falsein the smart_document_understanding object.annotatedFieldsDefines the annotated smart document understanding fields that the document is split on. The content of the annotated field that the segmentation splits at is used as the title field for that segmented result. For example, if the field
sub-titleis specified, when a document is uploaded each time the smart documement understanding conversion encounters a field of typesub-titlethe document is split at that point and the content of the field used as the title of the remaining content. Thnis split is performed for all instances of the listed fields in the uploaded document. Only valid if used with a collection that has enabled set totruein the smart_document_understanding object.Return Value
An initialized
SegmentSettings.
View on GitHub
SegmentSettings Structure Reference