Class: AWSCDK::Comprehend::CfnFlywheel::DocumentClassificationConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
comprehend/cfn_flywheel.rb

Overview

Configuration required for a document classification model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode:, labels: nil) ⇒ DocumentClassificationConfigProperty

Returns a new instance of DocumentClassificationConfigProperty.

Parameters:

  • mode (String)

    Classification mode indicates whether the documents are MULTI_CLASS or MULTI_LABEL .

  • labels (Array<String>, nil) (defaults to: nil)

    One or more labels to associate with the custom classifier.



691
692
693
694
695
696
# File 'comprehend/cfn_flywheel.rb', line 691

def initialize(mode:, labels: nil)
  @mode = mode
  Jsii::Type.check_type(@mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode")
  @labels = labels
  Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "labels") unless @labels.nil?
end

Instance Attribute Details

#labelsArray<String>? (readonly)

One or more labels to associate with the custom classifier.



707
708
709
# File 'comprehend/cfn_flywheel.rb', line 707

def labels
  @labels
end

#modeString (readonly)

Classification mode indicates whether the documents are MULTI_CLASS or MULTI_LABEL .



702
703
704
# File 'comprehend/cfn_flywheel.rb', line 702

def mode
  @mode
end

Class Method Details

.jsii_propertiesObject



709
710
711
712
713
714
# File 'comprehend/cfn_flywheel.rb', line 709

def self.jsii_properties
  {
    :mode => "mode",
    :labels => "labels",
  }
end

Instance Method Details

#to_jsiiObject



716
717
718
719
720
721
722
723
# File 'comprehend/cfn_flywheel.rb', line 716

def to_jsii
  result = {}
  result.merge!({
    "mode" => @mode,
    "labels" => @labels,
  })
  result.compact
end