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.



11796
11797
11798
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11796

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)


11776
11777
11778
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11776

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)


11781
11782
11783
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11781

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)


11786
11787
11788
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11786

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)


11793
11794
11795
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11793

def semantic_chunking_group_size
  @semantic_chunking_group_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11801
11802
11803
11804
11805
11806
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 11801

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