Class: AWSCDK::Comprehend::CfnDocumentClassifier::AugmentedManifestsListItemProperty

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

Overview

An augmented manifest file that provides training data for your custom model.

An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_names:, s3_uri:, split: nil) ⇒ AugmentedManifestsListItemProperty

Returns a new instance of AugmentedManifestsListItemProperty.

Parameters:

  • attribute_names (Array<String>)

    The JSON attribute that contains the annotations for your training documents.

  • s3_uri (String)

    The Amazon S3 location of the augmented manifest file.

  • split (String, nil) (defaults to: nil)

    The purpose of the data you've provided in the augmented manifest.



669
670
671
672
673
674
675
676
# File 'comprehend/cfn_document_classifier.rb', line 669

def initialize(attribute_names:, s3_uri:, split: nil)
  @attribute_names = attribute_names
  Jsii::Type.check_type(@attribute_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "attributeNames")
  @s3_uri = s3_uri
  Jsii::Type.check_type(@s3_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3Uri")
  @split = split
  Jsii::Type.check_type(@split, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "split") unless @split.nil?
end

Instance Attribute Details

#attribute_namesArray<String> (readonly)

The JSON attribute that contains the annotations for your training documents.

The number of attribute names that you specify depends on whether your augmented manifest file is the output of a single labeling job or a chained labeling job.

If your file is the output of a single labeling job, specify the LabelAttributeName key that was used when the job was created in Ground Truth.

If your file is the output of a chained labeling job, specify the LabelAttributeName key for one or more jobs in the chain. Each LabelAttributeName key provides the annotations from an individual job.



688
689
690
# File 'comprehend/cfn_document_classifier.rb', line 688

def attribute_names
  @attribute_names
end

#s3_uriString (readonly)

The Amazon S3 location of the augmented manifest file.



693
694
695
# File 'comprehend/cfn_document_classifier.rb', line 693

def s3_uri
  @s3_uri
end

#splitString? (readonly)

The purpose of the data you've provided in the augmented manifest.

You can either train or test this data. If you don't specify, the default is train.

TRAIN - all of the documents in the manifest will be used for training. If no test documents are provided, Amazon Comprehend will automatically reserve a portion of the training documents for testing.

TEST - all of the documents in the manifest will be used for testing.



704
705
706
# File 'comprehend/cfn_document_classifier.rb', line 704

def split
  @split
end

Class Method Details

.jsii_propertiesObject



706
707
708
709
710
711
712
# File 'comprehend/cfn_document_classifier.rb', line 706

def self.jsii_properties
  {
    :attribute_names => "attributeNames",
    :s3_uri => "s3Uri",
    :split => "split",
  }
end

Instance Method Details

#to_jsiiObject



714
715
716
717
718
719
720
721
722
# File 'comprehend/cfn_document_classifier.rb', line 714

def to_jsii
  result = {}
  result.merge!({
    "attributeNames" => @attribute_names,
    "s3Uri" => @s3_uri,
    "split" => @split,
  })
  result.compact
end