Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessOptionsLayoutConfigChunkingConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta3/classes.rb,
lib/google/apis/documentai_v1beta3/representations.rb,
lib/google/apis/documentai_v1beta3/representations.rb

Overview

Serving config for chunking.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3ProcessOptionsLayoutConfigChunkingConfig

Returns a new instance of GoogleCloudDocumentaiV1beta3ProcessOptionsLayoutConfigChunkingConfig.



10962
10963
10964
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10962

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#breakpoint_percentile_thresholdFixnum

Optional. The percentile of cosine dissimilarity that must be exceeded between a group of tokens and the next. The smaller this number is, the more chunks will be generated. Corresponds to the JSON property breakpointPercentileThreshold

Returns:

  • (Fixnum)


10942
10943
10944
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10942

def breakpoint_percentile_threshold
  @breakpoint_percentile_threshold
end

#chunk_sizeFixnum

Optional. The chunk sizes to use when splitting documents, in order of level. Corresponds to the JSON property chunkSize

Returns:

  • (Fixnum)


10947
10948
10949
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10947

def chunk_size
  @chunk_size
end

#include_ancestor_headingsBoolean Also known as: include_ancestor_headings?

Optional. Whether or not to include ancestor headings when splitting. Corresponds to the JSON property includeAncestorHeadings

Returns:

  • (Boolean)


10952
10953
10954
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10952

def include_ancestor_headings
  @include_ancestor_headings
end

#semantic_chunking_group_sizeBoolean Also known as: semantic_chunking_group_size?

Optional. The number of tokens to group together when evaluating semantic similarity. Corresponds to the JSON property semanticChunkingGroupSize

Returns:

  • (Boolean)


10959
10960
10961
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10959

def semantic_chunking_group_size
  @semantic_chunking_group_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10967
10968
10969
10970
10971
10972
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10967

def update!(**args)
  @breakpoint_percentile_threshold = args[:breakpoint_percentile_threshold] if args.key?(:breakpoint_percentile_threshold)
  @chunk_size = args[:chunk_size] if args.key?(:chunk_size)
  @include_ancestor_headings = args[:include_ancestor_headings] if args.key?(:include_ancestor_headings)
  @semantic_chunking_group_size = args[:semantic_chunking_group_size] if args.key?(:semantic_chunking_group_size)
end