#[non_exhaustive]pub struct DocumentClassifierInputDataConfig {
pub data_format: Option<DocumentClassifierDataFormat>,
pub s3_uri: Option<String>,
pub test_s3_uri: Option<String>,
pub label_delimiter: Option<String>,
pub augmented_manifests: Option<Vec<AugmentedManifestsListItem>>,
}Expand description
The input properties for training a document classifier.
For more information on how the input file is formatted, see how-document-classification-training-data.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data_format: Option<DocumentClassifierDataFormat>The format of your training data:
-
COMPREHEND_CSV: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide theS3Uriparameter in your request. -
AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels.If you use this value, you must provide the
AugmentedManifestsparameter in your request.
If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
s3_uri: Option<String>The Amazon S3 URI for the input data. The S3 bucket must be in the same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.
For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.
This parameter is required if you set DataFormat to COMPREHEND_CSV.
test_s3_uri: Option<String>The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the same AWS Region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.
label_delimiter: Option<String>Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (|). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL.
augmented_manifests: Option<Vec<AugmentedManifestsListItem>>A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
Implementations
sourceimpl DocumentClassifierInputDataConfig
impl DocumentClassifierInputDataConfig
sourcepub fn data_format(&self) -> Option<&DocumentClassifierDataFormat>
pub fn data_format(&self) -> Option<&DocumentClassifierDataFormat>
The format of your training data:
-
COMPREHEND_CSV: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide theS3Uriparameter in your request. -
AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels.If you use this value, you must provide the
AugmentedManifestsparameter in your request.
If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
sourcepub fn s3_uri(&self) -> Option<&str>
pub fn s3_uri(&self) -> Option<&str>
The Amazon S3 URI for the input data. The S3 bucket must be in the same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.
For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.
This parameter is required if you set DataFormat to COMPREHEND_CSV.
sourcepub fn test_s3_uri(&self) -> Option<&str>
pub fn test_s3_uri(&self) -> Option<&str>
The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the same AWS Region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files.
sourcepub fn label_delimiter(&self) -> Option<&str>
pub fn label_delimiter(&self) -> Option<&str>
Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (|). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL.
sourcepub fn augmented_manifests(&self) -> Option<&[AugmentedManifestsListItem]>
pub fn augmented_manifests(&self) -> Option<&[AugmentedManifestsListItem]>
A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
sourceimpl DocumentClassifierInputDataConfig
impl DocumentClassifierInputDataConfig
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DocumentClassifierInputDataConfig
Trait Implementations
sourceimpl Clone for DocumentClassifierInputDataConfig
impl Clone for DocumentClassifierInputDataConfig
sourcefn clone(&self) -> DocumentClassifierInputDataConfig
fn clone(&self) -> DocumentClassifierInputDataConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl PartialEq<DocumentClassifierInputDataConfig> for DocumentClassifierInputDataConfig
impl PartialEq<DocumentClassifierInputDataConfig> for DocumentClassifierInputDataConfig
sourcefn eq(&self, other: &DocumentClassifierInputDataConfig) -> bool
fn eq(&self, other: &DocumentClassifierInputDataConfig) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DocumentClassifierInputDataConfig) -> bool
fn ne(&self, other: &DocumentClassifierInputDataConfig) -> bool
This method tests for !=.
impl StructuralPartialEq for DocumentClassifierInputDataConfig
Auto Trait Implementations
impl RefUnwindSafe for DocumentClassifierInputDataConfig
impl Send for DocumentClassifierInputDataConfig
impl Sync for DocumentClassifierInputDataConfig
impl Unpin for DocumentClassifierInputDataConfig
impl UnwindSafe for DocumentClassifierInputDataConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more